handsontable 17.1.0-rc13 → 17.1.0-rc15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -1
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/dist/handsontable.full.js +6 -6
- package/dist/handsontable.full.min.js +5 -5
- package/dist/handsontable.js +6 -6
- package/dist/handsontable.min.js +5 -5
- package/dist/themes/classic.js +2 -2
- package/dist/themes/classic.min.js +2 -2
- package/dist/themes/horizon.js +2 -2
- package/dist/themes/horizon.min.js +2 -2
- package/dist/themes/main.js +2 -2
- package/dist/themes/main.min.js +2 -2
- package/dist/themes/static/variables/colors/ant.js +2 -2
- package/dist/themes/static/variables/colors/ant.min.js +2 -2
- package/dist/themes/static/variables/colors/classic.js +2 -2
- package/dist/themes/static/variables/colors/classic.min.js +2 -2
- package/dist/themes/static/variables/colors/horizon.js +2 -2
- package/dist/themes/static/variables/colors/horizon.min.js +2 -2
- package/dist/themes/static/variables/colors/main.js +2 -2
- package/dist/themes/static/variables/colors/main.min.js +2 -2
- package/dist/themes/static/variables/colors/material.js +2 -2
- package/dist/themes/static/variables/colors/material.min.js +2 -2
- package/dist/themes/static/variables/colors/shadcn.js +2 -2
- package/dist/themes/static/variables/colors/shadcn.min.js +2 -2
- package/dist/themes/static/variables/density.js +2 -2
- package/dist/themes/static/variables/density.min.js +2 -2
- package/dist/themes/static/variables/helpers/iconsMap.js +2 -2
- package/dist/themes/static/variables/helpers/iconsMap.min.js +2 -2
- package/dist/themes/static/variables/icons/horizon.js +2 -2
- package/dist/themes/static/variables/icons/horizon.min.js +2 -2
- package/dist/themes/static/variables/icons/main.js +2 -2
- package/dist/themes/static/variables/icons/main.min.js +2 -2
- package/dist/themes/static/variables/sizing.js +2 -2
- package/dist/themes/static/variables/sizing.min.js +2 -2
- package/dist/themes/static/variables/tokens/classic.js +2 -2
- package/dist/themes/static/variables/tokens/classic.min.js +2 -2
- package/dist/themes/static/variables/tokens/horizon.js +2 -2
- package/dist/themes/static/variables/tokens/horizon.min.js +2 -2
- package/dist/themes/static/variables/tokens/main.js +2 -2
- package/dist/themes/static/variables/tokens/main.min.js +2 -2
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/styles/handsontable.css +2 -2
- package/styles/handsontable.min.css +2 -2
- package/styles/handsontableStyles.js +1 -1
- package/styles/handsontableStyles.mjs +1 -1
- package/styles/ht-icons-horizon.min.css +2 -2
- package/styles/ht-icons-main.min.css +2 -2
- package/styles/ht-theme-classic-no-icons.min.css +2 -2
- package/styles/ht-theme-classic.min.css +2 -2
- package/styles/ht-theme-horizon-no-icons.min.css +2 -2
- package/styles/ht-theme-horizon.min.css +2 -2
- package/styles/ht-theme-main-no-icons.min.css +2 -2
- package/styles/ht-theme-main.min.css +2 -2
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
|
27
27
|
*
|
|
28
|
-
* Version: 17.1.0-
|
|
29
|
-
* Release date: 19/05/2026 (built at 19/05/2026
|
|
28
|
+
* Version: 17.1.0-rc15
|
|
29
|
+
* Release date: 19/05/2026 (built at 19/05/2026 08:00:12)
|
|
30
30
|
*/
|
|
31
31
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Handsontable",[],t):"object"==typeof exports?exports.Handsontable=t():e.Handsontable=t()}("u">typeof self?self:this,()=>(()=>{var e={5962(){},5109(){},549(){},36(){},2981(){},6634(){},2863(){},7513(){},4070(){},3374(){},5720(){},3538(){},1872(){},3252(){},2153(){},2666(){},2509(){},8158(){},2109(){},763(){},5320(){},4501(){},9102(){},2474(){},8636(){},2770(){},2943(){},3788(){},9813(){},8207(){},3686(){},1181(){},2822(){},2732(){},3455(){},3453(){},2069(){},1375(){},7859(){},5766(){},8465(){},5092(){},6539(){},7072(){},4216(){},2334(){},350(){},7278(){},7797(){},6329(){},152(){},9577(){},1094(){},4078(){},2527(){},9744(){},469(){},5590(){},514(){},4103(){},1238(){},3745(){},7320(){},7437(){},6258(){},1384(){},7772(){},8921(){},6229(){},2443(){},433(){},296(){},4911(){},6802(){},745(){},7085(){},1219(){},56(){},2169(){},3367(){},403(){},9951(){},8881(){},1860(){},5742(){},6602(){},6036(){},6089(){},556(){},4271(){},9329(){},1812(){},7005(){},355(){},8949(){},2661(){},9491(){},4101(){},678(){},4605(){},698(){},7464(){},594(){},8225(){},1957(){},6467(){},6426(){},2093(){},4203(){},7508(){},6779(){},4888(){},9247(){},8382(){},1266(){},8356(){},5032(){},7317(){},620(){},6018(){},9373(){},1787(){},3775(){},1784(){},9160(){},5555(){},5081(){},866(){},4874(){},8282(){},664(){},1292(){},7577(){},9949(){},1937(){},5876(){},4057(){},7539(e,t,r){e=r.nmd(e),e.exports=function(){"use strict";function t(){return z.apply(null,arguments)}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){var t;if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(t in e)if(i(e,t))return!1;return!0}function a(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var r,n=[],o=e.length;for(r=0;r<o;++r)n.push(t(e[r],r));return n}function u(e,t){for(var r in t)i(t,r)&&(e[r]=t[r]);return i(t,"toString")&&(e.toString=t.toString),i(t,"valueOf")&&(e.valueOf=t.valueOf),e}function c(e,t,r,n){return ts(e,t,r,n,!0).utc()}function g(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 p(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());return(n&&(t=g(e),r=W.call(t.parsedDateParts,function(e){return null!=e}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e))?n:(e._isValid=n,e._isValid)}function m(e){var t=c(NaN);return null!=e?u(g(t),e):g(t).userInvalidated=!0,t}W=Array.prototype.some?Array.prototype.some:function(e){var t,r=Object(this),n=r.length>>>0;for(t=0;t<n;t++)if(t in r&&e.call(this,r[t],t,r))return!0;return!1};var f,y,b=t.momentProperties=[],C=!1;function w(e,t){var r,n,o,i=b.length;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=g(t)),a(t._locale)||(e._locale=t._locale),i>0)for(r=0;r<i;r++)a(o=t[n=b[r]])||(e[n]=o);return e}function S(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===C&&(C=!0,t.updateOffset(this),C=!1)}function R(e){return e instanceof S||null!=e&&null!=e._isAMomentObject}function E(e){!1===t.suppressDeprecationWarnings&&"u">typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,r){var n=!0;return u(function(){if(null!=t.deprecationHandler&&t.deprecationHandler(null,e),n){var o,s,a,l=[],h=arguments.length;for(s=0;s<h;s++){if(o="","object"==typeof arguments[s]){for(a in o+="\n["+s+"] ",arguments[0])i(arguments[0],a)&&(o+=a+": "+arguments[0][a]+", ");o=o.slice(0,-2)}else o=arguments[s];l.push(o)}E(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+Error().stack),n=!1}return r.apply(this,arguments)},r)}var A={};function M(e,r){null!=t.deprecationHandler&&t.deprecationHandler(e,r),A[e]||(E(r),A[e]=!0)}function N(e){return"u">typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function I(e,t){var r,n=u({},e);for(r in t)i(t,r)&&(o(e[r])&&o(t[r])?(n[r]={},u(n[r],e[r]),u(n[r],t[r])):null!=t[r]?n[r]=t[r]:delete n[r]);for(r in e)i(e,r)&&!i(t,r)&&o(e[r])&&(n[r]=u({},n[r]));return n}function x(e){null!=e&&this.set(e)}function O(e,t,r){var n=""+Math.abs(e);return(e>=0?r?"+":"":"-")+Math.pow(10,Math.max(0,t-n.length)).toString().substr(1)+n}t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;var _=/(\[[^\[]*\])|(\\)?([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,k=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,H={},L={};function P(e,t,r,n){var o=n;"string"==typeof n&&(o=function(){return this[n]()}),e&&(L[e]=o),t&&(L[t[0]]=function(){return O(o.apply(this,arguments),t[1],t[2])}),r&&(L[r]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function D(e,t){return e.isValid()?(H[t=F(t,e.localeData())]=H[t]||function(e){var t,r,n,o=e.match(_);for(r=0,n=o.length;r<n;r++)L[o[r]]?o[r]=L[o[r]]:o[r]=(t=o[r]).match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"");return function(t){var r,i="";for(r=0;r<n;r++)i+=N(o[r])?o[r].call(t,e):o[r];return i}}(t),H[t](e)):e.localeData().invalidDate()}function F(e,t){var r=5;function n(e){return t.longDateFormat(e)||e}for(k.lastIndex=0;r>=0&&k.test(e);)e=e.replace(k,n),k.lastIndex=0,r-=1;return e}var B={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?B[e]||B[e.toLowerCase()]:void 0}function U(e){var t,r,n={};for(r in e)i(e,r)&&(t=V(r))&&(n[t]=e[r]);return n}var z,W,G,$={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},Y=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)i(e,t)&&r.push(t);return r},j=/\d/,q=/\d\d/,K=/\d{3}/,X=/\d{4}/,Q=/[+-]?\d{6}/,Z=/\d\d?/,J=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,et=/\d{1,3}/,er=/\d{1,4}/,en=/[+-]?\d{1,6}/,eo=/\d+/,ei=/[+-]?\d+/,es=/Z|[+-]\d\d:?\d\d/gi,ea=/Z|[+-]\d\d(?::?\d\d)?/gi,el=/[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,eh=/^[1-9]\d?/,ed=/^([1-9]\d|\d)/;function eu(e,t,r){G[e]=N(t)?t:function(e,n){return e&&r?r:t}}function ec(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function eg(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ep(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=eg(t)),r}G={};var em={};function ef(e,t){var r,n,o=t;for("string"==typeof e&&(e=[e]),l(t)&&(o=function(e,r){r[t]=ep(e)}),n=e.length,r=0;r<n;r++)em[e[r]]=o}function ey(e,t){ef(e,function(e,r,n,o){n._w=n._w||{},t(e,n._w,n,o)})}function eb(e){return e%4==0&&e%100!=0||e%400==0}function eC(e){return eb(e)?366:365}P("Y",0,0,function(){var e=this.year();return e<=9999?O(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"),eu("Y",ei),eu("YY",Z,q),eu("YYYY",er,X),eu("YYYYY",en,Q),eu("YYYYYY",en,Q),ef(["YYYYY","YYYYYY"],0),ef("YYYY",function(e,r){r[0]=2===e.length?t.parseTwoDigitYear(e):ep(e)}),ef("YY",function(e,r){r[0]=t.parseTwoDigitYear(e)}),ef("Y",function(e,t){t[0]=parseInt(e,10)}),t.parseTwoDigitYear=function(e){return ep(e)+(ep(e)>68?1900:2e3)};var ew=eS("FullYear",!0);function eS(e,r){return function(n){return null!=n?(eR(this,e,n),t.updateOffset(this,r),this):ev(this,e)}}function ev(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function eR(e,t,r){var n,o,i,s;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(o?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(o?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(o?n.setUTCHours(r):n.setHours(r));case"Date":return void(o?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}i=e.month(),s=29!==(s=e.date())||1!==i||eb(r)?s:28,o?n.setUTCFullYear(r,i,s):n.setFullYear(r,i,s)}}function eE(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=(t%12+12)%12;return e+=(t-r)/12,1===r?eb(e)?29:28:31-r%7%2}eG=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)}),eu("M",Z,eh),eu("MM",Z,q),eu("MMM",function(e,t){return t.monthsShortRegex(e)}),eu("MMMM",function(e,t){return t.monthsRegex(e)}),ef(["M","MM"],function(e,t){t[1]=ep(e)-1}),ef(["MMM","MMMM"],function(e,t,r,n){var o=r._locale.monthsParse(e,n,r._strict);null!=o?t[1]=o:g(r).invalidMonth=e});var eT="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),eA=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;function eM(e,t,r){var n,o,i,s=e.toLocaleLowerCase();if(!this._monthsParse)for(n=0,this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[];n<12;++n)i=c([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(i,"").toLocaleLowerCase();if(r)if("MMM"===t)return -1!==(o=eG.call(this._shortMonthsParse,s))?o:null;else return -1!==(o=eG.call(this._longMonthsParse,s))?o:null;return"MMM"===t?-1!==(o=eG.call(this._shortMonthsParse,s))||-1!==(o=eG.call(this._longMonthsParse,s))?o:null:-1!==(o=eG.call(this._longMonthsParse,s))||-1!==(o=eG.call(this._shortMonthsParse,s))?o:null}function eN(e,t){if(!e.isValid())return e;if("string"==typeof t){if(/^\d+$/.test(t))t=ep(t);else if(!l(t=e.localeData().monthsParse(t)))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,eE(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function eI(e){return null!=e?(eN(this,e),t.updateOffset(this,!0),this):ev(this,"Month")}function ex(){function e(e,t){return t.length-e.length}var t,r,n,o,i=[],s=[],a=[];for(t=0;t<12;t++)r=c([2e3,t]),n=ec(this.monthsShort(r,"")),o=ec(this.months(r,"")),i.push(n),s.push(o),a.push(o),a.push(n);i.sort(e),s.sort(e),a.sort(e),this._monthsRegex=RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=RegExp("^("+i.join("|")+")","i")}function eO(e,t,r,n,o,i,s){var a;return e<100&&e>=0?isFinite((a=new Date(e+400,t,r,n,o,i,s)).getFullYear())&&a.setFullYear(e):a=new Date(e,t,r,n,o,i,s),a}function e_(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,isFinite((t=new Date(Date.UTC.apply(null,r))).getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ek(e,t,r){var n=7+t-r;return-((7+e_(e,0,n).getUTCDay()-t)%7)+n-1}function eH(e,t,r,n,o){var i,s,a=1+7*(t-1)+(7+r-n)%7+ek(e,n,o);return a<=0?s=eC(i=e-1)+a:a>eC(e)?(i=e+1,s=a-eC(e)):(i=e,s=a),{year:i,dayOfYear:s}}function eL(e,t,r){var n,o,i=ek(e.year(),t,r),s=Math.floor((e.dayOfYear()-i-1)/7)+1;return s<1?n=s+eP(o=e.year()-1,t,r):s>eP(e.year(),t,r)?(n=s-eP(e.year(),t,r),o=e.year()+1):(o=e.year(),n=s),{week:n,year:o}}function eP(e,t,r){var n=ek(e,t,r),o=ek(e+1,t,r);return(eC(e)-n+o)/7}function eD(e,t){return e.slice(t,7).concat(e.slice(0,t))}P("w",["ww",2],"wo","week"),P("W",["WW",2],"Wo","isoWeek"),eu("w",Z,eh),eu("ww",Z,q),eu("W",Z,eh),eu("WW",Z,q),ey(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=ep(e)}),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"),eu("d",Z),eu("e",Z),eu("E",Z),eu("dd",function(e,t){return t.weekdaysMinRegex(e)}),eu("ddd",function(e,t){return t.weekdaysShortRegex(e)}),eu("dddd",function(e,t){return t.weekdaysRegex(e)}),ey(["dd","ddd","dddd"],function(e,t,r,n){var o=r._locale.weekdaysParse(e,n,r._strict);null!=o?t.d=o:g(r).invalidWeekday=e}),ey(["d","e","E"],function(e,t,r,n){t[n]=ep(e)});var eF="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");function eB(e,t,r){var n,o,i,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(n=0,this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[];n<7;++n)i=c([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();if(r)if("dddd"===t)return -1!==(o=eG.call(this._weekdaysParse,s))?o:null;else if("ddd"===t)return -1!==(o=eG.call(this._shortWeekdaysParse,s))?o:null;else return -1!==(o=eG.call(this._minWeekdaysParse,s))?o:null;return"dddd"===t?-1!==(o=eG.call(this._weekdaysParse,s))||-1!==(o=eG.call(this._shortWeekdaysParse,s))||-1!==(o=eG.call(this._minWeekdaysParse,s))?o:null:"ddd"===t?-1!==(o=eG.call(this._shortWeekdaysParse,s))||-1!==(o=eG.call(this._weekdaysParse,s))||-1!==(o=eG.call(this._minWeekdaysParse,s))?o:null:-1!==(o=eG.call(this._minWeekdaysParse,s))||-1!==(o=eG.call(this._weekdaysParse,s))||-1!==(o=eG.call(this._shortWeekdaysParse,s))?o:null}function eV(){function e(e,t){return t.length-e.length}var t,r,n,o,i,s=[],a=[],l=[],h=[];for(t=0;t<7;t++)r=c([2e3,1]).day(t),n=ec(this.weekdaysMin(r,"")),o=ec(this.weekdaysShort(r,"")),i=ec(this.weekdays(r,"")),s.push(n),a.push(o),l.push(i),h.push(n),h.push(o),h.push(i);s.sort(e),a.sort(e),l.sort(e),h.sort(e),this._weekdaysRegex=RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=RegExp("^("+s.join("|")+")","i")}function eU(){return this.hours()%12||12}function ez(e,t){P(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function eW(e,t){return t._meridiemParse}P("H",["HH",2],0,"hour"),P("h",["hh",2],0,eU),P("k",["kk",2],0,function(){return this.hours()||24}),P("hmm",0,0,function(){return""+eU.apply(this)+O(this.minutes(),2)}),P("hmmss",0,0,function(){return""+eU.apply(this)+O(this.minutes(),2)+O(this.seconds(),2)}),P("Hmm",0,0,function(){return""+this.hours()+O(this.minutes(),2)}),P("Hmmss",0,0,function(){return""+this.hours()+O(this.minutes(),2)+O(this.seconds(),2)}),ez("a",!0),ez("A",!1),eu("a",eW),eu("A",eW),eu("H",Z,ed),eu("h",Z,eh),eu("k",Z,eh),eu("HH",Z,q),eu("hh",Z,q),eu("kk",Z,q),eu("hmm",J),eu("hmmss",ee),eu("Hmm",J),eu("Hmmss",ee),ef(["H","HH"],3),ef(["k","kk"],function(e,t,r){var n=ep(e);t[3]=24===n?0:n}),ef(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),ef(["h","hh"],function(e,t,r){t[3]=ep(e),g(r).bigHour=!0}),ef("hmm",function(e,t,r){var n=e.length-2;t[3]=ep(e.substr(0,n)),t[4]=ep(e.substr(n)),g(r).bigHour=!0}),ef("hmmss",function(e,t,r){var n=e.length-4,o=e.length-2;t[3]=ep(e.substr(0,n)),t[4]=ep(e.substr(n,2)),t[5]=ep(e.substr(o)),g(r).bigHour=!0}),ef("Hmm",function(e,t,r){var n=e.length-2;t[3]=ep(e.substr(0,n)),t[4]=ep(e.substr(n))}),ef("Hmmss",function(e,t,r){var n=e.length-4,o=e.length-2;t[3]=ep(e.substr(0,n)),t[4]=ep(e.substr(n,2)),t[5]=ep(e.substr(o))});var eG,e$,eY=eS("Hours",!0),ej={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:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:eT,week:{dow:0,doy:6},weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysShort:eF,meridiemParse:/[ap]\.?m?\.?/i},eq={},eK={};function eX(e){return e?e.toLowerCase().replace("_","-"):e}function eQ(t){var n=null;if(void 0===eq[t]&&e&&e.exports&&t&&t.match("^[^/\\\\]*$"))try{n=e$._abbr,r(3398)("./"+t),eZ(n)}catch(e){eq[t]=null}return eq[t]}function eZ(e,t){var r;return e&&((r=a(t)?e0(e):eJ(e,t))?e$=r:"u">typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),e$._abbr}function eJ(e,t){if(null===t)return delete eq[e],null;var r,n=ej;if(t.abbr=e,null!=eq[e])M("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."),n=eq[e]._config;else if(null!=t.parentLocale)if(null!=eq[t.parentLocale])n=eq[t.parentLocale]._config;else{if(null==(r=eQ(t.parentLocale)))return eK[t.parentLocale]||(eK[t.parentLocale]=[]),eK[t.parentLocale].push({name:e,config:t}),null;n=r._config}return eq[e]=new x(I(n,t)),eK[e]&&eK[e].forEach(function(e){eJ(e.name,e.config)}),eZ(e),eq[e]}function e0(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return e$;if(!n(e)){if(t=eQ(e))return t;e=[e]}return function(e){for(var t,r,n,o,i=0;i<e.length;){for(t=(o=eX(e[i]).split("-")).length,r=(r=eX(e[i+1]))?r.split("-"):null;t>0;){if(n=eQ(o.slice(0,t).join("-")))return n;if(r&&r.length>=t&&function(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}(o,r)>=t-1)break;t--}i++}return e$}(e)}function e1(e){var t,r=e._a;return r&&-2===g(e).overflow&&(t=r[1]<0||r[1]>11?1:r[2]<1||r[2]>eE(r[0],r[1])?2:r[3]<0||r[3]>24||24===r[3]&&(0!==r[4]||0!==r[5]||0!==r[6])?3:r[4]<0||r[4]>59?4:r[5]<0||r[5]>59?5:r[6]<0||r[6]>999?6:-1,g(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),g(e)._overflowWeeks&&-1===t&&(t=7),g(e)._overflowWeekday&&-1===t&&(t=8),g(e).overflow=t),e}var e2=/^\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)?)?$/,e3=/^\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)?)?$/,e6=/Z|[+-]\d\d(?::?\d\d)?/,e4=[["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]],e5=[["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/]],e9=/^\/?Date\((-?\d+)/i,e7=/^(?:(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}))$/,e8={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function te(e){var t,r,n,o,i,s,a=e._i,l=e2.exec(a)||e3.exec(a),h=e4.length,d=e5.length;if(l){for(t=0,g(e).iso=!0,r=h;t<r;t++)if(e4[t][1].exec(l[1])){o=e4[t][0],n=!1!==e4[t][2];break}if(null==o){e._isValid=!1;return}if(l[3]){for(t=0,r=d;t<r;t++)if(e5[t][1].exec(l[3])){i=(l[2]||" ")+e5[t][0];break}if(null==i){e._isValid=!1;return}}if(!n&&null!=i){e._isValid=!1;return}if(l[4])if(e6.exec(l[4]))s="Z";else{e._isValid=!1;return}e._f=o+(i||"")+(s||""),to(e)}else e._isValid=!1}function tt(e){var t,r,n,o,i,s,a,l,h,d,u,c=e7.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){if(i=c[4],s=c[3],a=c[2],l=c[5],h=c[6],d=c[7],u=[(t=parseInt(i,10))<=49?2e3+t:t<=999?1900+t:t,eT.indexOf(s),parseInt(a,10),parseInt(l,10),parseInt(h,10)],d&&u.push(parseInt(d,10)),r=c[1],n=u,o=e,r&&eF.indexOf(r)!==new Date(n[0],n[1],n[2]).getDay()&&(g(o).weekdayMismatch=!0,o._isValid=!1,1))return;e._a=u,e._tzm=function(e,t,r){if(e)return e8[e];if(t)return 0;var n=parseInt(r,10),o=n%100;return(n-o)/100*60+o}(c[8],c[9],c[10]),e._d=e_.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function tr(e,t,r){return null!=e?e:null!=t?t:r}function tn(e){var r,n,o,i,s,a,l,h,d,u,c,p,m,f,y,b,C=[];if(!e._d){for(c=new Date(t.now()),f=e._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()],e._w&&null==e._a[2]&&null==e._a[1]&&(null!=(n=(r=e)._w).GG||null!=n.W||null!=n.E?(a=1,l=4,o=tr(n.GG,r._a[0],eL(ta(),1,4).year),i=tr(n.W,1),((s=tr(n.E,1))<1||s>7)&&(d=!0)):(a=r._locale._week.dow,l=r._locale._week.doy,u=eL(ta(),a,l),o=tr(n.gg,r._a[0],u.year),i=tr(n.w,u.week),null!=n.d?((s=n.d)<0||s>6)&&(d=!0):null!=n.e?(s=n.e+a,(n.e<0||n.e>6)&&(d=!0)):s=a),i<1||i>eP(o,a,l)?g(r)._overflowWeeks=!0:null!=d?g(r)._overflowWeekday=!0:(h=eH(o,i,s,a,l),r._a[0]=h.year,r._dayOfYear=h.dayOfYear)),null!=e._dayOfYear&&(b=tr(e._a[0],f[0]),(e._dayOfYear>eC(b)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),m=e_(b,0,e._dayOfYear),e._a[1]=m.getUTCMonth(),e._a[2]=m.getUTCDate()),p=0;p<3&&null==e._a[p];++p)e._a[p]=C[p]=f[p];for(;p<7;p++)e._a[p]=C[p]=null==e._a[p]?+(2===p):e._a[p];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?e_:eO).apply(null,C),y=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==y&&(g(e).weekdayMismatch=!0)}}function to(e){if(e._f===t.ISO_8601)return void te(e);if(e._f===t.RFC_2822)return void tt(e);e._a=[],g(e).empty=!0;var r,n,o,s,a,l,h,d,u,c,p,m=""+e._i,f=m.length,y=0;for(a=0,p=(h=F(e._f,e._locale).match(_)||[]).length;a<p;a++)if(d=h[a],(l=(m.match(!i(G,d)?new RegExp(ec(d.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,r,n,o){return t||r||n||o}))):G[d](e._strict,e._locale))||[])[0])&&((u=m.substr(0,m.indexOf(l))).length>0&&g(e).unusedInput.push(u),m=m.slice(m.indexOf(l)+l.length),y+=l.length),L[d])l?g(e).empty=!1:g(e).unusedTokens.push(d),null!=l&&i(em,d)&&em[d](l,e._a,e,d);else e._strict&&!l&&g(e).unusedTokens.push(d);g(e).charsLeftOver=f-y,m.length>0&&g(e).unusedInput.push(m),e._a[3]<=12&&!0===g(e).bigHour&&e._a[3]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[3]=(r=e._locale,n=e._a[3],null==(o=e._meridiem)?n:null!=r.meridiemHour?r.meridiemHour(n,o):(null!=r.isPM&&((s=r.isPM(o))&&n<12&&(n+=12),s||12!==n||(n=0)),n)),null!==(c=g(e).era)&&(e._a[0]=e._locale.erasConvertYear(c,e._a[0])),tn(e),e1(e)}function ti(e){var r=e._i,i=e._f;return(e._locale=e._locale||e0(e._l),null===r||void 0===i&&""===r)?m({nullInput:!0}):("string"==typeof r&&(e._i=r=e._locale.preparse(r)),R(r))?new S(e1(r)):(h(r)?e._d=r:n(i)?!function(e){var t,r,n,o,i,s,a=!1,l=e._f.length;if(0===l){g(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;o<l;o++)i=0,s=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],to(t),p(t)&&(s=!0),i+=g(t).charsLeftOver,i+=10*g(t).unusedTokens.length,g(t).score=i,a?i<n&&(n=i,r=t):(null==n||i<n||s)&&(n=i,r=t,s&&(a=!0));u(e,r||t)}(e):i?to(e):function(e){var r=e._i;if(a(r))e._d=new Date(t.now());else if(h(r))e._d=new Date(r.valueOf());else if("string"==typeof r)!function(e){var r=e9.exec(e._i);if(null!==r){e._d=new Date(+r[1]);return}te(e),!1!==e._isValid||(delete e._isValid,tt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:t.createFromInputFallback(e)))}(e);else if(n(r))e._a=d(r.slice(0),function(e){return parseInt(e,10)}),tn(e);else if(o(r)){if(!e._d){var i=U(e._i),s=void 0===i.day?i.date:i.day;e._a=d([i.year,i.month,s,i.hour,i.minute,i.second,i.millisecond],function(e){return e&&parseInt(e,10)}),tn(e)}}else l(r)?e._d=new Date(r):t.createFromInputFallback(e)}(e),p(e)||(e._d=null),e)}function ts(e,t,r,i,a){var l,h={};return(!0===t||!1===t)&&(i=t,t=void 0),(!0===r||!1===r)&&(i=r,r=void 0),(o(e)&&s(e)||n(e)&&0===e.length)&&(e=void 0),h._isAMomentObject=!0,h._useUTC=h._isUTC=a,h._l=r,h._i=e,h._f=t,h._strict=i,(l=new S(e1(ti(h))))._nextDay&&(l.add(1,"d"),l._nextDay=void 0),l}function ta(e,t,r,n){return ts(e,t,r,n,!1)}t.createFromInputFallback=T("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":""))}),t.ISO_8601=function(){},t.RFC_2822=function(){};var tl=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=ta.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:m()}),th=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=ta.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:m()});function td(e,t){var r,o;if(1===t.length&&n(t[0])&&(t=t[0]),!t.length)return ta();for(o=1,r=t[0];o<t.length;++o)(!t[o].isValid()||t[o][e](r))&&(r=t[o]);return r}var tu=["year","quarter","month","week","day","hour","minute","second","millisecond"];function tc(e){var t=U(e),r=t.year||0,n=t.quarter||0,o=t.month||0,s=t.week||t.isoWeek||0,a=t.day||0,l=t.hour||0,h=t.minute||0,d=t.second||0,u=t.millisecond||0;this._isValid=function(e){var t,r,n=!1,o=tu.length;for(t in e)if(i(e,t)&&!(-1!==eG.call(tu,t)&&(null==e[t]||!isNaN(e[t]))))return!1;for(r=0;r<o;++r)if(e[tu[r]]){if(n)return!1;parseFloat(e[tu[r]])!==ep(e[tu[r]])&&(n=!0)}return!0}(t),this._milliseconds=+u+1e3*d+6e4*h+1e3*l*3600,this._days=+a+7*s,this._months=+o+3*n+12*r,this._data={},this._locale=e0(),this._bubble()}function tg(e){return e instanceof tc}function tp(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function tm(e,t){P(e,0,0,function(){var e=this.utcOffset(),r="+";return e<0&&(e=-e,r="-"),r+O(~~(e/60),2)+t+O(~~e%60,2)})}tm("Z",":"),tm("ZZ",""),eu("Z",ea),eu("ZZ",ea),ef(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=ty(ea,e)});var tf=/([\+\-]|\d\d)/gi;function ty(e,t){var r,n,o=(t||"").match(e);return null===o?null:0===(n=+(60*(r=((o[o.length-1]||[])+"").match(tf)||["-",0,0])[1])+ep(r[2]))?0:"+"===r[0]?n:-n}function tb(e,r){var n,o;return r._isUTC?(n=r.clone(),o=(R(e)||h(e)?e.valueOf():ta(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+o),t.updateOffset(n,!1),n):ta(e).local()}function tC(e){return-Math.round(e._d.getTimezoneOffset())}function tw(){return!!this.isValid()&&this._isUTC&&0===this._offset}t.updateOffset=function(){};var tS=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,tv=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function tR(e,t){var r,n,o,s,a,h,d=e,u=null;return tg(e)?d={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(d={},t?d[t]=+e:d.milliseconds=+e):(u=tS.exec(e))?(s="-"===u[1]?-1:1,d={y:0,d:ep(u[2])*s,h:ep(u[3])*s,m:ep(u[4])*s,s:ep(u[5])*s,ms:ep(tp(1e3*u[6]))*s}):(u=tv.exec(e))?(s="-"===u[1]?-1:1,d={y:tE(u[2],s),M:tE(u[3],s),w:tE(u[4],s),d:tE(u[5],s),h:tE(u[6],s),m:tE(u[7],s),s:tE(u[8],s)}):null==d?d={}:"object"==typeof d&&("from"in d||"to"in d)&&(r=ta(d.from),n=ta(d.to),h=r.isValid()&&n.isValid()?(n=tb(n,r),r.isBefore(n)?o=tT(r,n):((o=tT(n,r)).milliseconds=-o.milliseconds,o.months=-o.months),o):{milliseconds:0,months:0},(d={}).ms=h.milliseconds,d.M=h.months),a=new tc(d),tg(e)&&i(e,"_locale")&&(a._locale=e._locale),tg(e)&&i(e,"_isValid")&&(a._isValid=e._isValid),a}function tE(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function tT(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=t-e.clone().add(r.months,"M"),r}function tA(e,t){return function(r,n){var o;return null===n||isNaN(+n)||(M(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=r,r=n,n=o),tM(this,tR(r,n),e),this}}function tM(e,r,n,o){var i=r._milliseconds,s=tp(r._days),a=tp(r._months);e.isValid()&&(o=null==o||o,a&&eN(e,ev(e,"Month")+a*n),s&&eR(e,"Date",ev(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),o&&t.updateOffset(e,s||a))}tR.fn=tc.prototype,tR.invalid=function(){return tR(NaN)};var tN=tA(1,"add"),tI=tA(-1,"subtract");function tx(e){return"string"==typeof e||e instanceof String}function tO(e,t){if(e.date()<t.date())return-tO(t,e);var r,n=(t.year()-e.year())*12+(t.month()-e.month()),o=e.clone().add(n,"months");return r=t-o<0?(t-o)/(o-e.clone().add(n-1,"months")):(t-o)/(e.clone().add(n+1,"months")-o),-(n+r)||0}function t_(e){var t;return void 0===e?this._locale._abbr:(null!=(t=e0(e))&&(this._locale=t),this)}t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var tk=T("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 tH(){return this._locale}function tL(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-126227808e5:new Date(e,t,r).valueOf()}function tP(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-126227808e5:Date.UTC(e,t,r)}function tD(e,t){return t.erasAbbrRegex(e)}function tF(){var e,t,r,n,o,i=[],s=[],a=[],l=[],h=this.eras();for(e=0,t=h.length;e<t;++e)r=ec(h[e].name),n=ec(h[e].abbr),o=ec(h[e].narrow),s.push(r),i.push(n),a.push(o),l.push(r),l.push(n),l.push(o);this._erasRegex=RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=RegExp("^("+s.join("|")+")","i"),this._erasAbbrRegex=RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=RegExp("^("+a.join("|")+")","i")}function tB(e,t){P(0,[e,e.length],0,t)}function tV(e,t,r,n,o){var i;return null==e?eL(this,n,o).year:(t>(i=eP(e,n,o))&&(t=i),tU.call(this,e,t,r,n,o))}function tU(e,t,r,n,o){var i=eH(e,t,r,n,o),s=e_(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"),eu("N",tD),eu("NN",tD),eu("NNN",tD),eu("NNNN",function(e,t){return t.erasNameRegex(e)}),eu("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),ef(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var o=r._locale.erasParse(e,n,r._strict);o?g(r).era=o:g(r).invalidEra=e}),eu("y",eo),eu("yy",eo),eu("yyy",eo),eu("yyyy",eo),eu("yo",function(e,t){return t._eraYearOrdinalRegex||eo}),ef(["y","yy","yyy","yyyy"],0),ef(["yo"],function(e,t,r,n){var o;r._locale._eraYearOrdinalRegex&&(o=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[0]=r._locale.eraYearOrdinalParse(e,o):t[0]=parseInt(e,10)}),P(0,["gg",2],0,function(){return this.weekYear()%100}),P(0,["GG",2],0,function(){return this.isoWeekYear()%100}),tB("gggg","weekYear"),tB("ggggg","weekYear"),tB("GGGG","isoWeekYear"),tB("GGGGG","isoWeekYear"),eu("G",ei),eu("g",ei),eu("GG",Z,q),eu("gg",Z,q),eu("GGGG",er,X),eu("gggg",er,X),eu("GGGGG",en,Q),eu("ggggg",en,Q),ey(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=ep(e)}),ey(["gg","GG"],function(e,r,n,o){r[o]=t.parseTwoDigitYear(e)}),P("Q",0,"Qo","quarter"),eu("Q",j),ef("Q",function(e,t){t[1]=(ep(e)-1)*3}),P("D",["DD",2],"Do","date"),eu("D",Z,eh),eu("DD",Z,q),eu("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ef(["D","DD"],2),ef("Do",function(e,t){t[2]=ep(e.match(Z)[0])});var tz=eS("Date",!0);P("DDD",["DDDD",3],"DDDo","dayOfYear"),eu("DDD",et),eu("DDDD",K),ef(["DDD","DDDD"],function(e,t,r){r._dayOfYear=ep(e)}),P("m",["mm",2],0,"minute"),eu("m",Z,ed),eu("mm",Z,q),ef(["m","mm"],4);var tW=eS("Minutes",!1);P("s",["ss",2],0,"second"),eu("s",Z,ed),eu("ss",Z,q),ef(["s","ss"],5);var tG=eS("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()}),eu("S",et,j),eu("SS",et,q),eu("SSS",et,K),f="SSSS";f.length<=9;f+="S")eu(f,eo);function t$(e,t){t[6]=ep(("0."+e)*1e3)}for(f="S";f.length<=9;f+="S")ef(f,t$);y=eS("Milliseconds",!1),P("z",0,0,"zoneAbbr"),P("zz",0,0,"zoneName");var tY=S.prototype;function tj(e){return e}tY.add=tN,tY.calendar=function(e,r){if(1==arguments.length)if(arguments[0]){var a,d,u,c;if(a=arguments[0],R(a)||h(a)||tx(a)||l(a)||(u=n(d=a),c=!1,u&&(c=0===d.filter(function(e){return!l(e)&&tx(d)}).length),u&&c)||function(e){var t,r,n=o(e)&&!s(e),a=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],h=l.length;for(t=0;t<h;t+=1)r=l[t],a=a||i(e,r);return n&&a}(a)||null==a)e=arguments[0],r=void 0;else(function(e){var t,r,n=o(e)&&!s(e),a=!1,l=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<l.length;t+=1)r=l[t],a=a||i(e,r);return n&&a})(arguments[0])&&(r=arguments[0],e=void 0)}else e=void 0,r=void 0;var g=e||ta(),p=tb(g,this).startOf("day"),m=t.calendarFormat(this,p)||"sameElse",f=r&&(N(r[m])?r[m].call(this,g):r[m]);return this.format(f||this.localeData().calendar(m,this,ta(g)))},tY.clone=function(){return new S(this)},tY.diff=function(e,t,r){var n,o,i;if(!this.isValid()||!(n=tb(e,this)).isValid())return NaN;switch(o=(n.utcOffset()-this.utcOffset())*6e4,t=V(t)){case"year":i=tO(this,n)/12;break;case"month":i=tO(this,n);break;case"quarter":i=tO(this,n)/3;break;case"second":i=(this-n)/1e3;break;case"minute":i=(this-n)/6e4;break;case"hour":i=(this-n)/36e5;break;case"day":i=(this-n-o)/864e5;break;case"week":i=(this-n-o)/6048e5;break;default:i=this-n}return r?i:eg(i)},tY.endOf=function(e){var r,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?tP:tL,e){case"year":r=n(this.year()+1,0,1)-1;break;case"quarter":r=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":r=n(this.year(),this.month()+1,1)-1;break;case"week":r=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":r=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":r=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":r=this._d.valueOf(),r+=36e5-((r+(this._isUTC?0:6e4*this.utcOffset()))%36e5+36e5)%36e5-1;break;case"minute":r=this._d.valueOf(),r+=6e4-(r%6e4+6e4)%6e4-1;break;case"second":r=this._d.valueOf(),r+=1e3-(r%1e3+1e3)%1e3-1}return this._d.setTime(r),t.updateOffset(this,!0),this},tY.format=function(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var r=D(this,e);return this.localeData().postformat(r)},tY.from=function(e,t){return this.isValid()&&(R(e)&&e.isValid()||ta(e).isValid())?tR({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},tY.fromNow=function(e){return this.from(ta(),e)},tY.to=function(e,t){return this.isValid()&&(R(e)&&e.isValid()||ta(e).isValid())?tR({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},tY.toNow=function(e){return this.to(ta(),e)},tY.get=function(e){return N(this[e=V(e)])?this[e]():this},tY.invalidAt=function(){return g(this).overflow},tY.isAfter=function(e,t){var r=R(e)?e:ta(e);return!!(this.isValid()&&r.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf())},tY.isBefore=function(e,t){var r=R(e)?e:ta(e);return!!(this.isValid()&&r.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf())},tY.isBetween=function(e,t,r,n){var o=R(e)?e:ta(e),i=R(t)?t:ta(t);return!!(this.isValid()&&o.isValid()&&i.isValid())&&("("===(n=n||"()")[0]?this.isAfter(o,r):!this.isBefore(o,r))&&(")"===n[1]?this.isBefore(i,r):!this.isAfter(i,r))},tY.isSame=function(e,t){var r,n=R(e)?e:ta(e);return!!(this.isValid()&&n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf()))},tY.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},tY.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},tY.isValid=function(){return p(this)},tY.lang=tk,tY.locale=t_,tY.localeData=tH,tY.max=th,tY.min=tl,tY.parsingFlags=function(){return u({},g(this))},tY.set=function(e,t){if("object"==typeof e){var r,n=function(e){var t,r=[];for(t in e)i(e,t)&&r.push({unit:t,priority:$[t]});return r.sort(function(e,t){return e.priority-t.priority}),r}(e=U(e)),o=n.length;for(r=0;r<o;r++)this[n[r].unit](e[n[r].unit])}else if(N(this[e=V(e)]))return this[e](t);return this},tY.startOf=function(e){var r,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?tP:tL,e){case"year":r=n(this.year(),0,1);break;case"quarter":r=n(this.year(),this.month()-this.month()%3,1);break;case"month":r=n(this.year(),this.month(),1);break;case"week":r=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":r=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":r=n(this.year(),this.month(),this.date());break;case"hour":r=this._d.valueOf(),r-=((r+(this._isUTC?0:6e4*this.utcOffset()))%36e5+36e5)%36e5;break;case"minute":r=this._d.valueOf(),r-=(r%6e4+6e4)%6e4;break;case"second":r=this._d.valueOf(),r-=(r%1e3+1e3)%1e3}return this._d.setTime(r),t.updateOffset(this,!0),this},tY.subtract=tI,tY.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]},tY.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}},tY.toDate=function(){return new Date(this.valueOf())},tY.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,r=t?this.clone().utc():this;if(0>r.year()||r.year()>9999)return D(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ");if(N(Date.prototype.toISOString))if(t)return this.toDate().toISOString();else return new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",D(r,"Z"));return D(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},tY.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n="moment",o="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+n+'("]',t=0<=this.year()&&9999>=this.year()?"YYYY":"YYYYYY",r=o+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r)},"u">typeof Symbol&&null!=Symbol.for&&(tY[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),tY.toJSON=function(){return this.isValid()?this.toISOString():null},tY.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},tY.unix=function(){return Math.floor(this.valueOf()/1e3)},tY.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},tY.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},tY.eraName=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""},tY.eraNarrow=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""},tY.eraAbbr=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""},tY.eraYear=function(){var e,r,n,o,i=this.localeData().eras();for(e=0,r=i.length;e<r;++e)if(n=i[e].since<=i[e].until?1:-1,o=this.clone().startOf("day").valueOf(),i[e].since<=o&&o<=i[e].until||i[e].until<=o&&o<=i[e].since)return(this.year()-t(i[e].since).year())*n+i[e].offset;return this.year()},tY.year=ew,tY.isLeapYear=function(){return eb(this.year())},tY.weekYear=function(e){return tV.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},tY.isoWeekYear=function(e){return tV.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},tY.quarter=tY.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)},tY.month=eI,tY.daysInMonth=function(){return eE(this.year(),this.month())},tY.week=tY.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add((e-t)*7,"d")},tY.isoWeek=tY.isoWeeks=function(e){var t=eL(this,1,4).week;return null==e?t:this.add((e-t)*7,"d")},tY.weeksInYear=function(){var e=this.localeData()._week;return eP(this.year(),e.dow,e.doy)},tY.weeksInWeekYear=function(){var e=this.localeData()._week;return eP(this.weekYear(),e.dow,e.doy)},tY.isoWeeksInYear=function(){return eP(this.year(),1,4)},tY.isoWeeksInISOWeekYear=function(){return eP(this.isoWeekYear(),1,4)},tY.date=tz,tY.day=tY.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,r,n=ev(this,"Day");return null==e?n:(t=e,r=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=r.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-n,"d"))},tY.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")},tY.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var t,r=(t=this.localeData(),"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},tY.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")},tY.hour=tY.hours=eY,tY.minute=tY.minutes=tW,tY.second=tY.seconds=tG,tY.millisecond=tY.milliseconds=y,tY.utcOffset=function(e,r,n){var o,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:tC(this);if("string"==typeof e){if(null===(e=ty(ea,e)))return this}else 16>Math.abs(e)&&!n&&(e*=60);return!this._isUTC&&r&&(o=tC(this)),this._offset=e,this._isUTC=!0,null!=o&&this.add(o,"m"),i!==e&&(!r||this._changeInProgress?tM(this,tR(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this},tY.utc=function(e){return this.utcOffset(0,e)},tY.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(tC(this),"m")),this},tY.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=ty(es,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},tY.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?ta(e).utcOffset():0,(this.utcOffset()-e)%60==0)},tY.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},tY.isLocal=function(){return!!this.isValid()&&!this._isUTC},tY.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},tY.isUtc=tw,tY.isUTC=tw,tY.zoneAbbr=function(){return this._isUTC?"UTC":""},tY.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},tY.dates=T("dates accessor is deprecated. Use date instead.",tz),tY.months=T("months accessor is deprecated. Use month instead",eI),tY.years=T("years accessor is deprecated. Use year instead",ew),tY.zone=T("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()}),tY.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=ti(t))._a?(e=t._isUTC?c(t._a):ta(t._a),this._isDSTShifted=this.isValid()&&function(e,t){var r,n=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),i=0;for(r=0;r<n;r++)ep(e[r])!==ep(t[r])&&i++;return i+o}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted});var tq=x.prototype;function tK(e,t,r,n){var o=e0(),i=c().set(n,t);return o[r](i,e)}function tX(e,t,r){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return tK(e,t,r,"month");var n,o=[];for(n=0;n<12;n++)o[n]=tK(e,n,r,"month");return o}function tQ(e,t,r,n){"boolean"==typeof e||(r=t=e,e=!1),l(t)&&(r=t,t=void 0),t=t||"";var o,i=e0(),s=e?i._week.dow:0,a=[];if(null!=r)return tK(t,(r+s)%7,n,"day");for(o=0;o<7;o++)a[o]=tK(t,(o+s)%7,n,"day");return a}tq.calendar=function(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return N(n)?n.call(t,r):n},tq.longDateFormat=function(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(_).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},tq.invalidDate=function(){return this._invalidDate},tq.ordinal=function(e){return this._ordinal.replace("%d",e)},tq.preparse=tj,tq.postformat=tj,tq.relativeTime=function(e,t,r,n){var o=this._relativeTime[r];return N(o)?o(e,t,r,n):o.replace(/%d/i,e)},tq.pastFuture=function(e,t){var r=this._relativeTime[e>0?"future":"past"];return N(r)?r(t):r.replace(/%s/i,t)},tq.set=function(e){var t,r;for(r in e)i(e,r)&&(N(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},tq.eras=function(e,r){var n,o,i,s=this._eras||e0("en")._eras;for(n=0,o=s.length;n<o;++n)switch("string"==typeof s[n].since&&(i=t(s[n].since).startOf("day"),s[n].since=i.valueOf()),typeof s[n].until){case"undefined":s[n].until=Infinity;break;case"string":i=t(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf()}return s},tq.erasParse=function(e,t,r){var n,o,i,s,a,l=this.eras();for(n=0,e=e.toUpperCase(),o=l.length;n<o;++n)if(i=l[n].name.toUpperCase(),s=l[n].abbr.toUpperCase(),a=l[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(s===e)return l[n];break;case"NNNN":if(i===e)return l[n];break;case"NNNNN":if(a===e)return l[n]}else if([i,s,a].indexOf(e)>=0)return l[n]},tq.erasConvertYear=function(e,r){var n=e.since<=e.until?1:-1;return void 0===r?t(e.since).year():t(e.since).year()+(r-e.offset)*n},tq.erasAbbrRegex=function(e){return i(this,"_erasAbbrRegex")||tF.call(this),e?this._erasAbbrRegex:this._erasRegex},tq.erasNameRegex=function(e){return i(this,"_erasNameRegex")||tF.call(this),e?this._erasNameRegex:this._erasRegex},tq.erasNarrowRegex=function(e){return i(this,"_erasNarrowRegex")||tF.call(this),e?this._erasNarrowRegex:this._erasRegex},tq.months=function(e,t){return e?n(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||eA).test(t)?"format":"standalone"][e.month()]:n(this._months)?this._months:this._months.standalone},tq.monthsShort=function(e,t){return e?n(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[eA.test(t)?"format":"standalone"][e.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},tq.monthsParse=function(e,t,r){var n,o,i;if(this._monthsParseExact)return eM.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(o=c([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[n]=RegExp(i.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}},tq.monthsRegex=function(e){return this._monthsParseExact?(i(this,"_monthsRegex")||ex.call(this),e)?this._monthsStrictRegex:this._monthsRegex:(i(this,"_monthsRegex")||(this._monthsRegex=el),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},tq.monthsShortRegex=function(e){return this._monthsParseExact?(i(this,"_monthsRegex")||ex.call(this),e)?this._monthsShortStrictRegex:this._monthsShortRegex:(i(this,"_monthsShortRegex")||(this._monthsShortRegex=el),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},tq.week=function(e){return eL(e,this._week.dow,this._week.doy).week},tq.firstDayOfYear=function(){return this._week.doy},tq.firstDayOfWeek=function(){return this._week.dow},tq.weekdays=function(e,t){var r=n(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?eD(r,this._week.dow):e?r[e.day()]:r},tq.weekdaysMin=function(e){return!0===e?eD(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},tq.weekdaysShort=function(e){return!0===e?eD(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},tq.weekdaysParse=function(e,t,r){var n,o,i;if(this._weekdaysParseExact)return eB.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=c([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=RegExp(i.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;else if(!r&&this._weekdaysParse[n].test(e))return n}},tq.weekdaysRegex=function(e){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||eV.call(this),e)?this._weekdaysStrictRegex:this._weekdaysRegex:(i(this,"_weekdaysRegex")||(this._weekdaysRegex=el),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},tq.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||eV.call(this),e)?this._weekdaysShortStrictRegex:this._weekdaysShortRegex:(i(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=el),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},tq.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||eV.call(this),e)?this._weekdaysMinStrictRegex:this._weekdaysMinRegex:(i(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=el),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},tq.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},tq.meridiem=function(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"},eZ("en",{eras:[{since:"0001-01-01",until:Infinity,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,r=1===ep(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+r}}),t.lang=T("moment.lang is deprecated. Use moment.locale instead.",eZ),t.langData=T("moment.langData is deprecated. Use moment.localeData instead.",e0);var tZ=Math.abs;function tJ(e,t,r,n){var o=tR(t,r);return e._milliseconds+=n*o._milliseconds,e._days+=n*o._days,e._months+=n*o._months,e._bubble()}function t0(e){return e<0?Math.floor(e):Math.ceil(e)}function t1(e){return 4800*e/146097}function t2(e){return 146097*e/4800}function t3(e){return function(){return this.as(e)}}var t6=t3("ms"),t4=t3("s"),t5=t3("m"),t9=t3("h"),t7=t3("d"),t8=t3("w"),re=t3("M"),rt=t3("Q"),rr=t3("y");function rn(e){return function(){return this.isValid()?this._data[e]:NaN}}var ro=rn("milliseconds"),ri=rn("seconds"),rs=rn("minutes"),ra=rn("hours"),rl=rn("days"),rh=rn("months"),rd=rn("years"),ru=Math.round,rc={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function rg(e,t,r,n,o){return o.relativeTime(t||1,!!r,e,n)}var rp=Math.abs;function rm(e){return(e>0)-(e<0)||+e}function rf(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,o,i,s,a,l=rp(this._milliseconds)/1e3,h=rp(this._days),d=rp(this._months),u=this.asSeconds();return u?(e=eg(l/60),t=eg(e/60),l%=60,e%=60,r=eg(d/12),d%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=u<0?"-":"",i=rm(this._months)!==rm(u)?"-":"",s=rm(this._days)!==rm(u)?"-":"",a=rm(this._milliseconds)!==rm(u)?"-":"",o+"P"+(r?i+r+"Y":"")+(d?i+d+"M":"")+(h?s+h+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+n+"S":"")):"P0D"}var ry=tc.prototype;return ry.isValid=function(){return this._isValid},ry.abs=function(){var e=this._data;return this._milliseconds=tZ(this._milliseconds),this._days=tZ(this._days),this._months=tZ(this._months),e.milliseconds=tZ(e.milliseconds),e.seconds=tZ(e.seconds),e.minutes=tZ(e.minutes),e.hours=tZ(e.hours),e.months=tZ(e.months),e.years=tZ(e.years),this},ry.add=function(e,t){return tJ(this,e,t,1)},ry.subtract=function(e,t){return tJ(this,e,t,-1)},ry.as=function(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=V(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+t1(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(t2(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw Error("Unknown unit "+e)}},ry.asMilliseconds=t6,ry.asSeconds=t4,ry.asMinutes=t5,ry.asHours=t9,ry.asDays=t7,ry.asWeeks=t8,ry.asMonths=re,ry.asQuarters=rt,ry.asYears=rr,ry.valueOf=t6,ry._bubble=function(){var e,t,r,n,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*t0(t2(a)+s),s=0,a=0),l.milliseconds=i%1e3,l.seconds=(e=eg(i/1e3))%60,l.minutes=(t=eg(e/60))%60,l.hours=(r=eg(t/60))%24,s+=eg(r/24),a+=o=eg(t1(s)),s-=t0(t2(o)),n=eg(a/12),a%=12,l.days=s,l.months=a,l.years=n,this},ry.clone=function(){return tR(this)},ry.get=function(e){return e=V(e),this.isValid()?this[e+"s"]():NaN},ry.milliseconds=ro,ry.seconds=ri,ry.minutes=rs,ry.hours=ra,ry.days=rl,ry.weeks=function(){return eg(this.days()/7)},ry.months=rh,ry.years=rd,ry.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,o,i,s,a,l,h,d,u,c,g,p,m=!1,f=rc;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(m=e),"object"==typeof t&&(f=Object.assign({},rc,t),null!=t.s&&null==t.ss&&(f.ss=t.s-1)),g=this.localeData(),r=!m,n=f,o=tR(this).abs(),i=ru(o.as("s")),s=ru(o.as("m")),a=ru(o.as("h")),l=ru(o.as("d")),h=ru(o.as("M")),d=ru(o.as("w")),u=ru(o.as("y")),c=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],null!=n.w&&(c=c||d<=1&&["w"]||d<n.w&&["ww",d]),(c=c||h<=1&&["M"]||h<n.M&&["MM",h]||u<=1&&["y"]||["yy",u])[2]=r,c[3]=+this>0,c[4]=g,p=rg.apply(null,c),m&&(p=g.pastFuture(+this,p)),g.postformat(p)},ry.toISOString=rf,ry.toString=rf,ry.toJSON=rf,ry.locale=t_,ry.localeData=tH,ry.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",rf),ry.lang=tk,P("X",0,0,"unix"),P("x",0,0,"valueOf"),eu("x",ei),eu("X",/[+-]?\d+(\.\d{1,3})?/),ef("X",function(e,t,r){r._d=new Date(1e3*parseFloat(e))}),ef("x",function(e,t,r){r._d=new Date(ep(e))}),t.version="2.30.1",z=ta,t.fn=tY,t.min=function(){var e=[].slice.call(arguments,0);return td("isBefore",e)},t.max=function(){var e=[].slice.call(arguments,0);return td("isAfter",e)},t.now=function(){return Date.now?Date.now():+new Date},t.utc=c,t.unix=function(e){return ta(1e3*e)},t.months=function(e,t){return tX(e,t,"months")},t.isDate=h,t.locale=eZ,t.invalid=m,t.duration=tR,t.isMoment=R,t.weekdays=function(e,t,r){return tQ(e,t,r,"weekdays")},t.parseZone=function(){return ta.apply(null,arguments).parseZone()},t.localeData=e0,t.isDuration=tg,t.monthsShort=function(e,t){return tX(e,t,"monthsShort")},t.weekdaysMin=function(e,t,r){return tQ(e,t,r,"weekdaysMin")},t.defineLocale=eJ,t.updateLocale=function(e,t){if(null!=t){var r,n,o=ej;null!=eq[e]&&null!=eq[e].parentLocale?eq[e].set(I(eq[e]._config,t)):(null!=(n=eQ(e))&&(o=n._config),t=I(o,t),null==n&&(t.abbr=e),(r=new x(t)).parentLocale=eq[e],eq[e]=r),eZ(e)}else null!=eq[e]&&(null!=eq[e].parentLocale?(eq[e]=eq[e].parentLocale,e===eZ()&&eZ(e)):null!=eq[e]&&delete eq[e]);return eq[e]},t.locales=function(){return Y(eq)},t.weekdaysShort=function(e,t,r){return tQ(e,t,r,"weekdaysShort")},t.normalizeUnits=V,t.relativeTimeRounding=function(e){return void 0===e?ru:"function"==typeof e&&(ru=e,!0)},t.relativeTimeThreshold=function(e,t){return void 0!==rc[e]&&(void 0===t?rc[e]:(rc[e]=t,"s"===e&&(rc.ss=t-1),!0))},t.calendarFormat=function(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"},t.prototype=tY,t.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"},t}(),window.moment=r(7539)},6558(e,t,r){"use strict";function n(){if(l)return a;l=1;let e=[{key:"ZiB",factor:11805916207174113e5},{key:"ZB",factor:1e21},{key:"YiB",factor:12089258196146292e8},{key:"YB",factor:1e24},{key:"TiB",factor:0x10000000000},{key:"TB",factor:1e12},{key:"PiB",factor:0x4000000000000},{key:"PB",factor:1e15},{key:"MiB",factor:1048576},{key:"MB",factor:1e6},{key:"KiB",factor:1024},{key:"KB",factor:1e3},{key:"GiB",factor:0x40000000},{key:"GB",factor:1e9},{key:"EiB",factor:0x1000000000000000},{key:"EB",factor:1e18},{key:"B",factor:1}];function t(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}return a={unformat:function(r,n){let o,i=p(),s=i.currentDelimiters(),a=i.currentCurrency().symbol,l=i.currentOrdinal(),h=i.getZeroFormat(),d=i.currentAbbreviations();if("string"==typeof r)if(function(e,t){if(!(e.indexOf(":")&&":"!==t.thousands))return!1;let r=e.split(":");if(3!==r.length)return!1;let n=+r[0],o=+r[1],i=+r[2];return!isNaN(n)&&!isNaN(o)&&!isNaN(i)}(r,s)){let e,t,n;t=+(e=r.split(":"))[0],n=+e[1],o=+e[2]+60*n+3600*t}else o=function(r,n,o="",i,s,a){if(""!==r)return r===s?0:function r(n,o,i,s,a,l,h){if(!isNaN(+n))return+n;let d="",u=n.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(u!==n)return -1*r(u,o,i,s,a,l);for(let t=0;t<e.length;t++){let h=e[t];if((d=n.replace(RegExp(`([0-9 ])(${h.key})$`),"$1"))!==n)return r(d,o,i,s,a,l)*h.factor}if((d=n.replace("%",""))!==n)return r(d,o,i,s,a,l)/100;let c=parseFloat(n);if(isNaN(c))return;let g=s(c);if(g&&"."!==g&&(d=n.replace(RegExp(`${t(g)}$`),""))!==n)return r(d,o,i,s,a,l);let p={};Object.keys(l).forEach(e=>{p[l[e]]=e});let m=Object.keys(p).sort().reverse(),f=m.length;for(let e=0;e<f;e++){let t=m[e],h=p[t];if((d=n.replace(t,""))!==n){let e;switch(h){case"thousand":e=1e3;break;case"million":e=1e6;break;case"billion":e=1e9;break;case"trillion":e=1e12}return r(d,o,i,s,a,l)*e}}}(r.replace(o,"").replace(RegExp(`([0-9])${t(n.thousands)}([0-9])`,"g"),"$1$2").replace(n.decimal,"."),n,o,i,s,a)}(r,s,a,l,h,d);else{if("number"!=typeof r)return;o=r}if(void 0!==o)return o}}}function o(){if(d)return h;d=1;let e=n(),t=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,r={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`"}},o={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 i(t){return void 0!==e.unformat(t)}function s(e,t,n,o=!1){let i=Object.keys(e).map(o=>{if(!t[o])return console.error(`${n} Invalid key: ${o}`),!1;let i=e[o],a=t[o];if("string"==typeof a&&(a={type:a}),"format"===a.type){if(!s(i,r,`[Validate ${o}]`,!0))return!1}else if(typeof i!==a.type)return console.error(`${n} ${o} type mismatched: "${a.type}" expected, "${typeof i}" provided`),!1;if(a.restrictions&&a.restrictions.length){let t=a.restrictions.length;for(let r=0;r<t;r++){let{restriction:t,message:s}=a.restrictions[r];if(!t(i,e))return console.error(`${n} ${o} invalid value: ${s}`),!1}}return a.restriction&&!a.restriction(i,e)?(console.error(`${n} ${o} invalid value: ${a.message}`),!1):a.validValues&&-1===a.validValues.indexOf(i)?(console.error(`${n} ${o} invalid value: must be among ${JSON.stringify(a.validValues)}, "${i}" provided`),!1):(!a.children||!!s(i,a.children,`[Validate ${o}]`))&&!0});return o||i.push(...Object.keys(t).map(r=>{let o=t[r];if("string"==typeof o&&(o={type:o}),o.mandatory){let t=o.mandatory;if("function"==typeof t&&(t=t(e)),t&&void 0===e[r])return console.error(`${n} Missing mandatory key "${r}"`),!1}return!0})),i.reduce((e,t)=>e&&t,!0)}function a(e){return s(e,r,"[Validate format]")}return h={validate:function(e,t){let r=i(e),n=a(t);return r&&n},validateFormat:a,validateInput:i,validateLanguage:function(e){return s(e,o,"[Validate language]")}}}r.d(t,{A:()=>U});var i,s,a,l,h,d,u,c,g=function(e,t={}){var r,n,o,i,s,a;let l,h,d,u,c;if("string"!=typeof e)return e;n=e=(l=(r=e).match(/^{([^}]*)}/))?(t.prefix=l[1],r.slice(l[0].length)):r,function(e,t){if(-1!==e.indexOf("$")){t.output="currency";return}if(-1!==e.indexOf("%")){t.output="percent";return}if(-1!==e.indexOf("bd")){t.output="byte",t.base="general";return}if(-1!==e.indexOf("b")){t.output="byte",t.base="binary";return}if(-1!==e.indexOf("d")){t.output="byte",t.base="decimal";return}if(-1!==e.indexOf(":")){t.output="time";return}-1!==e.indexOf("o")&&(t.output="ordinal")}(e=(h=n.match(/{([^}]*)}$/))?(t.postfix=h[1],n.slice(0,-h[0].length)):n,t),(d=e.match(/[1-9]+[0-9]*/))&&(t.totalLength=+d[0]),(u=e.split(".")[0].match(/0+/))&&(t.characteristic=u[0].length),-1!==(o=e).indexOf(".")&&(t.optionalCharacteristic=-1===o.split(".")[0].indexOf("0")),-1!==e.indexOf("a")&&(t.average=!0),-1!==(i=e).indexOf("K")?t.forceAverage="thousand":-1!==i.indexOf("M")?t.forceAverage="million":-1!==i.indexOf("B")?t.forceAverage="billion":-1!==i.indexOf("T")&&(t.forceAverage="trillion");let g=e.split(".")[1];if(g){let e=g.match(/0+/);e&&(t.mantissa=e[0].length)}return(s=e).match(/\[\.]/)?t.optionalMantissa=!0:s.match(/\./)&&(t.optionalMantissa=!1),(c=e.split(".")[1])&&(t.trimMantissa=-1!==c.indexOf("[")),-1!==e.indexOf(",")&&(t.thousandSeparated=!0),-1!==e.indexOf(" ")&&(t.spaceSeparated=!0,t.spaceSeparatedCurrency=!0,(t.average||t.forceAverage)&&(t.spaceSeparatedAbbreviation=!0)),(a=e).match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),a.match(/^\+?-/)&&(t.negative="sign"),e.match(/^\+/)&&(t.forceSign=!0),t};function p(){let e;if(c)return u;c=1;let t=s?i:(s=1,i={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}}}),r=o(),n={},a={},l=null,h={};function d(){return a[e]}return n.languages=()=>Object.assign({},a),n.currentLanguage=()=>e,n.currentBytes=()=>d().bytes||{},n.currentCurrency=()=>d().currency,n.currentAbbreviations=()=>d().abbreviations,n.currentDelimiters=()=>d().delimiters,n.currentOrdinal=()=>d().ordinal,n.currentDefaults=()=>Object.assign({},d().defaults,h),n.currentOrdinalDefaultFormat=()=>Object.assign({},n.currentDefaults(),d().ordinalFormat),n.currentByteDefaultFormat=()=>Object.assign({},n.currentDefaults(),d().byteFormat),n.currentPercentageDefaultFormat=()=>Object.assign({},n.currentDefaults(),d().percentageFormat),n.currentCurrencyDefaultFormat=()=>Object.assign({},n.currentDefaults(),d().currencyFormat),n.currentTimeDefaultFormat=()=>Object.assign({},n.currentDefaults(),d().timeFormat),n.setDefaults=e=>{e=g(e),r.validateFormat(e)&&(h=e)},n.getZeroFormat=()=>l,n.setZeroFormat=e=>l="string"==typeof e?e:null,n.hasZeroFormat=()=>null!==l,n.languageData=e=>{if(e){if(a[e])return a[e];throw Error(`Unknown tag "${e}"`)}return d()},n.registerLanguage=(t,n=!1)=>{if(!r.validateLanguage(t))throw Error("Invalid language data");a[t.languageTag]=t,n&&(e=t.languageTag)},n.setLanguage=(r,n=t.languageTag)=>{if(!a[r]){let t=r.split("-")[0],o=Object.keys(a).find(e=>e.split("-")[0]===t);return a[o]?void(e=o):void(e=n)}e=r},n.registerLanguage(t),e=t.languageTag,u=n}var m={exports:{}};(function(e){var t,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n=Math.ceil,o=Math.floor,i="[BigNumber Error] ",s=i+"Number primitive has more than 15 significant digits: ",a=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function l(e){var t=0|e;return e>0||e===t?t:t-1}function h(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(r=14-(t=e[n++]+"").length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function d(e,t){var r,n,o=e.c,i=t.c,s=e.s,a=t.s,l=e.e,h=t.e;if(!s||!a)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=l==h,!o||!i)return n?0:!o^r?1:-1;if(!n)return l>h^r?1:-1;for(s=0,a=(l=o.length)<(h=i.length)?l:h;s<a;s++)if(o[s]!=i[s])return o[s]>i[s]^r?1:-1;return l==h?0:l>h^r?1:-1}function u(e,t,r,n){if(e<t||e>r||e!==o(e))throw Error(i+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function c(e){var t=e.c.length-1;return l(e.e/14)==t&&e.c[t]%2!=0}function g(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function p(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(n=e.length,++t>n){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}(t=function e(t){var m,f,y,b,C,w,S,R,E,T=B.prototype={constructor:B,toString:null,valueOf:null},A=new B(1),M=20,N=4,I=-7,x=21,O=-1e7,_=1e7,k=!1,H=1,L=0,P={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},D="0123456789abcdefghijklmnopqrstuvwxyz",F=!0;function B(e,t){var n,i,a,l,h,d,c,g,p=this;if(!(p instanceof B))return new B(e,t);if(null==t){if(e&&!0===e._isBigNumber){p.s=e.s,!e.c||e.e>_?p.c=p.e=null:e.e<O?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice());return}if((d="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,h=e;h>=10;h/=10,l++);l>_?p.c=p.e=null:(p.e=l,p.c=[e]);return}g=String(e)}else{if(!r.test(g=String(e)))return E(p,g,d);p.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(l=g.indexOf("."))>-1&&(g=g.replace(".","")),(h=g.search(/e/i))>0?(l<0&&(l=h),l+=+g.slice(h+1),g=g.substring(0,h)):l<0&&(l=g.length)}else{if(u(t,2,D.length,"Base"),10==t&&F)return W(p=new B(e),M+p.e+1,N);if(g=String(e),d="number"==typeof e){if(0*e!=0)return E(p,g,d,t);if(p.s=1/e<0?(g=g.slice(1),-1):1,B.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else p.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(n=D.slice(0,t),l=h=0,c=g.length;h<c;h++)if(0>n.indexOf(i=g.charAt(h))){if("."==i){if(h>l){l=c;continue}}else if(!a&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){a=!0,h=-1,l=0;continue}return E(p,String(e),d,t)}d=!1,(l=(g=R(g,t,10,p.s)).indexOf("."))>-1?g=g.replace(".",""):l=g.length}for(h=0;48===g.charCodeAt(h);h++);for(c=g.length;48===g.charCodeAt(--c););if(g=g.slice(h,++c)){if(c-=h,d&&B.DEBUG&&c>15&&(e>0x1fffffffffffff||e!==o(e)))throw Error(s+p.s*e);if((l=l-h-1)>_)p.c=p.e=null;else if(l<O)p.c=[p.e=0];else{if(p.e=l,p.c=[],h=(l+1)%14,l<0&&(h+=14),h<c){for(h&&p.c.push(+g.slice(0,h)),c-=14;h<c;)p.c.push(+g.slice(h,h+=14));h=14-(g=g.slice(h)).length}else h-=c;for(;h--;g+="0");p.c.push(+g)}}else p.c=[p.e=0]}function V(e,t,r,n){var o,i,s,a,l;if(null==r?r=N:u(r,0,8),!e.c)return e.toString();if(o=e.c[0],s=e.e,null==t)l=h(e.c),l=1==n||2==n&&(s<=I||s>=x)?g(l,s):p(l,s,"0");else if(i=(e=W(new B(e),t,r)).e,a=(l=h(e.c)).length,1==n||2==n&&(t<=i||i<=I)){for(;a<t;l+="0",a++);l=g(l,i)}else if(t-=s,l=p(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 U(e,t){for(var r,n,o=1,i=new B(e[0]);o<e.length;o++)(n=new B(e[o])).s&&(r=d(i,n))!==t&&(0!==r||i.s!==t)||(i=n);return i}function z(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+14*r-1)>_?e.c=e.e=null:r<O?e.c=[e.e=0]:(e.e=r,e.c=t),e}function W(e,t,r,i){var s,l,h,d,u,c,g,p=e.c;if(p){e:{for(s=1,d=p[0];d>=10;d/=10,s++);if((l=t-s)<0)l+=14,h=t,g=o((u=p[c=0])/a[s-h-1]%10);else if((c=n((l+1)/14))>=p.length)if(i){for(;p.length<=c;p.push(0));u=g=0,s=1,l%=14,h=l-14+1}else break e;else{for(s=1,u=d=p[c];d>=10;d/=10,s++);l%=14,g=(h=l-14+s)<0?0:o(u/a[s-h-1]%10)}if(i=i||t<0||null!=p[c+1]||(h<0?u:u%a[s-h-1]),i=r<4?(g||i)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||i||6==r&&(l>0?h>0?u/a[s-h]:0:p[c-1])%10&1||r==(e.s<0?8:7)),t<1||!p[0])return p.length=0,i?(t-=e.e+1,p[0]=a[(14-t%14)%14],e.e=-t||0):p[0]=e.e=0,e;if(0==l?(p.length=c,d=1,c--):(p.length=c+1,d=a[14-l],p[c]=h>0?o(u/a[s-h]%a[h])*d:0),i)for(;;)if(0==c){for(l=1,h=p[0];h>=10;h/=10,l++);for(h=p[0]+=d,d=1;h>=10;h/=10,d++);l!=d&&(e.e++,1e14==p[0]&&(p[0]=1));break}else{if(p[c]+=d,1e14!=p[c])break;p[c--]=0,d=1}for(l=p.length;0===p[--l];p.pop());}e.e>_?e.c=e.e=null:e.e<O&&(e.c=[e.e=0])}return e}function G(e){var t,r=e.e;return null===r?e.toString():(t=h(e.c),t=r<=I||r>=x?g(t,r):p(t,r,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,r;if(null!=e)if("object"==typeof e){if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(u(r=e[t],0,1e9,t),M=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(u(r=e[t],0,8,t),N=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(u(r[0],-1e9,0,t),u(r[1],0,1e9,t),I=r[0],x=r[1]):(u(r,-1e9,1e9,t),I=-(x=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)u(r[0],-1e9,-1,t),u(r[1],1,1e9,t),O=r[0],_=r[1];else if(u(r,-1e9,1e9,t),r)O=-(_=r<0?-r:r);else throw Error(i+t+" cannot be zero: "+r);if(e.hasOwnProperty(t="CRYPTO"))if(!!(r=e[t])===r)if(r)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))k=r;else throw k=!r,Error(i+"crypto unavailable");else k=r;else throw Error(i+t+" not true or false: "+r);if(e.hasOwnProperty(t="MODULO_MODE")&&(u(r=e[t],0,9,t),H=r),e.hasOwnProperty(t="POW_PRECISION")&&(u(r=e[t],0,1e9,t),L=r),e.hasOwnProperty(t="FORMAT"))if("object"==typeof(r=e[t]))P=r;else throw Error(i+t+" not an object: "+r);if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(i+t+" invalid: "+r);F="0123456789"==r.slice(0,10),D=r}}else throw Error(i+"Object expected: "+e);return{DECIMAL_PLACES:M,ROUNDING_MODE:N,EXPONENTIAL_AT:[I,x],RANGE:[O,_],CRYPTO:k,MODULO_MODE:H,POW_PRECISION:L,FORMAT:P,ALPHABET:D}},B.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!B.DEBUG)return!0;var t,r,n=e.c,s=e.e,a=e.s;e:if("[object Array]"==({}).toString.call(n)){if((1===a||-1===a)&&s>=-1e9&&s<=1e9&&s===o(s)){if(0===n[0]){if(0===s&&1===n.length)return!0;break e}if((t=(s+1)%14)<1&&(t+=14),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=1e14||r!==o(r))break e;if(0!==r)return!0}}}else if(null===n&&null===s&&(null===a||1===a||-1===a))return!0;throw Error(i+"Invalid BigNumber: "+e)},B.maximum=B.max=function(){return U(arguments,-1)},B.minimum=B.min=function(){return U(arguments,1)},m=0x20000000000000*Math.random()&2097151?function(){return o(0x20000000000000*Math.random())}:function(){return(0x40000000*Math.random()|0)*8388608+(8388608*Math.random()|0)},B.random=function(e){var t,r,s,l,h,d=0,c=[],g=new B(A);if(null==e?e=M:u(e,0,1e9),l=n(e/14),k)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(l*=2));d<l;)(h=131072*t[d]+(t[d+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[d]=r[0],t[d+1]=r[1]):(c.push(h%1e14),d+=2);d=l/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(l*=7);d<l;)(h=(31&t[d])*0x1000000000000+0x10000000000*t[d+1]+0x100000000*t[d+2]+0x1000000*t[d+3]+(t[d+4]<<16)+(t[d+5]<<8)+t[d+6])>=9e15?crypto.randomBytes(7).copy(t,d):(c.push(h%1e14),d+=7);d=l/7}else throw k=!1,Error(i+"crypto unavailable");if(!k)for(;d<l;)(h=m())<9e15&&(c[d++]=h%1e14);for(l=c[--d],e%=14,l&&e&&(h=a[14-e],c[d]=o(l/h)*h);0===c[d];c.pop(),d--);if(d<0)c=[s=0];else{for(s=-1;0===c[0];c.splice(0,1),s-=14);for(d=1,h=c[0];h>=10;h/=10,d++);d<14&&(s-=14-d)}return g.e=s,g.c=c,g},B.sum=function(){for(var e=1,t=arguments,r=new B(t[0]);e<t.length;)r=r.plus(t[e++]);return r},R=function(){var e="0123456789";function t(e,t,r,n){for(var o,i,s=[0],a=0,l=e.length;a<l;){for(i=s.length;i--;s[i]*=t);for(s[0]+=n.indexOf(e.charAt(a++)),o=0;o<s.length;o++)s[o]>r-1&&(null==s[o+1]&&(s[o+1]=0),s[o+1]+=s[o]/r|0,s[o]%=r)}return s.reverse()}return function(r,n,o,i,s){var a,l,d,u,c,g,m,f,y=r.indexOf("."),b=M,C=N;for(y>=0&&(u=L,L=0,r=r.replace(".",""),g=(f=new B(n)).pow(r.length-y),L=u,f.c=t(p(h(g.c),g.e,"0"),10,o,e),f.e=f.c.length),d=u=(m=t(r,n,o,s?(a=D,e):(a=e,D))).length;0==m[--u];m.pop());if(!m[0])return a.charAt(0);if(y<0?--d:(g.c=m,g.e=d,g.s=i,m=(g=S(g,f,b,C,o)).c,c=g.r,d=g.e),y=m[l=d+b+1],u=o/2,c=c||l<0||null!=m[l+1],c=C<4?(null!=y||c)&&(0==C||C==(g.s<0?3:2)):y>u||y==u&&(4==C||c||6==C&&1&m[l-1]||C==(g.s<0?8:7)),l<1||!m[0])r=c?p(a.charAt(1),-b,a.charAt(0)):a.charAt(0);else{if(m.length=l,c)for(--o;++m[--l]>o;)m[l]=0,l||(++d,m=[1].concat(m));for(u=m.length;!m[--u];);for(y=0,r="";y<=u;r+=a.charAt(m[y++]));r=p(r,d,a.charAt(0))}return r}}(),S=function(){function e(e,t,r){var n,o,i,s,a=0,l=e.length,h=t%1e7,d=t/1e7|0;for(e=e.slice();l--;)n=d*(i=e[l]%1e7)+(s=e[l]/1e7|0)*h,a=((o=h*i+n%1e7*1e7+a)/r|0)+(n/1e7|0)+d*s,e[l]=o%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=+(e[r]<t[r]),e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,s,a,h){var d,u,c,g,p,m,f,y,b,C,w,S,R,E,T,A,M,N=n.s==i.s?1:-1,I=n.c,x=i.c;if(!I||!I[0]||!x||!x[0])return new B(!n.s||!i.s||(I?x&&I[0]==x[0]:!x)?NaN:I&&0==I[0]||!x?0*N:N/0);for(b=(y=new B(N)).c=[],N=s+(u=n.e-i.e)+1,h||(h=1e14,u=l(n.e/14)-l(i.e/14),N=N/14|0),c=0;x[c]==(I[c]||0);c++);if(x[c]>(I[c]||0)&&u--,N<0)b.push(1),g=!0;else{for(E=I.length,A=x.length,c=0,N+=2,(p=o(h/(x[0]+1)))>1&&(x=e(x,p,h),I=e(I,p,h),A=x.length,E=I.length),R=A,w=(C=I.slice(0,A)).length;w<A;C[w++]=0);M=[0].concat(M=x.slice()),T=x[0],x[1]>=h/2&&T++;do{if(p=0,(d=t(x,C,A,w))<0){if(S=C[0],A!=w&&(S=S*h+(C[1]||0)),(p=o(S/T))>1)for(p>=h&&(p=h-1),f=(m=e(x,p,h)).length,w=C.length;1==t(m,C,f,w);)p--,r(m,A<f?M:x,f,h),f=m.length,d=1;else 0==p&&(d=p=1),f=(m=x.slice()).length;if(f<w&&(m=[0].concat(m)),r(C,m,w,h),w=C.length,-1==d)for(;1>t(x,C,A,w);)p++,r(C,A<w?M:x,w,h),w=C.length}else 0===d&&(p++,C=[0]);b[c++]=p,C[0]?C[w++]=I[R]||0:(C=[I[R]],w=1)}while((R++<E||null!=C[0])&&N--);g=null!=C[0],b[0]||b.splice(0,1)}if(1e14==h){for(c=1,N=b[0];N>=10;N/=10,c++);W(y,s+(y.e=c+14*u-1)+1,a,g)}else y.e=u,y.r=+g;return y}}(),f=/^(-?)0([xbo])(?=\w[\w.]*$)/i,y=/^([^.]+)\.$/,b=/^\.([^.]+)$/,C=/^-?(Infinity|NaN)$/,w=/^\s*\+(?=[\w.])|^\s+|\s+$/g,E=function(e,t,r,n){var o,s=r?t:t.replace(w,"");if(C.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(f,function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t}),n&&(o=n,s=s.replace(y,"$1").replace(b,"0.$1")),t!=s))return new B(s,o);if(B.DEBUG)throw Error(i+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},T.absoluteValue=T.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},T.comparedTo=function(e,t){return d(this,new B(e,t))},T.decimalPlaces=T.dp=function(e,t){var r,n,o;if(null!=e)return u(e,0,1e9),null==t?t=N:u(t,0,8),W(new B(this),e+this.e+1,t);if(!(r=this.c))return null;if(n=((o=r.length-1)-l(this.e/14))*14,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},T.dividedBy=T.div=function(e,t){return S(this,new B(e,t),M,N)},T.dividedToIntegerBy=T.idiv=function(e,t){return S(this,new B(e,t),0,1)},T.exponentiatedBy=T.pow=function(e,t){var r,s,a,l,h,d,u,g,p,m=this;if((e=new B(e)).c&&!e.isInteger())throw Error(i+"Exponent not an integer: "+G(e));if(null!=t&&(t=new B(t)),d=e.e>14,!m.c||!m.c[0]||1==m.c[0]&&!m.e&&1==m.c.length||!e.c||!e.c[0])return p=new B(Math.pow(+G(m),d?e.s*(2-c(e)):+G(e))),t?p.mod(t):p;if(u=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(s=!u&&m.isInteger()&&t.isInteger())&&(m=m.mod(t))}else{if(e.e>9&&(m.e>0||m.e<-1||(0==m.e?m.c[0]>1||d&&m.c[1]>=24e7:m.c[0]<8e13||d&&m.c[0]<=9999975e7)))return l=m.s<0&&c(e)?-0:0,m.e>-1&&(l=1/l),new B(u?1/l:l);L&&(l=n(L/14+2))}for(d?(r=new B(.5),u&&(e.s=1),g=c(e)):g=(a=Math.abs(+G(e)))%2,p=new B(A);;){if(g){if(!(p=p.times(m)).c)break;l?p.c.length>l&&(p.c.length=l):s&&(p=p.mod(t))}if(a){if(0===(a=o(a/2)))break;g=a%2}else if(W(e=e.times(r),e.e+1,1),e.e>14)g=c(e);else{if(0==(a=+G(e)))break;g=a%2}m=m.times(m),l?m.c&&m.c.length>l&&(m.c.length=l):s&&(m=m.mod(t))}return s?p:(u&&(p=A.div(p)),t?p.mod(t):l?W(p,L,N,h):p)},T.integerValue=function(e){var t=new B(this);return null==e?e=N:u(e,0,8),W(t,t.e+1,e)},T.isEqualTo=T.eq=function(e,t){return 0===d(this,new B(e,t))},T.isFinite=function(){return!!this.c},T.isGreaterThan=T.gt=function(e,t){return d(this,new B(e,t))>0},T.isGreaterThanOrEqualTo=T.gte=function(e,t){return 1===(t=d(this,new B(e,t)))||0===t},T.isInteger=function(){return!!this.c&&l(this.e/14)>this.c.length-2},T.isLessThan=T.lt=function(e,t){return 0>d(this,new B(e,t))},T.isLessThanOrEqualTo=T.lte=function(e,t){return -1===(t=d(this,new B(e,t)))||0===t},T.isNaN=function(){return!this.s},T.isNegative=function(){return this.s<0},T.isPositive=function(){return this.s>0},T.isZero=function(){return!!this.c&&0==this.c[0]},T.minus=function(e,t){var r,n,o,i,s=this.s;if(t=(e=new B(e,t)).s,!s||!t)return new B(NaN);if(s!=t)return e.s=-t,this.plus(e);var a=this.e/14,h=e.e/14,d=this.c,u=e.c;if(!a||!h){if(!d||!u)return d?(e.s=-t,e):new B(u?this:NaN);if(!d[0]||!u[0])return u[0]?(e.s=-t,e):new B(d[0]?this:3==N?-0:0)}if(a=l(a),h=l(h),d=d.slice(),s=a-h){for((i=s<0)?(s=-s,o=d):(h=a,o=u),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(n=(i=(s=d.length)<(t=u.length))?s:t,s=t=0;t<n;t++)if(d[t]!=u[t]){i=d[t]<u[t];break}if(i&&(o=d,d=u,u=o,e.s=-e.s),(t=(n=u.length)-(r=d.length))>0)for(;t--;d[r++]=0);for(t=1e14-1;n>s;){if(d[--n]<u[n]){for(r=n;r&&!d[--r];d[r]=t);--d[r],d[n]+=1e14}d[n]-=u[n]}for(;0==d[0];d.splice(0,1),--h);return d[0]?z(e,d,h):(e.s=3==N?-1:1,e.c=[e.e=0],e)},T.modulo=T.mod=function(e,t){var r,n;return(e=new B(e,t),this.c&&e.s&&(!e.c||e.c[0]))?e.c&&(!this.c||this.c[0])?(9==H?(n=e.s,e.s=1,r=S(this,e,0,3),e.s=n,r.s*=n):r=S(this,e,0,H),(e=this.minus(r.times(e))).c[0]||1!=H||(e.s=this.s),e):new B(this):new B(NaN)},T.multipliedBy=T.times=function(e,t){var r,n,o,i,s,a,h,d,u,c,g,p,m,f=this.c,y=(e=new B(e,t)).c;if(!f||!y||!f[0]||!y[0])return this.s&&e.s&&(!f||f[0]||y)&&(!y||y[0]||f)?(e.s*=this.s,f&&y?(e.c=[0],e.e=0):e.c=e.e=null):e.c=e.e=e.s=null,e;for(n=l(this.e/14)+l(e.e/14),e.s*=this.s,(h=f.length)<(c=y.length)&&(m=f,f=y,y=m,o=h,h=c,c=o),o=h+c,m=[];o--;m.push(0));for(o=c;--o>=0;){for(r=0,g=y[o]%1e7,p=y[o]/1e7|0,i=o+(s=h);i>o;)a=p*(d=f[--s]%1e7)+(u=f[s]/1e7|0)*g,r=((d=g*d+a%1e7*1e7+m[i]+r)/1e14|0)+(a/1e7|0)+p*u,m[i--]=d%1e14;m[i]=r}return r?++n:m.splice(0,1),z(e,m,n)},T.negated=function(){var e=new B(this);return e.s=-e.s||null,e},T.plus=function(e,t){var r,n=this.s;if(t=(e=new B(e,t)).s,!n||!t)return new B(NaN);if(n!=t)return e.s=-t,this.minus(e);var o=this.e/14,i=e.e/14,s=this.c,a=e.c;if(!o||!i){if(!s||!a)return new B(n/0);if(!s[0]||!a[0])return a[0]?e:new B(s[0]?this:0*n)}if(o=l(o),i=l(i),s=s.slice(),n=o-i){for(n>0?(i=o,r=a):(n=-n,r=s),r.reverse();n--;r.push(0));r.reverse()}for((n=s.length)-(t=a.length)<0&&(r=a,a=s,s=r,t=n),n=0;t;)n=(s[--t]=s[t]+a[t]+n)/1e14|0,s[t]=1e14===s[t]?0:s[t]%1e14;return n&&(s=[n].concat(s),++i),z(e,s,i)},T.precision=T.sd=function(e,t){var r,n,o;if(null!=e&&!!e!==e)return u(e,1,1e9),null==t?t=N:u(t,0,8),W(new B(this),e,t);if(!(r=this.c))return null;if(n=14*(o=r.length-1)+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&this.e+1>n&&(n=this.e+1),n},T.shiftedBy=function(e){return u(e,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+e)},T.squareRoot=T.sqrt=function(){var e,t,r,n,o,i=this.c,s=this.s,a=this.e,d=M+4,u=new B("0.5");if(1!==s||!i||!i[0])return new B(!s||s<0&&(!i||i[0])?NaN:i?this:1/0);if(0==(s=Math.sqrt(+G(this)))||s==1/0?(((t=h(i)).length+a)%2==0&&(t+="0"),s=Math.sqrt(+t),a=l((a+1)/2)-(a<0||a%2),r=new B(t=s==1/0?"5e"+a:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+a)):r=new B(s+""),r.c[0]){for((s=(a=r.e)+d)<3&&(s=0);;)if(o=r,r=u.times(o.plus(S(this,o,d,1))),h(o.c).slice(0,s)===(t=h(r.c)).slice(0,s)){if(r.e<a&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(n||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(this));break}if(!n&&(W(o,o.e+M+2,0),o.times(o).eq(this))){r=o;break}d+=4,s+=4,n=1}}return W(r,r.e+M+1,N,e)},T.toExponential=function(e,t){return null!=e&&(u(e,0,1e9),e++),V(this,e,t,1)},T.toFixed=function(e,t){return null!=e&&(u(e,0,1e9),e=e+this.e+1),V(this,e,t)},T.toFormat=function(e,t,r){var n;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=P;else if("object"!=typeof r)throw Error(i+"Argument not an object: "+r);if(n=this.toFixed(e,t),this.c){var o,s=n.split("."),a=+r.groupSize,l=+r.secondaryGroupSize,h=r.groupSeparator||"",d=s[0],u=s[1],c=this.s<0,g=c?d.slice(1):d,p=g.length;if(l&&(o=a,a=l,l=o,p-=o),a>0&&p>0){for(o=p%a||a,d=g.substr(0,o);o<p;o+=a)d+=h+g.substr(o,a);l>0&&(d+=h+g.slice(o)),c&&(d="-"+d)}n=u?d+(r.decimalSeparator||"")+((l=+r.fractionGroupSize)?u.replace(RegExp("\\d{"+l+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):u):d}return(r.prefix||"")+n+(r.suffix||"")},T.toFraction=function(e){var t,r,n,o,s,l,d,u,c,g,p,m,f=this.c;if(null!=e&&(!(d=new B(e)).isInteger()&&(d.c||1!==d.s)||d.lt(A)))throw Error(i+"Argument "+(d.isInteger()?"out of range: ":"not an integer: ")+G(d));if(!f)return new B(this);for(t=new B(A),c=r=new B(A),n=u=new B(A),m=h(f),s=t.e=m.length-this.e-1,t.c[0]=a[(l=s%14)<0?14+l:l],e=!e||d.comparedTo(t)>0?s>0?t:c:d,l=_,_=1/0,d=new B(m),u.c[0]=0;g=S(d,t,0,1),1!=(o=r.plus(g.times(n))).comparedTo(e);)r=n,n=o,c=u.plus(g.times(o=c)),u=o,t=d.minus(g.times(o=t)),d=o;return o=S(e.minus(r),n,0,1),u=u.plus(o.times(c)),r=r.plus(o.times(n)),u.s=c.s=this.s,s*=2,p=1>S(c,n,s,N).minus(this).abs().comparedTo(S(u,r,s,N).minus(this).abs())?[c,n]:[u,r],_=l,p},T.toNumber=function(){return+G(this)},T.toPrecision=function(e,t){return null!=e&&u(e,1,1e9),V(this,e,t,2)},T.toString=function(e){var t,r=this,n=r.s,o=r.e;return null===o?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=o<=I||o>=x?g(h(r.c),o):p(h(r.c),o,"0"):10===e&&F?t=p(h((r=W(new B(r),M+o+1,N)).c),r.e,"0"):(u(e,2,D.length,"Base"),t=R(p(h(r.c),o,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},T.valueOf=T.toJSON=function(){return G(this)},T._isBigNumber=!0,null!=t&&B.set(t),B}()).default=t.BigNumber=t,m.exports?m.exports=t:(e||(e="u">typeof self&&self?self:window),e.BigNumber=t)})("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{});var f=m.exports;let y=p(),b=o(),C={trillion:1e12,billion:1e9,million:1e6,thousand:1e3},w={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:S,decimalSuffixes:R}=y.currentBytes(),E={scale:1024,suffixes:R,marker:"bd"},T={scale:1024,suffixes:S,marker:"b"},A={scale:1e3,suffixes:R,marker:"d"};function M(e,t,r){let n=t[0],o=Math.abs(e);if(o>=r){for(let i=1;i<t.length;++i){let s=Math.pow(r,i),a=Math.pow(r,i+1);if(o>=s&&o<a){n=t[i],e/=s;break}}n===t[0]&&(e/=Math.pow(r,t.length-1),n=t[t.length-1])}return{value:e,suffix:n}}function N(e){let t="";for(let r=0;r<e;r++)t+="0";return t}function I({instance:e,providedFormat:t,state:r=y,decimalSeparator:n,defaults:o=r.currentDefaults()}){var i,s,a,l,h;let d,u,c,g,p,m,b,S=e._value;if(0===S&&r.hasZeroFormat())return r.getZeroFormat();if(!isFinite(S))return S.toString();let R=Object.assign({},w,o,t),E=R.totalLength,T=E?0:R.characteristic,A=R.optionalCharacteristic,M=R.forceAverage,x=R.lowPrecision,O=!!E||!!M||R.average,_=E?-1:O&&void 0===t.mantissa?0:R.mantissa,k=!E&&(void 0===t.optionalMantissa?-1===_:R.optionalMantissa),H=R.trimMantissa,L=R.thousandSeparated,P=R.spaceSeparated,D=R.negative,F=R.forceSign,B=R.exponential,V=R.roundingFunction,U="";if(O){let e=function({value:e,forceAverage:t,lowPrecision:r=!0,abbreviations:n,spaceSeparated:o=!1,totalLength:i=0,roundingFunction:s=Math.round}){let a="",l=Math.abs(e),h=-1;if(t&&n[t]&&C[t]?(a=n[t],e/=C[t]):l>=C.trillion||r&&1===s(l/C.trillion)?(a=n.trillion,e/=C.trillion):l<C.trillion&&l>=C.billion||r&&1===s(l/C.billion)?(a=n.billion,e/=C.billion):l<C.billion&&l>=C.million||r&&1===s(l/C.million)?(a=n.million,e/=C.million):(l<C.million&&l>=C.thousand||r&&1===s(l/C.thousand))&&(a=n.thousand,e/=C.thousand),a&&(a=(o?" ":"")+a),i){let t=e<0,r=e.toString().split(".")[0];h=Math.max(i-(t?r.length-1:r.length),0)}return{value:e,abbreviation:a,mantissaPrecision:h}}({value:S,forceAverage:M,lowPrecision:x,abbreviations:r.currentAbbreviations(),spaceSeparated:P,roundingFunction:V,totalLength:E});S=e.value,U+=e.abbreviation,E&&(_=e.mantissaPrecision)}if(B){let e=function({value:e,characteristicPrecision:t}){let[r,n]=e.toExponential().split("e"),o=+r;return t&&1<t&&(o*=Math.pow(10,t-1),n-=t-1,n=n>=0?`+${n}`:n),{value:o,abbreviation:`e${n}`}}({value:S,characteristicPrecision:T});S=e.value,U=e.abbreviation+U}let z=function(e,t,r,n,o,i){if(-1===n)return e;let s=function(e,t,r=Math.round){return -1!==e.toString().indexOf("e")?function(e,t){let r=e.toString(),[n,o]=r.split("e"),[i,s=""]=n.split(".");if(+o>0)r=i+s+N(o-s.length);else{let e=".";e=0>+i?`-0${e}`:`0${e}`;let n=(N(-o-1)+Math.abs(i)+s).substr(0,t);n.length<t&&(n+=N(t-n.length)),r=e+n}return+o>0&&t>0&&(r+=`.${N(t)}`),r}(e,t):new f(r(+`${e}e+${t}`)/Math.pow(10,t)).toFixed(t)}(t,n,i),[a,l=""]=s.toString().split(".");if(l.match(/^0+$/)&&(r||o))return a;let h=l.match(/0+$/);return o&&h?`${a}.${l.toString().slice(0,h.index)}`:s.toString()}(S.toString(),S,k,_,H,V);return i=z=function(e,t,r,n){let o=e,[i,s]=o.toString().split(".");if(i.match(/^-?0$/)&&r)return s?`${i.replace("0","")}.${s}`:i.replace("0","");let a=t<0&&0===i.indexOf("-");if(a&&(i=i.slice(1),o=o.slice(1)),i.length<n){let e=n-i.length;for(let t=0;t<e;t++)o=`0${o}`}return a&&(o=`-${o}`),o.toString()}(z,S,A,T),s=S,a=n,u=(d=r.currentDelimiters()).thousands,a=a||d.decimal,c=d.thousandsSize||3,p=(g=i.toString()).split(".")[0],m=g.split(".")[1],b=s<0&&0===p.indexOf("-"),L&&(b&&(p=p.slice(1)),(function(e,t){let r=[],n=0;for(let o=e;o>0;o--)n===t&&(r.unshift(o),n=0),n++;return r})(p.length,c).forEach((e,t)=>{p=p.slice(0,e+t)+u+p.slice(e+t)}),b&&(p=`-${p}`)),z=g=m?p+a+m:p,(O||B)&&(z+=U),(F||S<0)&&(l=z,z=0===(h=S)?l:0==+l?l.replace("-",""):h>0?`+${l}`:"sign"===D?l:`(${l.replace("-","")})`),z}function x(e,t){if(!e)return t;let r=Object.keys(e);return 1===r.length&&"output"===r[0]?t:e}function O(e,t,r){let n=new f(e._value),o=t;return r.isNumbro(t)&&(o=t._value),o=new f(o),e._value=n.minus(o).toNumber(),e}let _=p(),k=o(),H={loadLanguagesInNode:e=>{e.forEach(e=>{let t;try{t=function(e){throw 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.`)}t&&V.registerLanguage(t)})}},L=n(),P={format:(...e)=>(function(e,t={},r){if("string"==typeof t&&(t=g(t)),!b.validateFormat(t))return"ERROR: invalid format";let n=t.prefix||"",o=t.postfix||"",i=function(e,t,r){var n,o,i;switch(t.output){case"currency":let s,a,l,h,d,u,c,g,p,m;return n=t=x(t,y.currentCurrencyDefaultFormat()),s=y.currentCurrency(),l=Object.assign({},w,a=Object.assign({},n)),d="",u=!!l.totalLength||!!l.forceAverage||l.average,c=a.currencyPosition||s.position,g=a.currencySymbol||s.symbol,p=void 0!==l.spaceSeparatedCurrency?l.spaceSeparatedCurrency:l.spaceSeparated,void 0===a.lowPrecision&&(a.lowPrecision=!1),p&&(d=" "),"infix"===c&&(h=d+g+d),m=I({instance:e,providedFormat:a,state:y,decimalSeparator:h}),"prefix"===c&&(m=e._value<0&&"sign"===l.negative?`-${d}${g}${m.slice(1)}`:e._value>0&&l.forceSign?`+${d}${g}${m.slice(1)}`:g+d+m),c&&"postfix"!==c||(m=m+(d=!l.spaceSeparatedAbbreviation&&u?"":d)+g),m;case"percent":let f,b,C;return o=t=x(t,y.currentPercentageDefaultFormat()),f=o.prefixSymbol,b=I({instance:r(100*e._value),providedFormat:o,state:y}),C=Object.assign({},w,o),f?`%${C.spaceSeparated?" ":""}${b}`:`${b}${C.spaceSeparated?" ":""}%`;case"byte":return function(e,t,r,n){let o=t.base||"binary",i=Object.assign({},w,t),{binarySuffixes:s,decimalSuffixes:a}=r.currentBytes(),l={general:{scale:1024,suffixes:a||R,marker:"bd"},binary:{scale:1024,suffixes:s||S,marker:"b"},decimal:{scale:1e3,suffixes:a||R,marker:"d"}}[o],{value:h,suffix:d}=M(e._value,l.suffixes,l.scale),u=I({instance:n(h),providedFormat:t,state:r,defaults:r.currentByteDefaultFormat()});return`${u}${i.spaceSeparated?" ":""}${d}`}(e,t=x(t,y.currentByteDefaultFormat()),y,r);case"time":let E,T,A;return t=x(t,y.currentTimeDefaultFormat()),E=Math.floor(e._value/60/60),T=Math.floor((e._value-60*E*60)/60),A=Math.round(e._value-60*E*60-60*T),`${E}:${T<10?"0":""}${T}:${A<10?"0":""}${A}`;case"ordinal":let N,O,_,k;return i=t=x(t,y.currentOrdinalDefaultFormat()),N=y.currentOrdinal(),O=Object.assign({},w,i),_=I({instance:e,providedFormat:i,state:y}),k=N(e._value),`${_}${O.spaceSeparated?" ":""}${k}`;default:return I({instance:e,providedFormat:t,numbro:r})}}(e,t,r);return(i=n+i)+o})(...e,V),getByteUnit:(...e)=>(function(e){return M(e._value,E.suffixes,E.scale).suffix})(...e),getBinaryByteUnit:(...e)=>(function(e){return M(e._value,T.suffixes,T.scale).suffix})(...e),getDecimalByteUnit:(...e)=>(function(e){return M(e._value,A.suffixes,A.scale).suffix})(...e),formatOrDefault:x},D={add:(e,t)=>{let r,n;return r=new f(e._value),n=t,V.isNumbro(t)&&(n=t._value),n=new f(n),e._value=r.plus(n).toNumber(),e},subtract:(e,t)=>O(e,t,V),multiply:(e,t)=>{let r,n;return r=new f(e._value),n=t,V.isNumbro(t)&&(n=t._value),n=new f(n),e._value=r.times(n).toNumber(),e},divide:(e,t)=>{let r,n;return r=new f(e._value),n=t,V.isNumbro(t)&&(n=t._value),n=new f(n),e._value=r.dividedBy(n).toNumber(),e},set:(e,t)=>{let r;return r=t,V.isNumbro(t)&&(r=t._value),e._value=r,e},difference:(e,t)=>{let r;return O(r=V(e._value),t,V),Math.abs(r._value)},BigNumber:f};class F{constructor(e){this._value=e}clone(){return V(this._value)}format(e={}){return P.format(this,e)}formatCurrency(e){return"string"==typeof e&&(e=g(e)),(e=P.formatOrDefault(e,_.currentCurrencyDefaultFormat())).output="currency",P.format(this,e)}formatTime(e={}){return e.output="time",P.format(this,e)}binaryByteUnits(){return P.getBinaryByteUnit(this)}decimalByteUnits(){return P.getDecimalByteUnit(this)}byteUnits(){return P.getByteUnit(this)}difference(e){return D.difference(this,e)}add(e){return D.add(this,e)}subtract(e){return D.subtract(this,e)}multiply(e){return D.multiply(this,e)}divide(e){return D.divide(this,e)}set(e){return D.set(this,B(e))}value(){return this._value}valueOf(){return this._value}}function B(e){let t=e;return V.isNumbro(e)?t=e._value:"string"==typeof e?t=V.unformat(e):isNaN(e)&&(t=NaN),t}function V(e){return new F(B(e))}V.version="2.5.0",V.isNumbro=function(e){return e instanceof F},V.language=_.currentLanguage,V.registerLanguage=_.registerLanguage,V.setLanguage=_.setLanguage,V.languages=_.languages,V.languageData=_.languageData,V.zeroFormat=_.setZeroFormat,V.defaultFormat=_.currentDefaults,V.setDefaults=_.setDefaults,V.defaultCurrencyFormat=_.currentCurrencyDefaultFormat,V.validate=k.validate,V.loadLanguagesInNode=H.loadLanguagesInNode,V.unformat=L.unformat,V.BigNumber=D.BigNumber;var U=V&&V.__esModule&&Object.prototype.hasOwnProperty.call(V,"default")?V.default:V;window.numbro=r(6558).A},603(e,t,r){"use strict";r.r(t),r.d(t,{EOF:()=>eR,LexerDefinitionErrorType:()=>b,NoViableAltException:()=>tL,Parser:()=>ra,resolveGrammar:()=>tT,defaultParserErrorProvider:()=>tw,EarlyExitException:()=>tD,CstParser:()=>rl,Option:()=>eO,createSyntaxDiagramsCode:()=>rd,Alternation:()=>eP,assignOccurrenceIndices:()=>tM,ParserDefinitionErrorType:()=>S,GAstVisitor:()=>ez,Rule:()=>eI,defaultGrammarValidatorErrorProvider:()=>tv,defaultGrammarResolverErrorProvider:()=>tS,tokenMatcher:()=>eT,clearCache:()=>rb,RepetitionMandatory:()=>e_,Terminal:()=>eD,RepetitionMandatoryWithSeparator:()=>ek,createTokenInstance:()=>eE,RepetitionWithSeparator:()=>eL,defaultLexerErrorProvider:()=>ea,MismatchedTokenException:()=>tH,Repetition:()=>eH,tokenLabel:()=>ed,validateGrammar:()=>tA,NotAllInputParsedException:()=>tP,tokenName:()=>eu,Lexer:()=>eh,generateParserModule:()=>ry,NonTerminal:()=>eN,EMPTY_ALT:()=>rs,generateParserFactory:()=>rf,EmbeddedActionsParser:()=>rh,isRecognitionException:()=>tk,createToken:()=>eS,serializeGrammar:()=>eF,Flat:()=>ex,serializeProduction:()=>eB,VERSION:()=>R});var n,o,i,s,a,l,h,d,u,c,g,p,m,f,y,b,C,w,S,R="6.5.0",E=r(6642),T=r(5713),A={},M=new T.RegExpParser;function N(e){var t=e.toString();if(A.hasOwnProperty(t))return A[t];var r=M.pattern(t);return A[t]=r,r}var I=(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),x="Complement Sets are not supported for first char optimization",O='Unable to use "first char" lexer optimizations:\n';function _(e,t,r){var n=Q(e);t[n]=n,!0===r&&function(e,t){var r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){var o=Q(n.charCodeAt(0));t[o]=o}else{var i=r.toLowerCase();if(i!==r){var o=Q(i.charCodeAt(0));t[o]=o}}}(e,t)}function k(e,t){return(0,E.I6)(e.value,function(e){return"number"==typeof e?(0,E.gR)(t,e):void 0!==(0,E.I6)(t,function(t){return e.from<=t&&t<=e.to})})}var H=function(e){function t(t){var r=e.call(this)||this;return r.targetCharCodes=t,r.found=!1,r}return I(t,e),t.prototype.visitChildren=function(t){if(!0!==this.found){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}e.prototype.visitChildren.call(this,t)}},t.prototype.visitCharacter=function(e){(0,E.gR)(this.targetCharCodes,e.value)&&(this.found=!0)},t.prototype.visitSet=function(e){e.complement?void 0===k(e,this.targetCharCodes)&&(this.found=!0):void 0!==k(e,this.targetCharCodes)&&(this.found=!0)},t}(T.BaseRegExpVisitor);function L(e,t){if(!(t instanceof RegExp))return void 0!==(0,E.I6)(t,function(t){return(0,E.gR)(e,t.charCodeAt(0))});var r=N(t),n=new H(e);return n.visit(r),n.found}var P=(o=function(e,t){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),D="PATTERN",F="defaultMode",B="modes",V="boolean"==typeof RegExp("(?:)").sticky,U=/[^\\][\$]/,z=/[^\\[][\^]|^\^/;function W(e){var t=e.ignoreCase?"i":"";return RegExp("^(?:"+e.source+")",t)}function G(e){var t=e.ignoreCase?"iy":"y";return RegExp(""+e.source,t)}function $(e){var t=e.PATTERN;if((0,E.gd)(t))return!1;if((0,E.Tn)(t))return!0;if((0,E.zy)(t,"exec"))return!0;if((0,E.Kg)(t))return!1;throw Error("non exhaustive match")}function Y(e){return!!(0,E.Kg)(e)&&1===e.length&&e.charCodeAt(0)}var j={test:function(e){for(var t=e.length,r=this.lastIndex;r<t;r++){var n=e.charCodeAt(r);if(10===n)return this.lastIndex=r+1,!0;if(13===n)return 10===e.charCodeAt(r+1)?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function q(e,t){if((0,E.zy)(e,"LINE_BREAKS"))return!1;if((0,E.gd)(e.PATTERN)){try{L(t,e.PATTERN)}catch(e){return{issue:b.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if((0,E.Kg)(e.PATTERN))return!1;if($(e))return{issue:b.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function K(e){return(0,E.Tj)(e,function(e){return(0,E.Kg)(e)&&e.length>0?e.charCodeAt(0):e})}function X(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}function Q(e){return e<256?e:Z[e]}var Z=[];function J(e,t){var r=e.tokenTypeIdx;return r===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[r]}function ee(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var et=1,er={};function en(e){var t,r,n,o=function(e){for(var t=(0,E.T9)(e),r=e,n=!0;n;){r=(0,E.oE)((0,E.Bq)((0,E.Tj)(r,function(e){return e.CATEGORIES})));var o=(0,E.iv)(r,t);t=t.concat(o),(0,E.Im)(o)?n=!1:r=o}return t}(e);t=o,(0,E.jJ)(t,function(e){var t,r;eo(e)||(er[et]=e,e.tokenTypeIdx=et++),ei(e)&&!(0,E.cy)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),ei(e)||(e.CATEGORIES=[]),t=e,(0,E.zy)(t,"categoryMatches")||(e.categoryMatches=[]),r=e,(0,E.zy)(r,"categoryMatchesMap")||(e.categoryMatchesMap={})}),r=o,(0,E.jJ)(r,function(e){!function e(t,r){(0,E.jJ)(t,function(e){r.categoryMatchesMap[e.tokenTypeIdx]=!0}),(0,E.jJ)(r.CATEGORIES,function(n){var o=t.concat(r);(0,E.gR)(o,n)||e(o,n)})}([],e)}),n=o,(0,E.jJ)(n,function(e){e.categoryMatches=[],(0,E.jJ)(e.categoryMatchesMap,function(t,r){e.categoryMatches.push(er[r].tokenTypeIdx)})}),(0,E.jJ)(o,function(e){e.isParent=e.categoryMatches.length>0})}function eo(e){return(0,E.zy)(e,"tokenTypeIdx")}function ei(e){return(0,E.zy)(e,"CATEGORIES")}function es(e){return(0,E.zy)(e,"tokenTypeIdx")}var ea={buildUnableToPopLexerModeMessage:function(e){return"Unable to pop Lexer Mode after encountering Token ->"+e.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(e,t,r,n,o){return"unexpected character: ->"+e.charAt(t)+"<- at offset: "+t+", skipped "+r+" characters."}};(i=b||(b={}))[i.MISSING_PATTERN=0]="MISSING_PATTERN",i[i.INVALID_PATTERN=1]="INVALID_PATTERN",i[i.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",i[i.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",i[i.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",i[i.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",i[i.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",i[i.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",i[i.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",i[i.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",i[i.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",i[i.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",i[i.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",i[i.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",i[i.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",i[i.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",i[i.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK";var el={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:ea,traceInitPerf:!1,skipValidations:!1};Object.freeze(el);var eh=function(){function e(e,t){var r=this;if(void 0===t&&(t=el),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=(0,E.h1)(el,t);var n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var n,o=!0;r.TRACE_INIT("Lexer Config handling",function(){if(r.config.lineTerminatorsPattern===el.lineTerminatorsPattern)r.config.lineTerminatorsPattern=j;else if(r.config.lineTerminatorCharacters===el.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n For 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.');r.trackStartLines=/full|onlyStart/i.test(r.config.positionTracking),r.trackEndLines=/full/i.test(r.config.positionTracking),(0,E.cy)(e)?((n={modes:{}}).modes[F]=(0,E.T9)(e),n[F]=F):(o=!1,n=(0,E.lR)(e))}),!1===r.config.skipValidations&&(r.TRACE_INIT("performRuntimeChecks",function(){var e,t;r.lexerDefinitionErrors=r.lexerDefinitionErrors.concat((e=n,r.trackStartLines,r.config.lineTerminatorCharacters,t=[],(0,E.zy)(e,F)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+F+"> property in its definition\n",type:b.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,E.zy)(e,B)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+B+"> property in its definition\n",type:b.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,E.zy)(e,B)&&(0,E.zy)(e,F)&&!(0,E.zy)(e.modes,e.defaultMode)&&t.push({message:"A MultiMode Lexer cannot be initialized with a "+F+": <"+e.defaultMode+">which does not exist\n",type:b.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,E.zy)(e,B)&&(0,E.jJ)(e.modes,function(e,r){(0,E.jJ)(e,function(e,n){(0,E.b0)(e)&&t.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+r+"> at index: <")+n+">\n",type:b.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),t))}),r.TRACE_INIT("performWarningRuntimeChecks",function(){var e,t,o,i,s,a,l,h;r.lexerDefinitionWarning=r.lexerDefinitionWarning.concat((e=n,t=r.trackStartLines,o=r.config.lineTerminatorCharacters,i=[],s=!1,a=(0,E.oE)((0,E.Bq)((0,E.LG)(e.modes,function(e){return e}))),l=(0,E.ku)(a,function(e){return e[D]===eh.NA}),h=K(o),t&&(0,E.jJ)(l,function(e){var t=q(e,h);if(!1!==t){var r={message:function(e,t){if(t.issue===b.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n The problem is in the <"+e.name+"> Token Type\n Root cause: "+t.errMsg+".\n For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(t.issue===b.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n The problem is in the <"+e.name+"> Token Type\n For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}(e,t),type:t.issue,tokenType:e};i.push(r)}else(0,E.zy)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(s=!0):L(h,e.PATTERN)&&(s=!0)}),t&&!s&&i.push({message:"Warning: No LINE_BREAKS Found.\n This Lexer has been defined to track line and column information,\n But none of the Token Types can be identified as matching a line terminator.\n See https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n for details.",type:b.NO_LINE_BREAKS_FLAGS}),i))})),n.modes=n.modes?n.modes:{},(0,E.jJ)(n.modes,function(e,t){n.modes[t]=(0,E.ku)(e,function(e){return(0,E.b0)(e)})});var i=(0,E.HP)(n.modes);if((0,E.jJ)(n.modes,function(e,n){r.TRACE_INIT("Mode: <"+n+"> processing",function(){if(r.modes.push(n),!1===r.config.skipValidations&&r.TRACE_INIT("validatePatterns",function(){var t,n,o,s,a,l,h,d,u,c,g,p,m,f,y,C,w,S,R,A,M,I,x,O,_,k,H,L,F,B,V,W,G;r.lexerDefinitionErrors=r.lexerDefinitionErrors.concat((t=[],a=e,l=(0,E.pb)(a,function(e){return!(0,E.zy)(e,D)}),n={errors:(0,E.Tj)(l,function(e){return{message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:b.MISSING_PATTERN,tokenTypes:[e]}}),valid:(0,E.iv)(a,l)},t=t.concat(n.errors),s=(h=n.valid,d=(0,E.pb)(h,function(e){var t=e[D];return!(0,E.gd)(t)&&!(0,E.Tn)(t)&&!(0,E.zy)(t,"exec")&&!(0,E.Kg)(t)}),o={errors:(0,E.Tj)(d,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:b.INVALID_PATTERN,tokenTypes:[e]}}),valid:(0,E.iv)(h,d)}).valid,t=(t=(t=(t=(t=t.concat(o.errors)).concat((u=s,c=[],g=(0,E.pb)(u,function(e){return(0,E.gd)(e[D])}),(c=(c=(c=(c=c.concat((p=g,m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return P(t,e),t.prototype.visitEndAnchor=function(e){this.found=!0},t}(T.BaseRegExpVisitor),f=(0,E.pb)(p,function(e){var t=e[D];try{var r=N(t),n=new m;return n.visit(r),n.found}catch(e){return U.test(t.source)}}),(0,E.Tj)(f,function(e){return{message:"Unexpected RegExp Anchor Error:\n Token Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n See sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS for details.",type:b.EOI_ANCHOR_FOUND,tokenTypes:[e]}})))).concat((y=g,C=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return P(t,e),t.prototype.visitStartAnchor=function(e){this.found=!0},t}(T.BaseRegExpVisitor),w=(0,E.pb)(y,function(e){var t=e[D];try{var r=N(t),n=new C;return n.visit(r),n.found}catch(e){return z.test(t.source)}}),(0,E.Tj)(w,function(e){return{message:"Unexpected RegExp Anchor Error:\n Token Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n See https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS for details.",type:b.SOI_ANCHOR_FOUND,tokenTypes:[e]}})))).concat((S=g,R=(0,E.pb)(S,function(e){var t=e[D];return t instanceof RegExp&&(t.multiline||t.global)}),(0,E.Tj)(R,function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:b.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}})))).concat((A=g,M=[],I=(0,E.Tj)(A,function(e){return(0,E.TS)(A,function(t,r){return e.PATTERN.source!==r.PATTERN.source||(0,E.gR)(M,r)||r.PATTERN===eh.NA||(M.push(r),t.push(r)),t},[])}),I=(0,E.oE)(I),x=(0,E.pb)(I,function(e){return e.length>1}),(0,E.Tj)(x,function(e){var t=(0,E.Tj)(e,function(e){return e.name});return{message:"The same RegExp pattern ->"+(0,E.$1)(e).PATTERN+"<-has been used in all of the following Token Types: "+t.join(", ")+" <-",type:b.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})))).concat((O=g,_=(0,E.pb)(O,function(e){return e[D].test("")}),(0,E.Tj)(_,function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:b.EMPTY_MATCH_PATTERN,tokenTypes:[e]}})))))).concat((k=s,H=(0,E.pb)(k,function(e){if(!(0,E.zy)(e,"GROUP"))return!1;var t=e.GROUP;return t!==eh.SKIPPED&&t!==eh.NA&&!(0,E.Kg)(t)}),(0,E.Tj)(H,function(e){return{message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:b.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}})))).concat((L=s,F=i,B=(0,E.pb)(L,function(e){return void 0!==e.PUSH_MODE&&!(0,E.gR)(F,e.PUSH_MODE)}),(0,E.Tj)(B,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:b.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}})))).concat((V=s,W=[],G=(0,E.TS)(V,function(e,t,r){var n,o=t.PATTERN;return o===eh.NA||((0,E.Kg)(o)?e.push({str:o,idx:r,tokenType:t}):(0,E.gd)(o)&&(n=o,void 0===(0,E.I6)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],function(e){return -1!==n.source.indexOf(e)}))&&e.push({str:o.source,idx:r,tokenType:t})),e},[]),(0,E.jJ)(V,function(e,t){(0,E.jJ)(G,function(r){var n=r.str,o=r.idx,i=r.tokenType;if(t<o&&function(e,t){if((0,E.gd)(t)){var r=t.exec(e);return null!==r&&0===r.index}if((0,E.Tn)(t))return t(e,0,[],{});if((0,E.zy)(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}(n,e.PATTERN)){var s="Token: ->"+i.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";W.push({message:s,type:b.UNREACHABLE_PATTERN,tokenTypes:[e,i]})}})}),W))))}),(0,E.Im)(r.lexerDefinitionErrors)){var o;en(e),r.TRACE_INIT("analyzeTokenTypes",function(){var n,i,s,a,l,h,d,u,c,g,p,m,f,y,b,C,w;n={lineTerminatorCharacters:r.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:r.TRACE_INIT.bind(r)},(y=(n=(0,E.NT)(n,{useSticky:V,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(e,t){return t()}})).tracer)("initCharCodeToOptimizedIndexMap",function(){if((0,E.Im)(Z)){Z=Array(65536);for(var e=0;e<65536;e++)Z[e]=e>255?255+~~(e/255):e}}),y("Reject Lexer.NA",function(){i=(0,E.ku)(e,function(e){return e[D]===eh.NA})}),b=!1,y("Transform Patterns",function(){b=!1,s=(0,E.Tj)(i,function(e){var t=e[D];if((0,E.gd)(t)){var r=t.source;return 1===r.length&&"^"!==r&&"$"!==r&&"."!==r?r:2!==r.length||"\\"!==r[0]||(0,E.gR)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?n.useSticky?G(t):W(t):r[1]}if((0,E.Tn)(t))return b=!0,{exec:t};if((0,E.zy)(t,"exec"))return b=!0,t;if("string"==typeof t)if(1===t.length)return t;else{var o=new RegExp(t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"));return n.useSticky?G(o):W(o)}throw Error("non exhaustive match")})}),y("misc mapping",function(){a=(0,E.Tj)(i,function(e){return e.tokenTypeIdx}),l=(0,E.Tj)(i,function(e){var t=e.GROUP;if(t!==eh.SKIPPED){if((0,E.Kg)(t))return t;if((0,E.b0)(t))return!1;throw Error("non exhaustive match")}}),h=(0,E.Tj)(i,function(e){var t=e.LONGER_ALT;if(t)return(0,E.qh)(i,t)}),d=(0,E.Tj)(i,function(e){return e.PUSH_MODE}),u=(0,E.Tj)(i,function(e){return(0,E.zy)(e,"POP_MODE")})}),y("Line Terminator Handling",function(){var e=K(n.lineTerminatorCharacters);c=(0,E.Tj)(i,function(e){return!1}),"onlyOffset"!==n.positionTracking&&(c=(0,E.Tj)(i,function(t){return(0,E.zy)(t,"LINE_BREAKS")?t.LINE_BREAKS:!1===q(t,e)?L(e,t.PATTERN):void 0}))}),y("Misc Mapping #2",function(){g=(0,E.Tj)(i,$),p=(0,E.Tj)(s,Y),m=(0,E.TS)(i,function(e,t){var r=t.GROUP;return(0,E.Kg)(r)&&r!==eh.SKIPPED&&(e[r]=[]),e},{}),f=(0,E.Tj)(s,function(e,t){return{pattern:s[t],longerAlt:h[t],canLineTerminator:c[t],isCustom:g[t],short:p[t],group:l[t],push:d[t],pop:u[t],tokenTypeIdx:a[t],tokenType:i[t]}})}),C=!0,w=[],n.safeMode||y("First Char Optimization",function(){w=(0,E.TS)(i,function(e,t,r){if("string"==typeof t.PATTERN){var o;X(e,Q(t.PATTERN.charCodeAt(0)),f[r])}else if((0,E.cy)(t.START_CHARS_HINT))(0,E.jJ)(t.START_CHARS_HINT,function(t){var n=Q("string"==typeof t?t.charCodeAt(0):t);o!==n&&(o=n,X(e,n,f[r]))});else if((0,E.gd)(t.PATTERN))if(t.PATTERN.unicode)C=!1,n.ensureOptimizations&&(0,E.Zi)(""+O+" Unable to analyze < "+t.PATTERN.toString()+" > pattern.\n The regexp unicode flag is not currently supported by the regexp-to-ast library.\n This will disable the lexer's first char optimizations.\n For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var i=function(e,t){void 0===t&&(t=!1);try{var r=N(e);return function e(t,r,n){switch(t.type){case"Disjunction":for(var o=0;o<t.value.length;o++)e(t.value[o],r,n);break;case"Alternative":for(var i=t.value,o=0;o<i.length;o++){var s=i[o];switch(s.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}switch(s.type){case"Character":_(s.value,r,n);break;case"Set":if(!0===s.complement)throw Error(x);(0,E.jJ)(s.value,function(e){if("number"==typeof e)_(e,r,n);else if(!0===n)for(var t=e.from;t<=e.to;t++)_(t,r,n);else{for(var t=e.from;t<=e.to&&t<256;t++)_(t,r,n);if(e.to>=256)for(var o=e.from>=256?e.from:256,i=e.to,s=Q(o),a=Q(i),l=s;l<=a;l++)r[l]=l}});break;case"Group":e(s.value,r,n);break;default:throw Error("Non Exhaustive Match")}var a=void 0!==s.quantifier&&0===s.quantifier.atLeast;if("Group"===s.type&&!1===function e(t){return!!t.quantifier&&0===t.quantifier.atLeast||!!t.value&&((0,E.cy)(t.value)?(0,E.Si)(t.value,e):e(t.value))}(s)||"Group"!==s.type&&!1===a)break}break;default:throw Error("non exhaustive match!")}return(0,E.zu)(r)}(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===x)t&&(0,E.x5)(""+O+" Unable to optimize: < "+e.toString()+" >\n Complement Sets cannot be automatically optimized.\n This will disable the lexer's first char optimizations.\n See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");else{var n="";t&&(n="\n This will disable the lexer's first char optimizations.\n See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),(0,E.Zi)(O+"\n Failed parsing: < "+e.toString()+" >\n Using the regexp-to-ast library version: "+T.VERSION+"\n Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}(t.PATTERN,n.ensureOptimizations);(0,E.Im)(i)&&(C=!1),(0,E.jJ)(i,function(t){X(e,t,f[r])})}else n.ensureOptimizations&&(0,E.Zi)(""+O+" TokenType: <"+t.name+"> is using a custom token pattern without providing <start_chars_hint> parameter.\n This will disable the lexer's first char optimizations.\n For details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),C=!1;return e},[])}),y("ArrayPacking",function(){w=(0,E.VS)(w)}),o={emptyGroups:m,patternIdxToConfig:f,charCodeToPatternIdxToConfig:w,hasCustom:b,canBeOptimized:C}}),r.patternIdxToConfig[n]=o.patternIdxToConfig,r.charCodeToPatternIdxToConfig[n]=o.charCodeToPatternIdxToConfig,r.emptyGroups=(0,E.h1)(r.emptyGroups,o.emptyGroups),r.hasCustom=o.hasCustom||r.hasCustom,r.canModeBeOptimized[n]=o.canBeOptimized}})}),r.defaultMode=n.defaultMode,!(0,E.Im)(r.lexerDefinitionErrors)&&!r.config.deferDefinitionErrorsHandling)throw Error("Errors detected in definition of Lexer:\n"+(0,E.Tj)(r.lexerDefinitionErrors,function(e){return e.message}).join("-----------------------\n"));(0,E.jJ)(r.lexerDefinitionWarning,function(e){(0,E.x5)(e.message)}),r.TRACE_INIT("Choosing sub-methods implementations",function(){if(V?(r.chopInput=E.zK,r.match=r.matchWithTest):(r.updateLastIndex=E.tE,r.match=r.matchWithExec),o&&(r.handleModes=E.tE),!1===r.trackStartLines&&(r.computeNewColumn=E.zK),!1===r.trackEndLines&&(r.updateTokenEndLineColumnLocation=E.tE),/full/i.test(r.config.positionTracking))r.createTokenInstance=r.createFullToken;else if(/onlyStart/i.test(r.config.positionTracking))r.createTokenInstance=r.createStartOnlyToken;else if(/onlyOffset/i.test(r.config.positionTracking))r.createTokenInstance=r.createOffsetOnlyToken;else throw Error('Invalid <positionTracking> config option: "'+r.config.positionTracking+'"');r.hasCustom?(r.addToken=r.addTokenUsingPush,r.handlePayload=r.handlePayloadWithCustom):(r.addToken=r.addTokenUsingMemberAccess,r.handlePayload=r.handlePayloadNoCustom)}),r.TRACE_INIT("Failed Optimization Warnings",function(){var e=(0,E.TS)(r.canModeBeOptimized,function(e,t,r){return!1===t&&e.push(r),e},[]);if(t.ensureOptimizations&&!(0,E.Im)(e))throw Error("Lexer Modes: < "+e.join(", ")+' > cannot be optimized.\n Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n Or inspect the console log for details on how to resolve these issues.')}),r.TRACE_INIT("clearRegExpParserCache",function(){A={}}),r.TRACE_INIT("toFastProperties",function(){(0,E.Bl)(r)})})}return e.prototype.tokenize=function(e,t){if(void 0===t&&(t=this.defaultMode),!(0,E.Im)(this.lexerDefinitionErrors))throw Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+(0,E.Tj)(this.lexerDefinitionErrors,function(e){return e.message}).join("-----------------------\n"));return this.tokenizeInternal(e,t)},e.prototype.tokenizeInternal=function(e,t){var r,n,o,i,s,a,l,h,d,u,c,g,p,m,f,y,b,C,w=this,S=e,R=S.length,T=0,A=0,M=Array(this.hasCustom?0:Math.floor(e.length/10)),N=[],I=this.trackStartLines?1:void 0,x=this.trackStartLines?1:void 0,O=(r=this.emptyGroups,n={},o=(0,E.HP)(r),(0,E.jJ)(o,function(e){var t=r[e];if((0,E.cy)(t))n[e]=[];else throw Error("non exhaustive match")}),n),_=this.trackStartLines,k=this.config.lineTerminatorsPattern,H=0,L=[],P=[],D=[],F=[];Object.freeze(F);var B=void 0;function V(){return L}function U(e){var t=P[Q(e)];return void 0===t?F:t}var z=function(e){if(1===D.length&&void 0===e.tokenType.PUSH_MODE){var t=w.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{D.pop();var r=(0,E.HV)(D);L=w.patternIdxToConfig[r],P=w.charCodeToPatternIdxToConfig[r],H=L.length;var n=w.canModeBeOptimized[r]&&!1===w.config.safeMode;B=P&&n?U:V}};function W(e){D.push(e),P=this.charCodeToPatternIdxToConfig[e],H=(L=this.patternIdxToConfig[e]).length,H=L.length;var t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;B=P&&t?U:V}for(W.call(this,t);T<R;){h=null;var G=S.charCodeAt(T),$=B(G),Y=$.length;for(i=0;i<Y;i++){var j=(C=$[i]).pattern;d=null;var q=C.short;if(!1!==q?G===q&&(h=j):!0===C.isCustom?null!==(b=j.exec(S,T,M,O))?(h=b[0],void 0!==b.payload&&(d=b.payload)):h=null:(this.updateLastIndex(j,T),h=this.match(j,e,T)),null!==h){if(void 0!==(l=C.longerAlt)){var K=L[l],X=K.pattern;u=null,!0===K.isCustom?null!==(b=X.exec(S,T,M,O))?(a=b[0],void 0!==b.payload&&(u=b.payload)):a=null:(this.updateLastIndex(X,T),a=this.match(X,e,T)),a&&a.length>h.length&&(h=a,d=u,C=K)}break}}if(null!==h){if(c=h.length,void 0!==(g=C.group)&&(p=C.tokenTypeIdx,m=this.createTokenInstance(h,T,p,C.tokenType,I,x,c),this.handlePayload(m,d),!1===g?A=this.addToken(M,A,m):O[g].push(m)),e=this.chopInput(e,c),T+=c,x=this.computeNewColumn(x,c),!0===_&&!0===C.canLineTerminator){var Z=0,J=void 0,ee=void 0;k.lastIndex=0;do!0===(J=k.test(h))&&(ee=k.lastIndex-1,Z++);while(!0===J);0!==Z&&(I+=Z,x=c-ee,this.updateTokenEndLineColumnLocation(m,g,ee,Z,I,x,c))}this.handleModes(C,z,W,m)}else{for(var et=T,er=I,en=x,eo=!1;!eo&&T<R;)for(S.charCodeAt(T),e=this.chopInput(e,1),T++,s=0;s<H;s++){var ei=L[s],j=ei.pattern,q=ei.short;if(!1!==q?S.charCodeAt(T)===q&&(eo=!0):!0===ei.isCustom?eo=null!==j.exec(S,T,M,O):(this.updateLastIndex(j,T),eo=null!==j.exec(e)),!0===eo)break}f=T-et,y=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(S,et,f,er,en),N.push({offset:et,line:er,column:en,length:f,message:y})}}return this.hasCustom||(M.length=A),{tokens:M,groups:O,errors:N}},e.prototype.handleModes=function(e,t,r,n){if(!0===e.pop){var o=e.push;t(n),void 0!==o&&r.call(this,o)}else void 0!==e.push&&r.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,r,n,o,i,s){var a,l;void 0!==t&&(l=(a=r===s-1)?-1:0,(1!==n||!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,r,n){return{image:e,startOffset:t,tokenTypeIdx:r,tokenType:n}},e.prototype.createStartOnlyToken=function(e,t,r,n,o,i){return{image:e,startOffset:t,startLine:o,startColumn:i,tokenTypeIdx:r,tokenType:n}},e.prototype.createFullToken=function(e,t,r,n,o,i,s){return{image:e,startOffset:t,endOffset:t+s-1,startLine:o,endLine:o,startColumn:i,endColumn:i+s-1,tokenTypeIdx:r,tokenType:n}},e.prototype.addToken=function(e,t,r){return 666},e.prototype.addTokenUsingPush=function(e,t,r){return e.push(r),t},e.prototype.addTokenUsingMemberAccess=function(e,t,r){return e[t]=r,++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,r){return null},e.prototype.matchWithTest=function(e,t,r){return!0===e.test(t)?t.substring(r,e.lastIndex):null},e.prototype.matchWithExec=function(e,t){var r=e.exec(t);return null!==r?r[0]:r},e.prototype.TRACE_INIT=function(e,t){if(!0!==this.traceInitPerf)return t();this.traceInitIndent++;var r=Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+"--\x3e <"+e+">");var n=(0,E.O1)(t),o=n.time,i=n.value,s=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(r+"<-- <"+e+"> time: "+o+"ms"),this.traceInitIndent--,i},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 ed(e){return ec(e)?e.LABEL:e.name}function eu(e){return e.name}function ec(e){return(0,E.Kg)(e.LABEL)&&""!==e.LABEL}var eg="categories",ep="label",em="group",ef="push_mode",ey="pop_mode",eb="longer_alt",eC="line_breaks",ew="start_chars_hint";function eS(e){return ev(e)}function ev(e){var t=e.pattern,r={};if(r.name=e.name,(0,E.b0)(t)||(r.PATTERN=t),(0,E.zy)(e,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";return(0,E.zy)(e,eg)&&(r.CATEGORIES=e[eg]),en([r]),(0,E.zy)(e,ep)&&(r.LABEL=e[ep]),(0,E.zy)(e,em)&&(r.GROUP=e[em]),(0,E.zy)(e,ey)&&(r.POP_MODE=e[ey]),(0,E.zy)(e,ef)&&(r.PUSH_MODE=e[ef]),(0,E.zy)(e,eb)&&(r.LONGER_ALT=e[eb]),(0,E.zy)(e,eC)&&(r.LINE_BREAKS=e[eC]),(0,E.zy)(e,ew)&&(r.START_CHARS_HINT=e[ew]),r}var eR=ev({name:"EOF",pattern:eh.NA});function eE(e,t,r,n,o,i,s,a){return{image:t,startOffset:r,endOffset:n,startLine:o,endLine:i,startColumn:s,endColumn:a,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function eT(e,t){return J(e,t)}en([eR]);var eA=(s=function(e,t){return(s=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),eM=function(){function e(e){this.definition=e}return e.prototype.accept=function(e){e.visit(this),(0,E.jJ)(this.definition,function(t){t.accept(e)})},e}(),eN=function(e){function t(t){var r=e.call(this,[])||this;return r.idx=1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(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}(eM),eI=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.orgText="",(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),ex=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.ignoreAmbiguities=!1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),eO=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),e_=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),ek=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),eH=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),eL=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),eP=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,r.ignoreAmbiguities=!1,r.hasPredicates=!1,(0,E.kp)(r,(0,E.Up)(t,function(e){return void 0!==e})),r}return eA(t,e),t}(eM),eD=function(){function e(e){this.idx=1,(0,E.kp)(this,(0,E.Up)(e,function(e){return void 0!==e}))}return e.prototype.accept=function(e){e.visit(this)},e}();function eF(e){return(0,E.Tj)(e,eB)}function eB(e){function t(e){return(0,E.Tj)(e,eB)}if(e instanceof eN)return{type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(e instanceof ex)return{type:"Flat",definition:t(e.definition)};if(e instanceof eO)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof e_)return{type:"RepetitionMandatory",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof ek)return{type:"RepetitionMandatoryWithSeparator",name:e.name,idx:e.idx,separator:eB(new eD({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof eL)return{type:"RepetitionWithSeparator",name:e.name,idx:e.idx,separator:eB(new eD({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof eH)return{type:"Repetition",name:e.name,idx:e.idx,definition:t(e.definition)};else if(e instanceof eP)return{type:"Alternation",name:e.name,idx:e.idx,definition:t(e.definition)};else if(e instanceof eD){var r={type:"Terminal",name:e.terminalType.name,label:ed(e.terminalType),idx:e.idx},n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=(0,E.gd)(n)?n.source:n),r}else if(e instanceof eI)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};else throw Error("non exhaustive match")}var eV=function(){function e(){}return e.prototype.walk=function(e,t){var r=this;void 0===t&&(t=[]),(0,E.jJ)(e.definition,function(n,o){var i=(0,E.gv)(e.definition,o+1);if(n instanceof eN)r.walkProdRef(n,i,t);else if(n instanceof eD)r.walkTerminal(n,i,t);else if(n instanceof ex)r.walkFlat(n,i,t);else if(n instanceof eO)r.walkOption(n,i,t);else if(n instanceof e_)r.walkAtLeastOne(n,i,t);else if(n instanceof ek)r.walkAtLeastOneSep(n,i,t);else if(n instanceof eL)r.walkManySep(n,i,t);else if(n instanceof eH)r.walkMany(n,i,t);else if(n instanceof eP)r.walkOr(n,i,t);else throw Error("non exhaustive match")})},e.prototype.walkTerminal=function(e,t,r){},e.prototype.walkProdRef=function(e,t,r){},e.prototype.walkFlat=function(e,t,r){var n=t.concat(r);this.walk(e,n)},e.prototype.walkOption=function(e,t,r){var n=t.concat(r);this.walk(e,n)},e.prototype.walkAtLeastOne=function(e,t,r){var n=[new eO({definition:e.definition})].concat(t,r);this.walk(e,n)},e.prototype.walkAtLeastOneSep=function(e,t,r){var n=eU(e,t,r);this.walk(e,n)},e.prototype.walkMany=function(e,t,r){var n=[new eO({definition:e.definition})].concat(t,r);this.walk(e,n)},e.prototype.walkManySep=function(e,t,r){var n=eU(e,t,r);this.walk(e,n)},e.prototype.walkOr=function(e,t,r){var n=this,o=t.concat(r);(0,E.jJ)(e.definition,function(e){var t=new ex({definition:[e]});n.walk(t,o)})},e}();function eU(e,t,r){return[new eO({definition:[new eD({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var ez=function(){function e(){}return e.prototype.visit=function(e){switch(e.constructor){case eN:return this.visitNonTerminal(e);case ex:return this.visitFlat(e);case eO:return this.visitOption(e);case e_:return this.visitRepetitionMandatory(e);case ek:return this.visitRepetitionMandatoryWithSeparator(e);case eL:return this.visitRepetitionWithSeparator(e);case eH:return this.visitRepetition(e);case eP:return this.visitAlternation(e);case eD:return this.visitTerminal(e);case eI:return this.visitRule(e);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}(),eW=(a=function(e,t){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});function eG(e,t){return void 0===t&&(t=[]),e instanceof eO||e instanceof eH||e instanceof eL||(e instanceof eP?(0,E.zN)(e.definition,function(e){return eG(e,t)}):!(e instanceof eN&&(0,E.gR)(t,e))&&e instanceof eM&&(e instanceof eN&&t.push(e),(0,E.Si)(e.definition,function(e){return eG(e,t)})))}function e$(e){if(e instanceof eN)return"SUBRULE";if(e instanceof eO)return"OPTION";if(e instanceof eP)return"OR";if(e instanceof e_)return"AT_LEAST_ONE";if(e instanceof ek)return"AT_LEAST_ONE_SEP";else if(e instanceof eL)return"MANY_SEP";else if(e instanceof eH)return"MANY";else if(e instanceof eD)return"CONSUME";else throw Error("non exhaustive match")}var eY=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 eW(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";(0,E.zy)(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitNonTerminal=function(e){var t=e.nonTerminalName+this.separator+"Terminal";(0,E.zy)(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}(ez),ej=new eY;function eq(e){if(e instanceof eN)return eq(e.referencedRule);if(e instanceof eD)return[e.terminalType];if(e instanceof ex||e instanceof eO||e instanceof eH||e instanceof e_||e instanceof ek||e instanceof eL||e instanceof eD||e instanceof eI)return function(e){for(var t,r=[],n=e.definition,o=0,i=n.length>o,s=!0;i&&s;)s=eG(t=n[o]),r=r.concat(eq(t)),o+=1,i=n.length>o;return(0,E.sb)(r)}(e);if(e instanceof eP){var t,r;return t=e,r=(0,E.Tj)(t.definition,function(e){return eq(e)}),(0,E.sb)((0,E.Bq)(r))}throw Error("non exhaustive match")}var eK="_~IN~_",eX=(l=function(e,t){return(l=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),eQ=function(e){function t(t){var r=e.call(this)||this;return r.topProd=t,r.follows={},r}return eX(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},t.prototype.walkTerminal=function(e,t,r){},t.prototype.walkProdRef=function(e,t,r){var n,o,i=(n=e.referencedRule,o=e.idx,n.name+o+eK+this.topProd.name),s=eq(new ex({definition:t.concat(r)}));this.follows[i]=s},t}(eV),eZ=(h=function(e,t){return(h=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});function eJ(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset)}function e0(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function e1(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}var e2=function(e){function t(t){var r=e.call(this)||this;return r.result=[],r.ruleIdx=t,r}return eZ(t,e),t.prototype.collectNamedDSLMethod=function(e,t,r){if(!(0,E.b0)(e.name)){var n,o=void 0;if(e instanceof eO||e instanceof eH||e instanceof e_||e instanceof eP)o=new t({definition:e.definition,idx:e.idx});else if(e instanceof ek||e instanceof eL)o=new t({definition:e.definition,idx:e.idx,separator:e.separator});else throw Error("non exhaustive match");var i=[o],s=(n=this.ruleIdx,e.idx|r|n);this.result.push({def:i,key:s,name:e.name,orgProd:e})}},t.prototype.visitOption=function(e){this.collectNamedDSLMethod(e,eO,512)},t.prototype.visitRepetition=function(e){this.collectNamedDSLMethod(e,eH,768)},t.prototype.visitRepetitionMandatory=function(e){this.collectNamedDSLMethod(e,e_,1024)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.collectNamedDSLMethod(e,ek,1536)},t.prototype.visitRepetitionWithSeparator=function(e){this.collectNamedDSLMethod(e,eL,1280)},t.prototype.visitAlternation=function(e){var t=this;this.collectNamedDSLMethod(e,eP,256);var r=e.definition.length>1;(0,E.jJ)(e.definition,function(n,o){if(!(0,E.b0)(n.name)){var i,s,a=n.definition;a=r?[new eO({definition:n.definition})]:n.definition;var l=(i=t.ruleIdx,s=e.idx,256|s|i|o+1<<24);t.result.push({def:a,key:l,name:n.name,orgProd:n})}})},t}(ez),e3=(d=function(e,t){return(d=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),e6=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.path=r,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminalName=n.path.lastTok.name,n.nextTerminalOccurrence=n.path.lastTokOccurrence,n}return e3(t,e),t.prototype.walkTerminal=function(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){var n=new ex({definition:t.concat(r)});this.possibleTokTypes=eq(n),this.found=!0}},t}(function(e){function t(t,r){var n=e.call(this)||this;return n.topProd=t,n.path=r,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return e3(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=(0,E.T9)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,E.T9)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},t.prototype.walk=function(t,r){void 0===r&&(r=[]),this.found||e.prototype.walk.call(this,t,r)},t.prototype.walkProdRef=function(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){var n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}},t.prototype.updateExpectedNext=function(){(0,E.Im)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},t}(eV)),e4=function(e){function t(t,r){var n=e.call(this)||this;return n.topRule=t,n.occurrence=r,n.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},n}return e3(t,e),t.prototype.startWalking=function(){return this.walk(this.topRule),this.result},t}(eV),e5=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e3(t,e),t.prototype.walkMany=function(t,r,n){if(t.idx===this.occurrence){var o=(0,E.$1)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof eD&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkMany.call(this,t,r,n)},t}(e4),e9=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e3(t,e),t.prototype.walkManySep=function(t,r,n){if(t.idx===this.occurrence){var o=(0,E.$1)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof eD&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkManySep.call(this,t,r,n)},t}(e4),e7=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e3(t,e),t.prototype.walkAtLeastOne=function(t,r,n){if(t.idx===this.occurrence){var o=(0,E.$1)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof eD&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOne.call(this,t,r,n)},t}(e4),e8=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e3(t,e),t.prototype.walkAtLeastOneSep=function(t,r,n){if(t.idx===this.occurrence){var o=(0,E.$1)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof eD&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,r,n)},t}(e4);function te(e,t,r){void 0===r&&(r=[]),r=(0,E.T9)(r);var n=[],o=0;function i(i){var s=te(i.concat((0,E.gv)(e,o+1)),t,r);return n.concat(s)}for(;r.length<t&&o<e.length;){var s=e[o];if(s instanceof ex)return i(s.definition);if(s instanceof eN)return i(s.definition);if(s instanceof eO)n=i(s.definition);else if(s instanceof e_){var a=s.definition.concat([new eH({definition:s.definition})]);return i(a)}else if(s instanceof ek){var a=[new ex({definition:s.definition}),new eH({definition:[new eD({terminalType:s.separator})].concat(s.definition)})];return i(a)}else if(s instanceof eL){var a=s.definition.concat([new eH({definition:[new eD({terminalType:s.separator})].concat(s.definition)})]);n=i(a)}else if(s instanceof eH){var a=s.definition.concat([new eH({definition:s.definition})]);n=i(a)}else if(s instanceof eP)return(0,E.jJ)(s.definition,function(e){n=i(e.definition)}),n;else if(s instanceof eD)r.push(s.terminalType);else throw Error("non exhaustive match");o++}return n.push({partialPath:r,suffixDef:(0,E.gv)(e,o)}),n}function tt(e,t,r,n){var o="EXIT_NONE_TERMINAL",i=[o],s="EXIT_ALTERNATIVE",a=!1,l=t.length,h=l-n-1,d=[],u=[];for(u.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,E.Im)(u);){var c=u.pop();if(c===s){a&&(0,E.HV)(u).idx<=h&&u.pop();continue}var g=c.def,p=c.idx,m=c.ruleStack,f=c.occurrenceStack;if(!(0,E.Im)(g)){var y=g[0];if(y===o){var b={idx:p,def:(0,E.gv)(g),ruleStack:(0,E.gc)(m),occurrenceStack:(0,E.gc)(f)};u.push(b)}else if(y instanceof eD)if(p<l-1){var C=p+1;if(r(t[C],y.terminalType)){var b={idx:C,def:(0,E.gv)(g),ruleStack:m,occurrenceStack:f};u.push(b)}}else if(p===l-1)d.push({nextTokenType:y.terminalType,nextTokenOccurrence:y.idx,ruleStack:m,occurrenceStack:f}),a=!0;else throw Error("non exhaustive match");else if(y instanceof eN){var w=(0,E.T9)(m);w.push(y.nonTerminalName);var S=(0,E.T9)(f);S.push(y.idx);var b={idx:p,def:y.definition.concat(i,(0,E.gv)(g)),ruleStack:w,occurrenceStack:S};u.push(b)}else if(y instanceof eO){var R={idx:p,def:(0,E.gv)(g),ruleStack:m,occurrenceStack:f};u.push(R),u.push(s);var T={idx:p,def:y.definition.concat((0,E.gv)(g)),ruleStack:m,occurrenceStack:f};u.push(T)}else if(y instanceof e_){var A=new eH({definition:y.definition,idx:y.idx}),M=y.definition.concat([A],(0,E.gv)(g)),b={idx:p,def:M,ruleStack:m,occurrenceStack:f};u.push(b)}else if(y instanceof ek){var N=new eD({terminalType:y.separator}),A=new eH({definition:[N].concat(y.definition),idx:y.idx}),M=y.definition.concat([A],(0,E.gv)(g)),b={idx:p,def:M,ruleStack:m,occurrenceStack:f};u.push(b)}else if(y instanceof eL){var R={idx:p,def:(0,E.gv)(g),ruleStack:m,occurrenceStack:f};u.push(R),u.push(s);var N=new eD({terminalType:y.separator}),I=new eH({definition:[N].concat(y.definition),idx:y.idx}),M=y.definition.concat([I],(0,E.gv)(g)),T={idx:p,def:M,ruleStack:m,occurrenceStack:f};u.push(T)}else if(y instanceof eH){var R={idx:p,def:(0,E.gv)(g),ruleStack:m,occurrenceStack:f};u.push(R),u.push(s);var I=new eH({definition:y.definition,idx:y.idx}),M=y.definition.concat([I],(0,E.gv)(g)),T={idx:p,def:M,ruleStack:m,occurrenceStack:f};u.push(T)}else if(y instanceof eP)for(var x=y.definition.length-1;x>=0;x--){var O={idx:p,def:y.definition[x].definition.concat((0,E.gv)(g)),ruleStack:m,occurrenceStack:f};u.push(O),u.push(s)}else if(y instanceof ex)u.push({idx:p,def:y.definition.concat((0,E.gv)(g)),ruleStack:m,occurrenceStack:f});else if(y instanceof eI)u.push(function(e,t,r,n){var o=(0,E.T9)(r);o.push(e.name);var i=(0,E.T9)(n);return i.push(1),{idx:t,def:e.definition,ruleStack:o,occurrenceStack:i}}(y,p,m,f));else throw Error("non exhaustive match")}}return d}var tr=(u=function(e,t){return(u=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});(c=C||(C={}))[c.OPTION=0]="OPTION",c[c.REPETITION=1]="REPETITION",c[c.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",c[c.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",c[c.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",c[c.ALTERNATION=5]="ALTERNATION";var tn=function(e){function t(t,r,n){var o=e.call(this)||this;return o.topProd=t,o.targetOccurrence=r,o.targetProdType=n,o}return tr(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},t.prototype.checkIsTarget=function(e,t,r,n){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=r.concat(n),!0)},t.prototype.walkOption=function(t,r,n){this.checkIsTarget(t,C.OPTION,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkAtLeastOne=function(t,r,n){this.checkIsTarget(t,C.REPETITION_MANDATORY,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkAtLeastOneSep=function(t,r,n){this.checkIsTarget(t,C.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkMany=function(t,r,n){this.checkIsTarget(t,C.REPETITION,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkManySep=function(t,r,n){this.checkIsTarget(t,C.REPETITION_WITH_SEPARATOR,r,n)||e.prototype.walkOption.call(this,t,r,n)},t}(eV),to=function(e){function t(t,r,n){var o=e.call(this)||this;return o.targetOccurrence=t,o.targetProdType=r,o.targetRef=n,o.result=[],o}return tr(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,C.OPTION)},t.prototype.visitRepetition=function(e){this.checkIsTarget(e,C.REPETITION)},t.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,C.REPETITION_MANDATORY)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,C.REPETITION_MANDATORY_WITH_SEPARATOR)},t.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,C.REPETITION_WITH_SEPARATOR)},t.prototype.visitAlternation=function(e){this.checkIsTarget(e,C.ALTERNATION)},t}(ez);function ti(e){for(var t=Array(e),r=0;r<e;r++)t[r]=[];return t}function ts(e){for(var t=[""],r=0;r<e.length;r++){for(var n=e[r],o=[],i=0;i<t.length;i++){var s=t[i];o.push(s+"_"+n.tokenTypeIdx);for(var a=0;a<n.categoryMatches.length;a++){var l="_"+n.categoryMatches[a];o.push(s+l)}}t=o}return t}function ta(e,t){for(var r=(0,E.Tj)(e,function(e){return te([e],1)}),n=ti(r.length),o=(0,E.Tj)(r,function(e){var t={};return(0,E.jJ)(e,function(e){var r=ts(e.partialPath);(0,E.jJ)(r,function(e){t[e]=!0})}),t}),i=r,s=1;s<=t;s++){var a=i;i=ti(a.length);for(var l=function(e){for(var r=a[e],l=0;l<r.length;l++){var h=r[l].partialPath,d=r[l].suffixDef,u=ts(h);if(function(e,t,r){for(var n=0;n<e.length;n++)if(n!==r){for(var o=e[n],i=0;i<t.length;i++)if(!0===o[t[i]])return!1}return!0}(o,u,e)||(0,E.Im)(d)||h.length===t){var c=n[e];if(!1===td(c,h)){c.push(h);for(var g=0;g<u.length;g++){var p=u[g];o[e][p]=!0}}}else{var m=te(d,s+1,h);i[e]=i[e].concat(m),(0,E.jJ)(m,function(t){var r=ts(t.partialPath);(0,E.jJ)(r,function(t){o[e][t]=!0})})}}},h=0;h<a.length;h++)l(h)}return n}function tl(e,t,r,n){var o=new to(e,C.ALTERNATION,n);return t.accept(o),ta(o.result,r)}function th(e,t,r,n){var o=new to(e,r);t.accept(o);var i=o.result,s=new tn(t,e,r).startWalking();return ta([new ex({definition:i}),new ex({definition:s})],n)}function td(e,t){t:for(var r=0;r<e.length;r++){var n=e[r];if(n.length===t.length){for(var o=0;o<n.length;o++){var i=t[o],s=n[o];if(!1==(i===s||void 0!==s.categoryMatchesMap[i.tokenTypeIdx]))continue t}return!0}}return!1}function tu(e){return(0,E.Si)(e,function(e){return(0,E.Si)(e,function(e){return(0,E.Si)(e,function(e){return(0,E.Im)(e.categoryMatches)})})})}var tc=(g=function(e,t){return(g=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}g(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});function tg(e){return e$(e)+"_#_"+e.idx+"_#_"+tp(e)}function tp(e){return e instanceof eD?e.terminalType.name:e instanceof eN?e.nonTerminalName:""}var tm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return tc(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}(ez),tf=/^[a-zA-Z_]\w*$/,ty=new RegExp(tf.source.replace("^","^\\$")),tb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.alternations=[],t}return tc(t,e),t.prototype.visitAlternation=function(e){this.alternations.push(e)},t}(ez),tC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return tc(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}(ez),tw={buildMismatchTokenMessage:function(e){var t=e.expected,r=e.actual;return e.previous,e.ruleName,"Expecting "+(ec(t)?"--\x3e "+ed(t)+" <--":"token of type --\x3e "+t.name+" <--")+" but found --\x3e '"+r.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,r=e.actual,n=(e.previous,e.customUserDescription);e.ruleName;var o="Expecting: ",i="\nbut found: '"+(0,E.$1)(r).image+"'";if(n)return o+n+i;var s=(0,E.TS)(t,function(e,t){return e.concat(t)},[]),a=(0,E.Tj)(s,function(e){return"["+(0,E.Tj)(e,function(e){return ed(e)}).join(", ")+"]"});return o+"one of these possible Token sequences:\n"+(0,E.Tj)(a,function(e,t){return" "+(t+1)+". "+e}).join("\n")+i},buildEarlyExitMessage:function(e){var t=e.expectedIterationPaths,r=e.actual,n=e.customUserDescription;e.ruleName;var o="Expecting: ",i="\nbut found: '"+(0,E.$1)(r).image+"'";return n?o+n+i:o+("expecting at least one iteration which starts with one of these possible Token sequences::\n <"+(0,E.Tj)(t,function(e){return"["+(0,E.Tj)(e,function(e){return ed(e)}).join(",")+"]"}).join(" ,"))+">"+i}};Object.freeze(tw);var tS={buildRuleNotFoundError:function(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"}},tv={buildDuplicateFoundError:function(e,t){var r=e.name,n=(0,E.$1)(t),o=n.idx,i=e$(n),s=n instanceof eD?n.terminalType.name:n instanceof eN?n.nonTerminalName:"",a="->"+i+(o>0?o:"")+"<- "+(s?"with argument: ->"+s+"<-":"")+"\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(a=a.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: ->"+ty.toString()+"<-.\nNote that this means a nested rule name must start with the '$'(dollar) sign."},buildDuplicateNestedRuleNameError:function(e,t){return"Duplicate nested rule name: ->"+(0,E.$1)(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=(0,E.Tj)(e.prefixPath,function(e){return ed(e)}).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return"Ambiguous alternatives: <"+e.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\n"+("in <OR"+r+"> 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=(0,E.Tj)(e.prefixPath,function(e){return ed(e)}).join(", "),r=0===e.alternation.idx?"":e.alternation.idx,n="Ambiguous Alternatives Detected: <"+e.ambiguityIndices.join(" ,")+"> in <OR"+r+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\n";return n+"See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details."},buildEmptyRepetitionError:function(e){var t=e$(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,r=t+" --\x3e "+E.Tj(e.leftRecursionPath,function(e){return e.name}).concat([t]).join(" --\x3e ");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 "+r+"\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 eI?e.topLevelRule.name:e.topLevelRule)+"<- is already defined in the grammar: ->"+e.grammarName+"<-"}},tR=(p=function(e,t){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),tE=function(e){function t(t,r){var n=e.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=r,n.errors=[],n}return tR(t,e),t.prototype.resolveRefs=function(){var e=this;(0,E.jJ)((0,E.zu)(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 r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:S.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}},t}(ez);function tT(e){e=(0,E.NT)(e,{errMsgProvider:tS});var t,r={};return(0,E.jJ)(e.rules,function(e){r[e.name]=e}),(t=new tE(r,e.errMsgProvider)).resolveRefs(),t.errors}function tA(e){var t,r,n,o,i,s,a,l,h,d,u,c,g,p,m,f,y,b,w,R,T,A,M,N,I,x,O,_,k,H,L,P,D;return t=(e=(0,E.NT)(e,{errMsgProvider:tv,ignoredIssues:{}})).rules,r=e.maxLookahead,n=e.tokenTypes,o=e.ignoredIssues,i=e.errMsgProvider,s=e.grammarName,a=E.Tj(t,function(e){var t,r,n,o,s,a;return t=e,r=i,n=new tm,t.accept(n),o=n.allProductions,s=E.$z(o,tg),a=E.Up(s,function(e){return e.length>1}),E.Tj(E.zu(a),function(e){var n=E.$1(e),o=r.buildDuplicateFoundError(t,e),i=e$(n),s={message:o,type:S.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:i,occurrence:n.idx},a=tp(n);return a&&(s.parameter=a),s})}),l=E.Tj(t,function(e){return function e(t,r,n,o){void 0===o&&(o=[]);var i=[],s=function e(t){var r=[];if(E.Im(t))return r;var n=E.$1(t);if(n instanceof eN)r.push(n.referencedRule);else if(n instanceof ex||n instanceof eO||n instanceof e_||n instanceof ek||n instanceof eL||n instanceof eH)r=r.concat(e(n.definition));else if(n instanceof eP)r=E.Bq(E.Tj(n.definition,function(t){return e(t.definition)}));else if(n instanceof eD);else throw Error("non exhaustive match");var o=eG(n),i=t.length>1;if(!o||!i)return r;var s=E.gv(t);return r.concat(e(s))}(r.definition);if(E.Im(s))return[];var a=t.name;E.gR(s,t)&&i.push({message:n.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:o}),type:S.LEFT_RECURSION,ruleName:a});var l=E.iv(s,o.concat([t])),h=E.Tj(l,function(r){var i=E.T9(o);return i.push(r),e(t,r,n,i)});return i.concat(E.Bq(h))}(e,e,i)}),h=[],d=[],u=[],(0,E.Si)(l,E.Im)&&(h=(0,E.Tj)(t,function(e){var t,r,n,o;return t=e,r=i,n=new tb,t.accept(n),o=n.alternations,E.TS(o,function(e,n){var o=E.gc(n.definition),i=E.Tj(o,function(e,o){var i=tt([e],[],null,1);return E.Im(i)?{message:r.buildEmptyAlternationError({topLevelRule:t,alternation:n,emptyChoiceIdx:o}),type:S.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:n.idx,alternative:o+1}:null});return e.concat(E.oE(i))},[])}),d=(0,E.Tj)(t,function(e){var t,n,s,a,l,h,d;return t=e,n=r,s=o,a=i,l=new tb,t.accept(l),h=l.alternations,(d=s[t.name])&&(h=(0,E.ku)(h,function(e){return d[e$(e)+(0===e.idx?"":e.idx)]})),h=(0,E.ku)(h,function(e){return!0===e.ignoreAmbiguities}),E.TS(h,function(e,r){var o,i,s,l,h,d,u,c,g,p,m,f,y=tl(r.idx,t,r.maxLookahead||n,r),b=(o=y,i=r,s=t,l=a,h=[],d=(0,E.TS)(o,function(e,t,r){return!0===i.definition[r].ignoreAmbiguities||(0,E.jJ)(t,function(t){var n=[r];(0,E.jJ)(o,function(e,o){r!==o&&td(e,t)&&!0!==i.definition[o].ignoreAmbiguities&&n.push(o)}),n.length>1&&!td(h,t)&&(h.push(t),e.push({alts:n,path:t}))}),e},[]),E.Tj(d,function(e){var t=(0,E.Tj)(e.alts,function(e){return e+1});return{message:l.buildAlternationAmbiguityError({topLevelRule:s,alternation:i,ambiguityIndices:t,prefixPath:e.path}),type:S.AMBIGUOUS_ALTS,ruleName:s.name,occurrence:i.idx,alternatives:[e.alts]}})),C=(u=y,c=r,g=t,p=a,m=[],f=(0,E.TS)(u,function(e,t,r){var n=(0,E.Tj)(t,function(e){return{idx:r,path:e}});return e.concat(n)},[]),(0,E.jJ)(f,function(e){if(!0!==c.definition[e.idx].ignoreAmbiguities){var t=e.idx,r=e.path,n=(0,E.JW)(f,function(e){var n;return!0!==c.definition[e.idx].ignoreAmbiguities&&e.idx<t&&(n=e.path,n.length<r.length&&(0,E.Si)(n,function(e,t){var n=r[t];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]}))}),o=(0,E.Tj)(n,function(e){var r=[e.idx+1,t+1],n=0===c.idx?"":c.idx;return{message:p.buildAlternationPrefixAmbiguityError({topLevelRule:g,alternation:c,ambiguityIndices:r,prefixPath:e.path}),type:S.AMBIGUOUS_PREFIX_ALTS,ruleName:g.name,occurrence:n,alternatives:r}});m=m.concat(o)}}),m);return e.concat(b,C)},[])}),w=t,R=r,T=i,A=[],(0,E.jJ)(w,function(e){var t=new tC;e.accept(t);var r=t.allProductions;(0,E.jJ)(r,function(t){var r=function(e){if(e instanceof eO)return C.OPTION;if(e instanceof eH)return C.REPETITION;if(e instanceof e_)return C.REPETITION_MANDATORY;if(e instanceof ek)return C.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof eL)return C.REPETITION_WITH_SEPARATOR;else if(e instanceof eP)return C.ALTERNATION;else throw Error("non exhaustive match")}(t),n=t.maxLookahead||R,o=th(t.idx,e,r,n)[0];if((0,E.Im)((0,E.Bq)(o))){var i=T.buildEmptyRepetitionError({topLevelRule:e,repetition:t});A.push({message:i,type:S.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),u=A),M=t,N=n,I=i,x=[],O=(0,E.Tj)(N,function(e){return e.name}),(0,E.jJ)(M,function(e){var t=e.name;if((0,E.gR)(O,t)){var r=I.buildNamespaceConflictError(e);x.push({message:r,type:S.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),c=x,g=E.Tj(n,function(e){var t,r,n;return t=e,r=i,n=[],t.name.match(tf)||n.push({message:r.buildTokenNameError({tokenType:t,expectedPattern:tf}),type:S.INVALID_TOKEN_NAME}),n}),_=t,k=i,H=[],(0,E.jJ)(_,function(e){var t=new e2("");e.accept(t);var r=(0,E.Tj)(t.result,function(e){return e.orgProd});H.push((0,E.Tj)(r,function(t){var r,n,o,i;return r=e,n=t,o=k,i=[],n.name.match(ty)||i.push({message:o.buildInvalidNestedRuleNameError(r,n),type:S.INVALID_NESTED_RULE_NAME,ruleName:r.name}),i}))}),p=(0,E.Bq)(H),L=t,P=i,D=[],(0,E.jJ)(L,function(e){var t=new e2("");e.accept(t);var r=(0,E.$z)(t.result,function(e){return e.name}),n=(0,E.Up)(r,function(e){return e.length>1});(0,E.jJ)((0,E.zu)(n),function(t){var r=(0,E.Tj)(t,function(e){return e.orgProd}),n=P.buildDuplicateNestedRuleNameError(e,r);D.push({message:n,type:S.DUPLICATE_NESTED_NAME,ruleName:e.name})})}),m=D,f=(0,E.Tj)(t,function(e){var t,r,n,o;return t=e,r=i,n=new tb,t.accept(n),o=n.alternations,E.TS(o,function(e,n){return n.definition.length>255&&e.push({message:r.buildTooManyAlternativesError({topLevelRule:t,alternation:n}),type:S.TOO_MANY_ALTS,ruleName:t.name,occurrence:n.idx}),e},[])}),y=(0,E.Tj)(t,function(e){var t,r,n,o;return t=e,r=i,n=[],(o=t.name).match(tf)||n.push({message:r.buildInvalidRuleNameError({topLevelRule:t,expectedPattern:tf}),type:S.INVALID_RULE_NAME,ruleName:o}),n}),b=(0,E.Tj)(t,function(e){var r=e,n=t,o=s,a=i,l=[];if((0,E.TS)(n,function(e,t){return t.name===r.name?e+1:e},0)>1){var h=a.buildDuplicateRuleNameError({topLevelRule:r,grammarName:o});l.push({message:h,type:S.DUPLICATE_RULE_NAME,ruleName:r.name})}return l}),E.Bq(a.concat(g,p,m,u,l,h,d,c,f,y,b))}function tM(e){(0,E.jJ)(e.rules,function(e){var t=new eY;e.accept(t),(0,E.jJ)(t.dslMethods,function(e){(0,E.jJ)(e,function(e,t){e.idx=t+1})})})}var tN="MismatchedTokenException",tI="NoViableAltException",tx="EarlyExitException",tO="NotAllInputParsedException",t_=[tN,tI,tx,tO];function tk(e){return(0,E.gR)(t_,e.name)}function tH(e,t,r){this.name=tN,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}function tL(e,t,r){this.name=tI,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}function tP(e,t){this.name=tO,this.message=e,this.token=t,this.resyncedTokens=[]}function tD(e,t,r){this.name=tx,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}Object.freeze(t_),tH.prototype=Error.prototype,tL.prototype=Error.prototype,tP.prototype=Error.prototype,tD.prototype=Error.prototype;var tF={},tB="InRuleRecoveryException";function tV(e){this.name=tB,this.message=e}tV.prototype=Error.prototype;var tU=function(){function e(){}return e.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,E.zy)(e,"recoveryEnabled")?e.recoveryEnabled:ro.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=tz)},e.prototype.getTokenToInsert=function(e){var t=eE(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,r,n){for(var o=this,i=this.findReSyncTokenType(),s=this.exportLexerState(),a=[],l=!1,h=this.LA(1),d=this.LA(1),u=function(){var e=o.LA(0),t=new tH(o.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:h,previous:e,ruleName:o.getCurrRuleFullName()}),h,o.LA(0));t.resyncedTokens=(0,E.gc)(a),o.SAVE_ERROR(t)};!l;)if(this.tokenMatcher(d,n))return void u();else if(r.call(this)){u(),e.apply(this,t);return}else this.tokenMatcher(d,i)?l=!0:(d=this.SKIP_TOKEN(),this.addToResyncTokens(d,a));this.importLexerState(s)},e.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,r){return!(!1===r||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 r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)},e.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){var r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new tV("sad sad panda")},e.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},e.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var r=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||(0,E.Im)(t))return!1;var n=this.LA(1);return void 0!==(0,E.I6)(t,function(e){return r.tokenMatcher(n,e)})},e.prototype.canRecoverWithSingleTokenDeletion=function(e){return this.tokenMatcher(this.LA(2),e)},e.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return(0,E.gR)(r,e)},e.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),r=2;;){var n=t.tokenType;if((0,E.gR)(e,n))return n;t=this.LA(r),r++}},e.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return tF;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}},e.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return(0,E.Im)(this.LAST_EXPLICIT_RULE_STACK)||(t=(0,E.Tj)(this.LAST_EXPLICIT_RULE_STACK,function(t){return e.RULE_STACK[t]}),r=(0,E.Tj)(this.LAST_EXPLICIT_RULE_STACK,function(t){return e.RULE_OCCURRENCE_STACK[t]})),(0,E.Tj)(t,function(n,o){return 0===o?tF:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:r[o],inRule:e.shortRuleNameToFullName(t[o-1])}})},e.prototype.flattenFollowSet=function(){var e=this,t=(0,E.Tj)(this.buildFullFollowKeyStack(),function(t){return e.getFollowSetFromFollowKey(t)});return(0,E.Bq)(t)},e.prototype.getFollowSetFromFollowKey=function(e){if(e===tF)return[eR];var t=e.ruleName+e.idxInCallingRule+eK+e.inRule;return this.resyncFollows[t]},e.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,eR)||t.push(e),t},e.prototype.reSyncTo=function(e){for(var t=[],r=this.LA(1);!1===this.tokenMatcher(r,e);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return(0,E.gc)(t)},e.prototype.attemptInRepetitionRecovery=function(e,t,r,n,o,i,s){},e.prototype.getCurrentGrammarPath=function(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,E.T9)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}},e.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,E.Im)(this.LAST_EXPLICIT_RULE_STACK)?(0,E.Tj)(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)}):(0,E.Tj)(this.LAST_EXPLICIT_RULE_STACK,function(t){return e.shortRuleNameToFullName(e.RULE_STACK[t])})},e}();function tz(e,t,r,n,o,i,s){var a=this.getKeyForAutomaticLookahead(n,o),l=this.firstAfterRepMap[a];if(void 0===l){var h=this.getCurrRuleFullName();l=new i(this.getGAstProductions()[h],o).startWalking(),this.firstAfterRepMap[a]=l}var d=l.token,u=l.occurrence,c=l.isEndOfRule;1===this.RULE_STACK.length&&c&&void 0===d&&(d=eR,u=1),this.shouldInRepetitionRecoveryBeTried(d,u,s)&&this.tryInRepetitionRecovery(e,t,r,d)}var tW=function(){function e(){}return e.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,E.zy)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:ro.dynamicTokensEnabled,this.maxLookahead=(0,E.zy)(e,"maxLookahead")?e.maxLookahead:ro.maxLookahead,this.lookAheadFuncsCache=(0,E.rF)()?new Map:[],(0,E.rF)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},e.prototype.preComputeLookaheadFunctions=function(e){var t=this;(0,E.jJ)(e,function(e){t.TRACE_INIT(e.name+" Rule Lookahead",function(){var r,n=(ej.reset(),e.accept(ej),r=ej.dslMethods,ej.reset(),r),o=n.alternation,i=n.repetition,s=n.option,a=n.repetitionMandatory,l=n.repetitionMandatoryWithSeparator,h=n.repetitionWithSeparator;(0,E.jJ)(o,function(r){var n=0===r.idx?"":r.idx;t.TRACE_INIT(""+e$(r)+n,function(){var n,o,i,s,a,l,h,d,u=(n=r.idx,o=r.maxLookahead||t.maxLookahead,i=r.hasPredicates,s=t.dynamicTokensEnabled,a=t.lookAheadBuilderForAlternatives,h=tu(l=tl(n,e,o))?ee:J,a(l,i,h,s)),c=(d=t.fullRuleNameToShort[e.name],256|r.idx|d);t.setLaFuncCache(c,u)})}),(0,E.jJ)(i,function(r){t.computeLookaheadFunc(e,r.idx,768,C.REPETITION,r.maxLookahead,e$(r))}),(0,E.jJ)(s,function(r){t.computeLookaheadFunc(e,r.idx,512,C.OPTION,r.maxLookahead,e$(r))}),(0,E.jJ)(a,function(r){t.computeLookaheadFunc(e,r.idx,1024,C.REPETITION_MANDATORY,r.maxLookahead,e$(r))}),(0,E.jJ)(l,function(r){t.computeLookaheadFunc(e,r.idx,1536,C.REPETITION_MANDATORY_WITH_SEPARATOR,r.maxLookahead,e$(r))}),(0,E.jJ)(h,function(r){t.computeLookaheadFunc(e,r.idx,1280,C.REPETITION_WITH_SEPARATOR,r.maxLookahead,e$(r))})})})},e.prototype.computeLookaheadFunc=function(e,t,r,n,o,i){var s=this;this.TRACE_INIT(""+i+(0===t?"":t),function(){var i,a,l,h,d,u=(i=o||s.maxLookahead,a=s.dynamicTokensEnabled,l=s.lookAheadBuilderForOptional,d=tu(h=th(t,e,n,i))?ee:J,l(h[0],d,a)),c=t|r|s.fullRuleNameToShort[e.name];s.setLaFuncCache(c,u)})},e.prototype.lookAheadBuilderForOptional=function(e,t,r){return function(e,t,r){var n=(0,E.Si)(e,function(e){return 1===e.length}),o=e.length;if(!n||r)return function(){r:for(var r=0;r<o;r++){for(var n=e[r],i=n.length,s=0;s<i;s++)if(!1===t(this.LA(s+1),n[s]))continue r;return!0}return!1};var i=(0,E.Bq)(e);if(1===i.length&&(0,E.Im)(i[0].categoryMatches)){var s=i[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}var a=(0,E.TS)(i,function(e,t,r){return e[t.tokenTypeIdx]=!0,(0,E.jJ)(t.categoryMatches,function(t){e[t]=!0}),e},[]);return function(){return!0===a[this.LA(1).tokenTypeIdx]}}(e,t,r)},e.prototype.lookAheadBuilderForAlternatives=function(e,t,r,n){var o=e.length,i=(0,E.Si)(e,function(e){return(0,E.Si)(e,function(e){return 1===e.length})});if(t)return function(t){for(var n=(0,E.Tj)(t,function(e){return e.GATE}),i=0;i<o;i++){var s=e[i],a=s.length,l=n[i];if(void 0===l||!1!==l.call(this))r:for(var h=0;h<a;h++){for(var d=s[h],u=d.length,c=0;c<u;c++)if(!1===r(this.LA(c+1),d[c]))continue r;return i}}};if(!i||n)return function(){for(var t=0;t<o;t++){var n=e[t],i=n.length;r:for(var s=0;s<i;s++){for(var a=n[s],l=a.length,h=0;h<l;h++)if(!1===r(this.LA(h+1),a[h]))continue r;return t}}};var s=(0,E.Tj)(e,function(e){return(0,E.Bq)(e)}),a=(0,E.TS)(s,function(e,t,r){return(0,E.jJ)(t,function(t){(0,E.zy)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),(0,E.jJ)(t.categoryMatches,function(t){(0,E.zy)(e,t)||(e[t]=r)})}),e},[]);return function(){return a[this.LA(1).tokenTypeIdx]}},e.prototype.getKeyForAutomaticLookahead=function(e,t){return t|e|this.getLastExplicitRuleShortName()},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}(),tG=/^\s*function\s*(\S*)\s*\(/,t$="name";function tY(e){var t=e.name;return t||e.toString().match(tG)[1]}function tj(e,t){var r=Object.getOwnPropertyDescriptor(e,t$);return(!!(0,E.b0)(r)||!!r.configurable)&&(Object.defineProperty(e,t$,{enumerable:!1,configurable:!0,writable:!1,value:t}),!0)}function tq(e,t){for(var r=(0,E.HP)(e),n=r.length,o=0;o<n;o++)for(var i=e[r[o]],s=i.length,a=0;a<s;a++){var l=i[a];void 0===l.tokenTypeIdx&&(void 0!==l.fullName?this[l.fullName](l.children,t):this[l.name](l.children,t))}}(m=w||(w={}))[m.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",m[m.MISSING_METHOD=1]="MISSING_METHOD";var tK=["constructor","visit","validateVisitor"],tX=function(){function e(){}return e.prototype.initTreeBuilder=function(e){if(this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.outputCst=(0,E.zy)(e,"outputCst")?e.outputCst:ro.outputCst,this.nodeLocationTracking=(0,E.zy)(e,"nodeLocationTracking")?e.nodeLocationTracking:ro.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=e0,this.setNodeLocationFromNode=e0,this.cstPostRule=E.tE,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=E.tE,this.setNodeLocationFromNode=E.tE,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=eJ,this.setNodeLocationFromNode=eJ,this.cstPostRule=E.tE,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=E.tE,this.setNodeLocationFromNode=E.tE,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=E.tE,this.setNodeLocationFromNode=E.tE,this.cstPostRule=E.tE,this.setInitialNodeLocation=E.tE;else throw Error('Invalid <nodeLocationTracking> config option: "'+e.nodeLocationTracking+'"');else this.cstInvocationStateUpdate=E.tE,this.cstFinallyStateUpdate=E.tE,this.cstPostTerminal=E.tE,this.cstPostNonTerminal=E.tE,this.cstPostRule=E.tE,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 r={name:e,fullName:this.shortRuleNameToFull[this.getLastExplicitRuleShortName()]+e,children:{}};this.setInitialNodeLocation(r),this.CST_STACK.push(r)},e.prototype.cstInvocationStateUpdate=function(e,t){this.LAST_EXPLICIT_RULE_STACK.push(this.RULE_STACK.length-1);var r={name:e,children:{}};this.setInitialNodeLocation(r),this.CST_STACK.push(r)},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),r=e.location;r.startOffset<=t.startOffset==!0?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)},e.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?r.endOffset=t.endOffset:r.startOffset=NaN},e.prototype.cstPostTerminal=function(e,t){var r=this.CST_STACK[this.CST_STACK.length-1];void 0===r.children[e]?r.children[e]=[t]:r.children[e].push(t),this.setNodeLocationFromToken(r.location,t)},e.prototype.cstPostNonTerminal=function(e,t){if(!0!==this.isBackTracking()){var r=this.CST_STACK[this.CST_STACK.length-1];e1(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}},e.prototype.getBaseCstVisitorConstructor=function(){if((0,E.b0)(this.baseCstVisitorConstructor)){var e,t,r,n=(e=this.className,t=this.allRuleNames,tj(r=function(){},e+"BaseSemantics"),r.prototype={visit:function(e,t){if((0,E.cy)(e)&&(e=e[0]),!(0,E.b0)(e))if(void 0!==e.fullName)return this[e.fullName](e.children,t);else return this[e.name](e.children,t)},validateVisitor:function(){var e,r,n,o,i,s,a,l=(e=this,r=t,s=(n=e,o=r,i=(0,E.Tj)(o,function(e){if(!(0,E.Tn)(n[e]))return{msg:"Missing visitor method: <"+e+"> on "+tY(n.constructor)+" CST Visitor.",type:w.MISSING_METHOD,methodName:e}}),(0,E.oE)(i)),a=function(e,t){var r=[];for(var n in e)tf.test(n)&&(0,E.Tn)(e[n])&&!(0,E.gR)(tK,n)&&!(0,E.gR)(t,n)&&r.push({msg:"Redundant visitor method: <"+n+"> on "+tY(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 /"+tf.source+"/.",type:w.REDUNDANT_METHOD,methodName:n});return r}(e,r),s.concat(a));if(!(0,E.Im)(l)){var h=(0,E.Tj)(l,function(e){return e.msg});throw Error("Errors Detected in CST Visitor <"+tY(this.constructor)+">:\n "+h.join("\n\n").replace(/\n/g,"\n "))}}},r.prototype.constructor=r,r._RULE_NAMES=t,r);return this.baseCstVisitorConstructor=n,n}return this.baseCstVisitorConstructor},e.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,E.b0)(this.baseCstVisitorWithDefaultsConstructor)){var e,t,r,n,o,i=(e=this.className,t=this.allRuleNames,r=this.getBaseCstVisitorConstructor(),tj(n=function(){},e+"BaseSemanticsWithDefaults"),o=Object.create(r.prototype),(0,E.jJ)(t,function(e){o[e]=tq}),n.prototype=o,n.prototype.constructor=n,n);return this.baseCstVisitorWithDefaultsConstructor=i,i}return this.baseCstVisitorWithDefaultsConstructor},e.prototype.nestedRuleBeforeClause=function(e,t){var r;return void 0!==e.NAME?(r=e.NAME,this.nestedRuleInvocationStateUpdate(r,t),r):void 0},e.prototype.nestedAltBeforeClause=function(e,t,r,n){var o,i,s=(o=this.getLastExplicitRuleShortName(),t|r|o|n+1<<24);return void 0!==e.NAME?(i=e.NAME,this.nestedRuleInvocationStateUpdate(i,s),{shortName:s,nestedName:i}):void 0},e.prototype.nestedRuleFinallyClause=function(e,t){var r=this.CST_STACK,n=r[r.length-1];this.nestedRuleFinallyStateUpdate();var o=r[r.length-1];e1(o,t,n),this.setNodeLocationFromNode(o.location,n.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}(),tQ=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)):rn},e.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?rn: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}(),tZ=function(){function e(){}return e.prototype.ACTION=function(e){return e.call(this)},e.prototype.consume=function(e,t,r){return this.consumeInternal(t,e,r)},e.prototype.subrule=function(e,t,r){return this.subruleInternal(t,e,r)},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,r){if(void 0===r&&(r=ri),(0,E.gR)(this.definedRulesNames,e)){var n={message:tv.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:S.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(n)}this.definedRulesNames.push(e);var o=this.defineRule(e,t,r);return this[e]=o,o},e.prototype.OVERRIDE_RULE=function(e,t,r){void 0===r&&(r=ri);var n,o,i,s=[];s=s.concat((n=this.definedRulesNames,o=this.className,i=[],E.gR(n,e)||i.push({message:"Invalid rule override, rule: ->"+e+"<- cannot be overridden in the grammar: ->"+o+"<-as it is not defined in any of the super grammars ",type:S.INVALID_RULE_OVERRIDE,ruleName:e}),i)),this.definitionErrors.push.apply(this.definitionErrors,s);var a=this.defineRule(e,t,r);return this[e]=a,a},e.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var r=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(tk(e))return!1;throw e}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}},e.prototype.getGAstProductions=function(){return this.gastProductionsCache},e.prototype.getSerializedGastProductions=function(){return eF((0,E.zu)(this.gastProductionsCache))},e}(),tJ=function(){function e(){}return e.prototype.initRecognizerEngine=function(e,t){if(this.className=tY(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=ee,this.definedRulesNames=[],this.tokensMap={},this.allRuleNames=[],this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,E.zy)(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n See: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n For Further details.");if((0,E.cy)(e)){if((0,E.Im)(e))throw Error("A Token Vocabulary cannot be empty.\n Note that the first argument for the parser constructor\n is 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 See: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n For Further details.")}if((0,E.cy)(e))this.tokensMap=(0,E.TS)(e,function(e,t){return e[t.name]=t,e},{});else if((0,E.zy)(e,"modes")&&(0,E.Si)((0,E.Bq)((0,E.zu)(e.modes)),es)){var r=(0,E.Bq)((0,E.zu)(e.modes)),n=(0,E.sb)(r);this.tokensMap=(0,E.TS)(n,function(e,t){return e[t.name]=t,e},{})}else if((0,E.Gv)(e))this.tokensMap=(0,E.lR)(e);else throw Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=eR;var o=(0,E.Si)((0,E.zu)(e),function(e){return(0,E.Im)(e.categoryMatches)});this.tokenMatcher=o?ee:J,en((0,E.zu)(this.tokensMap))},e.prototype.defineRule=function(e,t,r){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 n,o=(0,E.zy)(r,"resyncEnabled")?r.resyncEnabled:ri.resyncEnabled,i=(0,E.zy)(r,"recoveryValueFunc")?r.recoveryValueFunc:ri.recoveryValueFunc,s=this.ruleShortNameIdx<<12;function a(e){try{if(!0!==this.outputCst)return t.apply(this,e);t.apply(this,e);var r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(e){return this.invokeRuleCatch(e,o,i)}finally{this.ruleFinallyStateUpdate()}}return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s,(n=function(t,r){return void 0===t&&(t=0),this.ruleInvocationStateUpdate(s,e,t),a.call(this,r)}).ruleName=e,n.originalGrammarAction=t,n},e.prototype.invokeRuleCatch=function(e,t,r){var n=1===this.RULE_STACK.length,o=t&&!this.isBackTracking()&&this.recoveryEnabled;if(tk(e)){if(o){var i=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(i)){if(e.resyncedTokens=this.reSyncTo(i),!this.outputCst)return r();var s=this.CST_STACK[this.CST_STACK.length-1];return s.recoveredNode=!0,s}if(this.outputCst){var s=this.CST_STACK[this.CST_STACK.length-1];s.recoveredNode=!0,e.partialCstResult=s}throw e}if(n)return this.moveToTerminatedState(),r()}throw e},e.prototype.optionInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(512,t),n=this.nestedRuleBeforeClause(e,r);try{return this.optionInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.optionInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,r)},e.prototype.optionInternalLogic=function(e,t,r){var n,o,i=this,s=this.getLaFuncFromCache(r);if(void 0!==e.DEF){if(n=e.DEF,void 0!==(o=e.GATE)){var a=s;s=function(){return o.call(i)&&a.call(i)}}}else n=e;if(!0===s.call(this))return n.call(this)},e.prototype.atLeastOneInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(1024,e),n=this.nestedRuleBeforeClause(t,r);try{return this.atLeastOneInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.atLeastOneInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(1024,e);this.atLeastOneInternalLogic(e,t,r)},e.prototype.atLeastOneInternalLogic=function(e,t,r){var n,o,i=this,s=this.getLaFuncFromCache(r);if(void 0!==t.DEF){if(n=t.DEF,void 0!==(o=t.GATE)){var a=s;s=function(){return o.call(i)&&a.call(i)}}}else n=t;if(!0===s.call(this))for(var l=this.doSingleRepetition(n);!0===s.call(this)&&!0===l;)l=this.doSingleRepetition(n);else throw this.raiseEarlyExitException(e,C.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],s,1024,e,e7)},e.prototype.atLeastOneSepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(1536,e),n=this.nestedRuleBeforeClause(t,r);try{this.atLeastOneSepFirstInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.atLeastOneSepFirstInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,t,r)},e.prototype.atLeastOneSepFirstInternalLogic=function(e,t,r){var n=this,o=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){o.call(this);for(var s=function(){return n.tokenMatcher(n.LA(1),i)};!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),o.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,s,o,e8],s,1536,e,e8)}else throw this.raiseEarlyExitException(e,C.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)},e.prototype.manyInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(768,e),n=this.nestedRuleBeforeClause(t,r);try{return this.manyInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.manyInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,r)},e.prototype.manyInternalLogic=function(e,t,r){var n,o,i=this,s=this.getLaFuncFromCache(r);if(void 0!==t.DEF){if(n=t.DEF,void 0!==(o=t.GATE)){var a=s;s=function(){return o.call(i)&&a.call(i)}}}else n=t;for(var l=!0;!0===s.call(this)&&!0===l;)l=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],s,768,e,e5,l)},e.prototype.manySepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(1280,e),n=this.nestedRuleBeforeClause(t,r);try{this.manySepFirstInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.manySepFirstInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,t,r)},e.prototype.manySepFirstInternalLogic=function(e,t,r){var n=this,o=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){o.call(this);for(var s=function(){return n.tokenMatcher(n.LA(1),i)};!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),o.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,s,o,e9],s,1280,e,e9)}},e.prototype.repetitionSepSecondInternal=function(e,t,r,n,o){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,o],r,1536,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 r=(0,E.cy)(e)?e:e.DEF,n=this.getKeyForAutomaticLookahead(256,t),o=this.getLaFuncFromCache(n).call(this,r);if(void 0!==o)return r[o].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)},e.prototype.orInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(256,t),n=this.nestedRuleBeforeClause(e,r);try{var o=(0,E.cy)(e)?e:e.DEF,i=this.getLaFuncFromCache(r).call(this,o);if(void 0!==i){var s=o[i],a=this.nestedAltBeforeClause(s,t,256,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!==n&&this.nestedRuleFinallyClause(r,n)}},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 tP(t,e))}},e.prototype.subruleInternal=function(e,t,r){var n;try{var o=void 0!==r?r.ARGS:void 0;return n=e.call(this,t,o),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),n}catch(t){this.subruleInternalError(t,r,e.ruleName)}},e.prototype.subruleInternalError=function(e,t,r){throw tk(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:r),delete e.partialCstResult),e},e.prototype.consumeInternal=function(e,t,r){var n;try{var o=this.LA(1);!0===this.tokenMatcher(o,e)?(this.consumeToken(),n=o):this.consumeInternalError(e,o,r)}catch(r){n=this.consumeInternalRecovery(e,t,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,n),n},e.prototype.consumeInternalError=function(e,t,r){var n,o=this.LA(0);throw n=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:o,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new tH(n,t,o))},e.prototype.consumeInternalRecovery=function(e,t,r){if(this.recoveryEnabled&&"MismatchedTokenException"===r.name&&!this.isBackTracking()){var n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(e){if(e.name===tB)throw r;throw e}}throw r},e.prototype.saveRecogState=function(){var e=this.errors,t=(0,E.T9)(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,r){this.RULE_OCCURRENCE_STACK.push(r),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),eR)},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}(),t0=function(){function e(){}return e.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,E.NT)(e.errorMessageProvider,ro.errorMessageProvider)},e.prototype.SAVE_ERROR=function(e){if(tk(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,E.T9)(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(0,E.T9)(this._errors)},set:function(e){this._errors=e},enumerable:!0,configurable:!0}),e.prototype.raiseEarlyExitException=function(e,t,r){for(var n=this.getCurrRuleFullName(),o=th(e,this.getGAstProductions()[n],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:r,ruleName:n});throw this.SAVE_ERROR(new tD(a,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,t){for(var r=this.getCurrRuleFullName(),n=tl(e,this.getGAstProductions()[r],this.maxLookahead),o=[],i=1;i<=this.maxLookahead;i++)o.push(this.LA(i));var s=this.LA(0),a=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:n,actual:o,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new tL(a,this.LA(1),s))},e}(),t1=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(e,t){var r=this.gastProductionsCache[e];if((0,E.b0)(r))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return tt([r],t,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(e){var t=(0,E.$1)(e.ruleStack);return new e6(this.getGAstProductions()[t],e).startWalking()},e}(),t2={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(t2);var t3=ev({name:"RECORDING_PHASE_TOKEN",pattern:eh.NA});en([t3]);var t6=eE(t3,"This IToken indicates the Parser is in Recording Phase\n See: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(t6);var t4={name:"This CSTNode indicates the Parser is in Recording Phase\n See: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",children:{}},t5=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 r=t>0?t:"";e["CONSUME"+r]=function(e,r){return this.consumeInternalRecord(e,t,r)},e["SUBRULE"+r]=function(e,r){return this.subruleInternalRecord(e,t,r)},e["OPTION"+r]=function(e){return this.optionInternalRecord(e,t)},e["OR"+r]=function(e){return this.orInternalRecord(e,t)},e["MANY"+r]=function(e){this.manyInternalRecord(t,e)},e["MANY_SEP"+r]=function(e){this.manySepFirstInternalRecord(t,e)},e["AT_LEAST_ONE"+r]=function(e){this.atLeastOneInternalRecord(t,e)},e["AT_LEAST_ONE_SEP"+r]=function(e){this.atLeastOneSepFirstInternalRecord(t,e)}},r=0;r<10;r++)t(r);e.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},e.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},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 r=t>0?t:"";delete e["CONSUME"+r],delete e["SUBRULE"+r],delete e["OPTION"+r],delete e["OR"+r],delete e["MANY"+r],delete e["MANY_SEP"+r],delete e["AT_LEAST_ONE"+r],delete e["AT_LEAST_ONE_SEP"+r]}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 rn},e.prototype.topLevelRuleRecord=function(e,t){try{var r=new eI({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.message+'\n This error was thrown during the "grammar recording phase" For more info see:\n https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording'}catch(e){}throw e}},e.prototype.optionInternalRecord=function(e,t){return t9.call(this,eO,e,t)},e.prototype.atLeastOneInternalRecord=function(e,t){t9.call(this,e_,t,e)},e.prototype.atLeastOneSepFirstInternalRecord=function(e,t){t9.call(this,ek,t,e,!0)},e.prototype.manyInternalRecord=function(e,t){t9.call(this,eH,t,e)},e.prototype.manySepFirstInternalRecord=function(e,t){t9.call(this,eL,t,e,!0)},e.prototype.orInternalRecord=function(e,t){return t7.call(this,e,t)},e.prototype.subruleInternalRecord=function(e,t,r){if(re(t),!e||!1===(0,E.zy)(e,"ruleName")){var n=Error("<SUBRULE"+t8(t)+"> argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw n.KNOWN_RECORDER_ERROR=!0,n}var o=(0,E.se)(this.recordingProdStack),i=new eN({idx:t,nonTerminalName:e.ruleName,referencedRule:void 0});return o.definition.push(i),this.outputCst?t4:t2},e.prototype.consumeInternalRecord=function(e,t,r){if(re(t),!eo(e)){var n=Error("<CONSUME"+t8(t)+"> argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw n.KNOWN_RECORDER_ERROR=!0,n}var o=(0,E.se)(this.recordingProdStack),i=new eD({idx:t,terminalType:e});return o.definition.push(i),t6},e}();function t9(e,t,r,n){void 0===n&&(n=!1),re(r);var o=(0,E.se)(this.recordingProdStack),i=(0,E.Tn)(t)?t:t.DEF,s=new e({definition:[],idx:r});return(0,E.zy)(t,"NAME")&&(s.name=t.NAME),n&&(s.separator=t.SEP),(0,E.zy)(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(s),i.call(this),o.definition.push(s),this.recordingProdStack.pop(),t2}function t7(e,t){var r=this;re(t);var n=(0,E.se)(this.recordingProdStack),o=!1===(0,E.cy)(e),i=!1===o?e:e.DEF,s=new eP({definition:[],idx:t,ignoreAmbiguities:o&&!0===e.IGNORE_AMBIGUITIES});return(0,E.zy)(e,"NAME")&&(s.name=e.NAME),(0,E.zy)(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),s.hasPredicates=(0,E.zN)(i,function(e){return(0,E.Tn)(e.GATE)}),n.definition.push(s),(0,E.jJ)(i,function(e){var t=new ex({definition:[]});s.definition.push(t),(0,E.zy)(e,"NAME")&&(t.name=e.NAME),(0,E.zy)(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,E.zy)(e,"GATE")&&(t.ignoreAmbiguities=!0),r.recordingProdStack.push(t),e.ALT.call(r),r.recordingProdStack.pop()}),t2}function t8(e){return 0===e?"":""+e}function re(e){if(e<0||e>255){var t=Error("Invalid DSL Method idx value: <"+e+">\n Idx value must be a none negative value smaller than "+256);throw t.KNOWN_RECORDER_ERROR=!0,t}}var rt=function(){function e(){}return e.prototype.initPerformanceTracer=function(e){if((0,E.zy)(e,"traceInitPerf")){var t=e.traceInitPerf,r="number"==typeof t;this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=ro.traceInitPerf;this.traceInitIndent=-1},e.prototype.TRACE_INIT=function(e,t){if(!0!==this.traceInitPerf)return t();this.traceInitIndent++;var r=Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+"--\x3e <"+e+">");var n=(0,E.O1)(t),o=n.time,i=n.value,s=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(r+"<-- <"+e+"> time: "+o+"ms"),this.traceInitIndent--,i},e}(),rr=(f=function(e,t){return(f=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),rn=eE(eR,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(rn);var ro=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:tw,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),ri=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function rs(e){return void 0===e&&(e=void 0),function(){return e}}(y=S||(S={}))[y.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",y[y.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",y[y.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",y[y.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",y[y.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",y[y.LEFT_RECURSION=5]="LEFT_RECURSION",y[y.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",y[y.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",y[y.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",y[y.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",y[y.INVALID_NESTED_RULE_NAME=10]="INVALID_NESTED_RULE_NAME",y[y.DUPLICATE_NESTED_NAME=11]="DUPLICATE_NESTED_NAME",y[y.NO_NON_EMPTY_LOOKAHEAD=12]="NO_NON_EMPTY_LOOKAHEAD",y[y.AMBIGUOUS_PREFIX_ALTS=13]="AMBIGUOUS_PREFIX_ALTS",y[y.TOO_MANY_ALTS=14]="TOO_MANY_ALTS";var ra=function(){function e(e,t){void 0===t&&(t=ro),this.ignoredIssues=ro.ignoredIssues,this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(t),this.initLexerAdapter(),this.initLooksAhead(t),this.initRecognizerEngine(e,t),this.initRecoverable(t),this.initTreeBuilder(t),this.initContentAssist(),this.initGastRecorder(t),this.initPerformanceTracer(t),(0,E.zy)(t,"ignoredIssues")&&t.ignoredIssues!==ro.ignoredIssues&&(0,E.x5)("The <ignoredIssues> IParserConfig property is soft-deprecated and will be removed in future versions.\n Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead."),this.ignoredIssues=(0,E.zy)(t,"ignoredIssues")?t.ignoredIssues:ro.ignoredIssues,this.skipValidations=(0,E.zy)(t,"skipValidations")?t.skipValidations:ro.skipValidations}return e.performSelfAnalysis=function(e){e.performSelfAnalysis()},e.prototype.performSelfAnalysis=function(){var t=this;this.TRACE_INIT("performSelfAnalysis",function(){t.selfAnalysisDone=!0;var r=t.className;t.TRACE_INIT("toFastProps",function(){(0,E.Bl)(t)}),t.TRACE_INIT("Grammar Recording",function(){try{t.enableRecording(),(0,E.jJ)(t.definedRulesNames,function(e){var r=t[e].originalGrammarAction,n=void 0;t.TRACE_INIT(e+" Rule",function(){n=t.topLevelRuleRecord(e,r)}),t.gastProductionsCache[e]=n})}finally{t.disableRecording()}});var n=[];if(t.TRACE_INIT("Grammar Resolving",function(){n=tT({rules:(0,E.zu)(t.gastProductionsCache)}),t.definitionErrors.push.apply(t.definitionErrors,n)}),t.TRACE_INIT("Grammar Validations",function(){if((0,E.Im)(n)&&!1===t.skipValidations){var e=tA({rules:(0,E.zu)(t.gastProductionsCache),maxLookahead:t.maxLookahead,tokenTypes:(0,E.zu)(t.tokensMap),ignoredIssues:t.ignoredIssues,errMsgProvider:tv,grammarName:r});t.definitionErrors.push.apply(t.definitionErrors,e)}}),(0,E.Im)(t.definitionErrors)&&(t.recoveryEnabled&&t.TRACE_INIT("computeAllProdsFollows",function(){var e,r,n=(e=(0,E.zu)(t.gastProductionsCache),r={},(0,E.jJ)(e,function(e){var t=new eQ(e).startWalking();(0,E.kp)(r,t)}),r);t.resyncFollows=n}),t.TRACE_INIT("ComputeLookaheadFunctions",function(){t.preComputeLookaheadFunctions((0,E.zu)(t.gastProductionsCache))})),t.TRACE_INIT("expandAllNestedRuleNames",function(){var e,r,n,o=(e=(0,E.zu)(t.gastProductionsCache),r=t.fullRuleNameToShort,n={allRuleNames:[]},(0,E.jJ)(e,function(e){var t=r[e.name];n.allRuleNames.push(e.name);var o=new e2(t);e.accept(o),(0,E.jJ)(o.result,function(t){t.def,t.key;var r=t.name;n.allRuleNames.push(e.name+r)})}),n);t.allRuleNames=o.allRuleNames}),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,E.Im)(t.definitionErrors))throw Error("Parser Definition Errors detected:\n "+(0,E.Tj)(t.definitionErrors,function(e){return e.message}).join("\n-------------------------------\n"))})},e.DEFER_DEFINITION_ERRORS_HANDLING=!1,e}();(0,E.XJ)(ra,[tU,tW,tX,tQ,tJ,tZ,t0,t1,t5,rt]);var rl=function(e){function t(t,r){void 0===r&&(r=ro);var n=(0,E.lR)(r);return n.outputCst=!0,e.call(this,t,n)||this}return rr(t,e),t}(ra),rh=function(e){function t(t,r){void 0===r&&(r=ro);var n=(0,E.lR)(r);return n.outputCst=!1,e.call(this,t,n)||this}return rr(t,e),t}(ra);function rd(e,t){var r=void 0===t?{}:t,n=r.resourceBase,o=void 0===n?"https://unpkg.com/chevrotain@"+R+"/diagrams/":n,i=r.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===i?"https://unpkg.com/chevrotain@"+R+"/diagrams/diagrams.css":i)+"'>\n"+("\n<script src='"+o+"vendor/railroad-diagrams.js'><\/script>\n<script src='"+o+"src/diagrams_builder.js'><\/script>\n<script src='"+o+"src/diagrams_behavior.js'><\/script>\n<script src='"+o+"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'}function ru(e){var t;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 "+(t=e.rules,(0,E.Tj)(t,function(e){var t;return rm(1,'$.RULE("'+(t=e).name+'", function() {')+"\n"+rp(t.definition,2)+(rm(2,"})")+"\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 rc(e,t,r){var n=rm(r,"$."+(e+t.idx)+"(");return t.name||t.separator?(n+="{\n",t.name&&(n+=rm(r+1,'NAME: "'+t.name+'"')+",\n"),t.separator&&(n+=rm(r+1,"SEP: this.tokensMap."+t.separator.name)+",\n"),n+="DEF: "+rg(t.definition,r+2)+"\n",n+=rm(r,"}")+"\n"):n+=rg(t.definition,r+1),n+=rm(r,")")+"\n"}function rg(e,t){var r="function() {\n";return r+=rp(e,t),r+=rm(t,"}")+"\n"}function rp(e,t){var r="";return(0,E.jJ)(e,function(e){r+=function(e,t){var r;if(e instanceof eN)return rm(t,"$.SUBRULE"+e.idx+"($."+e.nonTerminalName+")\n");if(e instanceof eO)return rc("OPTION",e,t);if(e instanceof e_)return rc("AT_LEAST_ONE",e,t);if(e instanceof ek)return rc("AT_LEAST_ONE_SEP",e,t);if(e instanceof eL)return rc("MANY_SEP",e,t);else if(e instanceof eH)return rc("MANY",e,t);else if(e instanceof eP)return rm(t,"$.OR"+e.idx+"([")+"\n"+(0,E.Tj)(e.definition,function(e){var r,n,o;return r=e,o=rm(n=t+1,"{")+"\n",r.name&&(o+=rm(n+1,'NAME: "'+r.name+'",')+"\n"),o+=rm(n+1,"ALT: function() {")+"\n",o+=rp(r.definition,n+1),o+=rm(n+1,"}")+"\n",o+=rm(n,"}")}).join(",\n")+"\n"+rm(t,"])\n");else if(e instanceof eD)return r=e.terminalType.name,rm(t,"$.CONSUME"+e.idx+"(this.tokensMap."+r+")\n");else if(e instanceof ex)return rp(e.definition,t);else throw Error("non exhaustive match")}(e,t+1)}),r}function rm(e,t){return Array(4*e+1).join(" ")+t}function rf(e){var t,n=Function("tokenVocabulary","config","chevrotain"," \n"+ru(t={name:e.name,rules:e.rules})+"\nreturn new "+t.name+"(tokenVocabulary, config) \n");return function(t){return n(e.tokenVocabulary,t,r(603))}}function ry(e){var t;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"+ru(t={name:e.name,rules:e.rules})+"\n \nreturn {\n "+t.name+": "+t.name+" \n}\n}));\n"}function rb(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API.\n It performs no action other than printing this message.\n Please avoid using it as it will be completely removed in the future")}},6642(e,t,r){"use strict";function n(e){return e&&0===e.length}function o(e){return null==e?[]:Object.keys(e)}function i(e){for(var t=[],r=Object.keys(e),n=0;n<r.length;n++)t.push(e[r[n]]);return t}function s(e,t){for(var r=[],n=o(e),i=0;i<n.length;i++){var s=n[i];r.push(t.call(null,e[s],s))}return r}function a(e,t){for(var r=[],n=0;n<e.length;n++)r.push(t.call(null,e[n],n));return r}function l(e){return n(e)?void 0:e[0]}function h(e){var t=e&&e.length;return t?e[t-1]:void 0}function d(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++)t.call(null,e[r],r);else if(O(e))for(var n=o(e),r=0;r<n.length;r++){var i=n[r],s=e[i];t.call(null,s,i)}else throw Error("non exhaustive match")}function u(e){return"string"==typeof e}function c(e){return void 0===e}function g(e){return e instanceof Function}function p(e,t){return void 0===t&&(t=1),e.slice(t,e.length)}function m(e,t){return void 0===t&&(t=1),e.slice(0,e.length-t)}function f(e,t){var r=[];if(Array.isArray(e))for(var n=0;n<e.length;n++){var o=e[n];t.call(null,o)&&r.push(o)}return r}function y(e,t){return f(e,function(e){return!t(e)})}function b(e,t){for(var r=Object.keys(e),n={},o=0;o<r.length;o++){var i=r[o],s=e[i];t(s)&&(n[i]=s)}return n}function C(e,t){return!!O(e)&&e.hasOwnProperty(t)}function w(e,t){return void 0!==E(e,function(e){return e===t})}function S(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r]);return t}function R(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}function E(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(t.call(null,n))return n}}function T(e,t){for(var r=[],n=0;n<e.length;n++){var o=e[n];t.call(null,o)&&r.push(o)}return r}function A(e,t,r){for(var n=Array.isArray(e),s=n?e:i(e),a=n?[]:o(e),l=r,h=0;h<s.length;h++)l=t.call(null,l,s[h],n?h:a[h]);return l}function M(e){return y(e,function(e){return null==e})}function N(e,t){void 0===t&&(t=function(e){return e});var r=[];return A(e,function(e,n){var o=t(n);return w(r,o)?e:(r.push(o),e.concat(n))},[])}function I(e){return Array.isArray(e)}function x(e){return e instanceof RegExp}function O(e){return e instanceof Object}function _(e,t){for(var r=0;r<e.length;r++)if(!t(e[r],r))return!1;return!0}function k(e,t){return y(e,function(e){return w(t,e)})}function H(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return!0;return!1}function L(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return r;return -1}function P(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++)for(var i=t[n],s=o(i),a=0;a<s.length;a++){var l=s[a];e[l]=i[l]}return e}function D(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++){var i=t[n];if(!c(i))for(var s=o(i),a=0;a<s.length;a++){var l=s[a];C(e,l)||(e[l]=i[l])}}return e}function F(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return D.apply(null,[{}].concat(e))}function B(e,t){var r={};return d(e,function(e){var n=t(e),o=r[n];o?o.push(e):r[n]=[e]}),r}function V(e,t){for(var r=R(e),n=o(t),i=0;i<n.length;i++){var s=n[i],a=t[s];r[s]=a}return r}function U(){}function z(e){return e}function W(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(void 0!==n?n:void 0)}return t}function G(e){console&&console.error&&console.error("Error: "+e)}function $(e){console&&console.warn&&console.warn("Warning: "+e)}function Y(){return"function"==typeof Map}function j(e,t){t.forEach(function(t){var r=t.prototype;Object.getOwnPropertyNames(r).forEach(function(n){if("constructor"!==n){var o=Object.getOwnPropertyDescriptor(r,n);o&&(o.get||o.set)?Object.defineProperty(e.prototype,n,o):e.prototype[n]=t.prototype[n]}})})}function q(e){function t(){}t.prototype=e;var r=new t;function n(){return typeof r.bar}return n(),n(),e}function K(e){return e[e.length-1]}function X(e){var t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}r.d(t,{$1:()=>l,$z:()=>B,Bl:()=>q,Bq:()=>function e(t){for(var r=[],n=0;n<t.length;n++){var o=t[n];Array.isArray(o)?r=r.concat(e(o)):r.push(o)}return r},Gv:()=>O,HP:()=>o,HV:()=>h,I6:()=>E,Im:()=>n,JW:()=>T,Kg:()=>u,LG:()=>s,NT:()=>F,O1:()=>X,Si:()=>_,T9:()=>S,TS:()=>A,Tj:()=>a,Tn:()=>g,Up:()=>b,VS:()=>W,XJ:()=>j,Zi:()=>G,b0:()=>c,cy:()=>I,gR:()=>w,gc:()=>m,gd:()=>x,gv:()=>p,h1:()=>V,iv:()=>k,jJ:()=>d,kp:()=>P,ku:()=>y,lR:()=>R,oE:()=>M,pb:()=>f,qh:()=>L,rF:()=>Y,sb:()=>N,se:()=>K,tE:()=>U,x5:()=>$,zK:()=>z,zN:()=>H,zu:()=>i,zy:()=>C})},3398(e,t,r){var n={"./af":"5962","./af.js":"5962","./ar":"4070","./ar-dz":"5109","./ar-dz.js":"5109","./ar-kw":"549","./ar-kw.js":"549","./ar-ly":"36","./ar-ly.js":"36","./ar-ma":"2981","./ar-ma.js":"2981","./ar-ps":"6634","./ar-ps.js":"6634","./ar-sa":"2863","./ar-sa.js":"2863","./ar-tn":"7513","./ar-tn.js":"7513","./ar.js":"4070","./az":"3374","./az.js":"3374","./be":"5720","./be.js":"5720","./bg":"3538","./bg.js":"3538","./bm":"1872","./bm.js":"1872","./bn":"2153","./bn-bd":"3252","./bn-bd.js":"3252","./bn.js":"2153","./bo":"2666","./bo.js":"2666","./br":"2509","./br.js":"2509","./bs":"8158","./bs.js":"8158","./ca":"2109","./ca.js":"2109","./cs":"763","./cs.js":"763","./cv":"5320","./cv.js":"5320","./cy":"4501","./cy.js":"4501","./da":"9102","./da.js":"9102","./de":"2770","./de-at":"2474","./de-at.js":"2474","./de-ch":"8636","./de-ch.js":"8636","./de.js":"2770","./dv":"2943","./dv.js":"2943","./el":"3788","./el.js":"3788","./en-au":"9813","./en-au.js":"9813","./en-ca":"8207","./en-ca.js":"8207","./en-gb":"3686","./en-gb.js":"3686","./en-ie":"1181","./en-ie.js":"1181","./en-il":"2822","./en-il.js":"2822","./en-in":"2732","./en-in.js":"2732","./en-nz":"3455","./en-nz.js":"3455","./en-sg":"3453","./en-sg.js":"3453","./eo":"2069","./eo.js":"2069","./es":"8465","./es-do":"1375","./es-do.js":"1375","./es-mx":"7859","./es-mx.js":"7859","./es-us":"5766","./es-us.js":"5766","./es.js":"8465","./et":"5092","./et.js":"5092","./eu":"6539","./eu.js":"6539","./fa":"7072","./fa.js":"7072","./fi":"4216","./fi.js":"4216","./fil":"2334","./fil.js":"2334","./fo":"350","./fo.js":"350","./fr":"6329","./fr-ca":"7278","./fr-ca.js":"7278","./fr-ch":"7797","./fr-ch.js":"7797","./fr.js":"6329","./fy":"152","./fy.js":"152","./ga":"9577","./ga.js":"9577","./gd":"1094","./gd.js":"1094","./gl":"4078","./gl.js":"4078","./gom-deva":"2527","./gom-deva.js":"2527","./gom-latn":"9744","./gom-latn.js":"9744","./gu":"469","./gu.js":"469","./he":"5590","./he.js":"5590","./hi":"514","./hi.js":"514","./hr":"4103","./hr.js":"4103","./hu":"1238","./hu.js":"1238","./hy-am":"3745","./hy-am.js":"3745","./id":"7320","./id.js":"7320","./is":"7437","./is.js":"7437","./it":"1384","./it-ch":"6258","./it-ch.js":"6258","./it.js":"1384","./ja":"7772","./ja.js":"7772","./jv":"8921","./jv.js":"8921","./ka":"6229","./ka.js":"6229","./kk":"2443","./kk.js":"2443","./km":"433","./km.js":"433","./kn":"296","./kn.js":"296","./ko":"4911","./ko.js":"4911","./ku":"745","./ku-kmr":"6802","./ku-kmr.js":"6802","./ku.js":"745","./ky":"7085","./ky.js":"7085","./lb":"1219","./lb.js":"1219","./lo":"56","./lo.js":"56","./lt":"2169","./lt.js":"2169","./lv":"3367","./lv.js":"3367","./me":"403","./me.js":"403","./mi":"9951","./mi.js":"9951","./mk":"8881","./mk.js":"8881","./ml":"1860","./ml.js":"1860","./mn":"5742","./mn.js":"5742","./mr":"6602","./mr.js":"6602","./ms":"6089","./ms-my":"6036","./ms-my.js":"6036","./ms.js":"6089","./mt":"556","./mt.js":"556","./my":"4271","./my.js":"4271","./nb":"9329","./nb.js":"9329","./ne":"1812","./ne.js":"1812","./nl":"355","./nl-be":"7005","./nl-be.js":"7005","./nl.js":"355","./nn":"8949","./nn.js":"8949","./oc-lnc":"2661","./oc-lnc.js":"2661","./pa-in":"9491","./pa-in.js":"9491","./pl":"4101","./pl.js":"4101","./pt":"4605","./pt-br":"678","./pt-br.js":"678","./pt.js":"4605","./ro":"698","./ro.js":"698","./ru":"7464","./ru.js":"7464","./sd":"594","./sd.js":"594","./se":"8225","./se.js":"8225","./si":"1957","./si.js":"1957","./sk":"6467","./sk.js":"6467","./sl":"6426","./sl.js":"6426","./sq":"2093","./sq.js":"2093","./sr":"7508","./sr-cyrl":"4203","./sr-cyrl.js":"4203","./sr.js":"7508","./ss":"6779","./ss.js":"6779","./sv":"4888","./sv.js":"4888","./sw":"9247","./sw.js":"9247","./ta":"8382","./ta.js":"8382","./te":"1266","./te.js":"1266","./tet":"8356","./tet.js":"8356","./tg":"5032","./tg.js":"5032","./th":"7317","./th.js":"7317","./tk":"620","./tk.js":"620","./tl-ph":"6018","./tl-ph.js":"6018","./tlh":"9373","./tlh.js":"9373","./tr":"1787","./tr.js":"1787","./tzl":"3775","./tzl.js":"3775","./tzm":"9160","./tzm-latn":"1784","./tzm-latn.js":"1784","./tzm.js":"9160","./ug-cn":"5555","./ug-cn.js":"5555","./uk":"5081","./uk.js":"5081","./ur":"866","./ur.js":"866","./uz":"8282","./uz-latn":"4874","./uz-latn.js":"4874","./uz.js":"8282","./vi":"664","./vi.js":"664","./x-pseudo":"1292","./x-pseudo.js":"1292","./yo":"7577","./yo.js":"7577","./zh-cn":"9949","./zh-cn.js":"9949","./zh-hk":"1937","./zh-hk.js":"1937","./zh-mo":"5876","./zh-mo.js":"5876","./zh-tw":"4057","./zh-tw.js":"4057"};function o(e){return r(i(e))}function i(e){if(!r.o(n,e)){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}o.keys=function(){return Object.keys(n)},o.resolve=i,e.exports=o,o.id=3398},5713(e){var t,r;t="u">typeof self?self:this,r=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 r={type:"Flags",global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":a(r,"global");break;case"i":a(r,"ignoreCase");break;case"m":a(r,"multiLine");break;case"u":a(r,"unicode");break;case"y":a(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,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"(":switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead"}l(e);var e,t=this.disjunction();return this.consumeChar(")"),{type:e,value:t}}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 r=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:r,atMost:r};break;case",":t=this.isDigit()?{atLeast:r,atMost:this.integerIncludingZero()}:{atLeast:r,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=h;break;case"D":e=h,t=!0;break;case"s":e=u;break;case"S":e=u,t=!0;break;case"w":e=d;break;case"W":e=d,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(" ");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 r=this.classAtom();if("Character"===r.type&&this.isRangeDash()){this.consumeChar("-");var n=this.classAtom();if("Character"===n.type){if(n.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:n.value})}else s(r.value,e),e.push(i("-")),s(n.value,e)}else s(r.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 r={type:"Group",capturing:e,value:t};return e&&(r.idx=this.groupIdx),r},e.prototype.positiveInteger=function(){var e=this.popChar();if(!1===o.test(e))throw Error("Expecting a positive integer");for(;n.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)},e.prototype.integerIncludingZero=function(){var e=this.popChar();if(!1===n.test(e))throw Error("Expecting an integer");for(;n.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 n.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="",n=0;n<e;n++){var o=this.popChar();if(!1===r.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,r=/[0-9a-fA-F]/,n=/[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 h=[];for(t=i("0");t<=i("9");t++)h.push(t);var d=[i("_")].concat(h);for(t=i("a");t<=i("z");t++)d.push(t);for(t=i("A");t<=i("Z");t++)d.push(t);var u=[i(" "),i("\f"),i("\n"),i("\r"),i(" "),i("\v"),i(" "),i("\xa0"),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i("\u2028"),i("\u2029"),i(" "),i(" "),i(" "),i("\uFEFF")];function c(){}return c.prototype.visitChildren=function(e){for(var t in e){var r=e[t];e.hasOwnProperty(t)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(function(e){this.visit(e)},this))}},c.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)},c.prototype.visitPattern=function(e){},c.prototype.visitFlags=function(e){},c.prototype.visitDisjunction=function(e){},c.prototype.visitAlternative=function(e){},c.prototype.visitStartAnchor=function(e){},c.prototype.visitEndAnchor=function(e){},c.prototype.visitWordBoundary=function(e){},c.prototype.visitNonWordBoundary=function(e){},c.prototype.visitLookahead=function(e){},c.prototype.visitNegativeLookahead=function(e){},c.prototype.visitCharacter=function(e){},c.prototype.visitSet=function(e){},c.prototype.visitGroup=function(e){},c.prototype.visitGroupBackReference=function(e){},c.prototype.visitQuantifier=function(e){},{RegExpParser:e,BaseRegExpVisitor:c,VERSION:"0.4.0"}},"function"==typeof define&&define.amd?define([],r):e.exports?e.exports=r():t.regexpToAst=r()},3732(e){function t(){}t.prototype={on:function(e,t,r){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){var n=this;function o(){n.off(e,o),t.apply(r,arguments)}return o._=t,this.on(e,o,r)},emit:function(e){for(var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),n=0,o=r.length;n<o;n++)r[n].fn.apply(r[n].ctx,t);return this},off:function(e,t){var r=this.e||(this.e={}),n=r[e],o=[];if(n&&t)for(var i=0,s=n.length;i<s;i++)n[i].fn!==t&&n[i].fn._!==t&&o.push(n[i]);return o.length?r[e]=o:delete r[e],this}},e.exports=t,e.exports.TinyEmitter=t}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";r.d({},{iz:()=>tX,f1:()=>ip});var e,t,n,o,i,s,a,l,h,d,u,c,g,p,m,f,y,b,C,w,S,R,E,T,A,M,N,I,x,O,_,k,H,L,P,D,F,B,V,U,z,W,G,$,Y,j,q,K,X,Q,Z,J,ee,et,er,en,eo,ei={};r.r(ei),r.d(ei,{AbsPlugin:()=>iv,AddressPlugin:()=>iw,ArrayPlugin:()=>iS,BitShiftPlugin:()=>iR,BitwiseLogicOperationsPlugin:()=>iM,BooleanPlugin:()=>iN,CharPlugin:()=>iI,CodePlugin:()=>ix,ComplexPlugin:()=>ab,ConditionalAggregationPlugin:()=>sv,CountBlankPlugin:()=>iO,CountUniquePlugin:()=>i_,DateTimePlugin:()=>ik,DegreesPlugin:()=>iF,DeltaPlugin:()=>iB,ExpPlugin:()=>iV,FinancialPlugin:()=>iU,FormulaTextPlugin:()=>ij,HyperlinkPlugin:()=>iq,InformationPlugin:()=>iK,IsEvenPlugin:()=>iX,IsOddPlugin:()=>iQ,LogarithmPlugin:()=>iZ,LookupPlugin:()=>sM,MathConstantsPlugin:()=>i0,MathPlugin:()=>am,MatrixPlugin:()=>i3,MedianPlugin:()=>i6,ModuloPlugin:()=>i4,NumericAggregationPlugin:()=>i7,PowerPlugin:()=>st,RadiansPlugin:()=>sr,RadixConversionPlugin:()=>sn,RandomPlugin:()=>sd,RomanPlugin:()=>sN,RoundingPlugin:()=>sg,SimpleArithmerticPlugin:()=>sO,SqrtPlugin:()=>sp,StatisticalAggregationPlugin:()=>aI,StatisticalPlugin:()=>ap,SumprodPlugin:()=>sR,TextPlugin:()=>sE,TrigonometryPlugin:()=>sT}),(E=e||(e={})).RELATIVE="RELATIVE",E.ABSOLUTE="ABSOLUTE";class es{constructor(e,t,r){this.type=e,this.col=t,this.sheet=r}static absolute(t,r){return new es(e.ABSOLUTE,t,r)}static relative(t,r){return new es(e.RELATIVE,t,r)}static compareByAbsoluteAddress(e){return(t,r)=>t.toSimpleColumnAddress(e).col-r.toSimpleColumnAddress(e).col}isColumnAbsolute(){return this.type===e.ABSOLUTE}isColumnRelative(){return this.type===e.RELATIVE}isAbsolute(){return this.type===e.ABSOLUTE&&void 0!==this.sheet}moved(e,t,r){let n=void 0===this.sheet?void 0:e;return new es(this.type,this.col+t,n)}shiftedByColumns(e){return new es(this.type,this.col+e,this.sheet)}toSimpleColumnAddress(e){let t=r5(this,e),r=this.col;return this.isColumnRelative()&&(r=e.col+this.col),rJ(t,r)}shiftRelativeDimensions(e,t){let r=this.isColumnRelative()?this.col+e:this.col;return new es(this.type,r,this.sheet)}shiftAbsoluteDimensions(e,t){let r=this.isColumnAbsolute()?this.col+e:this.col;return new es(this.type,r,this.sheet)}withSheet(e){return new es(this.type,this.col,e)}isInvalid(e){return this.toSimpleColumnAddress(e).col<0}hash(t){let r=t&&void 0!==this.sheet?`#${this.sheet}`:"";switch(this.type){case e.RELATIVE:return`${r}#COLR${this.col}`;case e.ABSOLUTE:return`${r}#COLA${this.col}`}}unparse(t){let r=this.toSimpleColumnAddress(t);if(r0(r))return;let n=eO(r.col),o=this.type===e.ABSOLUTE?"$":"";return`${o}${n}`}exceedsSheetSizeLimits(e){return this.col>=e}}class ea{constructor(e,t,r){this.type=e,this.row=t,this.sheet=r}static absolute(t,r){return new ea(e.ABSOLUTE,t,r)}static relative(t,r){return new ea(e.RELATIVE,t,r)}static compareByAbsoluteAddress(e){return(t,r)=>t.toSimpleRowAddress(e).row-r.toSimpleRowAddress(e).row}isRowAbsolute(){return this.type===e.ABSOLUTE}isRowRelative(){return this.type===e.RELATIVE}isAbsolute(){return this.type===e.ABSOLUTE&&void 0!==this.sheet}moved(e,t,r){let n=void 0===this.sheet?void 0:e;return new ea(this.type,this.row+r,n)}shiftedByRows(e){return new ea(this.type,this.row+e,this.sheet)}toSimpleRowAddress(e){let t=r5(this,e),r=this.row;return this.isRowRelative()&&(r=e.row+this.row),rQ(t,r)}shiftRelativeDimensions(e,t){let r=this.isRowRelative()?this.row+t:this.row;return new ea(this.type,r,this.sheet)}shiftAbsoluteDimensions(e,t){let r=this.isRowAbsolute()?this.row+t:this.row;return new ea(this.type,r,this.sheet)}withSheet(e){return new ea(this.type,this.row,e)}isInvalid(e){return this.toSimpleRowAddress(e).row<0}hash(t){let r=t&&void 0!==this.sheet?`#${this.sheet}`:"";switch(this.type){case e.RELATIVE:return`${r}#ROWR${this.row}`;case e.ABSOLUTE:return`${r}#ROWA${this.row}`}}unparse(t){let r=this.toSimpleRowAddress(t);if(rZ(r))return;let n=this.type===e.ABSOLUTE?"$":"";return`${n}${r.row+1}`}exceedsSheetSizeLimits(e){return this.row>=e}}(T=t||(t={})).CELL_REFERENCE_RELATIVE="CELL_REFERENCE",T.CELL_REFERENCE_ABSOLUTE="CELL_REFERENCE_ABSOLUTE",T.CELL_REFERENCE_ABSOLUTE_COL="CELL_REFERENCE_ABSOLUTE_COL",T.CELL_REFERENCE_ABSOLUTE_ROW="CELL_REFERENCE_ABSOLUTE_ROW";class el{constructor(e,t,r,n){this.col=e,this.row=t,this.type=r,this.sheet=n}static fromColAndRow(e,t,r){return(e.isColumnAbsolute()&&t.isRowAbsolute()?el.absolute.bind(this):e.isColumnAbsolute()?el.absoluteCol.bind(this):t.isRowAbsolute()?el.absoluteRow.bind(this):el.relative.bind(this))(e.col,t.row,r)}static relative(e,r,n){return new el(e,r,t.CELL_REFERENCE_RELATIVE,n)}static absolute(e,r,n){return new el(e,r,t.CELL_REFERENCE_ABSOLUTE,n)}static absoluteCol(e,r,n){return new el(e,r,t.CELL_REFERENCE_ABSOLUTE_COL,n)}static absoluteRow(e,r,n){return new el(e,r,t.CELL_REFERENCE_ABSOLUTE_ROW,n)}toSimpleCellAddress(e){let r=r5(this,e);return this.type===t.CELL_REFERENCE_ABSOLUTE?r1(r,this.col,this.row):this.type===t.CELL_REFERENCE_ABSOLUTE_ROW?r1(r,e.col+this.col,this.row):this.type===t.CELL_REFERENCE_ABSOLUTE_COL?r1(r,this.col,e.row+this.row):r1(r,e.col+this.col,e.row+this.row)}toColumnAddress(){return new es(this.isColumnRelative()?e.RELATIVE:e.ABSOLUTE,this.col,this.sheet)}toRowAddress(){return new ea(this.isRowRelative()?e.RELATIVE:e.ABSOLUTE,this.row,this.sheet)}toSimpleColumnAddress(e){let t=r5(this,e),r=this.col;return this.isColumnRelative()&&(r+=e.col),rJ(t,r)}toSimpleRowAddress(e){let t=r5(this,e),r=this.row;return this.isRowRelative()&&(r+=e.row),rQ(t,r)}isRowAbsolute(){return this.type===t.CELL_REFERENCE_ABSOLUTE||this.type===t.CELL_REFERENCE_ABSOLUTE_ROW}isColumnAbsolute(){return this.type===t.CELL_REFERENCE_ABSOLUTE||this.type===t.CELL_REFERENCE_ABSOLUTE_COL}isColumnRelative(){return this.type===t.CELL_REFERENCE_RELATIVE||this.type===t.CELL_REFERENCE_ABSOLUTE_ROW}isRowRelative(){return this.type===t.CELL_REFERENCE_RELATIVE||this.type===t.CELL_REFERENCE_ABSOLUTE_COL}isAbsolute(){return this.type===t.CELL_REFERENCE_ABSOLUTE&&void 0!==this.sheet}shiftedByRows(e){return new el(this.col,this.row+e,this.type,this.sheet)}shiftedByColumns(e){return new el(this.col+e,this.row,this.type,this.sheet)}moved(e,t,r){let n=void 0===this.sheet?void 0:e;return new el(this.col+t,this.row+r,this.type,n)}withSheet(e){return new el(this.col,this.row,this.type,e)}isInvalid(e){return r2(this.toSimpleCellAddress(e))}shiftRelativeDimensions(e,t){return new el(this.isColumnAbsolute()?this.col:this.col+e,this.isRowAbsolute()?this.row:this.row+t,this.type,this.sheet)}shiftAbsoluteDimensions(e,t){return new el(this.isColumnRelative()?this.col:this.col+e,this.isRowRelative()?this.row:this.row+t,this.type,this.sheet)}hash(e){let r=e&&void 0!==this.sheet?`#${this.sheet}`:"";switch(this.type){case t.CELL_REFERENCE_RELATIVE:return`${r}#${this.row}R${this.col}`;case t.CELL_REFERENCE_ABSOLUTE:return`${r}#${this.row}A${this.col}`;case t.CELL_REFERENCE_ABSOLUTE_COL:return`${r}#${this.row}AC${this.col}`;case t.CELL_REFERENCE_ABSOLUTE_ROW:return`${r}#${this.row}AR${this.col}`}}unparse(e){let r=this.toSimpleCellAddress(e);if(r2(r))return;let n=eO(r.col),o=this.type===t.CELL_REFERENCE_ABSOLUTE||this.type===t.CELL_REFERENCE_ABSOLUTE_ROW?"$":"",i=this.type===t.CELL_REFERENCE_ABSOLUTE||this.type===t.CELL_REFERENCE_ABSOLUTE_COL?"$":"";return`${i}${n}${o}${r.row+1}`}exceedsSheetSizeLimits(e,t){return this.row>=t||this.col>=e}}let eh="A-Za-z\xc0-ʯ",ed=`${eh}0-9_.`,eu=`[${eh}0-9_]+`,ec=`(${eu}|'(((?!').|'')*)')!`,eg=`(${ec})?\\$?[A-Za-z]+\\$?[0-9]+`,ep=`(${ec})?\\$?[A-Za-z]+`,em=`(${ec})?\\$?[0-9]+`,ef="[rR][0-9]*[cC][0-9]*",ey=`(${eg})[^${ed}]`,eb=`[${eh}_][${ed}]*`,eC=["0","1","2","3","4","5","6","7","8","9"],ew=[...Array.from(Array(26)).map((e,t)=>t+65),...Array.from(Array(26)).map((e,t)=>t+97),...Array.from(Array(496)).map((e,t)=>t+192)].map(e=>String.fromCharCode(e)),eS=RegExp(`^(${ec})?(\\$?)([A-Za-z]+)(\\$?)([0-9]+)$`),ev=RegExp(`^(${ec})?(\\$?)([A-Za-z]+)$`),eR=RegExp(`^(${ec})?(\\$?)([0-9]+)$`),eE=RegExp(`^${eu}$`),eT=(e,t,r)=>{let n=eS.exec(e);if(!n)return;let o=ex(n[6]),i=Number(n[8])-1,s=eH(ek(n),r);if(null!==s)if("$"===n[5]&&"$"===n[7])return el.absolute(o,i,s);else if("$"===n[5])return el.absoluteCol(o,i-t.row,s);else if("$"===n[7])return el.absoluteRow(o-t.col,i,s);else return el.relative(o-t.col,i-t.row,s)},eA=(e,t,r)=>{let n=ev.exec(e);if(!n)return;let o=ex(n[6]),i=eH(ek(n),r);if(null!==i)if("$"===n[5])return es.absolute(o,i);else return es.relative(o-t.col,i)},eM=(e,t,r)=>{let n=eR.exec(e);if(!n)return;let o=Number(n[6])-1,i=eH(ek(n),r);if(null!==i)if("$"===n[5])return ea.absolute(o,i);else return ea.relative(o-t.row,i)},eN=(e,t,r)=>{let n=eS.exec(t);if(!n)return;let o=ex(n[6]),i=Number(n[8])-1,s=eH(ek(n),e);if(null!==s)return r1(void 0===s?r:s,o,i)},eI=(e,t,r)=>{let n=eO(t.col),o=e_(t.sheet,e);if(void 0!==o)if(r!==t.sheet)return`${o}!${n}${t.row+1}`;else return`${n}${t.row+1}`};function ex(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 eO(e){let t="";for(;e>=0;)t=String.fromCharCode(e%26+97)+t,e=Math.floor(e/26)-1;return t.toUpperCase()}function e_(e,t){let r=t(e);if(void 0!==r)if(eE.test(r))return r;else return r=r.replace(/'/g,"''"),`'${r}'`}function ek(e){var t;let r=null!=(t=e[3])?t:e[2];return r?r.replace(/''/g,"'"):null}function eH(e,t){if(!e)return;let r=t(e);return void 0===r?null:r}var eL=r(603);let eP=(e,t)=>({type:e,message:t});(A=n||(n={})).LexingError="LexingError",A.ParserError="ParsingError",A.StaticOffsetError="StaticOffsetError",A.StaticOffsetOutOfRangeError="StaticOffsetOutOfRangeError",A.RangeOffsetNotAllowed="RangeOffsetNotAllowed",A.InvalidRangeSize="InvalidRangeSize",(M=o||(o={})).EMPTY="EMPTY",M.NUMBER="NUMBER",M.STRING="STRING",M.MINUS_UNARY_OP="MINUS_UNARY_OP",M.PLUS_UNARY_OP="PLUS_UNARY_OP",M.PERCENT_OP="PERCENT_OP",M.CONCATENATE_OP="CONCATENATE_OP",M.EQUALS_OP="EQUALS_OP",M.NOT_EQUAL_OP="NOT_EQUAL_OP",M.GREATER_THAN_OP="GREATER_THAN_OP",M.LESS_THAN_OP="LESS_THAN_OP",M.GREATER_THAN_OR_EQUAL_OP="GREATER_THAN_OR_EQUAL_OP",M.LESS_THAN_OR_EQUAL_OP="LESS_THAN_OR_EQUAL_OP",M.PLUS_OP="PLUS_OP",M.MINUS_OP="MINUS_OP",M.TIMES_OP="TIMES_OP",M.DIV_OP="DIV_OP",M.POWER_OP="POWER_OP",M.FUNCTION_CALL="FUNCTION_CALL",M.NAMED_EXPRESSION="NAMED_EXPRESSION",M.PARENTHESIS="PARENTHESES",M.CELL_REFERENCE="CELL_REFERENCE",M.CELL_RANGE="CELL_RANGE",M.COLUMN_RANGE="COLUMN_RANGE",M.ROW_RANGE="ROW_RANGE",M.ERROR="ERROR",M.ERROR_WITH_RAW_INPUT="ERROR_WITH_RAW_INPUT",M.ARRAY="ARRAY",(N=i||(i={}))[N.RELATIVE=0]="RELATIVE",N[N.START_ABSOLUTE=1]="START_ABSOLUTE",N[N.BOTH_ABSOLUTE=2]="BOTH_ABSOLUTE";let eD=(e,t)=>({type:o.CELL_REFERENCE,reference:e,leadingWhitespace:null==t?void 0:t.image}),eF=(e,t,r,n)=>(eW(e,t,r),{type:o.CELL_RANGE,start:e,end:t,sheetReferenceType:r,leadingWhitespace:n}),eB=(e,t,r)=>({type:o.ARRAY,args:e,leadingWhitespace:null==t?void 0:t.image,internalWhitespace:null==r?void 0:r.image}),eV=(e,t)=>({type:o.ERROR,error:e,leadingWhitespace:null==t?void 0:t.image}),eU=(e,t,r)=>({type:o.ERROR_WITH_RAW_INPUT,error:t,rawInput:e,leadingWhitespace:null==r?void 0:r.image}),ez=()=>({type:o.ERROR,error:rX.parsingError()});function eW(e,t,r){if(void 0!==e.sheet&&void 0===t.sheet||void 0===e.sheet&&void 0!==t.sheet)throw Error("Start address inconsistent with end address");if(void 0===e.sheet&&r!==i.RELATIVE||void 0!==e.sheet&&r===i.RELATIVE)throw Error("Sheet address inconsistent with sheet reference type")}function eG(e,t){return(null!=t?t:"")+e}let e$={[o.PLUS_OP]:"+",[o.MINUS_OP]:"-",[o.TIMES_OP]:"*",[o.DIV_OP]:"/",[o.CONCATENATE_OP]:"&",[o.POWER_OP]:"^",[o.EQUALS_OP]:"=",[o.NOT_EQUAL_OP]:"<>",[o.GREATER_THAN_OP]:">",[o.GREATER_THAN_OR_EQUAL_OP]:">=",[o.LESS_THAN_OP]:"<",[o.LESS_THAN_OR_EQUAL_OP]:"<="};class eY{constructor(e){this.functionRegistry=e,this.cache=new Map}set(e,t){let r=tS(t,this.functionRegistry),n={ast:t,relativeDependencies:r,hasVolatileFunction:ej(t,this.functionRegistry.isFunctionVolatile),hasStructuralChangeFunction:ej(t,this.functionRegistry.isFunctionDependentOnSheetStructureChange)};return this.cache.set(e,n),n}get(e){return this.cache.get(e)}maybeSetAndThenGet(e,t){let r=this.cache.get(e);return void 0!==r?r.ast:(this.set(e,t),t)}}let ej=(e,t)=>{switch(e.type){case o.EMPTY:case o.NUMBER:case o.STRING:case o.ERROR:case o.ERROR_WITH_RAW_INPUT:case o.CELL_REFERENCE:case o.CELL_RANGE:case o.COLUMN_RANGE:case o.ROW_RANGE:case o.NAMED_EXPRESSION:return!1;case o.PERCENT_OP:case o.PLUS_UNARY_OP:case o.MINUS_UNARY_OP:return ej(e.value,t);case o.CONCATENATE_OP:case o.EQUALS_OP:case o.NOT_EQUAL_OP:case o.LESS_THAN_OP:case o.GREATER_THAN_OP:case o.LESS_THAN_OR_EQUAL_OP:case o.GREATER_THAN_OR_EQUAL_OP:case o.MINUS_OP:case o.PLUS_OP:case o.TIMES_OP:case o.DIV_OP:case o.POWER_OP:return ej(e.left,t)||ej(e.right,t);case o.PARENTHESIS:return ej(e.expression,t);case o.FUNCTION_CALL:if(t(e.procedureName))return!0;return e.args.some(e=>ej(e,t));case o.ARRAY:return e.args.some(e=>e.some(e=>ej(e,t)))}};class eq{}eq.DistinctSigns="Distinct signs.",eq.WrongArgNumber="Wrong number of arguments.",eq.EmptyArg="Empty function argument.",eq.EmptyArray="Empty array not allowed.",eq.ArrayDimensions="Array dimensions are not compatible.",eq.NoSpaceForArrayResult="No space for array result.",eq.ValueSmall="Value too small.",eq.ValueLarge="Value too large.",eq.BadCriterion="Incorrect criterion.",eq.RangeManySheets="Range spans more than one sheet.",eq.CellRangeExpected="Cell range expected.",eq.WrongDimension="Wrong range dimension.",eq.ScalarExpected="Cell range not allowed.",eq.NumberCoercion="Value cannot be coerced to number.",eq.NumberExpected="Number argument expected.",eq.IntegerExpected="Value needs to be an integer.",eq.BadMode="Mode not recognized.",eq.DateBounds="Date outside of bounds.",eq.OutOfSheet="Resulting reference is out of the sheet.",eq.WrongType="Wrong type of argument.",eq.NaN="NaN or infinite value encountered.",eq.EqualLength="Ranges need to be of equal length.",eq.Negative="Value cannot be negative.",eq.NotBinary="String does not represent a binary number.",eq.NotOctal="String does not represent an octal number.",eq.NotHex="String does not represent a hexadecimal number.",eq.EndStartPeriod="End period needs to be at least start period.",eq.CellRefExpected="Cell reference expected.",eq.EmptyRange="Empty range not allowed.",eq.BadRef="Address is not correct.",eq.NumberRange="Number-only range expected.",eq.ValueNotFound="Value not found.",eq.ValueBaseLarge="Value in base too large.",eq.ValueBaseSmall="Value in base too small.",eq.ValueBaseLong="Value in base too long.",eq.NegativeLength="Length cannot be negative.",eq.PatternNotFound="Pattern not found.",eq.OneValue="Needs at least one value.",eq.TwoValues="Range needs to contain at least two elements.",eq.ThreeValues="Range needs to contain at least three elements.",eq.IndexBounds="Index out of bounds.",eq.IndexLarge="Index too large.",eq.Formula="Expected formula.",eq.NegativeCount="Count cannot be negative.",eq.ParseError="Parsing error.",eq.SheetRef="Sheet does not exist.",eq.PeriodLong="Period number cannot exceed life length.",eq.InvalidDate="Invalid date.",eq.BitshiftLong="Result of bitshift is too long.",eq.EmptyString="Empty-string argument not allowed.",eq.LengthBounds="Length out of bounds.",eq.NegativeTime="Time cannot be negative.",eq.NoDefault="No default option.",eq.NoConditionMet="None of the conditions were met.",eq.Selector="Selector cannot exceed the number of arguments.",eq.StartEndDate="Start date needs to be earlier than end date.",eq.IncorrectDateTime="String does not represent correct DateTime.",eq.CharacterCodeBounds="Character code out of bounds.",eq.NonZero="Argument cannot be 0.",eq.LessThanOne="Argument cannot be less than 1.",eq.WeekendString="Incorrect weekend bitmask string.",eq.InvalidRoman="Invalid roman numeral.",eq.WrongOrder="Wrong order of values.",eq.ComplexNumberExpected="Complex number expected.",eq.ShouldBeIorJ="Should be 'i' or 'j'.",eq.SizeMismatch="Array dimensions mismatched.",eq.FunctionName=e=>`Function name ${e} not recognized.`,eq.NamedExpressionName=e=>`Named expression ${e} not recognized.`,eq.LicenseKey=e=>`License key is ${e}.`;let eK=(0,eL.createToken)({name:"AdditionOp",pattern:eL.Lexer.NA}),eX=(0,eL.createToken)({name:"PlusOp",pattern:/\+/,categories:eK}),eQ=(0,eL.createToken)({name:"MinusOp",pattern:/-/,categories:eK}),eZ=(0,eL.createToken)({name:"MultiplicationOp",pattern:eL.Lexer.NA}),eJ=(0,eL.createToken)({name:"TimesOp",pattern:/\*/,categories:eZ}),e0=(0,eL.createToken)({name:"DivOp",pattern:/\//,categories:eZ}),e1=(0,eL.createToken)({name:"PowerOp",pattern:/\^/}),e2=(0,eL.createToken)({name:"PercentOp",pattern:/%/}),e3=(0,eL.createToken)({name:"BooleanOp",pattern:eL.Lexer.NA}),e6=(0,eL.createToken)({name:"EqualsOp",pattern:/=/,categories:e3}),e4=(0,eL.createToken)({name:"NotEqualOp",pattern:/<>/,categories:e3}),e5=(0,eL.createToken)({name:"GreaterThanOp",pattern:/>/,categories:e3}),e9=(0,eL.createToken)({name:"LessThanOp",pattern:/</,categories:e3}),e7=(0,eL.createToken)({name:"GreaterThanOrEqualOp",pattern:/>=/,categories:e3}),e8=(0,eL.createToken)({name:"LessThanOrEqualOp",pattern:/<=/,categories:e3}),te=(0,eL.createToken)({name:"ConcatenateOp",pattern:/&/}),tt=(0,eL.createToken)({name:"LParen",pattern:/\(/}),tr=(0,eL.createToken)({name:"RParen",pattern:/\)/}),tn=(0,eL.createToken)({name:"ArrayLParen",pattern:/{/}),to=(0,eL.createToken)({name:"ArrayRParen",pattern:/}/}),ti=(0,eL.createToken)({name:"StringLiteral",pattern:/"([^"\\]*(\\.[^"\\]*)*)"/}),ts=(0,eL.createToken)({name:"ErrorLiteral",pattern:/#[A-Za-z0-9\/]+[?!]?/}),ta=(0,eL.createToken)({name:"RangeSeparator",pattern:RegExp(":")}),tl=(0,eL.createToken)({name:"ColumnRange",pattern:RegExp(`${ep}:${ep}`)}),th=(0,eL.createToken)({name:"RowRange",pattern:RegExp(`${em}:${em}`)}),td=(0,eL.createToken)({name:"ProcedureName",pattern:RegExp(`([${eh}][${ed}]*)\\(`)}),tu=new class{constructor(){this.POSSIBLE_START_CHARACTERS=[...ew,...eC,"$","'","_"],this.cellReferenceRegexp=RegExp(ey,"y")}match(e,t){this.cellReferenceRegexp.lastIndex=t;let r=this.cellReferenceRegexp.exec(e+"@");return null==r||null==r[1]?null:(r[0]=r[1],r)}},tc=(0,eL.createToken)({name:"CellReference",pattern:tu.match.bind(tu),start_chars_hint:tu.POSSIBLE_START_CHARACTERS,line_breaks:!1}),tg=new class{constructor(){this.POSSIBLE_START_CHARACTERS=[...ew,"_"],this.namedExpressionRegexp=RegExp(eb,"y"),this.r1c1CellRefRegexp=RegExp(`^${ef}$`)}match(e,t){this.namedExpressionRegexp.lastIndex=t;let r=this.namedExpressionRegexp.exec(e);return null==r||null==r[0]||this.r1c1CellRefRegexp.test(r[0])?null:r}},tp=(0,eL.createToken)({name:"NamedExpression",pattern:tg.match.bind(tg),start_chars_hint:tg.POSSIBLE_START_CHARACTERS,line_breaks:!1});class tm extends eL.EmbeddedActionsParser{constructor(e,t){super(e.allTokens,{outputCst:!1,maxLookahead:7}),this.resolveSheetReference=t,this.booleanExpressionOrEmpty=this.RULE("booleanExpressionOrEmpty",()=>{let e;return this.OR([{ALT:()=>this.SUBRULE(this.booleanExpression)},{ALT:(0,eL.EMPTY_ALT)({type:o.EMPTY,leadingWhitespace:null==e?void 0:e.image})}])}),this.procedureExpression=this.RULE("procedureExpression",()=>{var e;let t,r,n,i=this.CONSUME(td),s=i.image.toUpperCase().slice(0,-1),a=null!=(e=this.lexerConfig.functionMapping[s])?e:s,l=[],h=this.SUBRULE(this.booleanExpressionOrEmpty);this.MANY(()=>{var e;let t=this.CONSUME(this.lexerConfig.ArgSeparator);h.type===o.EMPTY&&(h.leadingWhitespace=null==(e=t.leadingWhitespace)?void 0:e.image),l.push(h),h=this.SUBRULE2(this.booleanExpressionOrEmpty)}),l.push(h),1===l.length&&l[0].type===o.EMPTY&&(l.length=0);let d=this.CONSUME(tr);return t=i.leadingWhitespace,r=d.leadingWhitespace,{type:o.FUNCTION_CALL,procedureName:a,args:l,leadingWhitespace:null==t?void 0:t.image,internalWhitespace:null==r?void 0:r.image,hyperlink:n}}),this.namedExpressionExpression=this.RULE("namedExpressionExpression",()=>{let e,t,r=this.CONSUME(tp);return e=r.image,t=r.leadingWhitespace,{type:o.NAMED_EXPRESSION,expressionName:e,leadingWhitespace:null==t?void 0:t.image}}),this.offsetProcedureExpression=this.RULE("offsetProcedureExpression",()=>{let e=[];return this.CONSUME(this.lexerConfig.OffsetProcedureName),this.CONSUME(tt),this.MANY_SEP({SEP:this.lexerConfig.ArgSeparator,DEF:()=>{e.push(this.SUBRULE(this.booleanExpression))}}),this.CONSUME(tr),this.handleOffsetHeuristic(e)}),this.columnRangeExpression=this.RULE("columnRangeExpression",()=>{var e;let t=this.CONSUME(tl),[r,i]=t.image.split(":"),s=this.ACTION(()=>eA(r,this.formulaAddress,this.resolveSheetReference)),a=this.ACTION(()=>eA(i,this.formulaAddress,this.resolveSheetReference));if(void 0===s||void 0===a)return eV(new rX(d.REF));if(s.exceedsSheetSizeLimits(this.lexerConfig.maxColumns)||a.exceedsSheetSizeLimits(this.lexerConfig.maxColumns))return eU(t.image,new rX(d.NAME),t.leadingWhitespace);if(void 0===s.sheet&&void 0!==a.sheet)return this.parsingError(n.ParserError,"Malformed range expression");let{firstEnd:l,secondEnd:h,sheetRefType:u}=tm.fixSheetIdsForRangeEnds(s,a);return e=t.leadingWhitespace,eW(l,h,u),{type:o.COLUMN_RANGE,start:l,end:h,sheetReferenceType:u,leadingWhitespace:null==e?void 0:e.image}}),this.rowRangeExpression=this.RULE("rowRangeExpression",()=>{var e;let t=this.CONSUME(th),[r,i]=t.image.split(":"),s=this.ACTION(()=>eM(r,this.formulaAddress,this.resolveSheetReference)),a=this.ACTION(()=>eM(i,this.formulaAddress,this.resolveSheetReference));if(void 0===s||void 0===a)return eV(new rX(d.REF));if(s.exceedsSheetSizeLimits(this.lexerConfig.maxRows)||a.exceedsSheetSizeLimits(this.lexerConfig.maxRows))return eU(t.image,new rX(d.NAME),t.leadingWhitespace);if(void 0===s.sheet&&void 0!==a.sheet)return this.parsingError(n.ParserError,"Malformed range expression");let{firstEnd:l,secondEnd:h,sheetRefType:u}=tm.fixSheetIdsForRangeEnds(s,a);return e=t.leadingWhitespace,eW(l,h,u),{type:o.ROW_RANGE,start:l,end:h,sheetReferenceType:u,leadingWhitespace:null==e?void 0:e.image}}),this.cellReference=this.RULE("cellReference",()=>{let e=this.CONSUME(tc),t=this.ACTION(()=>eT(e.image,this.formulaAddress,this.resolveSheetReference));return void 0===t?eU(e.image,new rX(d.REF),e.leadingWhitespace):t.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?eU(e.image,new rX(d.NAME),e.leadingWhitespace):eD(t,e.leadingWhitespace)}),this.endRangeReference=this.RULE("endRangeReference",e=>{var t;let r=this.CONSUME(tc),n=this.ACTION(()=>eT(e.image,this.formulaAddress,this.resolveSheetReference)),o=this.ACTION(()=>eT(r.image,this.formulaAddress,this.resolveSheetReference));return void 0===n||void 0===o?this.ACTION(()=>eU(`${e.image}:${r.image}`,new rX(d.REF),e.leadingWhitespace)):n.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)||o.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?this.ACTION(()=>eU(`${e.image}:${r.image}`,new rX(d.NAME),e.leadingWhitespace)):this.buildCellRange(n,o,null==(t=e.leadingWhitespace)?void 0:t.image)}),this.endOfRangeExpression=this.RULE("endOfRangeExpression",e=>this.OR([{ALT:()=>this.SUBRULE(this.endRangeReference,{ARGS:[e]})},{ALT:()=>{var t;let r=this.SUBRULE(this.offsetProcedureExpression),i=this.ACTION(()=>eT(e.image,this.formulaAddress,this.resolveSheetReference));return void 0===i?eV(new rX(d.REF)):r.type===o.CELL_REFERENCE?this.buildCellRange(i,r.reference,null==(t=e.leadingWhitespace)?void 0:t.image):this.parsingError(n.RangeOffsetNotAllowed,"Range offset not allowed here")}}])),this.cellRangeExpression=this.RULE("cellRangeExpression",()=>{let e=this.CONSUME(tc);return this.CONSUME2(ta),this.SUBRULE(this.endOfRangeExpression,{ARGS:[e]})}),this.endRangeWithOffsetStartReference=this.RULE("endRangeWithOffsetStartReference",e=>{let t=this.CONSUME(tc),r=this.ACTION(()=>eT(t.image,this.formulaAddress,this.resolveSheetReference));return void 0===r?this.ACTION(()=>eV(new rX(d.REF))):this.buildCellRange(e.reference,r,e.leadingWhitespace)}),this.endOfRangeWithOffsetStartExpression=this.RULE("endOfRangeWithOffsetStartExpression",e=>this.OR([{ALT:()=>this.SUBRULE(this.endRangeWithOffsetStartReference,{ARGS:[e]})},{ALT:()=>{let t=this.SUBRULE(this.offsetProcedureExpression);return t.type===o.CELL_REFERENCE?this.buildCellRange(e.reference,t.reference,e.leadingWhitespace):this.parsingError(n.RangeOffsetNotAllowed,"Range offset not allowed here")}}])),this.offsetExpression=this.RULE("offsetExpression",()=>{let e,t=this.SUBRULE(this.offsetProcedureExpression);return(this.OPTION(()=>{this.CONSUME(ta),e=t.type===o.CELL_RANGE?this.parsingError(n.RangeOffsetNotAllowed,"Range offset not allowed here"):this.SUBRULE(this.endOfRangeWithOffsetStartExpression,{ARGS:[t]})}),void 0!==e)?e:t}),this.insideArrayExpression=this.RULE("insideArrayExpression",()=>{let 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))}}])}),eB(e)}),this.parenthesisExpression=this.RULE("parenthesisExpression",()=>{let e,t,r=this.CONSUME(tt),n=this.SUBRULE(this.booleanExpression),i=this.CONSUME(tr);return e=r.leadingWhitespace,t=i.leadingWhitespace,{type:o.PARENTHESIS,expression:n,leadingWhitespace:null==e?void 0:e.image,internalWhitespace:null==t?void 0:t.image}}),this.arrayExpression=this.RULE("arrayExpression",()=>this.OR([{ALT:()=>{let e=this.CONSUME(tn),t=this.SUBRULE(this.insideArrayExpression),r=this.CONSUME(to);return eB(t.args,e.leadingWhitespace,r.leadingWhitespace)}},{ALT:()=>this.SUBRULE(this.parenthesisExpression)}])),this.numericStringToNumber=e=>Number(e.replace(this.lexerConfig.decimalSeparator,".")),this.positiveAtomicExpression=this.RULE("positiveAtomicExpression",()=>{var e;return this.OR(null!=(e=this.atomicExpCache)?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:()=>{let e,t,r=this.CONSUME(this.lexerConfig.NumberLiteral);return e=this.numericStringToNumber(r.image),t=r.leadingWhitespace,{type:o.NUMBER,value:e,leadingWhitespace:null==t?void 0:t.image}}},{ALT:()=>{var e,t;return e=this.CONSUME(ti),{type:o.STRING,value:e.image.slice(1,-1),leadingWhitespace:null==(t=e.leadingWhitespace)?void 0:t.image}}},{ALT:()=>{let e=this.CONSUME(ts),t=e.image.toUpperCase(),r=this.lexerConfig.errorMapping[t];return r?eV(new rX(r),e.leadingWhitespace):this.parsingError(n.ParserError,"Unknown error literal")}}])}),this.rightUnaryOpAtomicExpression=this.RULE("rightUnaryOpAtomicExpression",()=>{let e=this.SUBRULE(this.positiveAtomicExpression),t=this.OPTION(()=>this.CONSUME(e2));if(t){let r;return r=t.leadingWhitespace,{type:o.PERCENT_OP,value:e,leadingWhitespace:null==r?void 0:r.image}}return e}),this.atomicExpression=this.RULE("atomicExpression",()=>this.OR([{ALT:()=>{let e=this.CONSUME(eK),t=this.SUBRULE(this.atomicExpression);if((0,eL.tokenMatcher)(e,eX)){let r;return r=e.leadingWhitespace,{type:o.PLUS_UNARY_OP,value:t,leadingWhitespace:null==r?void 0:r.image}}if((0,eL.tokenMatcher)(e,eQ)){let r;return r=e.leadingWhitespace,{type:o.MINUS_UNARY_OP,value:t,leadingWhitespace:null==r?void 0:r.image}}return this.customParsingError=eP(n.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(()=>{let t=this.CONSUME(e1),r=this.SUBRULE2(this.atomicExpression);if((0,eL.tokenMatcher)(t,e1)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.POWER_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.multiplicationExpression=this.RULE("multiplicationExpression",()=>{let e=this.SUBRULE(this.powerExpression);return this.MANY(()=>{let t=this.CONSUME(eZ),r=this.SUBRULE2(this.powerExpression);if((0,eL.tokenMatcher)(t,eJ)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.TIMES_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else if((0,eL.tokenMatcher)(t,e0)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.DIV_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.additionExpression=this.RULE("additionExpression",()=>{let e=this.SUBRULE(this.multiplicationExpression);return this.MANY(()=>{let t=this.CONSUME(eK),r=this.SUBRULE2(this.multiplicationExpression);if((0,eL.tokenMatcher)(t,eX)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.PLUS_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else if((0,eL.tokenMatcher)(t,eQ)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.MINUS_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.concatenateExpression=this.RULE("concatenateExpression",()=>{let e=this.SUBRULE(this.additionExpression);return this.MANY(()=>{let t,r,n=this.CONSUME(te),i=this.SUBRULE2(this.additionExpression);t=e,r=n.leadingWhitespace,e={type:o.CONCATENATE_OP,left:t,right:i,leadingWhitespace:null==r?void 0:r.image}}),e}),this.booleanExpression=this.RULE("booleanExpression",()=>{let e=this.SUBRULE(this.concatenateExpression);return this.MANY(()=>{let t=this.CONSUME(e3),r=this.SUBRULE2(this.concatenateExpression);if((0,eL.tokenMatcher)(t,e6)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.EQUALS_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else if((0,eL.tokenMatcher)(t,e4)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.NOT_EQUAL_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else if((0,eL.tokenMatcher)(t,e5)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.GREATER_THAN_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else if((0,eL.tokenMatcher)(t,e9)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.LESS_THAN_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else if((0,eL.tokenMatcher)(t,e7)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.GREATER_THAN_OR_EQUAL_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else if((0,eL.tokenMatcher)(t,e8)){let n,i;n=e,i=t.leadingWhitespace,e={type:o.LESS_THAN_OR_EQUAL_OP,left:n,right:r,leadingWhitespace:null==i?void 0:i.image}}else this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.formula=this.RULE("formula",()=>(this.CONSUME(e6),this.SUBRULE(this.booleanExpression))),this.lexerConfig=e,this.formulaAddress=r1(0,0,0),this.performSelfAnalysis()}parseFromTokens(e,t){this.input=e;let r=this.formulaWithContext(t),o=[];return this.customParsingError&&o.push(this.customParsingError),(o=o.concat(this.errors.map(e=>({type:n.ParserError,message:e.message})))).length>0&&(r=ez()),{ast:r,errors:o}}reset(){super.reset(),this.customParsingError=void 0}formulaWithContext(e){return this.formulaAddress=e,this.formula()}buildCellRange(e,t,r){if(void 0===e.sheet&&void 0!==t.sheet)return this.parsingError(n.ParserError,"Malformed range expression");let{firstEnd:o,secondEnd:i,sheetRefType:s}=tm.fixSheetIdsForRangeEnds(e,t);return eF(o,i,s,r)}static fixSheetIdsForRangeEnds(e,t){let r=tm.rangeSheetReferenceType(e.sheet,t.sheet),n=void 0!==e.sheet&&void 0===t.sheet?t.withSheet(e.sheet):t;return{firstEnd:e,secondEnd:n,sheetRefType:r}}handleOffsetHeuristic(e){var r;let s,a,l,h,u=e[0];if(u.type!==o.CELL_REFERENCE)return this.parsingError(n.StaticOffsetError,"First argument to OFFSET is not a reference");let c=e[1];if(c.type===o.NUMBER&&Number.isInteger(c.value))s=c.value;else if(c.type===o.PLUS_UNARY_OP&&c.value.type===o.NUMBER&&Number.isInteger(c.value.value))s=c.value.value;else{if(!(c.type===o.MINUS_UNARY_OP&&c.value.type===o.NUMBER&&Number.isInteger(c.value.value)))return this.parsingError(n.StaticOffsetError,"Second argument to OFFSET is not a static number");s=-c.value.value}let g=e[2];if(g.type===o.NUMBER&&Number.isInteger(g.value))a=g.value;else if(g.type===o.PLUS_UNARY_OP&&g.value.type===o.NUMBER&&Number.isInteger(g.value.value))a=g.value.value;else{if(!(g.type===o.MINUS_UNARY_OP&&g.value.type===o.NUMBER&&Number.isInteger(g.value.value)))return this.parsingError(n.StaticOffsetError,"Third argument to OFFSET is not a static number");a=-g.value.value}let p=e[3];if(void 0===p)l=1;else{if(p.type!==o.NUMBER)return this.parsingError(n.StaticOffsetError,"Fourth argument to OFFSET is not a static number");if((l=p.value)<1)return this.parsingError(n.StaticOffsetError,"Fourth argument to OFFSET is too small number");if(!Number.isInteger(l))return this.parsingError(n.StaticOffsetError,"Fourth argument to OFFSET is not integer")}let m=e[4];if(void 0===m)h=1;else{if(m.type!==o.NUMBER)return this.parsingError(n.StaticOffsetError,"Fifth argument to OFFSET is not a static number");if((h=m.value)<1)return this.parsingError(n.StaticOffsetError,"Fifth argument to OFFSET is too small number");if(!Number.isInteger(h))return this.parsingError(n.StaticOffsetError,"Fifth argument to OFFSET is not integer")}let f=new el(u.reference.col+a,u.reference.row+s,u.reference.type,null!=(r=u.reference.sheet)?r:void 0),y=f.col,b=f.row;if((u.reference.type===t.CELL_REFERENCE_RELATIVE||u.reference.type===t.CELL_REFERENCE_ABSOLUTE_COL)&&(b+=this.formulaAddress.row),(u.reference.type===t.CELL_REFERENCE_RELATIVE||u.reference.type===t.CELL_REFERENCE_ABSOLUTE_ROW)&&(y+=this.formulaAddress.col),y<0||b<0)return eV(new rX(d.REF,eq.OutOfSheet));if(1===h&&1===l)return eD(f);{let e=new el(f.col+h-1,f.row+l-1,f.type,f.sheet);return eF(f,e,null==u.reference.sheet?i.RELATIVE:i.BOTH_ABSOLUTE)}}parsingError(e,t){return this.customParsingError=eP(e,t),ez()}static rangeSheetReferenceType(e,t){return void 0===e?i.RELATIVE:void 0===t?i.START_ABSOLUTE:i.BOTH_ABSOLUTE}}class tf{constructor(e){this.lexerConfig=e,this.lexer=new eL.Lexer(e.allTokens,{ensureOptimizations:!0})}tokenizeFormula(e){let t=this.lexer.tokenize(e),r=t.tokens;return r=this.trimTrailingWhitespaces(r),r=this.skipWhitespacesInsideRanges(r),t.tokens=r=this.skipWhitespacesBeforeArgSeparators(r),t}skipWhitespacesInsideRanges(e){return tf.filterTokensByNeighbors(e,(e,t,r)=>((0,eL.tokenMatcher)(e,tc)||(0,eL.tokenMatcher)(e,ta))&&(0,eL.tokenMatcher)(t,this.lexerConfig.WhiteSpace)&&((0,eL.tokenMatcher)(r,tc)||(0,eL.tokenMatcher)(r,ta)))}skipWhitespacesBeforeArgSeparators(e){return tf.filterTokensByNeighbors(e,(e,t,r)=>!(0,eL.tokenMatcher)(e,this.lexerConfig.ArgSeparator)&&(0,eL.tokenMatcher)(t,this.lexerConfig.WhiteSpace)&&(0,eL.tokenMatcher)(r,this.lexerConfig.ArgSeparator))}static filterTokensByNeighbors(e,t){if(e.length<3)return e;let r=0,n=[e[r++]];for(;r<e.length-1;)t(e[r-1],e[r],e[r+1])||n.push(e[r]),++r;return n.push(e[r]),n}trimTrailingWhitespaces(e){return e.length>0&&(0,eL.tokenMatcher)(e[e.length-1],this.lexerConfig.WhiteSpace)&&e.pop(),e}}class ty{constructor(e,t,r){this.config=e,this.sheetMapping=t,this.namedExpressions=r}unparse(e,t){return"="+this.unparseAst(e,t)}unparseAst(e,t){var r,n;switch(e.type){case o.EMPTY:return eG("",e.leadingWhitespace);case o.NUMBER:return eG(tb(e.value,this.config.decimalSeparator),e.leadingWhitespace);case o.STRING:return eG('"'+e.value+'"',e.leadingWhitespace);case o.FUNCTION_CALL:{let r=e.args.map(e=>void 0!==e?this.unparseAst(e,t):"").join(this.config.functionArgSeparator),n=(this.config.translationPackage.isFunctionTranslated(e.procedureName)?this.config.translationPackage.getFunctionTranslation(e.procedureName):e.procedureName)+"("+r+eG(")",e.internalWhitespace);return eG(n,e.leadingWhitespace)}case o.NAMED_EXPRESSION:return eG((null==(r=this.namedExpressions.nearestNamedExpression(e.expressionName,t.sheet))?void 0:r.displayName)||e.expressionName,e.leadingWhitespace);case o.CELL_REFERENCE:return eG((void 0!==e.reference.sheet?this.unparseSheetName(e.reference.sheet)+"!":"")+(null!=(n=e.reference.unparse(t))?n:this.config.translationPackage.getErrorTranslation(d.REF)),e.leadingWhitespace);case o.COLUMN_RANGE:case o.ROW_RANGE:case o.CELL_RANGE:return eG(this.formatRange(e,t),e.leadingWhitespace);case o.PLUS_UNARY_OP:{let r=this.unparseAst(e.value,t);return eG("+",e.leadingWhitespace)+r}case o.MINUS_UNARY_OP:{let r=this.unparseAst(e.value,t);return eG("-",e.leadingWhitespace)+r}case o.PERCENT_OP:return this.unparseAst(e.value,t)+eG("%",e.leadingWhitespace);case o.ERROR:return eG(this.config.translationPackage.getErrorTranslation(e.error?e.error.type:d.ERROR),e.leadingWhitespace);case o.ERROR_WITH_RAW_INPUT:return eG(e.rawInput,e.leadingWhitespace);case o.PARENTHESIS:{let r="("+this.unparseAst(e.expression,t)+eG(")",e.internalWhitespace);return eG(r,e.leadingWhitespace)}case o.ARRAY:{let r="{"+e.args.map(e=>e.map(e=>this.unparseAst(e,t)).join(this.config.arrayColumnSeparator)).join(this.config.arrayRowSeparator)+eG("}",e.internalWhitespace);return eG(r,e.leadingWhitespace)}default:{let r=this.unparseAst(e.left,t),n=this.unparseAst(e.right,t);return r+eG(e$[e.type],e.leadingWhitespace)+n}}}unparseSheetName(e){let t=e_(e,e=>this.sheetMapping.getSheetNameOrThrowError(e,{includePlaceholders:!0}));if(void 0===t)throw new tX(e);return t}formatRange(e,t){let r="",n="";void 0!==e.start.sheet&&e.sheetReferenceType!==i.RELATIVE&&(r=this.unparseSheetName(e.start.sheet)+"!"),void 0!==e.end.sheet&&e.sheetReferenceType===i.BOTH_ABSOLUTE&&(n=this.unparseSheetName(e.end.sheet)+"!");let o=e.start.unparse(t),s=e.end.unparse(t);return void 0===o||void 0===s?this.config.translationPackage.getErrorTranslation(d.REF):`${r}${o}:${n}${s}`}}function tb(e,t){return e.toString().replace(".",t)}class tC{constructor(e,t,r){this.config=e,this.functionRegistry=t,this.resolveSheetReference=r,this.statsCacheUsed=0,this.lexerConfig=(e=>{let t,r,n=e.translationPackage.getFunctionTranslation("OFFSET"),o=e.errorMapping,i=e.translationPackage.buildFunctionMapping(),s=new RegExp("standard"===e.ignoreWhiteSpace?"[ \\t\\n\\r]+":"\\s+"),a=(0,eL.createToken)({name:"WhiteSpace",pattern:s}),l=(0,eL.createToken)({name:"ArrayRowSep",pattern:e.arrayRowSeparator}),h=(0,eL.createToken)({name:"ArrayColSep",pattern:e.arrayColumnSeparator}),d=(0,eL.createToken)({name:"NumberLiteral",pattern:RegExp(`(([${e.decimalSeparator}]\\d+)|(\\d+([${e.decimalSeparator}]\\d*)?))(e[+-]?\\d+)?`)}),u=(0,eL.createToken)({name:"OffsetProcedureName",pattern:RegExp(n,"i")});e.functionArgSeparator===e.arrayColumnSeparator?(t=h,r=[]):e.functionArgSeparator===e.arrayRowSeparator?(t=l,r=[]):r=[t=(0,eL.createToken)({name:"ArgSeparator",pattern:e.functionArgSeparator})];let c=[a,eX,eQ,eJ,e0,e1,e6,e4,e2,e7,e8,e5,e9,tt,tr,tn,to,u,td,ta,...r,tl,th,d,ti,ts,te,e3,eK,eZ,tc,tp,l,h];return{ArgSeparator:t,NumberLiteral:d,OffsetProcedureName:u,ArrayRowSeparator:l,ArrayColSeparator:h,WhiteSpace:a,allTokens:c,errorMapping:o,functionMapping:i,decimalSeparator:e.decimalSeparator,maxColumns:e.maxColumns,maxRows:e.maxRows}})(e),this.lexer=new tf(this.lexerConfig),this.formulaParser=new tm(this.lexerConfig,this.resolveSheetReference),this.cache=new eY(this.functionRegistry)}parse(e,t){this.formulaAddress=t;let r=this.tokenizeFormula(e);if(r.errors.length>0){let e=r.errors.map(e=>({type:n.LexingError,message:e.message}));return{ast:ez(),errors:e,hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]}}let o=this.computeHashFromTokens(r.tokens,t),i=this.cache.get(o);if(void 0!==i)++this.statsCacheUsed;else{let e=this.bindWhitespacesToTokens(r.tokens),n=this.formulaParser.parseFromTokens(e,t);if(n.errors.length>0)return Object.assign(Object.assign({},n),{hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]});i=this.cache.set(o,n.ast)}let{ast:s,hasVolatileFunction:a,hasStructuralChangeFunction:l}=i,h=this.convertReversedRangesToRegularRanges(s),d=tS(h,this.functionRegistry);return{ast:h,errors:[],hasVolatileFunction:a,hasStructuralChangeFunction:l,dependencies:d}}convertReversedRangesToRegularRanges(e){switch(e.type){case o.EMPTY:case o.NUMBER:case o.STRING:case o.ERROR:case o.ERROR_WITH_RAW_INPUT:case o.CELL_REFERENCE:case o.NAMED_EXPRESSION:return e;case o.CELL_RANGE:{let{start:t,end:r}=e,n=this.orderCellRangeEnds(t,r);return Object.assign(Object.assign({},e),{start:n.start,end:n.end})}case o.COLUMN_RANGE:{let{start:t,end:r}=e,n=this.orderColumnRangeEnds(t,r);return Object.assign(Object.assign({},e),{start:n.start,end:n.end})}case o.ROW_RANGE:{let{start:t,end:r}=e,n=this.orderRowRangeEnds(t,r);return Object.assign(Object.assign({},e),{start:n.start,end:n.end})}case o.PERCENT_OP:case o.PLUS_UNARY_OP:case o.MINUS_UNARY_OP:{let t=this.convertReversedRangesToRegularRanges(e.value);return Object.assign(Object.assign({},e),{value:t})}case o.CONCATENATE_OP:case o.EQUALS_OP:case o.NOT_EQUAL_OP:case o.LESS_THAN_OP:case o.GREATER_THAN_OP:case o.LESS_THAN_OR_EQUAL_OP:case o.GREATER_THAN_OR_EQUAL_OP:case o.MINUS_OP:case o.PLUS_OP:case o.TIMES_OP:case o.DIV_OP:case o.POWER_OP:{let t=this.convertReversedRangesToRegularRanges(e.left),r=this.convertReversedRangesToRegularRanges(e.right);return Object.assign(Object.assign({},e),{left:t,right:r})}case o.PARENTHESIS:{let t=this.convertReversedRangesToRegularRanges(e.expression);return Object.assign(Object.assign({},e),{expression:t})}case o.FUNCTION_CALL:{let t=e.args.map(e=>this.convertReversedRangesToRegularRanges(e));return Object.assign(Object.assign({},e),{args:t})}case o.ARRAY:{let t=e.args.map(e=>e.map(e=>this.convertReversedRangesToRegularRanges(e)));return Object.assign(Object.assign({},e),{args:t})}}}orderCellRangeEnds(e,t){let r=[e,t],[n,o]=r.map(e=>e.toColumnAddress()).sort(es.compareByAbsoluteAddress(this.formulaAddress)),[i,s]=r.map(e=>e.toRowAddress()).sort(ea.compareByAbsoluteAddress(this.formulaAddress)),[a,l]=r.map(e=>e.sheet).sort(tC.compareSheetIds.bind(this));return{start:el.fromColAndRow(n,i,a),end:el.fromColAndRow(o,s,l)}}orderColumnRangeEnds(e,t){let r=[e,t],[n,o]=r.sort(es.compareByAbsoluteAddress(this.formulaAddress)),[i,s]=r.map(e=>e.sheet).sort(tC.compareSheetIds.bind(this));return{start:new es(n.type,n.col,i),end:new es(o.type,o.col,s)}}orderRowRangeEnds(e,t){let r=[e,t],[n,o]=r.sort(ea.compareByAbsoluteAddress(this.formulaAddress)),[i,s]=r.map(e=>e.sheet).sort(tC.compareSheetIds.bind(this));return{start:new ea(n.type,n.row,i),end:new ea(o.type,o.row,s)}}static compareSheetIds(e,t){return(e=null!=e?e:1/0)-(t=null!=t?t:1/0)}fetchCachedResultForAst(e){let t=this.computeHashFromAst(e);return this.fetchCachedResult(t)}fetchCachedResult(e){let t=this.cache.get(e);if(void 0===t)throw Error("There is no AST with such key in the cache");{let{ast:e,hasVolatileFunction:r,hasStructuralChangeFunction:n,relativeDependencies:o}=t;return{ast:e,errors:[],hasVolatileFunction:r,hasStructuralChangeFunction:n,dependencies:o}}}computeHashFromTokens(e,t){var r;let n="",o=0;for(;o<e.length;){let i=e[o];if((0,eL.tokenMatcher)(i,tc)){let e=eT(i.image,t,this.resolveSheetReference);n=void 0===e?n.concat(i.image):n.concat(e.hash(!0))}else if((0,eL.tokenMatcher)(i,td)){let e=i.image.toUpperCase().slice(0,-1),t=null!=(r=this.lexerConfig.functionMapping[e])?r:e;n=n.concat(t,"(")}else if((0,eL.tokenMatcher)(i,tl)){let[e,r]=i.image.split(":"),o=eA(e,t,this.resolveSheetReference),s=eA(r,t,this.resolveSheetReference);n=void 0===o||void 0===s?n.concat("!REF"):n.concat(o.hash(!0),":",s.hash(!0))}else if((0,eL.tokenMatcher)(i,th)){let[e,r]=i.image.split(":"),o=eM(e,t,this.resolveSheetReference),s=eM(r,t,this.resolveSheetReference);n=void 0===o||void 0===s?n.concat("!REF"):n.concat(o.hash(!0),":",s.hash(!0))}else n=n.concat(i.image);o++}return n}rememberNewAst(e){let t=this.computeHashFromAst(e);return this.cache.maybeSetAndThenGet(t,e)}computeHashFromAst(e){return"="+this.computeHashOfAstNode(e)}computeHashOfAstNode(e){switch(e.type){case o.EMPTY:return e.leadingWhitespace||"";case o.NUMBER:return eG(tb(e.value,this.config.decimalSeparator),e.leadingWhitespace);case o.STRING:return eG('"'+e.value+'"',e.leadingWhitespace);case o.NAMED_EXPRESSION:return eG(e.expressionName,e.leadingWhitespace);case o.FUNCTION_CALL:{let t=e.args.map(e=>this.computeHashOfAstNode(e)).join(this.config.functionArgSeparator),r=e.procedureName+"("+t+eG(")",e.internalWhitespace);return eG(r,e.leadingWhitespace)}case o.CELL_REFERENCE:return eG(e.reference.hash(!0),e.leadingWhitespace);case o.COLUMN_RANGE:case o.ROW_RANGE:case o.CELL_RANGE:return eG(e.start.hash(e.sheetReferenceType!==i.RELATIVE)+":"+e.end.hash(e.sheetReferenceType===i.BOTH_ABSOLUTE),e.leadingWhitespace);case o.MINUS_UNARY_OP:return eG("-"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case o.PLUS_UNARY_OP:return eG("+"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case o.PERCENT_OP:return this.computeHashOfAstNode(e.value)+eG("%",e.leadingWhitespace);case o.ERROR:return eG(this.config.translationPackage.getErrorTranslation(e.error?e.error.type:d.ERROR),e.leadingWhitespace);case o.ERROR_WITH_RAW_INPUT:return eG(e.rawInput,e.leadingWhitespace);case o.ARRAY:return eG("{"+e.args.map(e=>e.map(e=>this.computeHashOfAstNode(e)).join(",")).join(";")+eG("}",e.internalWhitespace),e.leadingWhitespace);case o.PARENTHESIS:{let t="("+this.computeHashOfAstNode(e.expression)+eG(")",e.internalWhitespace);return eG(t,e.leadingWhitespace)}default:return this.computeHashOfAstNode(e.left)+eG(e$[e.type],e.leadingWhitespace)+this.computeHashOfAstNode(e.right)}}bindWhitespacesToTokens(e){let t=[],r=e[0];(0,eL.tokenMatcher)(r,this.lexerConfig.WhiteSpace)||t.push(r);for(let r=1;r<e.length;++r){let n=e[r];if((0,eL.tokenMatcher)(n,this.lexerConfig.WhiteSpace))continue;let o=e[r-1];(0,eL.tokenMatcher)(o,this.lexerConfig.WhiteSpace)&&(n.leadingWhitespace=o),t.push(n)}return t}tokenizeFormula(e){return this.lexer.tokenizeFormula(e)}}let tw=(e,t,r,n)=>{switch(e.type){case o.EMPTY:case o.NUMBER:case o.STRING:case o.ERROR:return;case o.NAMED_EXPRESSION:n&&r.push(new tA(e.expressionName));return;case o.CELL_REFERENCE:n&&r.push(new tv(e.reference));return;case o.CELL_RANGE:n&&e.start.sheet===e.end.sheet&&r.push(new tR(e.start,e.end));return;case o.COLUMN_RANGE:n&&e.start.sheet===e.end.sheet&&r.push(new tE(e.start,e.end));return;case o.ROW_RANGE:n&&e.start.sheet===e.end.sheet&&r.push(new tT(e.start,e.end));return;case o.PERCENT_OP:case o.PLUS_UNARY_OP:case o.MINUS_UNARY_OP:return void tw(e.value,t,r,!0);case o.CONCATENATE_OP:case o.EQUALS_OP:case o.NOT_EQUAL_OP:case o.LESS_THAN_OP:case o.GREATER_THAN_OP:case o.LESS_THAN_OR_EQUAL_OP:case o.GREATER_THAN_OR_EQUAL_OP:case o.MINUS_OP:case o.PLUS_OP:case o.TIMES_OP:case o.DIV_OP:case o.POWER_OP:tw(e.left,t,r,!0),tw(e.right,t,r,!0);return;case o.PARENTHESIS:tw(e.expression,t,r,n);return;case o.FUNCTION_CALL:{let n=!t.doesFunctionNeedArgumentToBeComputed(e.procedureName);e.args.forEach(e=>tw(e,t,r,n));return}}},tS=(e,t)=>{let r=[];return tw(e,t,r,!0),r};class tv{constructor(e){this.dependency=e}absolutize(e){return this.dependency.toSimpleCellAddress(e)}}class tR{constructor(e,t){this.start=e,this.end=t}absolutize(e){return new ne(this.start.toSimpleCellAddress(e),this.end.toSimpleCellAddress(e))}}class tE{constructor(e,t){this.start=e,this.end=t}absolutize(e){let t=this.start.toSimpleColumnAddress(e),r=this.end.toSimpleColumnAddress(e);return new nt(t.sheet,t.col,r.col)}}class tT{constructor(e,t){this.start=e,this.end=t}absolutize(e){let t=this.start.toSimpleRowAddress(e),r=this.end.toSimpleRowAddress(e);return new nr(t.sheet,t.row,r.row)}}class tA{constructor(e){this.name=e}absolutize(e){return this}}let tM=(e,t)=>e.map(e=>e.absolutize(t)),tN=Symbol("Empty value");function tI(e){return e instanceof tx?e.val:e}class tx{constructor(e,t){this.val=e,this.format=t}fromNumber(e){return new this.constructor(e)}}function tO(e,t){if("number"==typeof e)return t;{let r=e.fromNumber(t);return r.format=e.format,r}}class t_ extends tx{getDetailedType(){return s.NUMBER_DATE}}class tk extends tx{getDetailedType(){return s.NUMBER_CURRENCY}}class tH extends tx{getDetailedType(){return s.NUMBER_TIME}}class tL extends tx{getDetailedType(){return s.NUMBER_DATETIME}}class tP extends tx{getDetailedType(){return s.NUMBER_PERCENT}}function tD(e){return"number"==typeof e||e instanceof tx}function tF(e){return e instanceof tx?{type:e.getDetailedType(),format:e.format}:{type:s.NUMBER_RAW}}(I=s||(s={})).NUMBER_RAW="NUMBER_RAW",I.NUMBER_DATE="NUMBER_DATE",I.NUMBER_TIME="NUMBER_TIME",I.NUMBER_DATETIME="NUMBER_DATETIME",I.NUMBER_CURRENCY="NUMBER_CURRENCY",I.NUMBER_PERCENT="NUMBER_PERCENT";class tB{constructor(e,t,r,n){this._data=e,this.range=t,this.dependencyGraph=r,this._hasOnlyNumbers=n,this.size=void 0===e?new nE(t.effectiveWidth(r),t.effectiveHeight(r)):new nE(e[0].length,e.length)}get data(){return this.ensureThatComputed(),this._data}static fromRange(e,t,r){return new tB(e,t,r,!0)}static onlyNumbers(e){return new tB(e,void 0,void 0,!0)}static onlyValues(e){return new tB(e,void 0,void 0,void 0)}static onlyRange(e,t){return new tB(void 0,e,t,void 0)}static fromScalar(e){return new tB([[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();let e=[];for(let t=0;t<this._data.length;t++)for(let r=0;r<this._data[0].length;r++)e.push(this._data[t][r]);return e}*effectiveAddressesFromData(e){for(let t=0;t<this.data.length;++t){let r=this.data[t];for(let n=0;n<r.length;++n)yield r1(e.sheet,e.col+n,e.row+t)}}*entriesFromTopLeftCorner(e){this.ensureThatComputed();for(let t=0;t<this.size.height;++t)for(let r=0;r<this.size.width;++r)yield[this._data[t][r],r1(e.sheet,e.col+r,e.row+t)]}*iterateValuesFromTopLeftCorner(){yield*this.valuesFromTopLeftCorner()}numberOfElements(){return this.size.width*this.size.height}hasOnlyNumbers(){if(void 0===this._hasOnlyNumbers){for(let e of(this._hasOnlyNumbers=!0,this.data))for(let 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)?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=>{let t=this.dependencyGraph.getCellValue(e);return t instanceof tB?(this._hasOnlyNumbers=!1,new rX(d.VALUE,eq.ScalarExpected)):(tD(t)||(this._hasOnlyNumbers=!1),t)}))}}class tV{constructor(){this.changes=new Map}static empty(){return new tV}addAll(e){for(let t of e.changes.values())this.add(t.address,t);return this}addChange(e,t,r){this.addInterpreterValue(e,t,r)}exportChanges(e){let t=[];return this.changes.forEach(r=>{let n=e.exportChange(r);Array.isArray(n)?t=t.concat(n):t.push(n)}),t}getChanges(){return Array.from(this.changes.values())}isEmpty(){return 0===this.changes.size}add(e,t){let r=t.value;if(r instanceof tB)for(let t of r.effectiveAddressesFromData(e))this.changes.delete(r6(t));this.changes.set(r6(e),t)}addInterpreterValue(e,t,r){this.add(t,{address:t,value:e,oldValue:r})}}class tU{constructor(e,t,r,n){this.displayName=e,this.address=t,this.added=r,this.options=n}normalizeExpressionName(){return this.displayName.toLowerCase()}copy(){return new tU(this.displayName,this.address,this.added,this.options)}}class tz{constructor(){this.mapping=new Map}has(e){return this.mapping.has(this.normalizeExpressionName(e))}isNameAvailable(e){let t=this.normalizeExpressionName(e),r=this.mapping.get(t);return!(r&&r.added)}add(e){this.mapping.set(e.normalizeExpressionName(),e)}get(e){return this.mapping.get(this.normalizeExpressionName(e))}getExisting(e){let t=this.mapping.get(this.normalizeExpressionName(e));return t&&t.added?t:void 0}remove(e){let t=this.normalizeExpressionName(e),r=this.mapping.get(t);r&&(r.added=!1)}getAllNamedExpressions(){return Array.from(this.mapping.values()).filter(e=>e.added)}normalizeExpressionName(e){return e.toLowerCase()}}class tW{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){let t=this.normalizeExpressionName(e);return!this.mapping.has(t)}remove(e){let t=this.normalizeExpressionName(e);this.mapping.get(t)&&this.mapping.delete(t)}normalizeExpressionName(e){return e.toLowerCase()}}class tG{constructor(){this.nextNamedExpressionRow=0,this.workbookStore=new tz,this.worksheetStores=new Map,this.addressCache=new Map}isNameAvailable(e,t){var r,n;return void 0===t?this.workbookStore.isNameAvailable(e):null==(n=null==(r=this.worksheetStore(t))?void 0:r.isNameAvailable(e))||n}namedExpressionInAddress(e){let t=this.addressCache.get(e);return t&&t.added?t:void 0}namedExpressionForScope(e,t){var r;return void 0===t?this.workbookStore.getExisting(e):null==(r=this.worksheetStore(t))?void 0:r.get(e)}nearestNamedExpression(e,t){var r,n;return null!=(n=null==(r=this.worksheetStore(t))?void 0:r.get(e))?n:this.workbookStore.getExisting(e)}isExpressionInScope(e,t){var r,n;return null!=(n=null==(r=this.worksheetStore(t))?void 0:r.has(e))&&n}isNameValid(e){let t=RegExp(`^${eg}$`),r=RegExp(`^${ef}$`),n=RegExp(`^${eb}$`);return!(t.test(e)||r.test(e))&&n.test(e)}addNamedExpression(e,t,r){let n=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t),o=n.get(e);return void 0!==o?(o.added=!0,o.displayName=e,o.options=r):(o=new tU(e,this.nextAddress(),!0,r),n.add(o)),this.addressCache.set(o.address.row,o),o}restoreNamedExpression(e,t){let r=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t);return e.added=!0,r.add(e),this.addressCache.set(e.address.row,e),e}namedExpressionOrPlaceholder(e,t){var r;return null!=(r=this.worksheetStoreOrCreate(t).get(e))?r:this.workbookNamedExpressionOrPlaceholder(e)}workbookNamedExpressionOrPlaceholder(e){let t=this.workbookStore.get(e);return void 0===t&&(t=new tU(e,this.nextAddress(),!1),this.workbookStore.add(t)),t}remove(e,t){let r,n=null==(r=void 0===t?this.workbookStore:this.worksheetStore(t))?void 0:r.get(e);if(void 0===r||void 0===n||!n.added)throw Error("Named expression does not exist");r.remove(e),r instanceof tW&&0===r.mapping.size&&this.worksheetStores.delete(t),this.addressCache.delete(n.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(){let e=[];return this.workbookStore.getAllNamedExpressions().forEach(t=>{e.push({expression:t,scope:void 0})}),this.worksheetStores.forEach((t,r)=>{t.getAllNamedExpressions().forEach(t=>{e.push({expression:t,scope:r})})}),e}getAllNamedExpressionsForScope(e){var t,r;return void 0===e?this.workbookStore.getAllNamedExpressions():null!=(r=null==(t=this.worksheetStores.get(e))?void 0:t.getAllNamedExpressions())?r:[]}worksheetStoreOrCreate(e){let t=this.worksheetStores.get(e);return t||(t=new tW,this.worksheetStores.set(e,t)),t}worksheetStore(e){return this.worksheetStores.get(e)}nextAddress(){return r1(tG.SHEET_FOR_WORKBOOK_EXPRESSIONS,0,this.nextNamedExpressionRow++)}}tG.SHEET_FOR_WORKBOOK_EXPRESSIONS=-1;let t$=e=>{switch(e.type){case o.EMPTY:case o.NUMBER:case o.STRING:case o.ERROR:case o.ERROR_WITH_RAW_INPUT:return!1;case o.CELL_REFERENCE:return!e.reference.isAbsolute();case o.CELL_RANGE:case o.COLUMN_RANGE:case o.ROW_RANGE:return!e.start.isAbsolute();case o.NAMED_EXPRESSION:return!1;case o.PERCENT_OP:case o.PLUS_UNARY_OP:case o.MINUS_UNARY_OP:return t$(e.value);case o.CONCATENATE_OP:case o.EQUALS_OP:case o.NOT_EQUAL_OP:case o.LESS_THAN_OP:case o.GREATER_THAN_OP:case o.LESS_THAN_OR_EQUAL_OP:case o.GREATER_THAN_OR_EQUAL_OP:case o.MINUS_OP:case o.PLUS_OP:case o.TIMES_OP:case o.DIV_OP:case o.POWER_OP:return t$(e.left)||t$(e.right);case o.PARENTHESIS:return t$(e.expression);case o.FUNCTION_CALL:return e.args.some(e=>t$(e));case o.ARRAY:return e.args.some(e=>e.some(e=>t$(e)))}};class tY{constructor(e,t,r){if(this.sheet=e,this.rowStart=t,this.rowEnd=r,t<0)throw Error("Starting row cant be less than 0");if(r<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,r){return new tY(e,t,t+r-1)}static fromRowStartAndEnd(e,t,r){return new tY(e,t,r)}*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");let t=Math.max(this.rowStart,e.rowStart),r=Math.min(this.rowEnd,e.rowEnd);return t>r?null:new tY(this.sheet,t,r)}firstRow(){return new tY(this.sheet,this.rowStart,this.rowStart)}}class tj{constructor(e,t,r){if(this.sheet=e,this.columnStart=t,this.columnEnd=r,t<0)throw Error("Starting column cant be less than 0");if(r<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,r){return new tj(e,t,t+r-1)}static fromColumnStartAndEnd(e,t,r){return new tj(e,t,r)}*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");let t=Math.max(this.columnStart,e.columnStart),r=Math.min(this.columnEnd,e.columnEnd);return t>r?null:new tj(this.sheet,t,r)}firstColumn(){return new tj(this.sheet,this.columnStart,this.columnStart)}}(x=a||(a={})).BUILD_ENGINE_TOTAL="BUILD_ENGINE_TOTAL",x.PARSER="PARSER",x.GRAPH_BUILD="GRAPH_BUILD",x.COLLECT_DEPENDENCIES="COLLECT_DEPENDENCIES",x.PROCESS_DEPENDENCIES="PROCESS_DEPENDENCIES",x.TOP_SORT="TOP_SORT",x.BUILD_COLUMN_INDEX="BUILD_COLUMN_INDEX",x.EVALUATION="EVALUATION",x.VLOOKUP="VLOOKUP",x.TRANSFORM_ASTS="TRANSFORM_ASTS",x.TRANSFORM_ASTS_POSTPONED="TRANSFORM_ASTS_POSTPONED",x.ADJUSTING_ADDRESS_MAPPING="ADJUSTING_ADDRESS_MAPPING",x.ADJUSTING_ARRAY_MAPPING="ADJUSTING_ARRAY_MAPPING",x.ADJUSTING_RANGES="ADJUSTING_RANGES",x.ADJUSTING_GRAPH="ADJUSTING_GRAPH",x.CRITERION_FUNCTION_FULL_CACHE_USED="CRITERION_FUNCTION_FULL_CACHE_USED",x.CRITERION_FUNCTION_PARTIAL_CACHE_USED="CRITERION_FUNCTION_PARTIAL_CACHE_USED";class tq{constructor(){this.stats=new Map([[a.CRITERION_FUNCTION_FULL_CACHE_USED,0],[a.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0]]),this.startTimes=new Map}incrementCriterionFunctionFullCacheUsed(){var e;let t=(null!=(e=this.stats.get(a.CRITERION_FUNCTION_FULL_CACHE_USED))?e:0)+1;this.stats.set(a.CRITERION_FUNCTION_FULL_CACHE_USED,t)}incrementCriterionFunctionPartialCacheUsed(){var e;let t=(null!=(e=this.stats.get(a.CRITERION_FUNCTION_PARTIAL_CACHE_USED))?e:0)+1;this.stats.set(a.CRITERION_FUNCTION_PARTIAL_CACHE_USED,t)}reset(){this.stats.clear(),this.startTimes.clear(),this.stats.set(a.CRITERION_FUNCTION_FULL_CACHE_USED,0),this.stats.set(a.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;let r=Date.now(),n=this.startTimes.get(e);if(n){let o=null!=(t=this.stats.get(e))?t:0;o+=r-n,this.stats.set(e,o),this.startTimes.delete(e)}else throw Error(`Statistics ${e} not started`)}measure(e,t){this.start(e);let r=t();return this.end(e),r}snapshot(){return new Map(this.stats)}}class tK extends tq{incrementCriterionFunctionFullCacheUsed(){}incrementCriterionFunctionPartialCacheUsed(){}start(e){}end(e){}}class tX extends Error{constructor(e){super(`There's no sheet with id = ${e}`)}}class tQ extends Error{constructor(e){super(`There's no sheet with name '${e}'`)}}class tZ extends Error{constructor(e){super(`Sheet with name ${e} already exists`)}}class tJ extends Error{constructor(){super("Sheet size limit exceeded")}}class t0 extends Error{constructor(){super("This is not a formula")}}class t1 extends Error{constructor(e){super(`Address (row = ${e.row}, col = ${e.col}) is invalid`)}}class t2 extends Error{constructor(e){super(`Invalid arguments, expected ${e}`)}}class t3 extends Error{constructor(e,t){super(`Sheets ${e} and ${t} are not equal.`)}}class t6 extends Error{constructor(e){super(`Name of Named Expression '${e}' is already present`)}}class t4 extends Error{constructor(e){super(`Name of Named Expression '${e}' is invalid`)}}class t5 extends Error{constructor(e){super(`Named Expression '${e}' does not exist`)}}class t9 extends Error{constructor(){super("There is no operation to undo")}}class t7 extends Error{constructor(){super("There is no operation to redo")}}class t8 extends Error{constructor(){super("There is nothing to paste")}}function re(e,t){switch(typeof t){case"function":case"symbol":return t.toString();case"bigint":return"BigInt("+t.toString()+")";default:if(t instanceof RegExp)return"RegExp("+t.toString()+")";return t}}class rt extends Error{constructor(e){super(`Unable to parse value: ${JSON.stringify(e,re,4)}`)}}class rr extends Error{constructor(e,t){super(`Expected value of type: ${e} for config parameter: ${t}`)}}class rn extends Error{constructor(e){super(`Config parameter ${e} cannot be empty.`)}}class ro extends Error{constructor(e,t){super(`Config parameter ${e} should be at least ${t}`)}}class ri extends Error{constructor(e,t){super(`Config parameter ${e} should be at most ${t}`)}}class rs extends Error{constructor(e,t){super(`Expected one of ${e} for config parameter: ${t}`)}}class ra extends Error{constructor(){super("Computations are suspended")}}class rl extends Error{constructor(e){super(`Translation for ${e} is missing in the translation package you're using.`)}}class rh extends Error{constructor(e){super(`Cannot register translation for function with id: ${e}`)}}class rd extends Error{constructor(){super("Language not registered.")}}class ru extends Error{constructor(){super("Language already registered.")}}class rc extends Error{static functionNotDeclaredInPlugin(e,t){return new rc(`Function with id ${e} not declared in plugin ${t}`)}static functionMethodNotFound(e,t){return new rc(`Function method ${e} not found in plugin ${t}`)}}class rg extends Error{static cannotRegisterFunctionWithId(e){return new rg(`Cannot register function with id ${e}`)}static cannotUnregisterFunctionWithId(e){return new rg(`Cannot unregister function with id ${e}`)}static cannotUnregisterProtectedPlugin(){return new rg("Cannot unregister protected plugin")}}class rp extends Error{constructor(){super("Cannot perform this operation, source location has an array inside.")}}class rm extends Error{constructor(){super("Cannot perform this operation, target location has an array inside.")}}class rf extends Error{constructor(){super("Relative addresses not allowed in named expressions.")}}class ry extends Error{constructor(e,t){super(`Alias id ${e} in plugin ${t} already defined as a function or alias.`)}}class rb{constructor(e){this.policy=e,this.mapping=new Map}getCell(e,t={}){let r=this.mapping.get(e.sheet);if(!r){if(t.throwIfSheetNotExists)throw new tX(e.sheet);return}let n=r.getCell(e);if(!n&&t.throwIfCellNotExists)throw Error("Vertex for address missing in AddressMapping");return n}getCellOrThrow(e){let t=this.mapping.get(e.sheet);if(!t)throw new tX(e.sheet);let r=t.getCell(e);if(!r)throw Error("Vertex for address missing in AddressMapping");return r}getStrategyForSheetOrThrow(e){let t=this.mapping.get(e);if(void 0===t)throw new tX(e);return t}addSheetWithStrategy(e,t,r={throwIfSheetAlreadyExists:!0}){let n=this.mapping.get(e);if(n){if(r.throwIfSheetAlreadyExists)throw Error("Sheet already added");return n}return this.mapping.set(e,t),t}addSheetOrChangeStrategy(e,t){let r=this.createStrategyBasedOnBoundaries(t),n=this.mapping.get(e);return n?r instanceof r$?n:(this.moveStrategyContent(n,r,e),this.mapping.set(e,r),r):(this.mapping.set(e,r),r)}moveStrategyContent(e,t,r){for(let[n,o]of e.getEntries(r))t.setCell(n,o)}addSheetAndSetStrategyBasedOnBoundaries(e,t,r={throwIfSheetAlreadyExists:!0}){this.addSheetWithStrategy(e,this.createStrategyBasedOnBoundaries(t),r)}createStrategyBasedOnBoundaries(e){let{height:t,width:r,fill:n}=e;return new(this.policy.call(n))(r,t)}addSheetStrategyPlaceholderIfNotExists(e){this.mapping.has(e)||this.mapping.set(e,new r$(0,0))}removeSheetIfExists(e){return this.mapping.delete(e)}getCellValue(e){let t=this.getCell(e);return void 0===t?tN:t instanceof rA?t.getArrayCellValue(e):t.getCellValue()}getRawValue(e){let t=this.getCell(e);return t instanceof rz?t.getValues().rawValue:t instanceof rA?t.getArrayCellRawValue(e):null}setCell(e,t){let r=this.mapping.get(e.sheet);if(!r)throw Error("Sheet not initialized");r.setCell(e,t)}moveCell(e,t){let r=this.mapping.get(e.sheet);if(!r)throw Error("Sheet not initialized.");if(this.has(t))throw Error("Cannot move cell. Destination already occupied.");let n=r.getCell(e);if(void 0===n)throw Error("Cannot move cell. No cell with such address.");this.setCell(t,n),this.removeCell(e)}removeCell(e){let t=this.mapping.get(e.sheet);if(!t)throw Error("Sheet not initialized");t.removeCell(e)}has(e){let t=this.mapping.get(e.sheet);return void 0!==t&&t.has(e)}getSheetHeight(e){return this.getStrategyForSheetOrThrow(e).getHeight()}getSheetWidth(e){return this.getStrategyForSheetOrThrow(e).getWidth()}addRows(e,t,r){this.getStrategyForSheetOrThrow(e).addRows(t,r)}removeRows(e){this.getStrategyForSheetOrThrow(e.sheet).removeRows(e)}addColumns(e,t,r){this.getStrategyForSheetOrThrow(e).addColumns(t,r)}removeColumns(e){this.getStrategyForSheetOrThrow(e.sheet).removeColumns(e)}*verticesFromRowsSpan(e){yield*this.mapping.get(e.sheet).verticesFromRowsSpan(e)}*verticesFromColumnsSpan(e){yield*this.mapping.get(e.sheet).verticesFromColumnsSpan(e)}*entriesFromRowsSpan(e){let t=this.getStrategyForSheetOrThrow(e.sheet);yield*t.entriesFromRowsSpan(e)}*entriesFromColumnsSpan(e){let t=this.getStrategyForSheetOrThrow(e.sheet);yield*t.entriesFromColumnsSpan(e)}*entries(){for(let[e,t]of this.mapping.entries())yield*t.getEntries(e)}*sheetEntries(e){let t=this.getStrategyForSheetOrThrow(e);yield*t.getEntries(e)}hasAnyEntries(e){return!this.sheetEntries(e).next().done}}class rC{constructor(){this.arrayMapping=new Map}getArray(e){let t=this.getArrayByCorner(e.start);if(null==t?void 0:t.getRange().sameAs(e))return t}getArrayByCorner(e){return this.arrayMapping.get(r6(e))}setArray(e,t){this.arrayMapping.set(r6(e.start),t)}removeArray(e){"string"==typeof e?this.arrayMapping.delete(e):this.arrayMapping.delete(r6(e.start))}count(){return this.arrayMapping.size}*arraysInRows(e){for(let[t,r]of this.arrayMapping.entries())r.spansThroughSheetRows(e.sheet,e.rowStart,e.rowEnd)&&(yield[t,r])}*arraysInCols(e){for(let[t,r]of this.arrayMapping.entries())r.spansThroughSheetColumn(e.sheet,e.columnStart,e.columnEnd)&&(yield[t,r])}isFormulaArrayInRow(e,t){for(let r of this.arrayMapping.values())if(r.spansThroughSheetRows(e,t))return!0;return!1}isFormulaArrayInAllRows(e){let t=!0;for(let r of e.rows())this.isFormulaArrayInRow(e.sheet,r)||(t=!1);return t}isFormulaArrayInColumn(e,t){for(let r of this.arrayMapping.values())if(r.spansThroughSheetColumn(e,t))return!0;return!1}isFormulaArrayInAllColumns(e){let t=!0;for(let r of e.columns())this.isFormulaArrayInColumn(e.sheet,r)||(t=!1);return t}isFormulaArrayInRange(e){for(let t of this.arrayMapping.values())if(t.getRange().doesOverlap(e))return!0;return!1}isFormulaArrayAtAddress(e){for(let t of this.arrayMapping.values())if(t.getRange().addressInRange(e))return!0;return!1}moveArrayVerticesAfterRowByRows(e,t,r){this.updateArrayVerticesInSheet(e,(e,n)=>{let o=n.getRange();return t<=o.start.row?[o.shifted(0,r),n]:void 0})}moveArrayVerticesAfterColumnByColumns(e,t,r){this.updateArrayVerticesInSheet(e,(e,n)=>{let o=n.getRange();return t<=o.start.col?[o.shifted(r,0),n]:void 0})}updateArrayVerticesInSheet(e,t){let r=[];for(let[n,o]of this.arrayMapping.entries()){if(o.sheet!==e)continue;let i=t(n,o);void 0!==i&&(this.removeArray(n),r.push(i))}r.forEach(([e,t])=>{this.setArray(e,t)})}}class rw{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 rS{constructor(e){if(this.size=new nE(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 rS(e instanceof tB?e.data:[[e]])}simpleRangeValue(){return tB.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 r=0;r<this.height();r++)this.array[r].splice(e,0,...Array(t).fill(tN));this.size.width+=t}removeRows(e,t){if(this.outOfBound(0,e)||this.outOfBound(0,t))throw Error("Array index out of bound");let r=t-e+1;this.array.splice(e,r),this.size.height-=r}removeColumns(e,t){if(this.outOfBound(e,0)||this.outOfBound(t,0))throw Error("Array index out of bound");let r=t-e+1;for(let t of this.array)t.splice(e,r);this.size.width-=r}nullArrays(e,t){let r=[];for(let n=0;n<e;++n)r.push(Array(t).fill(tN));return r}get(e,t){if(this.outOfBound(e,t))throw Error("Array index out of bound");return this.array[t][e]}set(e,t,r){if(this.outOfBound(e,t))throw Error("Array index out of bound");this.array[t][e]=r}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||(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 rv{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 rR{}class rE extends rR{constructor(){super()}}class rT extends rE{constructor(e,t,r){super(),this.formula=e,this.cellAddress=t,this.version=r}get width(){return 1}get height(){return 1}static fromAst(e,t,r,n){return r.isScalar()?new rM(e,t,n):new rA(e,t,r,n)}getFormula(e){return this.ensureRecentData(e),this.formula}ensureRecentData(e){if(this.version!=e.version()){let[t,r,n]=e.applyTransformations(this.formula,this.cellAddress,this.version);this.formula=t,this.cellAddress=r,this.version=n}}getAddress(e){return this.ensureRecentData(e),this.cellAddress}}class rA extends rT{constructor(e,t,r,n=0){super(e,t,n),r.isRef?this.array=new rv(new rX(d.REF,eq.NoSpaceForArrayResult),nE.error()):this.array=new rw(r)}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 rX)return this.setErrorValue(e),e;let t=rS.fromInterpreterValue(e);return t.resize(this.array.size),this.array=t,e}getCellValue(){if(this.array instanceof rw)throw Error("Array not computed yet.");return this.array.simpleRangeValue()}valueOrUndef(){if(!(this.array instanceof rw))return this.array.simpleRangeValue()}getArrayCellValue(e){let t=e.col-this.cellAddress.col,r=e.row-this.cellAddress.row;try{return this.array.get(t,r)}catch(e){return new rX(d.REF)}}getArrayCellRawValue(e){let t=this.getArrayCellValue(e);if(!(t instanceof rX)&&t!==tN)return tI(t)}setArrayCellValue(e,t){let r=e.col-this.cellAddress.col,n=e.row-this.cellAddress.row;this.array instanceof rS&&this.array.set(r,n,t)}setNoSpace(){return this.array=new rv(new rX(d.SPILL,eq.NoSpaceForArrayResult),nE.error()),this.getCellValue()}getRange(){return ne.spanFrom(this.cellAddress,this.width,this.height)}getRangeOrUndef(){return ne.spanFromOrUndef(this.cellAddress,this.width,this.height)}setAddress(e){this.cellAddress=e}setFormula(e){this.formula=e}spansThroughSheetRows(e,t,r=t){return this.cellAddress.sheet===e&&this.cellAddress.row<=r&&t<this.cellAddress.row+this.height}spansThroughSheetColumn(e,t,r=t){return this.cellAddress.sheet===e&&this.cellAddress.col<=r&&t<this.cellAddress.col+this.width}isComputed(){return!(this.array instanceof rw)}columnsFromArray(){return tj.fromNumberOfColumns(this.cellAddress.sheet,this.cellAddress.col,this.width)}rowsFromArray(){return tY.fromNumberOfRows(this.cellAddress.sheet,this.cellAddress.row,this.height)}ensureRecentData(e){}isLeftCorner(e){return r9(this.cellAddress,e)}setErrorValue(e){this.array=new rv(e,this.array.size)}}class rM extends rT{constructor(e,t,r){super(e,t,r)}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 rN extends rR{constructor(e){super(),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 r;return null==(r=this.getCriterionFunctionValues(e).get(t))?void 0:r[0]}getCriterionFunctionValues(e){var t;return null!=(t=this.criterionFunctionCache.get(e))?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()}}let rI=(e,t,r,n,o)=>{let i,s;if(t instanceof rN){let e=t.range.intersectionWith(r);return void 0!==e?Array.from(e.addresses(o)):[]}return t instanceof rT?(i=t.getFormula(n),s=t.getAddress(n),tS(i,e).filter(e=>e instanceof tv).map(e=>e.dependency.toSimpleCellAddress(s)).filter(e=>r.addressInRange(e))):[]};(O=l||(l={}))[O.ON_STACK=0]="ON_STACK",O[O.PROCESSED=1]="PROCESSED",O[O.POPPED=2]="POPPED";class rx{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,r){let n=e.reverse();return n.forEach(e=>this.runDFS(e)),this.postprocess(n,r,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]=l.ON_STACK;let t=[e],r=[];for(;t.length>0;){let e=t[t.length-1];switch(this.nodeStatus[e]){case l.ON_STACK:this.handleOnStack(e,r,t);break;case l.PROCESSED:this.handleProcessed(e,r,t);break;case l.POPPED:t.pop()}}}handleOnStack(e,t,r){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]&&(r.push(t),this.parent[t]=e,this.nodeStatus[t]=l.ON_STACK)}),this.nodeStatus[e]=l.PROCESSED}handleProcessed(e,t,r){let n=this.entranceTime[e];if(this.getAdjacentNodeIds(e).forEach(t=>{this.inSCC[t]||(n=this.parent[t]===e?Math.min(n,this.low[t]):Math.min(n,this.entranceTime[t]))}),this.low[e]=n,n===this.entranceTime[e]){let r=[];do r.push(t[t.length-1]),t.pop();while(r[r.length-1]!==e);r.forEach(e=>{this.inSCC[e]=!0}),this.order.push(...r),r.length>1&&r.forEach(e=>{this.sccNonSingletons[e]=!0})}r.pop(),this.nodeStatus[e]=l.POPPED}postprocess(e,t,r){let n=[];e.forEach(e=>{n[e]=!0});let o=[],i=[];return this.order.reverse(),this.order.forEach(e=>{let s=this.getAdjacentNodeIds(e);this.sccNonSingletons[e]||s.includes(e)?(i.push(this.nodesSparseArray[e]),t(this.nodesSparseArray[e]),s.forEach(e=>n[e]=!0)):(o.push(this.nodesSparseArray[e]),n[e]&&r(this.nodesSparseArray[e])&&s.forEach(e=>n[e]=!0))}),{sorted:o,cycled:i}}}class rO{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 r_{constructor(e){this.dependencyQuery=e,this.nodesSparseArray=[],this.edgesSparseArray=[],this.dirtyAndVolatileNodeIds=new rO({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 null!=e.idInGraph}existsEdge(e,t){let r=e.idInGraph,n=t.idInGraph;return void 0!==r&&void 0!==n&&this.edgesSparseArray[r].includes(n)}adjacentNodes(e){let t=e.idInGraph;if(void 0===t)throw this.missingNodeError(e);return new Set(this.edgesSparseArray[t].filter(e=>void 0!==e).map(e=>this.nodesSparseArray[e]).filter(e=>void 0!==e))}adjacentNodesCount(e){let t=e.idInGraph;if(void 0===t)throw this.missingNodeError(e);return this.fixEdgesArrayForNode(t).length}addNodeIfNotExists(e){let t=e.idInGraph;if(void 0!==t)return t;let r=this.nextId;return this.nextId++,this.nodesSparseArray[r]=e,this.edgesSparseArray[r]=[],e.idInGraph=r,r}addEdge(e,t){let r=this.getNodeIdIfNotNumber(e),n=this.getNodeIdIfNotNumber(t);if(void 0===r)throw this.missingNodeError(e);if(void 0===n)throw this.missingNodeError(t);this.edgesSparseArray[r].includes(n)||this.edgesSparseArray[r].push(n)}removeNode(e){let t=e.idInGraph;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());let r=this.removeDependencies(e);return delete this.nodesSparseArray[t],delete this.edgesSparseArray[t],this.infiniteRangeIds.delete(t),e.idInGraph=void 0,r}removeEdge(e,t){let r=this.getNodeIdIfNotNumber(e),n=this.getNodeIdIfNotNumber(t);if(void 0===r)throw this.missingNodeError(e);if(void 0===n)throw this.missingNodeError(t);let o=this.edgesSparseArray[r].indexOf(n);if(-1===o)throw Error("Edge does not exist");delete this.edgesSparseArray[r][o]}removeEdgeIfExists(e,t){let r=this.getNodeIdIfNotNumber(e),n=this.getNodeIdIfNotNumber(t);if(void 0===r||void 0===n)return;let o=this.edgesSparseArray[r].indexOf(n);-1!==o&&delete this.edgesSparseArray[r][o]}topSortWithScc(){return this.getTopSortedWithSccSubgraphFrom(this.getNodes(),()=>!0,()=>{})}getTopSortedWithSccSubgraphFrom(e,t,r){let n=new rx(this.nodesSparseArray,this.edgesSparseArray),o=e.map(e=>e.idInGraph).filter(e=>void 0!==e);return n.getTopSortedWithSccSubgraphFrom(o,t,r)}markNodeAsVolatile(e){let t=e.idInGraph;void 0!==t&&(this.dirtyAndVolatileNodeIds.rawValue.volatile.push(t),this.dirtyAndVolatileNodeIds.markAsModified())}markNodeAsDirty(e){let t=e.idInGraph;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){let t=e.idInGraph;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){let t=this.getNodeIdIfNotNumber(e);void 0!==t&&this.infiniteRangeIds.add(t)}getInfiniteRanges(){return[...this.infiniteRangeIds].map(e=>this.nodesSparseArray[e])}getNodeIdIfNotNumber(e){return"number"==typeof e?e:e.idInGraph}fixEdgesArrayForNode(e){let t=this.edgesSparseArray[e];return this.edgesSparseArray[e]=t.filter(e=>void 0!==e&&this.nodesSparseArray[e]),this.edgesSparseArray[e]}removeDependencies(e){let t=this.dependencyQuery(e);return t.forEach(([t,r])=>{this.removeEdgeIfExists(r,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 Error(`Unknown node ${JSON.stringify(e)}`)}}class rk{constructor(){this.rangeMapping=new Map}getNumberOfRangesInSheet(e){var t,r;return null!=(r=null==(t=this.rangeMapping.get(e))?void 0:t.size)?r:0}addOrUpdateVertex(e){let t=this.rangeMapping.get(e.sheet);void 0===t&&(t=new Map,this.rangeMapping.set(e.sheet,t));let r=rk.calculateRangeKey(e.start,e.end);t.set(r,e)}removeVertexIfExists(e){let t=e.sheet,r=this.rangeMapping.get(t);if(void 0===r)return;let n=rk.calculateRangeKey(e.start,e.end);r.delete(n),0===r.size&&this.rangeMapping.delete(t)}getRangeVertex(e,t){let r=this.rangeMapping.get(e.sheet),n=rk.calculateRangeKey(e,t);return null==r?void 0:r.get(n)}getVertexOrThrow(e,t){let r=this.getRangeVertex(e,t);if(!r)throw Error("Range does not exist");return r}truncateRanges(e,t){let r=[],n=[],o=[],i=e.sheet;for(let[s,a]of this.entriesFromSheet(e.sheet)){let l=a.range;e.start<=t(a.range.end)&&(l.removeSpan(e),l.shouldBeRemoved()?(this.removeByKey(i,s),r.push(a)):n.push([s,a]),o.push(a))}let s=[];for(let[e,r]of(n.sort((e,r)=>rk.compareBy(e[1],r[1],t)),n)){let t=rk.calculateRangeKey(r.range.start,r.range.end);if(t===e)continue;let n=this.getByKey(i,t);this.removeByKey(i,e),void 0!==n&&r!=n?s.push([n,r]):this.addOrUpdateVertex(r)}return{verticesToRemove:r,verticesToMerge:s,verticesWithChangedSize:o}}moveAllRangesInSheetAfterAddingRows(e,t,r){return this.updateVerticesFromSheet(e,(e,n)=>t<=n.start.row?(n.range.shiftByRows(r),{changedSize:!1,vertex:n}):t>n.start.row&&t<=n.end.row?(n.range.expandByRows(r),{changedSize:!0,vertex:n}):void 0)}moveAllRangesInSheetAfterAddingColumns(e,t,r){return this.updateVerticesFromSheet(e,(e,n)=>t<=n.start.col?(n.range.shiftByColumns(r),{changedSize:!1,vertex:n}):t>n.start.col&&t<=n.end.col?(n.range.expandByColumns(r),{changedSize:!0,vertex:n}):void 0)}moveRangesInsideSourceRange(e,t,r,n){this.updateVerticesFromSheet(e.sheet,(o,i)=>e.containsRange(i.range)?(i.range.shiftByColumns(t),i.range.shiftByRows(r),i.range.moveToSheet(n),{changedSize:!1,vertex:i}):void 0)}*rangesInSheet(e){let t=this.rangeMapping.get(e);t&&(yield*t.values())}*rangeVerticesContainedInRange(e){for(let t of this.rangesInSheet(e.sheet))e.containsRange(t.range)&&(yield t)}findSmallerRange(e){if(e.height()>1&&Number.isFinite(e.height())){let t=r1(e.end.sheet,e.end.col,e.end.row-1),r=this.getRangeVertex(e.start,t);if(void 0!==r)return{smallerRangeVertex:r,restRange:ne.fromSimpleCellAddresses(r1(e.start.sheet,e.start.col,e.end.row),e.end)}}return{restRange:e}}static calculateRangeKey(e,t){return`${e.col},${e.row},${t.col},${t.row}`}static compareBy(e,t,r){let n=r(e.range.start),o=r(t.range.start);return n!==o?n-o:r(e.range.end)-r(t.range.end)}*entriesFromSheet(e){let t=this.rangeMapping.get(e);t&&(yield*t.entries())}removeByKey(e,t){let r=this.rangeMapping.get(e);if(!r)throw Error(`Sheet ${e} not found`);r.delete(t)}getByKey(e,t){var r;return null==(r=this.rangeMapping.get(e))?void 0:r.get(t)}updateVerticesFromSheet(e,t){let r=[];for(let[n,o]of this.entriesFromSheet(e)){let i=t(n,o);void 0!==i&&(this.removeByKey(e,n),r.push(i))}return r.forEach(e=>{this.addOrUpdateVertex(e.vertex)}),{verticesWithChangedSize:r.filter(e=>e.changedSize).map(e=>e.vertex)}}}class rH{constructor(e,t,r){this.functions=e,this.errors=t,this.ui=r,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){let t=[];for(let r of e)this.isFunctionTranslated(r)&&t.push(this.functions[r]);return t}getFunctionTranslation(e){let t=this.functions[e];if(void 0!==t)return t;throw new rl(`functions.${e}`)}getMaybeFunctionTranslation(e){return this.functions[e]}getErrorTranslation(e){if(e===d.LIC)return`#${d.LIC}!`;let t=this.errors[e];if(void 0!==t)return t;throw new rl(`errors.${e}`)}getUITranslation(e){let t=this.ui[e];if(void 0!==t)return t;throw new rl(`ui.${e}`)}checkUI(){for(let e of Object.values(h))if(!(e in this.ui))throw new rl(`ui.${e}`)}checkErrors(){for(let e of Object.values(d))if(!(e in this.errors)&&e!==d.LIC)throw new rl(`errors.${e}`)}checkFunctionTranslations(e){let t=new Set(Object.getOwnPropertyNames(e));for(let e of Object.getOwnPropertyNames(this._protectedTranslations))if(t.has(e))throw new rh(e)}}(h||(h={})).NEW_SHEET_PREFIX="NEW_SHEET_PREFIX";class rL{constructor(e,t,r=!1){this.id=e,this.displayName=t,this.isPlaceholder=r}get canonicalName(){return rP.canonicalizeSheetName(this.displayName)}}class rP{constructor(e){this.lastSheetId=-1,this.mappingFromCanonicalNameToId=new Map,this.allSheets=new Map,this.sheetNamePrefix=e.getUITranslation(h.NEW_SHEET_PREFIX)}static canonicalizeSheetName(e){return e.toLowerCase()}getSheetId(e,t={}){var r;return null==(r=this._getSheetByName(e,t))?void 0:r.id}getSheetIdOrThrowError(e){let t=this._getSheetByName(e,{});if(void 0===t)throw new tQ(e);return t.id}getSheetName(e){var t;return null==(t=this._getSheet(e,{}))?void 0:t.displayName}getSheetNameOrThrowError(e,t={}){return this._getSheetOrThrowError(e,t).displayName}*iterateSheetNames(e={}){for(let t of this.allSheets.values())(e.includePlaceholders||!t.isPlaceholder)&&(yield t.displayName)}getSheetNames(e={}){return Array.from(this.iterateSheetNames(e))}numberOfSheets(e={}){return this.getSheetNames(e).length}hasSheetWithId(e,t={}){return void 0!==this._getSheet(e,t)}hasSheetWithName(e){return void 0!==this._getSheetByName(e,{})}addSheet(e=`${this.sheetNamePrefix}${this.lastSheetId+2}`){let t=this._getSheetByName(e,{includePlaceholders:!0});if(t){if(!t.isPlaceholder)throw new tZ(e);return t.isPlaceholder=!1,t.id}this.lastSheetId++;let r=new rL(this.lastSheetId,e);return this._storeSheetInMappings(r),r.id}addSheetWithId(e,t){let r=this._getSheetByName(t,{includePlaceholders:!0});if(r){if(r.id!==e||!r.isPlaceholder)throw new tZ(t);r.isPlaceholder=!1;return}e>this.lastSheetId&&(this.lastSheetId=e);let n=new rL(e,t);this._storeSheetInMappings(n)}addPlaceholderIfNotExists(e){let t=this._getSheetByName(e,{includePlaceholders:!0});if(t)return t.id;this.lastSheetId++;let r=new rL(this.lastSheetId,e,!0);return this._storeSheetInMappings(r),r.id}addPlaceholderWithId(e,t){if(this._getSheetByName(t,{includePlaceholders:!0}))throw new tZ(t);if(this.hasSheetWithId(e,{includePlaceholders:!0}))throw Error(`Sheet with id ${e} already exists`);e>this.lastSheetId&&(this.lastSheetId=e);let r=new rL(e,t,!0);this._storeSheetInMappings(r)}removeSheetIfExists(e,t={}){let r=this._getSheet(e,t);return!!r&&(this.allSheets.delete(e),this.mappingFromCanonicalNameToId.delete(r.canonicalName),e===this.lastSheetId&&this.lastSheetId--,!0)}markSheetAsPlaceholder(e){this._getSheetOrThrowError(e,{}).isPlaceholder=!0}renameSheet(e,t){let r,n=this._getSheetOrThrowError(e,{}),o=n.displayName;if(o===t)return{previousDisplayName:void 0};let i=this._getSheetByName(t,{includePlaceholders:!0});if(void 0!==i&&i.id!==n.id)if(i.isPlaceholder)this.mappingFromCanonicalNameToId.delete(i.canonicalName),this.allSheets.delete(i.id),i.id===this.lastSheetId&&this.lastSheetId--,r=i.id;else throw new tZ(t);let s=n.canonicalName;return this.mappingFromCanonicalNameToId.delete(s),n.displayName=t,this._storeSheetInMappings(n),{previousDisplayName:o,mergedWithPlaceholderSheet:r}}_storeSheetInMappings(e){this.allSheets.set(e.id,e),this.mappingFromCanonicalNameToId.set(e.canonicalName,e.id)}_getSheet(e,t){let r=this.allSheets.get(e);if(void 0!==r)return t.includePlaceholders||!r.isPlaceholder?r:void 0}_getSheetByName(e,t){let r=this.mappingFromCanonicalNameToId.get(rP.canonicalizeSheetName(e));if(void 0!==r)return this._getSheet(r,t)}_getSheetOrThrowError(e,t){let r=this._getSheet(e,t);if(void 0===r)throw new tX(e);return r}}class rD{constructor(e,t){this.sheetMapping=e,this.addressMapping=t}ensureSheetRegistered(e){let t=this.sheetMapping.addPlaceholderIfNotExists(e);return this.addressMapping.addSheetStrategyPlaceholderIfNotExists(t),t}}function rF(e){if(!Array.isArray(e))throw new t2("an array of arrays.");for(let t=0;t<e.length;t++)if(!Array.isArray(e[t]))throw new t2("an array of arrays.")}function rB(e){let t=0,r=0,n=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,++n);t=Math.max(t,i),i>0&&(r=o+1)}let o=t*r;return{height:r,width:t,fill:0===o?0:n/o}}class rV{constructor(e,t,r,n,o,i,s,a){this.addressMapping=e,this.rangeMapping=t,this.sheetMapping=r,this.arrayMapping=n,this.stats=o,this.lazilyTransformingAstService=i,this.functionRegistry=s,this.namedExpressions=a,this.changes=tV.empty(),this.dependencyQueryAddresses=e=>{if(e instanceof rN)return this.rangeDependencyQuery(e).map(([e,t])=>e);{let t=this.formulaDependencyQuery(e);if(void 0===t)return[];{let[e,r]=t;return r.map(t=>t instanceof tA?this.namedExpressions.namedExpressionOrPlaceholder(t.name,e.sheet).address:r4(t)?t:r8(t.start,t.end))}}},this.dependencyQueryVertices=e=>{if(e instanceof rN)return this.rangeDependencyQuery(e);{let t=this.formulaDependencyQuery(e);if(void 0===t)return[];{let[e,r]=t;return r.map(t=>{if(t instanceof ne)return[t.start,this.rangeMapping.getVertexOrThrow(t.start,t.end)];if(!(t instanceof tA))return[t,this.addressMapping.getCellOrThrow(t)];{let r=this.namedExpressions.namedExpressionOrPlaceholder(t.name,e.sheet);return[r.address,this.addressMapping.getCellOrThrow(r.address)]}})}}},this.rangeDependencyQuery=e=>{let t,r=[],{smallerRangeVertex:n,restRange:o}=this.rangeMapping.findSmallerRange(e.range);for(let i of(void 0!==n&&this.graph.adjacentNodes(n).has(e)?(t=o,r.push([new ne(n.start,n.end),n])):t=e.range,t.addresses(this))){let e=this.addressMapping.getCell(i);void 0!==e&&r.push([i,e])}return r},this.formulaDependencyQuery=e=>{let t;return e instanceof rT?(t=e.getAddress(this.lazilyTransformingAstService),[t,tM(tS(e.getFormula(this.lazilyTransformingAstService),this.functionRegistry),t)]):void 0},this.graph=new r_(this.dependencyQueryVertices),this.sheetReferenceRegistrar=new rD(r,e)}static buildEmpty(e,t,r,n,o){return new rV(new rb(t.chooseAddressMappingPolicy),new rk,new rP(t.translationPackage),new rC,o,e,r,n)}setFormulaToCell(e,t,r,n,o,i){let s=rT.fromAst(t,e,n,this.lazilyTransformingAstService.version());return this.exchangeOrAddFormulaVertex(s),this.processCellDependencies(r,s),this.graph.markNodeAsDirty(s),o&&this.markAsVolatile(s),i&&this.markAsDependentOnStructureChange(s),this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setParsingErrorToCell(e,t){let r=this.shrinkPossibleArrayAndGetCell(e);return this.exchangeOrAddGraphNode(r,t),this.addressMapping.setCell(e,t),this.graph.markNodeAsDirty(t),this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setValueToCell(e,t){let r=this.shrinkPossibleArrayAndGetCell(e);if(r instanceof rA&&this.arrayMapping.removeArray(r.getRange()),r instanceof rz)r.getValues().rawValue!==t.rawValue&&(r.setValues(t),this.graph.markNodeAsDirty(r));else{let n=new rz(t.parsedValue,t.rawValue);this.exchangeOrAddGraphNode(r,n),this.addressMapping.setCell(e,n),this.graph.markNodeAsDirty(n)}return this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setCellEmpty(e){let t=this.shrinkPossibleArrayAndGetCell(e);if(void 0===t)return tV.empty();if(this.graph.adjacentNodes(t).size>0){let r=new rU;this.exchangeGraphNode(t,r),0===this.graph.adjacentNodesCount(r)?(this.removeVertex(r),this.addressMapping.removeCell(e)):(this.graph.markNodeAsDirty(r),this.addressMapping.setCell(e,r))}else this.removeVertex(t),this.addressMapping.removeCell(e);return this.getAndClearContentChanges()}clearDirtyVertices(){this.graph.clearDirtyNodes()}verticesToRecompute(){return this.graph.getDirtyAndVolatileNodes()}processCellDependencies(e,t){let r=t.idInGraph;if(void 0===r)throw Error("End vertex not found");e.forEach(e=>{if(e instanceof ne){let t=this.getRange(e.start,e.end);void 0===t&&(t=new rN(e),this.rangeMapping.addOrUpdateVertex(t)),this.graph.addNodeIfNotExists(t);let n=t.idInGraph;if(void 0===n)throw Error("Range vertex not found");e.isFinite()||this.graph.markNodeAsInfiniteRange(n);let{smallerRangeVertex:o,restRange:i}=this.rangeMapping.findSmallerRange(e);if(void 0!==o){if(this.graph.addEdge(o,n),t.bruteForce)for(let r of(t.bruteForce=!1,e.addresses(this)))this.graph.removeEdge(this.fetchCell(r),n)}else t.bruteForce=!0;let s=this.arrayMapping.getArray(i);if(void 0!==s)this.graph.addEdge(s,n);else for(let e of i.addresses(this)){let{vertex:t,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=r?r:t,n)}this.graph.addEdge(n,r),e.isFinite()&&this.correctInfiniteRangesDependenciesByRangeVertex(t)}else if(e instanceof tA){let n=t.getAddress(this.lazilyTransformingAstService).sheet,{vertex:o,id:i}=this.fetchNamedExpressionVertex(e.name,n);this.graph.addEdge(null!=i?i:o,r)}else{let{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=n?n:t,r)}})}fetchNamedExpressionVertex(e,t){let r=this.namedExpressions.namedExpressionOrPlaceholder(e,t);return this.fetchCellOrCreateEmpty(r.address)}exchangeNode(e,t){let r=this.fetchCellOrCreateEmpty(e).vertex,n=this.fetchCellOrCreateEmpty(t).vertex;this.addressMapping.removeCell(e),this.exchangeGraphNode(r,n)}fetchCellOrCreateEmpty(e){let t=this.addressMapping.getCell(e);if(void 0!==t)return{vertex:t,id:void 0};let r=new rU,n=this.graph.addNodeIfNotExists(r);return this.addressMapping.setCell(e,r),{vertex:r,id:n}}removeRows(e){this.stats.measure(a.ADJUSTING_GRAPH,()=>{for(let[t,r]of this.addressMapping.entriesFromRowsSpan(e)){for(let e of this.graph.adjacentNodes(r))this.graph.markNodeAsDirty(e);if(r instanceof rA)if(!r.isLeftCorner(t))continue;else this.shrinkArrayToCorner(r),this.arrayMapping.removeArray(r.getRange());this.removeVertex(r)}}),this.stats.measure(a.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeRows(e)});let t=this.stats.measure(a.ADJUSTING_RANGES,()=>{let t=this.truncateRanges(e,e=>e.row);return this.getArrayVerticesRelatedToRanges(t)});return this.stats.measure(a.ADJUSTING_ARRAY_MAPPING,()=>{this.fixArraysAfterRemovingRows(e.sheet,e.rowStart,e.numberOfRows)}),this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}addSheet(e){this.addressMapping.addSheetOrChangeStrategy(e,rB([])),this.stats.measure(a.ADJUSTING_ADDRESS_MAPPING,()=>{this.markAllCellsAsDirtyInSheet(e)}),this.stats.measure(a.ADJUSTING_RANGES,()=>{this.markAllRangesAsDirtyInSheet(e)})}removeSheet(e){this.clearSheet(e);let t=!this.addressMapping.hasAnyEntries(e),r=0===this.rangeMapping.getNumberOfRangesInSheet(e);t&&r?(this.sheetMapping.removeSheetIfExists(e),this.addressMapping.removeSheetIfExists(e)):this.sheetMapping.markSheetAsPlaceholder(e)}mergeSheets(e,t){if(!this.isPlaceholder(t))throw Error(`Cannot merge sheets: sheet ${t} is not a placeholder`);this.mergeRangeVertices(e,t),this.mergeCellVertices(e,t),this.addressMapping.removeSheetIfExists(t),this.addStructuralNodesToChangeSet()}clearSheet(e){let t=new Set;for(let[r,n]of this.addressMapping.sheetEntries(e))n instanceof rA?t.add(n):this.setCellEmpty(r);for(let e of t.values())this.setArrayEmpty(e);this.addStructuralNodesToChangeSet()}removeColumns(e){this.stats.measure(a.ADJUSTING_GRAPH,()=>{for(let[t,r]of this.addressMapping.entriesFromColumnsSpan(e)){for(let e of this.graph.adjacentNodes(r))this.graph.markNodeAsDirty(e);if(r instanceof rA)if(!r.isLeftCorner(t))continue;else this.shrinkArrayToCorner(r),this.arrayMapping.removeArray(r.getRange());this.removeVertex(r)}}),this.stats.measure(a.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeColumns(e)});let t=this.stats.measure(a.ADJUSTING_RANGES,()=>{let t=this.truncateRanges(e,e=>e.col);return this.getArrayVerticesRelatedToRanges(t)});return this.stats.measure(a.ADJUSTING_ARRAY_MAPPING,()=>this.fixArraysAfterRemovingColumns(e.sheet,e.columnStart,e.numberOfColumns)),this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}addRows(e){this.stats.measure(a.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.addRows(e.sheet,e.rowStart,e.numberOfRows)});let t=this.stats.measure(a.ADJUSTING_RANGES,()=>{let t=this.rangeMapping.moveAllRangesInSheetAfterAddingRows(e.sheet,e.rowStart,e.numberOfRows);return this.fixRangesWhenAddingRows(e.sheet,e.rowStart,e.numberOfRows),this.getArrayVerticesRelatedToRanges(t.verticesWithChangedSize)});for(let t of(this.stats.measure(a.ADJUSTING_ARRAY_MAPPING,()=>{this.fixArraysAfterAddingRow(e.sheet,e.rowStart,e.numberOfRows)}),this.addressMapping.verticesFromRowsSpan(e)))this.graph.markNodeAsDirty(t);return this.addStructuralNodesToChangeSet(),{affectedArrays:t}}addColumns(e){this.stats.measure(a.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.addColumns(e.sheet,e.columnStart,e.numberOfColumns)});let t=this.stats.measure(a.ADJUSTING_RANGES,()=>{let t=this.rangeMapping.moveAllRangesInSheetAfterAddingColumns(e.sheet,e.columnStart,e.numberOfColumns);return this.fixRangesWhenAddingColumns(e.sheet,e.columnStart,e.numberOfColumns),this.getArrayVerticesRelatedToRanges(t.verticesWithChangedSize)});for(let t of(this.stats.measure(a.ADJUSTING_ARRAY_MAPPING,()=>this.fixArraysAfterAddingColumn(e.sheet,e.columnStart,e.numberOfColumns)),this.addressMapping.verticesFromColumnsSpan(e)))this.graph.markNodeAsDirty(t);return this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}isThereSpaceForArray(e){let t=e.getRangeOrUndef();if(void 0===t)return!1;for(let r of t.addresses(this)){let t=this.addressMapping.getCell(r);if(void 0!==t&&!(t instanceof rU)&&t!==e)return!1}return!0}moveCells(e,t,r,n){for(let o of e.addressesWithDirection(t,r,this)){let i=r1(n,o.col+t,o.row+r),s=this.addressMapping.getCell(o),a=this.addressMapping.getCell(i);if(this.addressMapping.removeCell(o),void 0!==s){let t;for(let r of(this.graph.markNodeAsDirty(s),this.addressMapping.setCell(i,s),this.graph.adjacentNodes(s)))r instanceof rN&&!e.containsRange(r.range)&&(t=null!=t?t:this.fetchCellOrCreateEmpty(o).vertex,this.graph.addEdge(t,r),this.graph.removeEdge(s,r));t&&(this.graph.markNodeAsDirty(t),this.addressMapping.setCell(o,t))}if(void 0!==a){for(let e of(void 0===s&&this.addressMapping.removeCell(i),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(let t of this.rangeMapping.rangeVerticesContainedInRange(e))for(let r of this.graph.adjacentNodes(t))if(r instanceof rN&&!e.containsRange(r.range))for(let e of(this.graph.removeEdge(t,r),t.range.addresses(this))){let{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=n?n:t,r),this.addressMapping.setCell(e,t),this.graph.markNodeAsDirty(t)}this.rangeMapping.moveRangesInsideSourceRange(e,t,r,n)}setArrayEmpty(e){let t=ne.spanFrom(e.getAddress(this.lazilyTransformingAstService),e.width,e.height),r=this.graph.adjacentNodes(e);for(let e of t.addresses(this))this.addressMapping.removeCell(e);for(let t of r.values()){let r=rI(this.functionRegistry,t,e.getRange(),this.lazilyTransformingAstService,this);for(let e of r){let{vertex:r,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=n?n:r,t)}r.length>0&&this.graph.markNodeAsDirty(t)}this.removeVertex(e),this.arrayMapping.removeArray(e.getRange())}addVertex(e,t){this.graph.addNodeIfNotExists(t),this.addressMapping.setCell(e,t)}addArrayVertex(e,t){this.graph.addNodeIfNotExists(t),this.setAddressMappingForArrayVertex(t,e)}*arrayFormulaNodes(){for(let e of this.graph.getNodes())e instanceof rA&&(yield e)}*entriesFromRowsSpan(e){yield*this.addressMapping.entriesFromRowsSpan(e)}*entriesFromColumnsSpan(e){yield*this.addressMapping.entriesFromColumnsSpan(e)}fetchCell(e){return this.addressMapping.getCellOrThrow(e)}getCell(e){return this.addressMapping.getCell(e,{throwIfSheetNotExists:!0})}getCellValue(e){return this.isPlaceholder(e.sheet)?new rX(d.REF,eq.SheetRef):this.addressMapping.getCellValue(e)}getRawValue(e){return this.isPlaceholder(e.sheet)?null:this.addressMapping.getRawValue(e)}getScalarValue(e){if(this.isPlaceholder(e.sheet))return new rX(d.REF,eq.SheetRef);let t=this.addressMapping.getCellValue(e);return t instanceof tB?new rX(d.VALUE,eq.ScalarExpected):t}existsEdge(e,t){return this.graph.existsEdge(e,t)}getSheetId(e){return this.sheetMapping.getSheetIdOrThrowError(e)}getSheetHeight(e){return this.addressMapping.getSheetHeight(e)}getSheetWidth(e){return this.addressMapping.getSheetWidth(e)}getArray(e){return this.arrayMapping.getArray(e)}getRange(e,t){return this.rangeMapping.getRangeVertex(e,t)}topSortWithScc(){return this.graph.topSortWithScc()}markAsVolatile(e){this.graph.markNodeAsVolatile(e)}markAsDependentOnStructureChange(e){this.graph.markNodeAsChangingWithStructure(e)}forceApplyPostponedTransformations(){for(let e of this.graph.getNodes())e instanceof rM&&e.ensureRecentData(this.lazilyTransformingAstService)}*rawValuesFromRange(e){for(let t of e.addresses(this)){let e=this.getScalarValue(t);e!==tN&&(yield[tI(e),t])}}computeListOfValuesInRange(e){let t=[];for(let r of e.addresses(this)){let e=this.getScalarValue(r);t.push(e)}return t}shrinkArrayToCorner(e){for(let t of(this.cleanAddressMappingUnderArray(e),this.adjacentArrayVertices(e))){let r;r=t instanceof rT?this.formulaDirectDependenciesToArray(t,e):this.rangeDirectDependenciesToArray(t,e);let n=!1;for(let[o,i]of r)e.isLeftCorner(o)&&(n=!0),this.graph.addEdge(i,t),this.graph.markNodeAsDirty(i);n||this.graph.removeEdge(e,t)}this.graph.markNodeAsDirty(e)}isArrayInternalCell(e){let t=this.getCell(e);return t instanceof rA&&!t.isLeftCorner(e)}getAndClearContentChanges(){let e=this.changes;return this.changes=tV.empty(),e}getAdjacentNodesAddresses(e){let t=this.graph.adjacentNodes(e),r=[];return t.forEach(e=>{e instanceof rN?r.push(r8(e.start,e.end)):e instanceof rT&&r.push(e.getAddress(this.lazilyTransformingAstService))}),r}markAllCellsAsDirtyInSheet(e){for(let[,t]of this.addressMapping.sheetEntries(e))this.graph.markNodeAsDirty(t)}markAllRangesAsDirtyInSheet(e){for(let t of this.rangeMapping.rangesInSheet(e))this.graph.markNodeAsDirty(t)}mergeRangeVertices(e,t){for(let r of Array.from(this.rangeMapping.rangesInSheet(t))){if(!this.graph.hasNode(r))continue;let n=r.start,o=r.end;if(n.sheet!==t&&o.sheet!==t)continue;let i=r1(e,n.col,n.row),s=r1(e,o.col,o.row),a=this.rangeMapping.getRangeVertex(i,s);a?(this.rerouteDependents(r,a),this.removeVertexAndRerouteDependencies(r,a),this.rangeMapping.removeVertexIfExists(r),this.graph.markNodeAsDirty(a)):(this.rangeMapping.removeVertexIfExists(r),r.range.moveToSheet(e),this.rangeMapping.addOrUpdateVertex(r),this.graph.markNodeAsDirty(r))}}mergeCellVertices(e,t){for(let[r,n]of Array.from(this.addressMapping.sheetEntries(t))){let t=r1(e,r.col,r.row),o=this.getCell(t);o?(this.rerouteDependents(n,o),this.removeVertexAndCleanupDependencies(n),this.addressMapping.removeCell(r),this.graph.markNodeAsDirty(o)):(this.addressMapping.moveCell(r,t),this.graph.markNodeAsDirty(n))}}isPlaceholder(e){return e!==tG.SHEET_FOR_WORKBOOK_EXPRESSIONS&&!this.sheetMapping.hasSheetWithId(e,{includePlaceholders:!1})}exchangeGraphNode(e,t){this.graph.addNodeIfNotExists(t);let r=this.graph.adjacentNodes(e);this.removeVertex(e),r.forEach(e=>{this.graph.hasNode(e)&&this.graph.addEdge(t,e)})}setArray(e,t){this.arrayMapping.setArray(e,t)}correctInfiniteRangesDependency(e){let t=this.graph.getInfiniteRanges().filter(t=>t.range.addressInRange(e));if(t.length<=0)return;let{vertex:r,id:n}=this.fetchCellOrCreateEmpty(e),o=null!=n?n:r.idInGraph;if(void 0===o)throw Error("Vertex not found");t.forEach(e=>{this.graph.addEdge(o,e)})}exchangeOrAddGraphNode(e,t){e?this.exchangeGraphNode(e,t):this.graph.addNodeIfNotExists(t)}getArrayVerticesRelatedToRanges(e){let t=new Set;return e.forEach(e=>{this.graph.hasNode(e)&&this.graph.adjacentNodes(e).forEach(e=>{e instanceof rA&&t.add(e)})}),t}correctInfiniteRangesDependenciesByRangeVertex(e){this.graph.getInfiniteRanges().forEach(t=>{let r=e.range.intersectionWith(t.range);void 0!==r&&r.addresses(this).forEach(e=>{let{vertex:r,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=n?n:r,t)})})}cleanAddressMappingUnderArray(e){for(let t of e.getRange().addresses(this)){let r=e.getArrayCellValue(t);this.getCell(t)===e?e.isLeftCorner(t)?this.changes.addChange(new rX(d.REF),t,r):(this.addressMapping.removeCell(t),this.changes.addChange(tN,t,r)):this.changes.addChange(tN,t,r)}}*formulaDirectDependenciesToArray(e,t){var r;let[,n]=null!=(r=this.formulaDependencyQuery(e))?r:[];if(void 0!==n){for(let e of n)if(!(e instanceof tA)&&!(e instanceof ne)&&t.getRange().addressInRange(e)){let t=this.fetchCellOrCreateEmpty(e).vertex;yield[e,t]}}}*rangeDirectDependenciesToArray(e,t){let{restRange:r}=this.rangeMapping.findSmallerRange(e.range);for(let e of r.addresses(this))if(t.getRange().addressInRange(e)){let t=this.fetchCellOrCreateEmpty(e).vertex;yield[e,t]}}*adjacentArrayVertices(e){for(let t of this.graph.adjacentNodes(e))(t instanceof rT||t instanceof rN)&&(yield t)}addStructuralNodesToChangeSet(){this.graph.markChangingWithStructureNodesAsDirty()}fixRangesWhenAddingRows(e,t,r){for(let n of Array.from(this.rangeMapping.rangesInSheet(e)))if(n.range.includesRow(t+r))if(n.bruteForce)for(let e of n.range.rangeWithSameWidth(t,r).addresses(this)){let{vertex:t,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=r?r:t,n)}else{let e=n,t=this.rangeMapping.findSmallerRange(e.range);if(void 0!==t.smallerRangeVertex)continue;for(;void 0===t.smallerRangeVertex;){let r=new rN(ne.spanFrom(e.range.start,e.range.width(),e.range.height()-1));this.rangeMapping.addOrUpdateVertex(r),this.graph.addNodeIfNotExists(r);let n=new ne(r1(e.range.start.sheet,e.range.start.col,e.range.end.row),e.range.end);this.addAllFromRange(n,e),this.graph.addEdge(r,e),e=r,t=this.rangeMapping.findSmallerRange(e.range)}this.graph.addEdge(t.smallerRangeVertex,e),this.addAllFromRange(t.restRange,e),this.graph.removeEdge(t.smallerRangeVertex,n)}}addAllFromRange(e,t){for(let r of e.addresses(this)){let{vertex:e,id:n}=this.fetchCellOrCreateEmpty(r);this.graph.addEdge(null!=n?n:e,t)}}fixRangesWhenAddingColumns(e,t,r){for(let n of this.rangeMapping.rangesInSheet(e))if(n.range.includesColumn(t+r)){for(let o of(n.bruteForce?n.range.rangeWithSameHeight(t,r):ne.spanFrom(r1(e,t,n.range.end.row),r,1)).addresses(this)){let{vertex:e,id:t}=this.fetchCellOrCreateEmpty(o);this.graph.addEdge(null!=t?t:e,n)}}}exchangeOrAddFormulaVertex(e){let t=e.getAddress(this.lazilyTransformingAstService),r=ne.spanFrom(t,e.width,e.height),n=this.shrinkPossibleArrayAndGetCell(t);if(e instanceof rA&&this.setArray(r,e),this.exchangeOrAddGraphNode(n,e),this.addressMapping.setCell(t,e),e instanceof rA){if(!this.isThereSpaceForArray(e))return;for(let t of r.addresses(this)){if(e.isLeftCorner(t))continue;let r=this.getCell(t);this.exchangeOrAddGraphNode(r,e)}}for(let t of r.addresses(this))this.addressMapping.setCell(t,e)}setAddressMappingForArrayVertex(e,t){if(this.addressMapping.setCell(t,e),!(e instanceof rA))return;let r=ne.spanFromOrUndef(t,e.width,e.height);if(void 0!==r&&(this.setArray(r,e),this.isThereSpaceForArray(e)))for(let t of r.addresses(this))this.addressMapping.setCell(t,e)}truncateRanges(e,t){let{verticesToRemove:r,verticesToMerge:n,verticesWithChangedSize:o}=this.rangeMapping.truncateRanges(e,t);for(let[e,t]of n)this.rerouteDependents(t,e),this.removeVertexAndCleanupDependencies(t);for(let e of r)this.removeVertexAndCleanupDependencies(e);return o}fixArraysAfterAddingRow(e,t,r){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,r),!(t<=0))for(let[,n]of this.arrayMapping.arraysInRows(tY.fromRowStartAndEnd(e,t-1,t-1))){let o=n.getRange();for(let i=o.start.col;i<=o.end.col;++i)for(let s=t;s<=o.end.row;++s){let t=r1(e,i,s),o=r1(e,i,s+r),a=n.getArrayCellValue(t);this.addressMapping.moveCell(o,t),this.changes.addChange(tN,o,a)}}}fixArraysAfterRemovingRows(e,t,r){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,-r),!(t<=0))for(let[,r]of this.arrayMapping.arraysInRows(tY.fromRowStartAndEnd(e,t-1,t-1)))if(this.isThereSpaceForArray(r))for(let e of r.getRange().addresses(this))this.addressMapping.setCell(e,r);else this.setNoSpaceIfArray(r)}fixArraysAfterAddingColumn(e,t,r){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,r),!(t<=0))for(let[,n]of this.arrayMapping.arraysInCols(tj.fromColumnStartAndEnd(e,t-1,t-1))){let o=n.getRange();for(let i=o.start.row;i<=o.end.row;++i)for(let s=t;s<=o.end.col;++s){let t=r1(e,s,i),o=r1(e,s+r,i),a=n.getArrayCellValue(t);this.addressMapping.moveCell(o,t),this.changes.addChange(tN,o,a)}}}fixArraysAfterRemovingColumns(e,t,r){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,-r),!(t<=0))for(let[,r]of this.arrayMapping.arraysInCols(tj.fromColumnStartAndEnd(e,t-1,t-1)))if(this.isThereSpaceForArray(r))for(let e of r.getRange().addresses(this))this.addressMapping.setCell(e,r);else this.setNoSpaceIfArray(r)}shrinkPossibleArrayAndGetCell(e){let t=this.getCell(e);return t instanceof rA?(this.setNoSpaceIfArray(t),this.getCell(e)):t}setNoSpaceIfArray(e){e instanceof rA&&(this.shrinkArrayToCorner(e),e.setNoSpace())}removeVertex(e){this.removeVertexAndCleanupDependencies(e),e instanceof rN&&this.rangeMapping.removeVertexIfExists(e)}rerouteDependents(e,t){let r=this.graph.adjacentNodes(e);this.graph.removeEdgeIfExists(t,e),r.forEach(e=>{this.graph.hasNode(e)&&this.graph.addEdge(t,e)})}removeVertexAndRerouteDependencies(e,t){let r=this.graph.removeNode(e);this.graph.removeEdgeIfExists(t,e),r.forEach(([e,r])=>{this.graph.hasNode(r)&&this.graph.addEdge(r,t)})}removeVertexAndCleanupDependencies(e){let t=new Set(this.graph.removeNode(e)),r=new Set;for(;t.size>0;){let e=t.values().next().value;t.delete(e);let[n,o]=e;this.graph.hasNode(o)&&0===this.graph.adjacentNodesCount(o)&&((o instanceof rN||o instanceof rU)&&this.graph.removeNode(o).forEach(e=>t.add(e)),o instanceof rN?(this.rangeMapping.removeVertexIfExists(o),r.add(o.sheet)):o instanceof rU&&r4(n)&&(this.addressMapping.removeCell(n),r.add(n.sheet)))}this.cleanupPlaceholderSheets(r)}cleanupPlaceholderSheets(e){for(let t of e)this.isPlaceholder(t)&&!this.addressMapping.hasAnyEntries(t)&&0===this.rangeMapping.getNumberOfRangesInSheet(t)&&(this.sheetMapping.removeSheetIfExists(t,{includePlaceholders:!0}),this.addressMapping.removeSheetIfExists(t))}}class rU extends rE{constructor(){super()}getCellValue(){return tN}}class rz extends rE{constructor(e,t){super(),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 rW extends rE{constructor(e,t){super(),this.errors=e,this.rawInput=t}getCellValue(){let e=this.errors.map(e=>e.message).find(e=>e);return rX.parsingError(e)}getFormula(){return this.rawInput}}class rG{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.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 r=this.mapping.get(e.col);r||(r=new Map,this.mapping.set(e.col,r)),r.set(e.row,t)}has(e){var t;return!!(null==(t=this.mapping.get(e.col))?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))||t.delete(e.row)}addRows(e,t){this.mapping.forEach(r=>{let n=new Map;r.forEach((o,i)=>{i>=e&&(n.set(i+t,o),r.delete(i))}),n.forEach((e,t)=>{r.set(t,e)})}),this.height+=t}addColumns(e,t){let r=new Map;this.mapping.forEach((n,o)=>{o>=e&&(r.set(o+t,n),this.mapping.delete(o))}),r.forEach((e,t)=>{this.mapping.set(t,e)}),this.width+=t}removeRows(e){this.mapping.forEach(t=>{let r=new Map;t.forEach((n,o)=>{o>=e.rowStart&&(t.delete(o),o>e.rowEnd&&r.set(o-e.numberOfRows,n))}),r.forEach((e,r)=>{t.set(r,e)})});let t=Math.max(0,Math.min(this.height-1,e.rowEnd)-e.rowStart+1);this.height=Math.max(0,this.height-t)}removeColumns(e){let t=new Map;this.mapping.forEach((r,n)=>{n>=e.columnStart&&(this.mapping.delete(n),n>e.columnEnd&&t.set(n-e.numberOfColumns,r))}),t.forEach((e,t)=>{this.mapping.set(t,e)});let r=Math.max(0,Math.min(this.width-1,e.columnEnd)-e.columnStart+1);this.width=Math.max(0,this.width-r)}*getEntries(e){for(let[t,r]of this.mapping)for(let[n,o]of r)yield[r1(e,t,n),o]}*verticesFromColumn(e){let t=this.mapping.get(e);if(void 0!==t)for(let[e,r]of t)yield r}*verticesFromRow(e){for(let t of this.mapping.values()){let r=t.get(e);void 0!==r&&(yield r)}}*verticesFromColumnsSpan(e){for(let t of e.columns()){let e=this.mapping.get(t);if(void 0!==e)for(let[t,r]of e)yield r}}*verticesFromRowsSpan(e){for(let t of this.mapping.values())for(let r of e.rows()){let e=t.get(r);void 0!==e&&(yield e)}}*entriesFromRowsSpan(e){for(let[t,r]of this.mapping.entries())for(let n of e.rows()){let o=r.get(n);void 0!==o&&(yield[r1(e.sheet,t,n),o])}}*entriesFromColumnsSpan(e){for(let t of e.columns()){let r=this.mapping.get(t);if(void 0!==r)for(let[n,o]of r.entries())yield[r1(e.sheet,t,n),o]}}*vertices(){for(let[e,t]of this.mapping)for(let[e,r]of t)void 0!==r&&(yield r)}}class r${constructor(e,t){this.width=e,this.height=t,this.mapping=Array(t);for(let r=0;r<t;r++)this.mapping[r]=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]=Array(this.width)),this.mapping[e.row][e.col]=t}has(e){let 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){let r=[];for(let e=0;e<t;e++)r.push(Array(this.width));this.mapping.splice(e,0,...r),this.height+=t}addColumns(e,t){for(let r=0;r<this.height;r++)void 0!==this.mapping[r]&&this.mapping[r].splice(e,0,...Array(t));this.width+=t}removeRows(e){this.mapping.splice(e.rowStart,e.numberOfRows);let t=Math.max(0,Math.min(this.height-1,e.rowEnd)-e.rowStart+1);this.height=Math.max(0,this.height-t)}removeColumns(e){for(let t=0;t<this.height;t++)void 0!==this.mapping[t]&&this.mapping[t].splice(e.columnStart,e.numberOfColumns);let t=Math.max(0,Math.min(this.width-1,e.columnEnd)-e.columnStart+1);this.width=Math.max(0,this.width-t)}*getEntries(e){for(let t=0;t<this.height;++t)for(let r=0;r<this.width;++r){let n=this.getCellVertex(r,t);n&&(yield[r1(e,r,t),n])}}*verticesFromColumn(e){for(let t=0;t<this.height;++t){let r=this.getCellVertex(e,t);r&&(yield r)}}*verticesFromRow(e){for(let t=0;t<this.width;++t){let r=this.getCellVertex(t,e);r&&(yield r)}}*verticesFromColumnsSpan(e){for(let t=e.columnStart;t<=e.columnEnd;++t)for(let e=0;e<this.height;++e){let r=this.getCellVertex(t,e);r&&(yield r)}}*verticesFromRowsSpan(e){for(let t=0;t<this.width;++t)for(let r=e.rowStart;r<=e.rowEnd;++r){let e=this.getCellVertex(t,r);e&&(yield e)}}*entriesFromRowsSpan(e){for(let t=0;t<this.width;++t)for(let r=e.rowStart;r<=e.rowEnd;++r){let n=this.getCellVertex(t,r);n&&(yield[r1(e.sheet,t,r),n])}}*entriesFromColumnsSpan(e){for(let t=e.columnStart;t<=e.columnEnd;++t)for(let r=0;r<this.height;++r){let n=this.getCellVertex(t,r);n&&(yield[r1(e.sheet,t,r),n])}}*vertices(){for(let e=0;e<this.height;++e)for(let t=0;t<this.width;++t){let r=this.getCellVertex(t,e);r&&(yield r)}}getCellVertex(e,t){var r;return null==(r=this.mapping[t])?void 0:r[e]}}(_=d||(d={})).DIV_BY_ZERO="DIV_BY_ZERO",_.NAME="NAME",_.VALUE="VALUE",_.NUM="NUM",_.NA="NA",_.CYCLE="CYCLE",_.REF="REF",_.SPILL="SPILL",_.LIC="LIC",_.ERROR="ERROR",(k=u||(u={})).FORMULA="FORMULA",k.VALUE="VALUE",k.ARRAY="ARRAY",k.EMPTY="EMPTY",k.ARRAYFORMULA="ARRAYFORMULA",(H=c||(c={})).EMPTY="EMPTY",H.NUMBER="NUMBER",H.STRING="STRING",H.BOOLEAN="BOOLEAN",H.ERROR="ERROR",(g||(g={})).NUMBER="NUMBER";let rY=Object.assign(Object.assign({},c),g),rj=Object.assign(Object.assign({},c),s),rq=e=>{switch(e){case rY.EMPTY:return 0;case rY.NUMBER:return 1;case rY.STRING:return 2;case rY.BOOLEAN:return 3;case rY.ERROR:return 4}throw Error("Cell value not computed")},rK=e=>{if(e===tN)return rY.EMPTY;if(e instanceof rX||e instanceof tB)return rY.ERROR;if("string"==typeof e)return rY.STRING;if(tD(e))return rY.NUMBER;if("boolean"==typeof e)return rY.BOOLEAN;throw Error("Cell value not computed")};class rX{constructor(e,t,r){this.type=e,this.message=t,this.root=r}static parsingError(e){return new rX(d.ERROR,`${eq.ParseError}${e?" "+e:""}`)}attachRootVertex(e){return void 0===this.root?new rX(this.type,this.message,e):this}}let rQ=(e,t)=>({sheet:e,row:t}),rZ=e=>e.row<0,rJ=(e,t)=>({sheet:e,col:t}),r0=e=>e.col<0,r1=(e,t,r)=>({sheet:e,col:t,row:r}),r2=e=>e.col<0||e.row<0,r3=(e,t,r,n)=>r1(t,e.col+r,e.row+n),r6=e=>`${e.sheet},${e.row},${e.col}`;function r4(e){return e&&("object"==typeof e||"function"==typeof e)&&"number"==typeof(null==e?void 0:e.sheet)&&"number"==typeof(null==e?void 0:e.col)&&"number"==typeof(null==e?void 0:e.row)}let r5=(e,t)=>{var r;return null!=(r=e.sheet)?r:t.sheet},r9=(e,t)=>e.sheet===t.sheet&&e.col===t.col&&e.row===t.row;function r7(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"start"in e&&r4(e.start)&&"end"in e&&r4(e.end)}let r8=(e,t)=>({start:e,end:t});class ne{constructor(e,t){if(e.sheet!==t.sheet)throw new t3(e.sheet,t.sheet);this.start=r1(e.sheet,e.col,e.row),this.end=r1(t.sheet,t.col,t.row)}get sheet(){return this.start.sheet}static fromSimpleCellAddresses(e,t){if(e.sheet!==t.sheet)throw new t3(e.sheet,t.sheet);let r=t.col-e.col,n=t.row-e.row;return Number.isFinite(n)&&Number.isFinite(r)?new ne(e,t):Number.isFinite(n)?new nr(e.sheet,e.row,t.row):new nt(e.sheet,e.col,t.col)}static fromAst(e,t){return e.type===o.CELL_RANGE?ne.fromCellRange(e,t):e.type===o.COLUMN_RANGE?nt.fromColumnRange(e,t):nr.fromRowRangeAst(e,t)}static fromAstOrUndef(e,t){try{return ne.fromAst(e,t)}catch(e){return}}static fromCellRange(e,t){return new ne(e.start.toSimpleCellAddress(t),e.end.toSimpleCellAddress(t))}static spanFrom(e,t,r){let n=ne.spanFromOrUndef(e,t,r);if(void 0===n)throw Error("AbsoluteCellRange: Wrong range size");return n}static spanFromOrUndef(e,t,r){if(!Number.isFinite(t)&&Number.isFinite(r)){if(0===e.col)return new nr(e.sheet,e.row,e.row+r-1)}else if(!Number.isFinite(r)&&Number.isFinite(t)){if(0!==e.row)return;return new nt(e.sheet,e.col,e.col+t-1)}else if(Number.isFinite(r)&&Number.isFinite(t))return new ne(e,r1(e.sheet,e.col+t-1,e.row+r-1))}static fromCoordinates(e,t,r,n,o){return new ne(r1(e,t,r),r1(e,n,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;let t=Math.max(this.start.row,e.start.row),r=Math.min(this.end.row,e.end.row),n=Math.max(this.start.col,e.start.col),o=Math.min(this.end.col,e.end.col);if(!(t>r)&&!(n>o))return new ne(r1(this.sheet,n,t),r1(this.sheet,o,r))}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 ne.spanFrom(r1(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 tY?this.removeRows(e.start,e.end):this.removeColumns(e.start,e.end)}shouldBeRemoved(){return 0>=this.width()||0>=this.height()}rangeWithSameWidth(e,t){return ne.spanFrom(r1(this.sheet,this.start.col,e),this.width(),t)}rangeWithSameHeight(e,t){return ne.spanFrom(r1(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(){let e=[];for(let t=0;t<this.height();++t){e[t]=[];for(let r=0;r<this.width();++r){let n=r1(this.sheet,this.start.col+r,this.start.row+t);e[t].push(n)}}return e}withStart(e){return new ne(e,this.end)}sameDimensionsAs(e){return this.width()===e.width()&&this.height()===e.height()}sameAs(e){return r9(this.start,e.start)&&r9(this.end,e.end)}addressesArrayMap(e,t){let r=[],n=this.start.row;for(;n<=this.effectiveEndRow(e);){let o=this.start.col,i=[];for(;o<=this.effectiveEndColumn(e);)i.push(t(r1(this.start.sheet,o,n))),o++;r.push(i),n++}return r}addresses(e){let t=[],r=this.start.row,n=this.effectiveEndRow(e),o=this.effectiveEndColumn(e);for(;r<=n;){let e=this.start.col;for(;e<=o;)t.push(r1(this.start.sheet,e,r)),e++;r++}return t}*addressesWithDirection(e,t,r){if(e>0)if(t>0){let e=this.effectiveEndRow(r);for(;e>=this.start.row;){let t=this.effectiveEndColumn(r);for(;t>=this.start.col;)yield r1(this.start.sheet,t,e),t-=1;e-=1}}else{let e=this.start.row;for(;e<=this.effectiveEndRow(r);){let t=this.effectiveEndColumn(r);for(;t>=this.start.col;)yield r1(this.start.sheet,t,e),t-=1;e+=1}}else if(t>0){let e=this.effectiveEndRow(r);for(;e>=this.start.row;){let t=this.start.col;for(;t<=this.effectiveEndColumn(r);)yield r1(this.start.sheet,t,e),t+=1;e-=1}}else{let e=this.start.row;for(;e<=this.effectiveEndRow(r);){let t=this.start.col;for(;t<=this.effectiveEndColumn(r);)yield r1(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 r1(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)return this.shiftByRows(-(t-e+1));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)return this.shiftByColumns(-(t-e+1));e<=this.start.col&&(this.start.col=e),this.end.col-=Math.min(t,this.end.col)-e+1}}}class nt extends ne{constructor(e,t,r){super(r1(e,t,0),r1(e,r,1/0))}static fromColumnRange(e,t){let r=e.start.toSimpleColumnAddress(t),n=e.end.toSimpleColumnAddress(t);if(r.sheet!==n.sheet)throw new t3(r.sheet,n.sheet);return new nt(r.sheet,r.col,n.col)}shouldBeRemoved(){return 0>=this.width()}shiftByRows(e){}expandByRows(e){}shifted(e,t){return new nt(this.sheet,this.start.col+e,this.end.col+e)}rangeWithSameHeight(e,t){return new nt(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 nr extends ne{constructor(e,t,r){super(r1(e,0,t),r1(e,1/0,r))}static fromRowRangeAst(e,t){let r=e.start.toSimpleRowAddress(t),n=e.end.toSimpleRowAddress(t);if(r.sheet!==n.sheet)throw new t3(r.sheet,n.sheet);return new nr(r.sheet,r.row,n.row)}shouldBeRemoved(){return 0>=this.height()}shiftByColumns(e){}expandByColumns(e){}shifted(e,t){return new nr(this.sheet,this.start.row+t,this.end.row+t)}rangeWithSameWidth(e,t){return new nr(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 nn{constructor(e,t,r){this.formulaAddress=e,this.arraysFlag=t,this.formulaVertex=r}}let no=/^\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij]))\s*(([+-])\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij])))?$/;class ni{constructor(e,t,r){this.config=e,this.dateTimeHelper=t,this.numberLiteralsHelper=r,this.lt=(e,t)=>0>this.compare(e,t),this.leq=(e,t)=>0>=this.compare(e,t),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(tI(e),tI(t)),this.addWithEpsilonRaw=(e,t)=>{let r=e+t;return Math.abs(r)<this.actualEps*Math.abs(e)?0:r},this.addWithEpsilon=(e,t)=>{let r=nb(e,t);return this.ExtendedNumberFactory(this.addWithEpsilonRaw(tI(e),tI(t)),r)},this.unaryMinus=e=>tO(e,-tI(e)),this.unaryPlus=e=>e,this.unaryPercent=e=>new tP(tI(e)/100),this.concat=(e,t)=>e.concat(t),this.nonstrictadd=(e,t)=>{if(e instanceof rX)return e;if(t instanceof rX)return t;if("number"==typeof e)if("number"==typeof t)return this.addWithEpsilonRaw(e,t);else return e;if("number"==typeof t)return t;return 0},this.subtract=(e,t)=>{let r=nb(e,t),n=tI(e),o=n-tI(t);return Math.abs(o)<this.actualEps*Math.abs(n)&&(o=0),this.ExtendedNumberFactory(o,r)},this.divide=(e,t)=>{let r=tI(e),n=tI(t);if(0===n)return new rX(d.DIV_BY_ZERO);{let o=nC(e,t);return this.ExtendedNumberFactory(r/n,o)}},this.multiply=(e,t)=>{let r=nC(e,t);return this.ExtendedNumberFactory(tI(e)*tI(t),r)},this.manyToExactComplex=e=>{let t=[];for(let r of e)if(r instanceof rX)return r;else if(tD(r)||"string"==typeof r){let e=this.coerceScalarToComplex(r);e instanceof rX||t.push(e)}return t},this.coerceNumbersExactRanges=e=>this.manyToNumbers(e,this.manyToExactNumbers),this.coerceNumbersCoerceRangesDropNulls=e=>this.manyToNumbers(e,this.manyToCoercedNumbersDropNulls),this.manyToExactNumbers=e=>{let t=[];for(let r of e)if(r instanceof rX)return r;else tD(r)&&t.push(tI(r));return t},this.manyToOnlyNumbersDropNulls=e=>{let t=[];for(let r of e)if(r instanceof rX)return r;else if(tD(r))t.push(tI(r));else if(r!==tN)return new rX(d.VALUE,eq.NumberExpected);return t},this.manyToCoercedNumbersDropNulls=e=>{let t=[];for(let r of e){if(r instanceof rX)return r;if(r===tN)continue;let e=this.coerceScalarToNumberOrError(r);tD(e)&&t.push(tI(e))}return t},this.collator=function(e){let t=e.caseSensitive?e.accentSensitive?"variant":"case":e.accentSensitive?"accent":"base",r=e.caseFirst,n=e.ignorePunctuation;return new Intl.Collator(e.localeLang,{sensitivity:t,caseFirst:r,ignorePunctuation:n})}(e),this.actualEps=e.smartRounding?e.precisionEpsilon:0}eqMatcherFunction(e){let t=this.buildRegex(e);return e=>"string"==typeof e&&t.test(this.normalizeString(e))}neqMatcherFunction(e){let t=this.buildRegex(e);return e=>"string"!=typeof e||!t.test(this.normalizeString(e))}searchString(e,t){var r;let n=this.buildRegex(e,!1).exec(t);return null!=(r=null==n?void 0:n.index)?r:-1}requiresRegex(e){if(!this.config.useRegularExpressions&&!this.config.useWildcards)return!this.config.matchWholeCell;for(let t=0;t<e.length;t++){let r=e.charAt(t);if(nm(r)||this.config.useRegularExpressions&&ny(r))return!0}return!1}floatCmp(e,t){let r=tI(e),n=tI(t),o=1+this.actualEps;return n>=0&&r*o>=n&&r<=n*o||n<=0&&r*o<=n&&r>=n*o?0:r>n?1:-1}coerceScalarToNumberOrError(e){var t;return e instanceof rX?e:null!=(t=this.coerceToMaybeNumber(e))?t:new rX(d.VALUE,eq.NumberCoercion)}coerceToMaybeNumber(e){var t;return null!=(t=this.coerceNonDateScalarToMaybeNumber(e))?t:"string"==typeof e?this.dateTimeHelper.dateStringToDateNumber(e):void 0}coerceNonDateScalarToMaybeNumber(e){if(e===tN)return 0;if("string"==typeof e){if(""===e)return 0;let t=this.coerceStringToMaybePercentNumber(e);if(void 0!==t)return t;let r=this.coerceStringToMaybeCurrencyNumber(e);return void 0!==r?r:this.numberLiteralsHelper.numericStringToMaybeNumber(e.trim())}return tD(e)?e:"boolean"==typeof e?Number(e):void 0}coerceStringToMaybePercentNumber(e){let t=e.trim();if(t.endsWith("%")){let e=t.slice(0,t.length-1).trim(),r=this.numberLiteralsHelper.numericStringToMaybeNumber(e);if(void 0!==r)return new tP(r/100)}}coerceStringToMaybeCurrencyNumber(e){let t=this.currencyMatcher(e.trim());if(void 0!==t){let[e,r]=t,n=this.numberLiteralsHelper.numericStringToMaybeNumber(r);if(void 0!==n)return new tk(n,e)}}currencyMatcher(e){for(let 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){let t=[];for(let r of e)if(r instanceof tB)t.push(r);else if(r!==tN){let e=this.coerceScalarToComplex(r);if(e instanceof rX)return e;t.push(e)}let r=[];for(let e of t)if(e instanceof tB){let t=this.manyToExactComplex(e.valuesFromTopLeftCorner());if(t instanceof rX)return t;r.push(...t)}else r.push(e);return r}coerceScalarToComplex(e){return e instanceof rX?e:e===tN?[0,0]:tD(e)?[tI(e),0]:"string"==typeof e?this.coerceStringToComplex(e):new rX(d.NUM,eq.ComplexNumberExpected)}ExtendedNumberFactory(e,t){let{type:r,format:n}=t;switch(r){case s.NUMBER_RAW:return e;case s.NUMBER_CURRENCY:return new tk(e,null!=n?n:this.config.currencySymbol[0]);case s.NUMBER_DATE:return new t_(e,n);case s.NUMBER_DATETIME:return new tL(e,n);case s.NUMBER_TIME:return new tH(e,n);case s.NUMBER_PERCENT:return new tP(e,n)}}buildRegex(e,t=!0){let r;e=this.normalizeString(e);let n=this.config.useWildcards,o=this.config.useRegularExpressions;if(o)try{RegExp(e)}catch(e){o=!1,n=!1}return(r=o?function(e,t){let r="";for(let n=0;n<e.length;n++){let o=e.charAt(n);nm(o)||ny(o)||t?r+=o:r+=o.toLowerCase()}return r}(e,this.config.caseSensitive):n?function(e,t){let r="";for(let n=0;n<e.length;n++){let o=e.charAt(n);if("~"===o){if(n==e.length-1){r+="~";continue}let t=e.charAt(n+1);nm(t)||ny(t)?r+="\\"+t:r+=t,n++}else nm(o)?r+="."+o:ny(o)?r+="\\"+o:t?r+=o:r+=o.toLowerCase()}return r}(e,this.config.caseSensitive):function(e,t){let r="";for(let n=0;n<e.length;n++){let o=e.charAt(n);nm(o)||ny(o)?r+="\\"+o:t?r+=o:r+=o.toLowerCase()}return r}(e,this.config.caseSensitive),this.config.matchWholeCell&&t)?RegExp("^("+r+")$"):RegExp(r)}normalizeString(e){return this.config.caseSensitive||(e=e.toLowerCase()),this.config.accentSensitive||(e=nv(e,"nfd").replace(/[\u0300-\u036f]/g,"")),e}compare(e,t){if("string"==typeof e||"string"==typeof t){let r="string"==typeof e?this.dateTimeHelper.dateStringToDateNumber(e):e,n="string"==typeof t?this.dateTimeHelper.dateStringToDateNumber(t):t;if(tD(r)&&tD(n))return this.floatCmp(r,n)}return(e===tN?e=nh(t):t===tN&&(t=nh(e)),"string"==typeof e&&"string"==typeof t)?this.stringCmp(e,t):"boolean"==typeof e&&"boolean"==typeof t?ng(nl(e),nl(t)):tD(e)&&tD(t)?this.floatCmp(e,t):e===tN&&t===tN?0:ng(rq(rK(e)),rq(rK(t)))}stringCmp(e,t){return this.collator.compare(e,t)}manyToNumbers(e,t){let r=[];for(let t of e)if(t instanceof tB)r.push(t);else{let e=tI(this.coerceScalarToNumberOrError(t));if(e instanceof rX)return e;r.push(e)}let n=[];for(let e of r)if(e instanceof tB){let r=t(e.valuesFromTopLeftCorner());if(r instanceof rX)return r;n.push(...r)}else n.push(e);return n}coerceStringToComplex(e){let t,r,n=no.exec(e);return null===n?new rX(d.NUM,eq.ComplexNumberExpected):(t=void 0!==n[6]?"-"===n[1]?[0,-1]:[0,1]:this.parseComplexToken(n[1]+n[3],n[5]))instanceof rX||void 0===n[8]?t:(r=void 0!==n[14]?"-"===n[9]?[0,-1]:[0,1]:this.parseComplexToken(n[9]+n[11],n[13]))instanceof rX?r:""!==n[5]||""===n[13]?new rX(d.NUM,eq.ComplexNumberExpected):"+"===n[8]?[t[0]+r[0],t[1]+r[1]]:[t[0]-r[0],t[1]-r[1]]}parseComplexToken(e,t){let r=tI(this.coerceNonDateScalarToMaybeNumber(e));return void 0===r?new rX(d.NUM,eq.ComplexNumberExpected):""===t?[r,0]:[0,r]}}function ns([e,t],r){if(!isFinite(e)||!isFinite(t))return new rX(d.NUM,eq.NaN);if(r=null!=r?r:"i",0===t)return`${e}`;let n=`${-1===t||1===t?"":Math.abs(t)}${r}`;return 0===e?`${t<0?"-":""}${n}`:`${e}${t<0?"-":"+"}${n}`}function na(e){return e instanceof tB?e:tB.fromScalar(e)}function nl(e){return Number(e)}function nh(e){return"string"==typeof e?"":tD(e)?0:"boolean"!=typeof e&&tN}function nd(e){if(e instanceof rX||"boolean"==typeof e)return e;{if(e===tN)return!1;if(tD(e))return 0!==tI(e);let t=e.toUpperCase();return"TRUE"===t||"FALSE"!==t&&""!==t&&void 0}}function nu(e){return e instanceof rX||"string"==typeof e?e:e===tN?"":tD(e)?tI(e).toString():e?"TRUE":"FALSE"}function nc(e){return e===tN?0:e}function ng(e,t){let r=tI(e),n=tI(t);return r>n?1:r<n?-1:0}function np(e){return isNaN(e)||e===1/0||e===-1/0}function nm(e){return["*","?"].includes(e)}let nf=["{","}","[","]","(",")","<",">","=",".","+","-",",","\\","$","^","!"];function ny(e){return nf.includes(e)}function nb(e,t){let{type:r,format:n}=tF(e),{type:o,format:i}=tF(t);if(r===s.NUMBER_RAW)return{type:o,format:i};if(o===s.NUMBER_RAW)return{type:r,format:n};if((r===s.NUMBER_DATETIME||r===s.NUMBER_DATE)&&(o===s.NUMBER_DATETIME||o===s.NUMBER_DATE))return{type:s.NUMBER_RAW};if(r===s.NUMBER_TIME){if(o===s.NUMBER_DATE)return{type:s.NUMBER_DATETIME,format:`${i} ${n}`};if(o===s.NUMBER_DATETIME)return{type:s.NUMBER_DATETIME,format:i}}if(o===s.NUMBER_TIME){if(r===s.NUMBER_DATE)return{type:s.NUMBER_DATETIME,format:`${n} ${i}`};if(r===s.NUMBER_DATETIME)return{type:s.NUMBER_DATETIME,format:n}}return{type:r,format:n}}function nC(e,t){let{type:r,format:n}=tF(e),{type:o,format:i}=tF(t);return(r===s.NUMBER_PERCENT&&(r=s.NUMBER_RAW,n=void 0),o===s.NUMBER_PERCENT&&(o=s.NUMBER_RAW,i=void 0),r===s.NUMBER_RAW)?{type:o,format:i}:o===s.NUMBER_RAW?{type:r,format:n}:{type:s.NUMBER_RAW}}function nw(e){return nv(e.toLowerCase(),"nfd").replace(/[\u0300-\u036f]/g,"")}function nS(e,t){var r;if(e.isAdHoc())return null==(r=e.data[0])?void 0:r[0];let n=e.range;if(t.formulaAddress.sheet===n.sheet){if(1===n.width()){let r=t.formulaAddress.row-n.start.row;if(r>=0&&r<n.height())return e.data[r][0]}else if(1===n.height()){let r=t.formulaAddress.col-n.start.col;if(r>=0&&r<n.width())return e.data[0][r]}}}function nv(e,t){return e.normalize(t.toUpperCase())}(L=p||(p={})).STRING="STRING",L.NUMBER="NUMBER",L.BOOLEAN="BOOLEAN",L.SCALAR="SCALAR",L.NOERROR="NOERROR",L.RANGE="RANGE",L.INTEGER="INTEGER",L.COMPLEX="COMPLEX",L.ANY="ANY";class nR{constructor(e){this.coerceScalarToNumberOrError=e=>this.arithmeticHelper.coerceScalarToNumberOrError(e),this.runFunction=(e,t,r,n)=>{let o=this.evaluateArguments(e,t,r),i=o.map(([e,t])=>e),s=o.map(([e,t])=>t),a=this.buildMetadataForEachArgumentValue(i.length,r),l=t.arraysFlag&&!r.vectorizationForbidden;if(!this.isNumberOfArgumentValuesValid(a,i.length))return new rX(d.NA,eq.WrongArgNumber);let[h,u]=l?this.calculateSizeOfVectorizedResultArray(i,a):[1,1];if(1===h&&1===u){let e=this.vectorizeAndBroadcastArgumentsIfNecessary(l,i,a,0,0);return this.calculateSingleCellOfResultArray(t,e,a,s,n,r.returnNumberType)}let c=[...Array(h).keys()].map(e=>[...Array(u).keys()].map(o=>{let h=this.vectorizeAndBroadcastArgumentsIfNecessary(l,i,a,e,o),d=this.calculateSingleCellOfResultArray(t,h,a,s,n,r.returnNumberType);if(d instanceof tB)throw Error("Function returning array cannot be vectorized.");return d}));return tB.onlyValues(c)},this.runFunctionWithReferenceArgument=(e,t,r,n,i,s=()=>new rX(d.NA,eq.CellRefExpected))=>{let a;if(0===e.length)return this.returnNumberWrapper(n(),r.returnNumberType);if(e.length>1)return new rX(d.NA,eq.WrongArgNumber);let l=e[0];for(;l.type===o.PARENTHESIS;)l=l.expression;if(l.type===o.CELL_REFERENCE)a=l.reference.toSimpleCellAddress(t.formulaAddress);else if(l.type===o.CELL_RANGE||l.type===o.COLUMN_RANGE||l.type===o.ROW_RANGE)try{a=ne.fromAst(l,t.formulaAddress).start}catch(e){return new rX(d.REF,eq.CellRefExpected)}return void 0!==a?this.returnNumberWrapper(i(a),r.returnNumberType):this.runFunction(e,t,r,s)},this.interpreter=e,this.dependencyGraph=e.dependencyGraph,this.columnSearch=e.columnSearch,this.config=e.config,this.serialization=e.serialization,this.arraySizePredictor=e.arraySizePredictor,this.dateTimeHelper=e.dateTimeHelper,this.arithmeticHelper=e.arithmeticHelper}evaluateAst(e,t){return this.interpreter.evaluateAst(e,t)}arraySizeForAst(e,t){return this.arraySizePredictor.checkArraySizeForAst(e,t)}listOfScalarValues(e,t){let r=[];for(let n of e){let e=this.evaluateAst(n,t);if(e instanceof tB)for(let t of e.valuesFromTopLeftCorner())r.push([t,!0]);else r.push([e,!1])}return r}coerceToType(e,t,r){let n;if(e instanceof tB)switch(t.argumentType){case p.RANGE:case p.ANY:n=e;break;default:{let t=nS(e,r);if(void 0===t)return;e=t}}if(!(e instanceof tB))switch(t.argumentType){case p.INTEGER:case p.NUMBER:let o=this.coerceScalarToNumberOrError(e);if(!tD(o)){n=o;break}let i=tI(o);if(void 0!==t.maxValue&&i>t.maxValue)return new rX(d.NUM,eq.ValueLarge);if(void 0!==t.minValue&&i<t.minValue)return new rX(d.NUM,eq.ValueSmall);if(void 0!==t.lessThan&&i>=t.lessThan)return new rX(d.NUM,eq.ValueLarge);if(void 0!==t.greaterThan&&i<=t.greaterThan)return new rX(d.NUM,eq.ValueSmall);if(t.argumentType===p.INTEGER&&!Number.isInteger(i))return new rX(d.NUM,eq.IntegerExpected);n=o;break;case p.STRING:n=nu(e);break;case p.BOOLEAN:n=nd(e);break;case p.SCALAR:case p.NOERROR:case p.ANY:n=e;break;case p.RANGE:if(e instanceof rX)return e;n=na(e);break;case p.COMPLEX:return this.arithmeticHelper.coerceScalarToComplex(tI(e))}return t.passSubtype||void 0===n?n:tI(n)}calculateSingleCellOfResultArray(e,t,r,n,o,i){let s=this.coerceArgumentsToRequiredTypes(e,t,r,n);if(s instanceof rX)return s;let a=o(...s);return this.returnNumberWrapper(a,i)}coerceArgumentsToRequiredTypes(e,t,r,n){let o=[];for(let i=0;i<r.length;i++){let s=r[i],a=void 0!==t[i]?t[i]:null==s?void 0:s.defaultValue;if(void 0===a){o.push(void 0);continue}let l=this.coerceToType(a,s,e);if(void 0===l&&!n[i])return new rX(d.VALUE,eq.WrongType);if(l instanceof rX&&s.argumentType!==p.SCALAR)return l;o.push(l)}return o}vectorizeAndBroadcastArgumentsIfNecessary(e,t,r,n,o){return t.map((t,i)=>e&&this.isRangePassedAsAScalarArgument(t,r[i])?this.vectorizeAndBroadcastRangeArgument(t,n,o):t)}vectorizeAndBroadcastRangeArgument(e,t,r){var n;let o=1===e.height()?0:t,i=1===e.width()?0:r;return null==(n=e.data[o])?void 0:n[i]}evaluateArguments(e,t,r){return r.expandRanges?this.listOfScalarValues(e,t):e.map(e=>[this.evaluateAst(e,t),!1])}buildMetadataForEachArgumentValue(e,t){let r=t.parameters?[...t.parameters]:[];if(void 0!==t.repeatLastArgs&&Number.isInteger(t.repeatLastArgs)&&t.repeatLastArgs>0)for(;e>r.length;)r.push(...r.slice(r.length-t.repeatLastArgs));return r}isNumberOfArgumentValuesValid(e,t){return!(t>e.length)&&(!(t<e.length)||e.slice(t).every(e=>(null==e?void 0:e.optionalArg)||(null==e?void 0:e.defaultValue)!==void 0))}calculateSizeOfVectorizedResultArray(e,t){let r=e.filter((e,r)=>this.isRangePassedAsAScalarArgument(e,t[r]));return[Math.max(1,...r.map(e=>e.height())),Math.max(1,...r.map(e=>e.width()))]}isRangePassedAsAScalarArgument(e,t){return null!=e&&null!=t&&e instanceof tB&&![p.RANGE,p.ANY].includes(t.argumentType)}metadata(e){let t=this.constructor.implementedFunctions[e];if(void 0!==t)return t;throw Error(`No metadata for function ${e}.`)}returnNumberWrapper(e,t,r){return void 0!==t&&tD(e)?this.arithmeticHelper.ExtendedNumberFactory(tI(e),{type:t,format:r}):e}}class nE{constructor(e,t,r=!1){this.width=e,this.height=t,this.isRef=r}static error(){return new nE(1,1,!0)}static scalar(){return new nE(1,1,!1)}isScalar(){return 1===this.width&&1===this.height||this.isRef}}class nT{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 o.FUNCTION_CALL:return this.checkArraySizeForFunction(e,t);case o.COLUMN_RANGE:case o.ROW_RANGE:case o.CELL_RANGE:{let r=ne.fromAstOrUndef(e,t.formulaAddress);if(void 0===r)return nE.error();return new nE(r.width(),r.height(),!0)}case o.ARRAY:{let r=[],n=[];for(let o of e.args){let 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);r.push(i),n.push(s)}return new nE(Math.min(...n),r.reduce((e,t)=>e+t,0))}case o.STRING:case o.NUMBER:return nE.scalar();case o.CELL_REFERENCE:return new nE(1,1,!0);case o.DIV_OP:case o.CONCATENATE_OP:case o.EQUALS_OP:case o.GREATER_THAN_OP:case o.GREATER_THAN_OR_EQUAL_OP:case o.LESS_THAN_OP:case o.LESS_THAN_OR_EQUAL_OP:case o.MINUS_OP:case o.NOT_EQUAL_OP:case o.PLUS_OP:case o.POWER_OP:case o.TIMES_OP:{let r=this.checkArraySizeForAst(e.left,t),n=this.checkArraySizeForAst(e.right,t);if(!t.arraysFlag&&(r.height>1||r.width>1||n.height>1||n.width>1))return nE.error();return new nE(Math.max(r.width,n.width),Math.max(r.height,n.height))}case o.MINUS_UNARY_OP:case o.PLUS_UNARY_OP:case o.PERCENT_OP:{let r=this.checkArraySizeForAst(e.value,t);if(!t.arraysFlag&&(r.height>1||r.width>1))return nE.error();return new nE(r.width,r.height)}case o.PARENTHESIS:return this.checkArraySizeForAst(e.expression,t);case o.EMPTY:default:return nE.error()}}checkArraySizeForFunction(e,t){let r=this.functionRegistry.getArraySizeFunction(e.procedureName);if(void 0!==r)return r(e,t);let n=this.functionRegistry.getMetadata(e.procedureName);if(void 0===n||n.expandRanges||!t.arraysFlag||n.vectorizationForbidden||void 0===n.parameters)return new nE(1,1);let o=e.args.map(e=>{var r;return this.checkArraySizeForAst(e,new nn(t.formulaAddress,t.arraysFlag||null!=(r=null==n?void 0:n.enableArrayArithmeticForArguments)&&r))}),i=[...n.parameters];if(void 0!==n.repeatLastArgs&&i.length<o.length&&(o.length-i.length)%n.repeatLastArgs!=0)return nE.error();for(;i.length<o.length;){if(void 0===n.repeatLastArgs)return nE.error();i.push(...i.slice(i.length-n.repeatLastArgs))}let s=1,a=1;for(let e=0;e<o.length;e++)i[e].argumentType!==p.RANGE&&i[e].argumentType!==p.ANY&&(a=Math.max(a,o[e].height),s=Math.max(s,o[e].width));return new nE(s,a)}}class nA{constructor(e,t,r){var n;this.value=t,this.address=r,this.type=e.type,this.message=null!=(n=e.message)?n:""}toString(){return this.value}valueOf(){return this.value}}function nM(e,t,r){if(void 0===e)return iy.defaultConfig[r];if("string"==typeof t)if(typeof e===t)return e;else throw new rr(t,r);if(t.includes(e))return e;throw new rs(t.map(e=>`'${e}'`).join(" "),r)}function nN(e,t,r){if(e<r)throw new ro(t,r)}function nI(e,t,r,n){if(t(e))return e;if(void 0===e)return iy.defaultConfig[n];throw new rr(r,n)}function nx(...e){let t=new Map;e.forEach(e=>{let r=t.get(e.value)||[];r.push(e.name),t.set(e.value,r)});let r=[];for(let e of t.values())e.length>1&&r.push(e);if(r.length>0){r.forEach(e=>e.sort());let e=r.map(e=>`[${e}]`).join("; ");throw Error(`Config initialization failed. Parameters in conflict: ${e}`)}}function nO(e,t,r){if(typeof e!==t)throw new rr(t,r)}let n_=RegExp("^ss(\\.(s+|0+))?$"),nk=RegExp("^[0-9/.\\-: ]+[ap]?m?$"),nH=RegExp("\\s+"),nL=RegExp("[ /.-]"),nP=nV(function(e){let t=e.toLowerCase().trim(),r=(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:r.length,hourItem:r.indexOf("hh"),minuteItem:r.indexOf("mm"),secondItem:r.findIndex(e=>n_.test(e))}}),nD=nV(function(e){let t=e.toLowerCase().trim().split(nL);return{itemsCount:t.length,dayItem:t.indexOf("dd"),monthItem:t.indexOf("mm"),shortYearItem:t.indexOf("yy"),longYearItem:t.indexOf("yyyy")}});function nF(e,t){var r,n,o;let i;if(void 0===t)return;let{itemsCount:s,hourItem:a,minuteItem:l,secondItem:h}=nP(t);if("am"===e[e.length-1]||"a"===e[e.length-1]?(i=!1,e.pop()):("pm"===e[e.length-1]||"p"===e[e.length-1])&&(i=!0,e.pop()),e.length!==s)return;let d=Number(null!=(r=e[h])?r:"0");if(!Number.isFinite(d))return;let u=Math.round(1e3*d)/1e3,c=Number(null!=(n=e[l])?n:"0");if(!(Number.isFinite(c)&&Number.isInteger(c)))return;let g=Number(null!=(o=e[a])?o:"0");if(Number.isFinite(g)&&Number.isInteger(g)&&(void 0===i||!(g<0)&&!(g>12)))return{hours:void 0!==i?g%12+12*!!i:g,minutes:c,seconds:u}}function nB(e,t){var r;if(void 0===t)return;let{itemsCount:n,dayItem:o,monthItem:i,shortYearItem:s,longYearItem:a}=nD(t);if(e.length!==n)return;let l=Number(e[o]);if(!(Number.isFinite(l)&&Number.isInteger(l)))return;let h=Number(e[i]);if(!(Number.isFinite(h)&&Number.isInteger(h))||e[a]&&e[s])return;let d=Number(null!=(r=e[a])?r:e[s]);if(Number.isFinite(d)&&Number.isInteger(d)&&(!e[a]||!(d<1e3)&&!(d>9999))&&(!e[s]||!(d<0)&&!(d>99)))return{year:d,month:h,day:l}}function nV(e){let t={};return r=>{let n=t[r];if(void 0!==n)return n;let o=e(r);return t[r]=o,o}}let nU=[31,28,31,30,31,30,31,31,30,31,30,31],nz=[0,31,59,90,120,151,181,212,243,273,304,334];function nW(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 nG(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}let n$={year:9999,month:12,day:31};class nY{constructor(e){this.config=e,this.minDateAbsoluteValue=this.dateToNumberFromZero(e.nullDate),this.maxDateValue=this.dateToNumber(n$),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){let{dateTime:t,dateFormat:r="",timeFormat:n=""}=this.parseDateTimeFromConfigFormats(e);if(void 0!==t)if(nG(t))if(nW(t))return new tL(nX(t)+this.dateToNumber(t),r+" "+n);else return new tH(nX(t),n);else if(nW(t))return new t_(this.dateToNumber(t),r);else return 0}parseDateTimeFromConfigFormats(e){return this.parseDateTimeFromFormats(e,this.config.dateFormats,this.config.timeFormats)}getNullYear(){return this.config.nullYear}getEpochYearZero(){return this.epochYearZero}isValidDate(e){if(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))return!1;if(e.year<1582)return!1;if(e.month<1||e.month>12)return!1;if(e.day<1)return!1;else if(this.isLeapYear(e.year)&&2===e.month)return e.day<=29;else return e.day<=nU[e.month-1]}dateToNumber(e){return this.dateToNumberFromZero(e)-this.minDateAbsoluteValue}relativeNumberToAbsoluteNumber(e){return e+this.minDateAbsoluteValue-!!this.leapYear1900}numberToSimpleDate(e){var t;let r,n=Math.floor(e)+this.minDateAbsoluteValue,o=Math.floor(n/365.2425);this.dateToNumberFromZero({year:o+1,month:1,day:1})<=n?o++:this.dateToNumberFromZero({year:o-1,month:1,day:1})>n&&o--;let i=n-this.dateToNumberFromZero({year:o,month:1,day:1}),s=(t=i-(this.isLeapYear(o)&&i>=59?1:0),r=0,nz[6]<=t&&(r+=6),nz[r+3]<=t&&(r+=3),nz[r+2]<=t?r+=2:nz[r+1]<=t&&(r+=1),r),a=i-nz[s]-(this.isLeapYear(o)&&s>1?1:0);return{year:o,month:s+1,day:a+1}}numberToSimpleDateTime(e){let t=nK(e%1),r=Math.floor(t.hours/24);return t.hours=t.hours%24,Object.assign(Object.assign({},this.numberToSimpleDate(Math.floor(e)+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:nU[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,r){let n=this.parseDateTime(e,t,r);if(!nW(n)||(n.year>=0&&n.year<100&&(n.year<this.getNullYear()?n.year+=2e3:n.year+=1900),this.isValidDate(n)))return n}parseDateTimeFromFormats(e,t,r){let n=0===t.length?[void 0]:t,o=0===r.length?[void 0]:r;for(let t of n)for(let r of o){let n=this.parseSingleFormat(e,t,r);if(void 0!==n)return{dateTime:n,timeFormat:r,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+nz[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 nj(e,t){let r=12*e.year+e.month-1+t;return{year:Math.floor(r/12),month:r%12+1,day:e.day}}function nq(e){return Math.round(3600*e*24)/86400}function nK(e){let t=24*e*3600,r=function(e,t=1){return Math.round(e*t)/t}(t%60,1e5)%60,n=(t-r)/60,o=Math.round(n%60)%60;return{hours:Math.round((n-o)/60),minutes:o,seconds:r}}function nX(e){return((e.seconds/60+e.minutes)/60+e.hours)/24}function nQ(e){return{year:e.year,month:e.month,day:Math.min(30,e.day)}}let nZ=/(\\.|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,nJ=/(\\.|[#0]+(\.[#0]*)?)/g;function n0(e,t){return{type:e,value:t}}function n1(e,t){let r=[],n=0;for(let o=0;o<e.length;++o){let i=e[o];if(i.index!==n){let e=t.substr(n,i.index-n);r.push(n0(m.FREE_TEXT,e))}i[0].startsWith("\\")?r.push(n0(m.FREE_TEXT,i[0])):r.push(n0(m.FORMAT,i[0])),n=i.index+i[0].length}let o=e[e.length-1];if(o.index+o[0].length<t.length){let e=t.substr(o.index+o[0].length,t.length);r.push(n0(m.FREE_TEXT,e))}return r}function n2(e){let t=function(e){let t;nZ.lastIndex=0;let r=[];do null!==(t=nZ.exec(e))&&r.push(t);while(t);return r}(e);if(!t.every(e=>n3(e)))return{type:f.DATE,tokens:n1(t,e)}}(P=m||(m={})).FORMAT="FORMAT",P.FREE_TEXT="FREE_TEXT",(D=f||(f={})).DATE="DATE",D.NUMBER="NUMBER",D.STRING="STRING";function n3(e){return e[0].startsWith("\\")}function n6(e,t){let r=`${e}`;for(;r.length<t;)r="0"+r;return r}function n4(e,t){return e.split(t).length-1}let n5="length",n9=e=>(e+"").replace(/\-/g,""),n7=e=>e.codePointAt(0)-65,n8={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."},oe=!1;var ot=y||(y={});ot.Number=class{constructor(e){var t;this.value=e,this.value=tO(this.value,0===(t=tI(this.value))?0:t)}},ot.String=class{constructor(e){this.value=e}},ot.Boolean=class{constructor(e){this.value=e}};class or{static getSingletonInstance(){return or.instance||(or.instance=new or),or.instance}}ot.Empty=or,ot.Formula=class{constructor(e){this.formula=e}},ot.Error=class{constructor(e,t){this.value=new rX(e,t)}};class on{constructor(e,t,r){this.config=e,this.dateHelper=t,this.numberLiteralsHelper=r}parse(e){if(null==e)return y.Empty.getSingletonInstance();if("number"==typeof e)if(np(e))return new y.Error(d.NUM,eq.ValueLarge);else return new y.Number(e);if("boolean"==typeof e)return new y.Boolean(e);if(e instanceof Date){let t=this.dateHelper.dateToNumber({day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()})+nX({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()+e.getMilliseconds()/1e3});return t<0?new y.Error(d.NUM,eq.DateBounds):new y.Number(t%1==0?new t_(t,"Date()"):t<1?new tH(t,"Date()"):new tL(t,"Date()"))}if("string"==typeof e){let r;if("true"===(r=e.toLowerCase())||"false"===r)return new y.Boolean("true"===e.toLowerCase());{var t;let r;if(e.startsWith("="))return new y.Formula(e);if(t=this.config.errorMapping,r=e.toUpperCase(),/#[A-Za-z0-9\/]+[?!]?/.test(r)&&Object.prototype.hasOwnProperty.call(t,r))return new y.Error(this.config.errorMapping[e.toUpperCase()]);let n,o=e.trim(),i=0;if(o.endsWith("%"))i=1,o=o.slice(0,o.length-1);else{let e=this.currencyMatcher(o);void 0!==e&&(i=2,[n,o]=e)}let s=this.numberLiteralsHelper.numericStringToMaybeNumber(o);if(void 0!==s){let e;return e=1===i?new tP(s/100):2===i?new tk(s,n):s,new y.Number(e)}let a=this.dateHelper.dateStringToDateNumber(o);return void 0!==a?new y.Number(a):new y.String(e.startsWith("'")?e.slice(1):e)}}else throw new rt(e)}currencyMatcher(e){for(let 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)]}}}(F=b||(b={}))[F.COPY=0]="COPY",F[F.CUT=1]="CUT",(B=C||(C={}))[B.VALUE=0]="VALUE",B[B.EMPTY=1]="EMPTY",B[B.FORMULA=2]="FORMULA",B[B.PARSING_ERROR=3]="PARSING_ERROR";class oo{constructor(e,t,r,n,o){this.sourceLeftCorner=e,this.width=t,this.height=r,this.type=n,this.content=o}*getContent(e){if(void 0!==this.content)for(let t=0;t<this.height;++t)for(let r=0;r<this.width;++r)yield[r1(e.sheet,e.col+r,e.row+t),this.content[t][r]]}}class oi{constructor(e,t,r){this.dependencyGraph=t,this.operations=r,this.maxRows=e.maxRows,this.maxColumns=e.maxColumns}cut(e,t,r){this.clipboard=new oo(e,t,r,b.CUT)}copy(e,t,r){let n=[];for(let o=0;o<r;++o){n[o]=[];for(let r=0;r<t;++r){let t=this.operations.getClipboardCell(r1(e.sheet,e.col+r,e.row+o));n[o].push(t)}}this.clipboard=new oo(e,t,r,b.COPY,n)}abortCut(){this.clipboard&&this.clipboard.type===b.CUT&&this.clear()}clear(){this.clipboard=void 0}ensureItIsPossibleToCopyPaste(e){if(void 0===this.clipboard)return;if(r2(e)||!this.dependencyGraph.sheetMapping.hasSheetWithId(e.sheet))throw new t2("a valid target address.");let t=ne.spanFrom(e,this.clipboard.width,this.clipboard.height);if(t.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new tJ;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw Error("It is not possible to paste onto an array")}isCutClipboard(){return void 0!==this.clipboard&&this.clipboard.type===b.CUT}isCopyClipboard(){return void 0!==this.clipboard&&this.clipboard.type===b.COPY}}class os{performEagerTransformations(e,t){for(let r of e.arrayFormulaNodes()){let[n,o]=this.transformSingleAst(r.getFormula(e.lazilyTransformingAstService),r.getAddress(e.lazilyTransformingAstService)),i=t.rememberNewAst(n);r.setFormula(i),r.setAddress(o)}}transformSingleAst(e,t){return[this.transformAst(e,t),this.fixNodeAddress(t)]}transformAst(e,t){switch(e.type){case o.CELL_REFERENCE:return this.transformCellReferenceAst(e,t);case o.CELL_RANGE:return this.transformCellRangeAst(e,t);case o.COLUMN_RANGE:return this.transformColumnRangeAst(e,t);case o.ROW_RANGE:return this.transformRowRangeAst(e,t);case o.EMPTY:case o.ERROR:case o.NUMBER:case o.NAMED_EXPRESSION:case o.ERROR_WITH_RAW_INPUT:case o.STRING:return e;case o.PERCENT_OP:case o.MINUS_UNARY_OP:case o.PLUS_UNARY_OP:return Object.assign(Object.assign({},e),{value:this.transformAst(e.value,t)});case o.FUNCTION_CALL:return Object.assign(Object.assign({},e),{procedureName:e.procedureName,args:e.args.map(e=>this.transformAst(e,t))});case o.PARENTHESIS:return Object.assign(Object.assign({},e),{expression:this.transformAst(e.expression,t)});case o.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){let r=this.transformCellAddress(e.reference,t);return r instanceof el?Object.assign(Object.assign({},e),{reference:r}):r===d.REF?eV(new rX(d.REF)):e}transformCellRangeAst(e,t){let r=this.transformCellRange(e.start,e.end,t);return Array.isArray(r)?Object.assign(Object.assign({},e),{start:r[0],end:r[1]}):r===d.REF?eV(new rX(d.REF)):e}transformColumnRangeAst(e,t){let r=this.transformColumnRange(e.start,e.end,t);return Array.isArray(r)?Object.assign(Object.assign({},e),{start:r[0],end:r[1]}):r===d.REF?eV(new rX(d.REF)):e}transformRowRangeAst(e,t){let r=this.transformRowRange(e.start,e.end,t);return Array.isArray(r)?Object.assign(Object.assign({},e),{start:r[0],end:r[1]}):r===d.REF?eV(new rX(d.REF)):e}}class oa extends os{constructor(e){super(),this.columnsSpan=e}get sheet(){return this.columnsSpan.sheet}isIrreversible(){return!1}transformRowRangeAst(e,t){return e}transformCellRange(e,t,r){return this.transformRange(e,t,r)}transformRowRange(e,t,r){throw Error("Not implemented")}transformColumnRange(e,t,r){return this.transformRange(e,t,r)}transformCellAddress(e,t){let r=r5(e,t);if(r!==this.columnsSpan.sheet&&t.sheet!==this.columnsSpan.sheet)return!1;let n=e.toSimpleColumnAddress(t);if(r===this.columnsSpan.sheet&&t.sheet!==this.columnsSpan.sheet)if(this.columnsSpan.columnStart<=n.col)return e.shiftedByColumns(this.columnsSpan.numberOfColumns);else return!1;if(t.sheet===this.columnsSpan.sheet&&r!==this.columnsSpan.sheet)return!e.isColumnAbsolute()&&!(t.col<this.columnsSpan.columnStart)&&e.shiftedByColumns(-this.columnsSpan.numberOfColumns);if(e.isColumnAbsolute())if(e.col<this.columnsSpan.columnStart)return!1;else return e.shiftedByColumns(this.columnsSpan.numberOfColumns);if(e.toSimpleColumnAddress(t).col<this.columnsSpan.columnStart)if(t.col<this.columnsSpan.columnStart)return!1;else return e.shiftedByColumns(-this.columnsSpan.numberOfColumns);return!!(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,r){let n=this.transformCellAddress(e,r),o=this.transformCellAddress(t,r);return n===d.REF||o===d.REF?d.REF:(!!n||!!o)&&[n||e,o||t]}}class ol extends os{constructor(e){super(),this.rowsSpan=e}get sheet(){return this.rowsSpan.sheet}isIrreversible(){return!1}transformColumnRangeAst(e,t){return e}transformCellRange(e,t,r){return this.transformRange(e,t,r)}transformRowRange(e,t,r){return this.transformRange(e,t,r)}transformColumnRange(e,t,r){throw Error("Not implemented")}transformCellAddress(e,t){let r=r5(e,t);if(r!==this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet)return!1;let n=e.toSimpleRowAddress(t);if(r===this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet)if(this.rowsSpan.rowStart<=n.row)return e.shiftedByRows(this.rowsSpan.numberOfRows);else return!1;if(t.sheet===this.rowsSpan.sheet&&r!==this.rowsSpan.sheet)return!e.isRowAbsolute()&&!(t.row<this.rowsSpan.rowStart)&&e.shiftedByRows(-this.rowsSpan.numberOfRows);if(e.isRowAbsolute())if(e.row<this.rowsSpan.rowStart)return!1;else return e.shiftedByRows(this.rowsSpan.numberOfRows);if(n.row<this.rowsSpan.rowStart)if(t.row<this.rowsSpan.rowStart)return!1;else return e.shiftedByRows(-this.rowsSpan.numberOfRows);return!!(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,r){let n=this.transformCellAddress(e,r),o=this.transformCellAddress(t,r);return n===d.REF||o===d.REF?d.REF:(!!n||!!o)&&[n||e,o||t]}}class oh extends os{constructor(e){super(),this.sheet=e}isIrreversible(){return!0}fixNodeAddress(e){return e}transformCellAddress(e,t){return!!e.isInvalid(t)&&d.REF}transformCellRange(e,t,r){return!!(e.isInvalid(r)||t.isInvalid(r))&&d.REF}transformColumnRange(e,t,r){return!!(e.isInvalid(r)||t.isInvalid(r))&&d.REF}transformRowRange(e,t,r){return!!(e.isInvalid(r)||t.isInvalid(r))&&d.REF}}class od extends os{constructor(e,t,r,n){super(),this.sourceRange=e,this.toRight=t,this.toBottom=r,this.toSheet=n,this.dependentFormulaTransformer=new ou(e,t,r,n)}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 r1(this.toSheet,e.col+this.toRight,e.row+this.toBottom)}transformCellAddress(e,t){return this.transformAddress(e,t)}transformCellRange(e,t,r){return this.transformRange(e,t,r)}transformColumnRange(e,t,r){return this.transformRange(e,t,r)}transformRowRange(e,t,r){return this.transformRange(e,t,r)}transformAddress(e,t){let r=this.sourceRange;if(e instanceof el){let n=e.toSimpleCellAddress(t);if(r.addressInRange(n))return e.shiftAbsoluteDimensions(this.toRight,this.toBottom)}return e.shiftRelativeDimensions(-this.toRight,-this.toBottom)}transformRange(e,t,r){let n=this.sourceRange;if(e instanceof el&&t instanceof el){let o=e.toSimpleCellAddress(r),i=t.toSimpleCellAddress(r);if(n.addressInRange(o)&&n.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 ou extends os{constructor(e,t,r,n){super(),this.sourceRange=e,this.toRight=t,this.toBottom=r,this.toSheet=n}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,r){return this.transformRange(e,t,r)}transformColumnRange(e,t,r){return this.transformRange(e,t,r)}transformRowRange(e,t,r){return this.transformRange(e,t,r)}shouldMove(e,t){return e instanceof el?this.sourceRange.addressInRange(e.toSimpleCellAddress(t)):e instanceof ea?this.sourceRange.rowInRange(e.toSimpleRowAddress(t))&&!this.sourceRange.isFinite():this.sourceRange.columnInRange(e.toSimpleColumnAddress(t))&&!this.sourceRange.isFinite()}transformRange(e,t,r){let n=this.transformCellAddress(e,r),o=this.transformCellAddress(t,r);return!!n&&!!o&&[n,o]}}class oc extends os{constructor(e){super(),this.columnsSpan=e}get sheet(){return this.columnsSpan.sheet}isIrreversible(){return!0}transformRowRangeAst(e,t){return e}transformCellRange(e,t,r){return this.transformRange(e,t,r)}transformRowRange(e,t,r){throw Error("Not implemented")}transformColumnRange(e,t,r){return this.transformRange(e,t,r)}transformCellAddress(e,t){let r=r5(e,t);if(this.columnsSpan.sheet!==t.sheet&&this.columnsSpan.sheet!==r)return!1;if(this.columnsSpan.sheet!==t.sheet&&this.columnsSpan.sheet===r){let r=e.toSimpleColumnAddress(t);if(r.col<this.columnsSpan.columnStart)return!1;if(r.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns)}if(this.columnsSpan.sheet===t.sheet&&this.columnsSpan.sheet!==r){if(e.isColumnAbsolute())return!1;else if(t.col<this.columnsSpan.columnStart)return!1;else if(t.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(this.columnsSpan.numberOfColumns)}if(this.columnsSpan.sheet===t.sheet&&this.columnsSpan.sheet===r)if(e.isColumnAbsolute()){if(e.col<this.columnsSpan.columnStart)return!1;else if(e.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns)}else{let r=e.toSimpleColumnAddress(t);if(r.col<this.columnsSpan.columnStart){if(t.col<this.columnsSpan.columnStart)return!1;else if(t.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(this.columnsSpan.numberOfColumns)}else if(r.col>this.columnsSpan.columnEnd){if(t.col<this.columnsSpan.columnStart)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns);else if(t.col>this.columnsSpan.columnEnd)return!1}}return d.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,r){let n=r5(e,r),o=e,i=t;if(this.columnsSpan.sheet===n){let n=e.toSimpleColumnAddress(r),s=t.toSimpleColumnAddress(r);if(this.columnsSpan.columnStart<=n.col&&this.columnsSpan.columnEnd>=s.col)return d.REF;n.col>=this.columnsSpan.columnStart&&n.col<=this.columnsSpan.columnEnd&&(o=e.shiftedByColumns(this.columnsSpan.columnEnd-n.col+1)),s.col>=this.columnsSpan.columnStart&&s.col<=this.columnsSpan.columnEnd&&(i=t.shiftedByColumns(-(s.col-this.columnsSpan.columnStart+1)))}let s=this.transformCellAddress(o,r),a=this.transformCellAddress(i,r);if(!1===s&&!1===a)return[o,i];if(s!==d.REF&&a!==d.REF)return[s||o,a||i];throw Error("Cannot happen")}}class og extends os{constructor(e){super(),this.rowsSpan=e}get sheet(){return this.rowsSpan.sheet}isIrreversible(){return!0}transformColumnRangeAst(e,t){return e}transformCellAddress(e,t){let r=r5(e,t);if(this.rowsSpan.sheet!==t.sheet&&this.rowsSpan.sheet!==r)return!1;if(this.rowsSpan.sheet!==t.sheet&&this.rowsSpan.sheet===r){let r=e.toSimpleRowAddress(t);if(r.row<this.rowsSpan.rowStart)return!1;if(r.row>this.rowsSpan.rowEnd)return e.shiftedByRows(-this.rowsSpan.numberOfRows)}if(this.rowsSpan.sheet===t.sheet&&this.rowsSpan.sheet!==r){if(e.isRowAbsolute())return!1;else if(t.row<this.rowsSpan.rowStart)return!1;else if(t.row>this.rowsSpan.rowEnd)return e.shiftedByRows(this.rowsSpan.numberOfRows)}if(this.rowsSpan.sheet===t.sheet&&this.rowsSpan.sheet===r)if(e.isRowAbsolute()){if(e.row<this.rowsSpan.rowStart)return!1;else if(e.row>this.rowsSpan.rowEnd)return e.shiftedByRows(-this.rowsSpan.numberOfRows)}else{let r=e.toSimpleRowAddress(t);if(r.row<this.rowsSpan.rowStart){if(t.row<this.rowsSpan.rowStart)return!1;else if(t.row>this.rowsSpan.rowEnd)return e.shiftedByRows(this.rowsSpan.numberOfRows)}else if(r.row>this.rowsSpan.rowEnd){if(t.row<this.rowsSpan.rowStart)return e.shiftedByRows(-this.rowsSpan.numberOfRows);else if(t.row>this.rowsSpan.rowEnd)return!1}}return d.REF}transformCellRange(e,t,r){return this.transformRange(e,t,r)}transformRowRange(e,t,r){return this.transformRange(e,t,r)}transformColumnRange(e,t,r){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,r){let n=r5(e,r),o=e,i=t;if(this.rowsSpan.sheet===n){let n=e.toSimpleRowAddress(r),s=t.toSimpleRowAddress(r);if(this.rowsSpan.rowStart<=n.row&&this.rowsSpan.rowEnd>=s.row)return d.REF;n.row>=this.rowsSpan.rowStart&&n.row<=this.rowsSpan.rowEnd&&(o=e.shiftedByRows(this.rowsSpan.rowEnd-n.row+1)),s.row>=this.rowsSpan.rowStart&&s.row<=this.rowsSpan.rowEnd&&(i=t.shiftedByRows(-(s.row-this.rowsSpan.rowStart+1)))}let s=this.transformCellAddress(o,r),a=this.transformCellAddress(i,r);return!1===s&&!1===a?[o,i]:s===d.REF||a===d.REF?d.REF:[s||o,a||i]}}class op extends os{constructor(e,t){super(),this.sheetIdToKeep=e,this.sheetBeingMerged=t}get sheet(){return this.sheetIdToKeep}isIrreversible(){return!0}transformCellAddress(e,t){return this.updateSheetInAddress(e)}transformCellRange(e,t,r){return this.transformRange(e,t)}transformColumnRange(e,t,r){return this.transformRange(e,t)}transformRowRange(e,t,r){return this.transformRange(e,t)}fixNodeAddress(e){return e}transformRange(e,t){let r=this.updateSheetInAddress(e),n=this.updateSheetInAddress(t);return(!!r||!!n)&&[r||e,n||t]}updateSheetInAddress(e){return e.sheet===this.sheetBeingMerged&&e.withSheet(this.sheetIdToKeep)}}class om{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return ow(this.indexes)}rowsSpans(){return this.normalizedIndexes().map(e=>tY.fromNumberOfRows(this.sheet,e[0],e[1]))}}class of{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return oS(this.indexes)}rowsSpans(){return this.normalizedIndexes().map(e=>tY.fromNumberOfRows(this.sheet,e[0],e[1]))}}class oy{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return oS(this.indexes)}columnsSpans(){return this.normalizedIndexes().map(e=>tj.fromNumberOfColumns(this.sheet,e[0],e[1]))}}class ob{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return ow(this.indexes)}columnsSpans(){return this.normalizedIndexes().map(e=>tj.fromNumberOfColumns(this.sheet,e[0],e[1]))}}class oC{constructor(e,t,r,n,o,i,s,a,l){this.dependencyGraph=t,this.columnSearch=r,this.cellContentParser=n,this.parser=o,this.stats=i,this.lazilyTransformingAstService=s,this.namedExpressions=a,this.arraySizePredictor=l,this.changes=tV.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){let t=[];for(let r of e.rowsSpans()){let e=this.doRemoveRows(r);e&&t.push(e)}return t}addRows(e){for(let t of e.rowsSpans())this.doAddRows(t)}addColumns(e){for(let t of e.columnsSpans())this.doAddColumns(t)}removeColumns(e){let t=[];for(let r of e.columnsSpans()){let e=this.doRemoveColumns(r);e&&t.push(e)}return t}clearSheet(e){this.dependencyGraph.clearSheet(e),this.columnSearch.removeSheet(e)}addSheet(e){let t=this.sheetMapping.addSheet(e);return this.dependencyGraph.addSheet(t),{sheetName:this.sheetMapping.getSheetNameOrThrowError(t),sheetId:t}}addSheetWithId(e,t){this.sheetMapping.addSheetWithId(e,t),this.dependencyGraph.addSheet(e)}addPlaceholderSheetWithId(e,t){this.sheetMapping.addPlaceholderWithId(e,t),this.addressMapping.addSheetStrategyPlaceholderIfNotExists(e)}removeSheet(e){return this.dependencyGraph.removeSheet(e),this.columnSearch.removeSheet(e),this.namedExpressions.getAllNamedExpressionsForScope(e).map(t=>this.removeNamedExpression(t.normalizeExpressionName(),e))}removeSheetByName(e){let t=this.sheetMapping.getSheetIdOrThrowError(e);return this.removeSheet(t)}renameSheet(e,t){let r,{previousDisplayName:n,mergedWithPlaceholderSheet:o}=this.sheetMapping.renameSheet(e,t);return void 0!==o&&(this.dependencyGraph.mergeSheets(e,o),this.stats.measure(a.TRANSFORM_ASTS,()=>{let t=new op(e,o);t.performEagerTransformations(this.dependencyGraph,this.parser),r=this.lazilyTransformingAstService.addTransformation(t)})),{previousDisplayName:n,version:r,mergedPlaceholderSheetId:o}}moveRows(e,t,r,n){let o=tY.fromNumberOfRows(e,n,r);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddRows(o),n<t&&(t+=r);let i=r1(e,0,t),s=r1(e,0,n);this.moveCells(i,1/0,r,s);let a=tY.fromNumberOfRows(e,t,r);return this.doRemoveRows(a),this.lazilyTransformingAstService.commitCombinedMode()}moveColumns(e,t,r,n){let o=tj.fromNumberOfColumns(e,n,r);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddColumns(o),n<t&&(t+=r);let i=r1(e,t,0),s=r1(e,n,0);this.moveCells(i,r,1/0,s);let a=tj.fromNumberOfColumns(e,t,r);return this.doRemoveColumns(a),this.lazilyTransformingAstService.commitCombinedMode()}moveCells(e,t,r,n){this.ensureItIsPossibleToMoveCells(e,t,r,n);let o=ne.spanFrom(e,t,r),i=ne.spanFrom(n,t,r),s=n.col-e.col,l=n.row-e.row,h=n.sheet,d=this.getRangeClipboardCells(i),u=this.dependencyGraph.rawValuesFromRange(i);this.columnSearch.removeValues(u);let c=this.dependencyGraph.rawValuesFromRange(o);this.columnSearch.moveValues(c,s,l,h);let g=0;this.stats.measure(a.TRANSFORM_ASTS,()=>{let e=new od(o,s,l,h);e.performEagerTransformations(this.dependencyGraph,this.parser),g=this.lazilyTransformingAstService.addTransformation(e)}),this.dependencyGraph.moveCells(o,s,l,h);let p=this.updateNamedExpressionsForMovedCells(e,t,r,n);return{version:g,overwrittenCellsData:d,addedGlobalNamedExpressions:p}}setRowOrder(e,t){let r=[],n=[];for(let[o,i]of t)if(o!==i){let t=ne.spanFrom({sheet:e,col:0,row:o},1/0,1),s=this.getRangeClipboardCells(t);n=n.concat(s),r.push(s.map(([{sheet:e,col:t},r])=>[{sheet:e,col:t,row:i},r]))}return r.forEach(t=>this.restoreClipboardCells(e,t.values())),n}setColumnOrder(e,t){let r=[],n=[];for(let[o,i]of t)if(o!==i){let t=ne.spanFrom({sheet:e,col:o,row:0},1,1/0),s=this.getRangeClipboardCells(t);n=n.concat(s),r.push(s.map(([{sheet:e,col:t,row:r},n])=>[{sheet:e,col:i,row:r},n]))}return r.forEach(t=>this.restoreClipboardCells(e,t.values())),n}addNamedExpression(e,t,r,n){let o=this.namedExpressions.addNamedExpression(e,r,n);this.storeNamedExpressionInCell(o.address,t),this.adjustNamedExpressionEdges(o,e,r)}restoreNamedExpression(e,t,r){let n=e.displayName;this.restoreCell(e.address,t);let o=this.namedExpressions.restoreNamedExpression(e,r);this.adjustNamedExpressionEdges(o,n,r)}changeNamedExpressionExpression(e,t,r,n){let o=this.namedExpressions.namedExpressionForScope(e,r);if(!o)throw new t5(e);let i=o.copy();o.options=n;let s=this.getClipboardCell(o.address);return this.storeNamedExpressionInCell(o.address,t),[i,s]}removeNamedExpression(e,t){let r=this.namedExpressions.namedExpressionForScope(e,t);if(!r)throw new t5(e);this.namedExpressions.remove(r.displayName,t);let n=this.getClipboardCell(r.address);if(void 0!==t){let t=this.namedExpressions.workbookNamedExpressionOrPlaceholder(e);this.dependencyGraph.exchangeNode(r.address,t.address)}else this.dependencyGraph.setCellEmpty(r.address);return[r,n]}ensureItIsPossibleToMoveCells(e,t,r,n){var o,i,s;if(r2(e)||!(ov(t)&&ov(r)||(o=e,i=t,s=r,0===o.row&&ov(i)&&s===1/0||0===o.col&&ov(s)&&i===1/0))||r2(n)||!this.sheetMapping.hasSheetWithId(e.sheet)||!this.sheetMapping.hasSheetWithId(n.sheet))throw new t2("a valid range of cells to move.");let a=ne.spanFrom(e,t,r),l=ne.spanFrom(n,t,r);if(l.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new tJ;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new rp;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(l))throw new rm}restoreClipboardCells(e,t){let r=[];for(let[n,o]of t)if(this.restoreCell(n,o),o.type===C.FORMULA){let{dependencies:t}=this.parser.fetchCachedResult(o.hash);r.push(...this.updateNamedExpressionsForTargetAddress(e,n,t))}return r}restoreCell(e,t){switch(t.type){case C.VALUE:this.setValueToCell(t,e);break;case C.FORMULA:this.setFormulaToCellFromCache(t.hash,e);break;case C.EMPTY:this.setCellEmpty(e);break;case C.PARSING_ERROR:this.setParsingErrorToCell(t.rawInput,t.errors,e)}}getOldContent(e){let t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof rU)return[e,{type:C.EMPTY}];if(t instanceof rz)return[e,Object.assign({type:C.VALUE},t.getValues())];if(t instanceof rT)return[t.getAddress(this.lazilyTransformingAstService),{type:C.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))}];if(t instanceof rW)return[e,{type:C.PARSING_ERROR,rawInput:t.rawInput,errors:t.errors}];throw Error("Trying to copy unsupported type")}getClipboardCell(e){let t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof rU)return{type:C.EMPTY};if(t instanceof rz)return Object.assign({type:C.VALUE},t.getValues());if(t instanceof rA){let r=t.getArrayCellValue(e);return r===tN?{type:C.EMPTY}:{type:C.VALUE,parsedValue:r,rawValue:t.getArrayCellRawValue(e)}}if(t instanceof rM)return{type:C.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))};if(t instanceof rW)return{type:C.PARSING_ERROR,rawInput:t.rawInput,errors:t.errors};throw Error("Trying to copy unsupported type")}getSheetClipboardCells(e){let t=this.dependencyGraph.getSheetHeight(e),r=this.dependencyGraph.getSheetWidth(e),n=Array(t);for(let o=0;o<t;o++){n[o]=Array(r);for(let t=0;t<r;t++){let r=r1(e,t,o);n[o][t]=this.getClipboardCell(r)}}return n}getRangeClipboardCells(e){let t=[];for(let r of e.addresses(this.dependencyGraph))t.push([r,this.getClipboardCell(r)]);return t}setCellContent(e,t){let r=this.cellContentParser.parse(t),o=this.getOldContent(e);if(r instanceof y.Formula){let t=this.parser.parse(r.formula,e),{ast:o,errors:i}=t;if(i.length>0)this.setParsingErrorToCell(r.formula,i,e);else try{let r=this.arraySizePredictor.checkArraySize(o,e);if(r.width<=0||r.height<=0)throw Error("Incorrect array size");this.setFormulaToCell(e,r,t)}catch(o){if(!o.message)throw o;let t={type:n.InvalidRangeSize,message:"Invalid range size."};this.setParsingErrorToCell(r.formula,[t],e)}}else r instanceof y.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:r.value,rawValue:t},e);return o}setSheetContent(e,t){this.clearSheet(e);for(let r=0;r<t.length;r++)for(let n=0;n<t[r].length;n++){let o=r1(e,n,r);this.setCellContent(o,t[r][n])}}setParsingErrorToCell(e,t,r){this.removeCellValueFromColumnSearch(r);let n=new rW(t,e),o=this.dependencyGraph.setParsingErrorToCell(r,n);this.columnSearch.applyChanges(o.getChanges()),this.changes.addAll(o),this.changes.addChange(n.getCellValue(),r)}setFormulaToCell(e,t,{ast:r,hasVolatileFunction:n,hasStructuralChangeFunction:o,dependencies:i}){this.removeCellValueFromColumnSearch(e);let s=this.dependencyGraph.setFormulaToCell(e,r,tM(i,e),t,n,o);this.columnSearch.applyChanges(s.getChanges()),this.changes.addAll(s)}setValueToCell(e,t){this.changeCellValueInColumnSearch(t,e.parsedValue);let r=this.dependencyGraph.setValueToCell(t,e);this.columnSearch.applyChanges(r.getChanges().filter(e=>!r9(e.address,t))),this.changes.addAll(r),this.changes.addChange(e.parsedValue,t)}setCellEmpty(e){if(this.dependencyGraph.isArrayInternalCell(e))return;this.removeCellValueFromColumnSearch(e);let t=this.dependencyGraph.setCellEmpty(e);this.columnSearch.applyChanges(t.getChanges()),this.changes.addAll(t),this.changes.addChange(tN,e)}setFormulaToCellFromCache(e,t){let{ast:r,hasVolatileFunction:n,hasStructuralChangeFunction:o,dependencies:i}=this.parser.fetchCachedResult(e),s=tM(i,t),[a]=new oh(t.sheet).transformSingleAst(r,t);this.parser.rememberNewAst(a);let l=s.filter(e=>e instanceof tA||(e instanceof ne?!(r2(e.start)||r2(e.end)):!r2(e))),h=this.arraySizePredictor.checkArraySize(r,t);this.dependencyGraph.setFormulaToCell(t,a,l,h,n,o)}rowEffectivelyNotInSheet(e,t){return e>=this.dependencyGraph.addressMapping.getSheetHeight(t)}getAndClearContentChanges(){let e=this.changes;return this.changes=tV.empty(),e}forceApplyPostponedTransformations(){this.dependencyGraph.forceApplyPostponedTransformations()}doRemoveRows(e){if(this.rowEffectivelyNotInSheet(e.rowStart,e.sheet))return;let t=[];for(let[r]of this.dependencyGraph.entriesFromRowsSpan(e))t.push({address:r,cellType:this.getClipboardCell(r)});let{affectedArrays:r,contentChanges:n}=this.dependencyGraph.removeRows(e);this.columnSearch.applyChanges(n.getChanges());let o=0;return this.stats.measure(a.TRANSFORM_ASTS,()=>{let t=new og(e);t.performEagerTransformations(this.dependencyGraph,this.parser),o=this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(r),{version:o,removedCells:t,rowFrom:e.rowStart,rowCount:e.numberOfRows}}doRemoveColumns(e){if(this.columnEffectivelyNotInSheet(e.columnStart,e.sheet))return;let t=[];for(let[r]of this.dependencyGraph.entriesFromColumnsSpan(e))t.push({address:r,cellType:this.getClipboardCell(r)});let{affectedArrays:r,contentChanges:n}=this.dependencyGraph.removeColumns(e);this.columnSearch.applyChanges(n.getChanges()),this.columnSearch.removeColumns(e);let o=0;return this.stats.measure(a.TRANSFORM_ASTS,()=>{let t=new oc(e);t.performEagerTransformations(this.dependencyGraph,this.parser),o=this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(r),{version:o,removedCells:t,columnFrom:e.columnStart,columnCount:e.numberOfColumns}}doAddRows(e){if(this.rowEffectivelyNotInSheet(e.rowStart,e.sheet))return;let{affectedArrays:t}=this.dependencyGraph.addRows(e);this.stats.measure(a.TRANSFORM_ASTS,()=>{let t=new ol(e);t.performEagerTransformations(this.dependencyGraph,this.parser),this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(t)}rewriteAffectedArrays(e){for(let t of e.values()){if(t.array.size.isRef)continue;let e=t.getFormula(this.lazilyTransformingAstService),r=t.getAddress(this.lazilyTransformingAstService),n=this.parser.computeHashFromAst(e);this.setFormulaToCellFromCache(n,r)}}doAddColumns(e){if(this.columnEffectivelyNotInSheet(e.columnStart,e.sheet))return;let{affectedArrays:t,contentChanges:r}=this.dependencyGraph.addColumns(e);this.columnSearch.addColumns(e),this.columnSearch.applyChanges(r.getChanges()),this.stats.measure(a.TRANSFORM_ASTS,()=>{let t=new oa(e);t.performEagerTransformations(this.dependencyGraph,this.parser),this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(t)}columnEffectivelyNotInSheet(e,t){return e>=this.dependencyGraph.addressMapping.getSheetWidth(t)}adjustNamedExpressionEdges(e,t,r){if(void 0===r)return;let{vertex:n,id:o}=this.dependencyGraph.fetchCellOrCreateEmpty(e.address),i=null!=o?o:n.idInGraph,s=this.namedExpressions.workbookNamedExpressionOrPlaceholder(t),{vertex:a,id:l}=this.dependencyGraph.fetchCellOrCreateEmpty(s.address),h=null!=l?l:a.idInGraph;for(let t of this.dependencyGraph.graph.adjacentNodes(a))if(t instanceof rM&&t.getAddress(this.lazilyTransformingAstService).sheet===r){let r=t.getFormula(this.lazilyTransformingAstService),n=t.getAddress(this.lazilyTransformingAstService),{dependencies:o}=this.parser.fetchCachedResultForAst(r);for(let r of tM(o,n))r instanceof tA&&r.name.toLowerCase()===e.displayName.toLowerCase()&&(this.dependencyGraph.graph.removeEdgeIfExists(h,t),this.dependencyGraph.graph.addEdge(i,t))}}storeNamedExpressionInCell(e,t){let r=this.cellContentParser.parse(t);if(r instanceof y.Formula){let t=this.parser.parse(r.formula,r1(-1,0,0));if(t$(t.ast))throw new rf;let{ast:n,hasVolatileFunction:o,hasStructuralChangeFunction:i,dependencies:s}=t;this.dependencyGraph.setFormulaToCell(e,n,tM(s,e),nE.scalar(),o,i)}else r instanceof y.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:r.value,rawValue:t},e)}updateNamedExpressionsForMovedCells(e,t,r,n){if(e.sheet===n.sheet)return[];let o=[];for(let i of ne.spanFrom(n,t,r).addresses(this.dependencyGraph)){let t=this.addressMapping.getCell(i,{throwIfCellNotExists:!0});if(t instanceof rM&&i.sheet!==e.sheet){let r=t.getFormula(this.lazilyTransformingAstService),{dependencies:n}=this.parser.fetchCachedResultForAst(r);o.push(...this.updateNamedExpressionsForTargetAddress(e.sheet,i,n))}}return o}updateNamedExpressionsForTargetAddress(e,t,r){if(e===t.sheet)return[];let n=[],o=this.addressMapping.getCellOrThrow(t);for(let i of tM(r,t)){if(!(i instanceof tA))continue;let r=i.name,s=this.dependencyGraph.fetchNamedExpressionVertex(r,e).vertex,a=this.namedExpressions.isExpressionInScope(r,t.sheet)?this.dependencyGraph.fetchNamedExpressionVertex(r,t.sheet).vertex:this.copyOrFetchGlobalNamedExpressionVertex(r,s,n);a!==s&&(this.dependencyGraph.graph.removeEdgeIfExists(s,o),this.dependencyGraph.graph.addEdge(a,o))}return n}allocateNamedExpressionAddressSpace(){this.dependencyGraph.addressMapping.addSheetWithStrategy(tG.SHEET_FOR_WORKBOOK_EXPRESSIONS,new rG(0,0))}copyOrFetchGlobalNamedExpressionVertex(e,t,r){let n=this.namedExpressions.namedExpressionForScope(e);if(void 0===n)if(n=this.namedExpressions.addNamedExpression(e),r.push(n.normalizeExpressionName()),t instanceof rM){let{ast:e,hasVolatileFunction:r,hasStructuralChangeFunction:o,dependencies:i}=this.parser.fetchCachedResultForAst(t.getFormula(this.lazilyTransformingAstService));this.dependencyGraph.setFormulaToCell(n.address,e,tM(i,n.address),nE.scalar(),r,o)}else t instanceof rU?this.setCellEmpty(n.address):t instanceof rz&&this.setValueToCell(t.getValues(),n.address);return this.dependencyGraph.fetchCellOrCreateEmpty(n.address).vertex}removeCellValueFromColumnSearch(e){if(this.isNotComputed(e))return;let t=this.dependencyGraph.getCellValue(e);this.columnSearch.remove(tI(t),e)}changeCellValueInColumnSearch(e,t){if(this.isNotComputed(e))return;let r=this.dependencyGraph.getCellValue(e);this.columnSearch.change(tI(r),tI(t),e)}isNotComputed(e){let t=this.dependencyGraph.getCell(e);return!!t&&t instanceof rT&&!t.isComputed()}}function ow(e){if(e.length<=1)return e;let t=[...e].sort(([e],[t])=>e-t),r=t.reduce((e,[t,r])=>{let n=e[e.length-1],o=n[0]+n[1];return t<=o?n[1]+=Math.max(0,r-(o-t)):e.push([t,r]),e},[t[0]]),n=0;for(let e=0;e<r.length;++e)r[e][0]-=n,n+=r[e][1];return r}function oS(e){if(e.length<=1)return e;let t=[...e].sort(([e],[t])=>e-t),r=t.reduce((e,[t,r])=>{let n=e[e.length-1];return t===n[0]?n[1]=Math.max(n[1],r):e.push([t,r]),e},[t[0]]),n=0;for(let e=0;e<r.length;++e)r[e][0]+=n,n+=r[e][1];return r}function ov(e){return Number.isInteger(e)&&e>0}class oR{}class oE extends oR{constructor(e,t){super(),this.command=e,this.rowsRemovals=t}doUndo(e){e.undoRemoveRows(this)}doRedo(e){e.redoRemoveRows(this)}}class oT extends oR{constructor(e,t,r,n,o,i,s){super(),this.sourceLeftCorner=e,this.width=t,this.height=r,this.destinationLeftCorner=n,this.overwrittenCellsData=o,this.addedGlobalNamedExpressions=i,this.version=s}doUndo(e){e.undoMoveCells(this)}doRedo(e){e.redoMoveCells(this)}}class oA extends oR{constructor(e){super(),this.command=e}doUndo(e){e.undoAddRows(this)}doRedo(e){e.redoAddRows(this)}}class oM extends oR{constructor(e,t,r){super(),this.sheetId=e,this.rowMapping=t,this.oldContent=r}doUndo(e){e.undoSetRowOrder(this)}doRedo(e){e.redoSetRowOrder(this)}}class oN extends oR{constructor(e,t,r){super(),this.sheetId=e,this.columnMapping=t,this.oldContent=r}doUndo(e){e.undoSetColumnOrder(this)}doRedo(e){e.redoSetColumnOrder(this)}}class oI extends oR{constructor(e,t,r){super(),this.sheetId=e,this.oldSheetContent=t,this.newSheetContent=r}doUndo(e){e.undoSetSheetContent(this)}doRedo(e){e.redoSetSheetContent(this)}}class ox extends oR{constructor(e,t,r,n,o){super(),this.sheet=e,this.startRow=t,this.numberOfRows=r,this.targetRow=n,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 oO extends oR{constructor(e,t,r,n,o){super(),this.sheet=e,this.startColumn=t,this.numberOfColumns=r,this.targetColumn=n,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 o_ extends oR{constructor(e){super(),this.command=e}doUndo(e){e.undoAddColumns(this)}doRedo(e){e.redoAddColumns(this)}}class ok extends oR{constructor(e,t){super(),this.command=e,this.columnsRemovals=t}doUndo(e){e.undoRemoveColumns(this)}doRedo(e){e.redoRemoveColumns(this)}}class oH extends oR{constructor(e,t){super(),this.sheetName=e,this.sheetId=t}doUndo(e){e.undoAddSheet(this)}doRedo(e){e.redoAddSheet(this)}}class oL extends oR{constructor(e,t,r,n){super(),this.sheetName=e,this.sheetId=t,this.oldSheetContent=r,this.scopedNamedExpressions=n}doUndo(e){e.undoRemoveSheet(this)}doRedo(e){e.redoRemoveSheet(this)}}class oP extends oR{constructor(e,t,r,n,o){super(),this.sheetId=e,this.oldName=t,this.newName=r,this.version=n,this.mergedPlaceholderSheetId=o}doUndo(e){e.undoRenameSheet(this)}doRedo(e){e.redoRenameSheet(this)}}class oD extends oR{constructor(e,t){super(),this.sheetId=e,this.oldSheetContent=t}doUndo(e){e.undoClearSheet(this)}doRedo(e){e.redoClearSheet(this)}}class oF extends oR{constructor(e){super(),this.cellContents=e}doUndo(e){e.undoSetCellContents(this)}doRedo(e){e.redoSetCellContents(this)}}class oB extends oR{constructor(e,t,r,n){super(),this.targetLeftCorner=e,this.oldContent=t,this.newContent=r,this.addedGlobalNamedExpressions=n}doUndo(e){e.undoPaste(this)}doRedo(e){e.redoPaste(this)}}class oV extends oR{constructor(e,t,r,n){super(),this.name=e,this.newContent=t,this.scope=r,this.options=n}doUndo(e){e.undoAddNamedExpression(this)}doRedo(e){e.redoAddNamedExpression(this)}}class oU extends oR{constructor(e,t,r){super(),this.namedExpression=e,this.content=t,this.scope=r}doUndo(e){e.undoRemoveNamedExpression(this)}doRedo(e){e.redoRemoveNamedExpression(this)}}class oz extends oR{constructor(e,t,r,n,o){super(),this.namedExpression=e,this.newContent=t,this.oldContent=r,this.scope=n,this.options=o}doUndo(e){e.undoChangeNamedExpression(this)}doRedo(e){e.redoChangeNamedExpression(this)}}class oW extends oR{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 oG{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 oW}commitBatchMode(){if(void 0===this.batchUndoEntry)throw Error("Batch mode wasn't started");this.addUndoEntry(this.batchUndoEntry),this.batchUndoEntry=void 0}storeDataForVersion(e,t,r){this.oldData.has(e)||this.oldData.set(e,[]),this.oldData.get(e).push([t,r])}clearRedoStack(){this.redoStack=[]}clearUndoStack(){this.undoStack=[]}isUndoStackEmpty(){return 0===this.undoStack.length}isRedoStackEmpty(){return 0===this.redoStack.length}undo(){let 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(let t of e.reversedOperations())this.undoEntry(t)}undoRemoveRows(e){this.operations.forceApplyPostponedTransformations();let{command:{sheet:t},rowsRemovals:r}=e;for(let e=r.length-1;e>=0;--e){let n=r[e];for(let{address:e,cellType:r}of(this.operations.addRows(new of(t,[[n.rowFrom,n.rowCount]])),n.removedCells))this.operations.restoreCell(e,r);this.restoreOldDataFromVersion(n.version-1)}}undoRemoveColumns(e){this.operations.forceApplyPostponedTransformations();let{command:{sheet:t},columnsRemovals:r}=e;for(let e=r.length-1;e>=0;--e){let n=r[e];for(let{address:e,cellType:r}of(this.operations.addColumns(new oy(t,[[n.columnFrom,n.columnCount]])),n.removedCells))this.operations.restoreCell(e,r);this.restoreOldDataFromVersion(n.version-1)}}undoAddRows(e){let t=e.command.rowsSpans();for(let r=t.length-1;r>=0;--r){let n=t[r];this.operations.removeRows(new om(e.command.sheet,[[n.rowStart,n.numberOfRows]]))}}undoAddColumns(e){let t=e.command.columnsSpans();for(let r=t.length-1;r>=0;--r){let n=t[r];this.operations.removeColumns(new ob(e.command.sheet,[[n.columnStart,n.numberOfColumns]]))}}undoSetCellContents(e){for(let t of e.cellContents){let e=t.address,[r,n]=t.oldContent;r9(e,r)||this.operations.setCellEmpty(e),this.operations.restoreCell(r,n)}}undoPaste(e){for(let t of(this.restoreOperationOldContent(e.oldContent),e.addedGlobalNamedExpressions))this.operations.removeNamedExpression(t)}undoMoveRows(e){let{sheet:t}=e;this.operations.moveRows(t,e.undoStart,e.numberOfRows,e.undoEnd),this.restoreOldDataFromVersion(e.version-1)}undoMoveColumns(e){let{sheet:t}=e;this.operations.moveColumns(t,e.undoStart,e.numberOfColumns,e.undoEnd),this.restoreOldDataFromVersion(e.version-1)}undoMoveCells(e){for(let t of(this.operations.forceApplyPostponedTransformations(),this.operations.moveCells(e.destinationLeftCorner,e.width,e.height,e.sourceLeftCorner),this.restoreOperationOldContent(e.overwrittenCellsData),this.restoreOldDataFromVersion(e.version-1),e.addedGlobalNamedExpressions))this.operations.removeNamedExpression(t)}undoAddSheet(e){let{sheetName:t}=e;this.operations.removeSheetByName(t)}undoRemoveSheet(e){this.operations.forceApplyPostponedTransformations();let{oldSheetContent:t,sheetId:r,scopedNamedExpressions:n,sheetName:o}=e;this.operations.addSheetWithId(r,o);for(let e=0;e<t.length;e++){let n=t[e];for(let t=0;t<n.length;t++){let o=n[t],i=r1(r,t,e);this.operations.restoreCell(i,o)}}for(let[e,t]of n)this.operations.restoreNamedExpression(e,t,r)}undoRenameSheet(e){this.operations.forceApplyPostponedTransformations(),this.operations.renameSheet(e.sheetId,e.oldName),void 0!==e.mergedPlaceholderSheetId&&void 0!==e.version&&(this.operations.addPlaceholderSheetWithId(e.mergedPlaceholderSheetId,e.newName),this.restoreOldDataFromVersion(e.version-1))}undoClearSheet(e){let{oldSheetContent:t,sheetId:r}=e;for(let e=0;e<t.length;e++){let n=t[e];for(let t=0;t<n.length;t++){let o=n[t],i=r1(r,t,e);this.operations.restoreCell(i,o)}}}undoSetSheetContent(e){let{oldSheetContent:t,sheetId:r}=e;this.operations.clearSheet(r);for(let e=0;e<t.length;e++){let n=t[e];for(let t=0;t<n.length;t++){let o=n[t],i=r1(r,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(){let 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(let 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){let{targetLeftCorner:t,newContent:r}=e,n=r.length,o=r[0].length;for(let e=0;e<n;++e)for(let n=0;n<o;++n){let o=r1(t.sheet,t.col+n,t.row+e);this.operations.restoreCell(o,r[e][n])}}redoSetCellContents(e){for(let 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.addSheetWithId(e.sheetId,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){let{sheetId:t,newSheetContent:r}=e;this.operations.setSheetContent(t,r)}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(let[t,r]of e)this.operations.restoreCell(t,r)}redoEntry(e){e.doRedo(this)}restoreOldDataFromVersion(e){for(let t of this.oldData.get(e)||[]){let[e,r]=t;this.operations.setFormulaToCellFromCache(r,e)}}}class o${constructor(e,t,r,n,o,i,s,a,l,h){this.operations=t,this.undoRedo=r,this.clipboardOperations=n,this.dependencyGraph=o,this.columnSearch=i,this.parser=s,this.cellContentParser=a,this.lazilyTransformingAstService=l,this.namedExpressions=h,this.maxRows=e.maxRows,this.maxColumns=e.maxColumns}get sheetMapping(){return this.dependencyGraph.sheetMapping}addRows(e,...t){let r=new of(e,t);this.ensureItIsPossibleToAddRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addRows(r),this.undoRedo.saveOperation(new oA(r))}removeRows(e,...t){let r=new om(e,t);this.ensureItIsPossibleToRemoveRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let n=this.operations.removeRows(r);this.undoRedo.saveOperation(new oE(r,n))}addColumns(e,...t){let r=new oy(e,t);this.ensureItIsPossibleToAddColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addColumns(r),this.undoRedo.saveOperation(new o_(r))}removeColumns(e,...t){let r=new ob(e,t);this.ensureItIsPossibleToRemoveColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let n=this.operations.removeColumns(r);this.undoRedo.saveOperation(new ok(r,n))}moveCells(e,t,r,n){this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let{version:o,overwrittenCellsData:i,addedGlobalNamedExpressions:s}=this.operations.moveCells(e,t,r,n);this.undoRedo.saveOperation(new oT(e,t,r,n,i,s,o))}moveRows(e,t,r,n){this.ensureItIsPossibleToMoveRows(e,t,r,n),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let o=this.operations.moveRows(e,t,r,n);this.undoRedo.saveOperation(new ox(e,t,r,n,o))}moveColumns(e,t,r,n){this.ensureItIsPossibleToMoveColumns(e,t,r,n),this.undoRedo.clearRedoStack();let o=this.operations.moveColumns(e,t,r,n);this.undoRedo.saveOperation(new oO(e,t,r,n,o))}cut(e,t,r){this.clipboardOperations.cut(e,t,r)}ensureItIsPossibleToCopy(e,t,r){if(!oY(t))throw new t2("width to be positive integer.");if(!oY(r))throw new t2("height to be positive integer.")}copy(e,t,r){this.ensureItIsPossibleToCopy(e,t,r),this.clipboardOperations.copy(e,t,r)}paste(e){let t=this.clipboardOperations.clipboard;if(void 0===t)throw new t8;if(this.clipboardOperations.isCutClipboard())this.moveCells(t.sourceLeftCorner,t.width,t.height,e);else if(this.clipboardOperations.isCopyClipboard()){this.clipboardOperations.ensureItIsPossibleToCopyPaste(e);let r=ne.spanFrom(e,t.width,t.height),n=this.operations.getRangeClipboardCells(r);this.undoRedo.clearRedoStack();let o=this.operations.restoreClipboardCells(t.sourceLeftCorner.sheet,t.getContent(e));this.undoRedo.saveOperation(new oB(e,n,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();let{sheetName:t,sheetId:r}=this.operations.addSheet(e);return this.undoRedo.saveOperation(new oH(t,r)),t}removeSheet(e){this.ensureScopeIdIsValid(e),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let t=this.sheetMapping.getSheetNameOrThrowError(e),r=this.operations.getSheetClipboardCells(e),n=this.operations.removeSheet(e);this.undoRedo.saveOperation(new oL(t,e,r,n))}renameSheet(e,t){this.ensureItIsPossibleToRenameSheet(e,t);let{previousDisplayName:r,version:n,mergedPlaceholderSheetId:o}=this.operations.renameSheet(e,t);return void 0!==r&&(this.undoRedo.clearRedoStack(),this.undoRedo.saveOperation(new oP(e,r,t,n,o))),r}clearSheet(e){this.ensureScopeIdIsValid(e),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let t=this.operations.getSheetClipboardCells(e);this.operations.clearSheet(e),this.undoRedo.saveOperation(new oD(e,t))}setCellContents(e,t){if(t instanceof Array){for(let e=0;e<t.length;e++)if(!(t[e]instanceof Array))throw new t2("an array of arrays or a raw cell value.")}else t=[[t]];this.ensureItIsPossibleToChangeCellContents(e,t),this.undoRedo.clearRedoStack();let r=[];for(let n=0;n<t.length;n++)for(let o=0;o<t[n].length;o++){let i={sheet:e.sheet,row:e.row+n,col:e.col+o},s=t[n][o];this.clipboardOperations.abortCut();let a=this.operations.setCellContent(i,s);r.push({address:i,newContent:s,oldContent:a})}this.undoRedo.saveOperation(new oF(r))}setSheetContent(e,t){this.ensureScopeIdIsValid(e),this.ensureItIsPossibleToChangeSheetContents(e,t),rF(t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let r=this.operations.getSheetClipboardCells(e);this.operations.setSheetContent(e,t),this.undoRedo.saveOperation(new oI(e,r,t))}setRowOrder(e,t){this.validateSwapRowIndexes(e,t),this.testRowOrderForArrays(e,t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let r=this.operations.setRowOrder(e,t);this.undoRedo.saveOperation(new oM(e,t,r))}validateSwapRowIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e);this.validateRowOrColumnMapping(e,t,"row")}testColumnOrderForArrays(e,t){for(let[r,n]of t)if(r!==n){let t=ne.spanFrom({sheet:e,col:r,row:0},1,1/0);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new rp}}setColumnOrder(e,t){this.validateSwapColumnIndexes(e,t),this.testColumnOrderForArrays(e,t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let r=this.operations.setColumnOrder(e,t);this.undoRedo.saveOperation(new oN(e,t,r))}validateSwapColumnIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e);this.validateRowOrColumnMapping(e,t,"column")}testRowOrderForArrays(e,t){for(let[r,n]of t)if(r!==n){let t=ne.spanFrom({sheet:e,col:0,row:r},1/0,1);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new rp}}mappingFromOrder(e,t,r){if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e);let n="row"===r?this.dependencyGraph.getSheetHeight(e):this.dependencyGraph.getSheetWidth(e);if(t.length!==n)throw new t2(`number of ${r}s provided to be sheet ${"row"===r?"height":"width"}.`);let o=[];for(let e=0;e<n;e++)t[e]!==e&&o.push([e,t[e]]);return o}undo(){if(this.undoRedo.isUndoStackEmpty())throw new t9;this.clipboardOperations.abortCut(),this.undoRedo.undo()}redo(){if(this.undoRedo.isRedoStackEmpty())throw new t7;this.clipboardOperations.abortCut(),this.undoRedo.redo()}addNamedExpression(e,t,r,n){this.ensureItIsPossibleToAddNamedExpression(e,t,r),this.operations.addNamedExpression(e,t,r,n),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new oV(e,t,r,n))}changeNamedExpressionExpression(e,t,r,n){this.ensureItIsPossibleToChangeNamedExpression(e,r,t);let[o,i]=this.operations.changeNamedExpressionExpression(e,r,t,n);this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new oz(o,r,i,t,n))}removeNamedExpression(e,t){this.ensureScopeIdIsValid(t);let[r,n]=this.operations.removeNamedExpression(e,t);return this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new oU(r,n,t)),r}ensureItIsPossibleToAddNamedExpression(e,t,r){this.ensureScopeIdIsValid(r),this.ensureNamedExpressionNameIsValid(e,r),this.ensureNamedExpressionIsValid(t)}ensureItIsPossibleToChangeNamedExpression(e,t,r){if(this.ensureScopeIdIsValid(r),void 0===this.namedExpressions.namedExpressionForScope(e,r))throw new t5(e);this.ensureNamedExpressionIsValid(t)}isItPossibleToRemoveNamedExpression(e,t){if(this.ensureScopeIdIsValid(t),void 0===this.namedExpressions.namedExpressionForScope(e,t))throw new t5(e)}ensureItIsPossibleToAddRows(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e);if(this.dependencyGraph.getSheetHeight(e)+t.map(e=>e[1]).reduce((e,t)=>e+t,0)>this.maxRows)throw new tJ;for(let[e,r]of t)if(!oj(e)||!oY(r))throw new t2("row number to be nonnegative and number of rows to add to be positive.")}ensureItIsPossibleToRemoveRows(e,...t){for(let[r,n]of t){let t=r+n-1;if(!oj(r)||!oj(t))throw new t2("starting and ending row to be nonnegative.");if(t<r)throw new t2("starting row to be smaller than the ending row.");if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e)}}ensureItIsPossibleToAddColumns(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e);if(this.dependencyGraph.getSheetWidth(e)+t.map(e=>e[1]).reduce((e,t)=>e+t,0)>this.maxColumns)throw new tJ;for(let[e,r]of t)if(!oj(e)||!oY(r))throw new t2("column number to be nonnegative and number of columns to add to be positive.")}ensureItIsPossibleToRemoveColumns(e,...t){for(let[r,n]of t){let t=r+n-1;if(!oj(r)||!oj(t))throw new t2("starting and ending column to be nonnegative.");if(t<r)throw new t2("starting column to be smaller than the ending column.");if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e)}}ensureItIsPossibleToMoveRows(e,t,r,n){this.ensureItIsPossibleToAddRows(e,[n,r]);let o=r1(e,0,t),i=r1(e,0,n);if(!this.sheetMapping.hasSheetWithId(e)||r2(o)||r2(i)||!oY(r)||n<=t+r&&n>=t)throw new t2("a valid range of rows to move.");let s=this.dependencyGraph.getSheetWidth(e),a=ne.spanFrom(o,s,r);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new rp;if(n>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllRows(tY.fromNumberOfRows(e,n-1,2)))throw new rm}ensureItIsPossibleToMoveColumns(e,t,r,n){this.ensureItIsPossibleToAddColumns(e,[n,r]);let o=r1(e,t,0),i=r1(e,n,0);if(!this.sheetMapping.hasSheetWithId(e)||r2(o)||r2(i)||!oY(r)||n<=t+r&&n>=t)throw new t2("a valid range of columns to move.");let s=this.dependencyGraph.getSheetHeight(e),a=ne.spanFrom(o,r,s);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new rp;if(n>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllColumns(tj.fromNumberOfColumns(e,n-1,2)))throw new rm}ensureItIsPossibleToAddSheet(e){if(this.sheetMapping.hasSheetWithName(e))throw new tZ(e)}ensureItIsPossibleToRenameSheet(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new tX(e);let r=this.sheetMapping.getSheetId(t);if(void 0!==r&&r!==e)throw new tZ(t)}ensureItIsPossibleToChangeContent(e){if(r2(e))throw new t1(e);if(!this.sheetMapping.hasSheetWithId(e.sheet))throw new tX(e.sheet)}ensureItIsPossibleToChangeCellContents(e,t){let r=rB(t),n=ne.spanFrom(e,r.width,r.height);for(let e of(this.ensureRangeInSizeLimits(n),n.addresses(this.dependencyGraph)))this.ensureItIsPossibleToChangeContent(e)}ensureItIsPossibleToChangeSheetContents(e,t){let r=rB(t),n=ne.spanFrom(r1(e,0,0),r.width,r.height);this.ensureRangeInSizeLimits(n)}ensureRangeInSizeLimits(e){if(e.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new tJ}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 tX(e)}validateRowOrColumnMapping(e,t,r){let n="row"===r?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(!oj(o[e])||o[e]>=n)throw new t2(`${r} numbers to be nonnegative integers and less than sheet ${"row"===r?"height":"width"}.`);if(o[e]===o[e+1])throw new t2(`source ${r} numbers to be unique.`);if(o[e]!==i[e])throw new t2(`target ${r} numbers to be permutation of source ${r} numbers.`)}}ensureNamedExpressionNameIsValid(e,t){if(!this.namedExpressions.isNameValid(e))throw new t4(e);if(!this.namedExpressions.isNameAvailable(e,t))throw new t6(e)}ensureNamedExpressionIsValid(e){let t=this.cellContentParser.parse(e);if(t instanceof y.Formula&&t$(this.parser.parse(t.formula,r1(-1,0,0)).ast))throw new rf}}function oY(e){return Number.isInteger(e)&&e>0}function oj(e){return Number.isInteger(e)&&e>=0}class oq{constructor(e,t,r,n,o,i){this.config=e,this.stats=t,this.interpreter=r,this.lazilyTransformingAstService=n,this.dependencyGraph=o,this.columnSearch=i}run(){this.stats.start(a.TOP_SORT);let{sorted:e,cycled:t}=this.dependencyGraph.topSortWithScc();this.stats.end(a.TOP_SORT),this.stats.measure(a.EVALUATION,()=>{this.recomputeFormulas(t,e)})}partialRun(e){let t=tV.empty();return this.stats.measure(a.EVALUATION,()=>{this.dependencyGraph.graph.getTopSortedWithSccSubgraphFrom(e,e=>this.recomputeVertex(e,t),e=>this.processVertexOnCycle(e,t))}),t}runAndForget(e,t,r){let n=[];for(let e of tM(r,t))if(e instanceof ne&&void 0===this.dependencyGraph.getRange(e.start,e.end)){let t=new rN(e);this.dependencyGraph.rangeMapping.addOrUpdateVertex(t),n.push(t)}let o=this.evaluateAstToCellValue(e,new nn(t,this.config.useArrayArithmetic));return n.forEach(e=>{this.dependencyGraph.rangeMapping.removeVertexIfExists(e)}),o}recomputeVertex(e,t){if(e instanceof rT){let r=e.isComputed()?e.getCellValue():void 0,n=this.recomputeFormulaVertexValue(e);if(n!==r){let o=e.getAddress(this.lazilyTransformingAstService);return t.addChange(n,o),this.columnSearch.change(tI(r),tI(n),o),!0}return!1}return!(e instanceof rN)||(e.clearCache(),!0)}processVertexOnCycle(e,t){if(e instanceof rN)e.clearCache();else if(e instanceof rT){let r=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.remove(tI(e.valueOrUndef()),r);let n=new rX(d.CYCLE,void 0,e);e.setCellValue(n),t.addChange(n,r)}}recomputeFormulas(e,t){e.forEach(e=>{e instanceof rT&&e.setCellValue(new rX(d.CYCLE,void 0,e))}),t.forEach(e=>{if(e instanceof rT){let t=this.recomputeFormulaVertexValue(e),r=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.add(tI(t),r)}else e instanceof rN&&e.clearCache()})}recomputeFormulaVertexValue(e){let t=e.getAddress(this.lazilyTransformingAstService);if(e instanceof rA&&(e.array.size.isRef||!this.dependencyGraph.isThereSpaceForArray(e)))return e.setNoSpace();{let r=e.getFormula(this.lazilyTransformingAstService),n=this.evaluateAstToCellValue(r,new nn(t,this.config.useArrayArithmetic,e));return e.setCellValue(n)}}evaluateAstToCellValue(e,t){let r=this.interpreter.evaluateAst(e,t);return r instanceof tB?r:r===tN&&this.config.evaluateNullToZero?0:r}}class oK{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 oX{constructor(e,t){this.name=e,this.newValue=t}}class oQ{constructor(e,t,r,n){this.config=e,this.namedExpressions=t,this.sheetMapping=r,this.lazilyTransformingService=n}exportChange(e){let t=e.value,r=e.address;if(r.sheet===tG.SHEET_FOR_WORKBOOK_EXPRESSIONS){let e=this.namedExpressions.namedExpressionInAddress(r.row);if(!e)throw Error("Missing named expression");return new oX(e.displayName,this.exportScalarOrRange(t))}if(!(t instanceof tB))return new oK(r,this.exportValue(t));{let e=[];for(let[n,o]of t.entriesFromTopLeftCorner(r))e.push(new oK(o,this.exportValue(n)));return e}}exportValue(e){return e instanceof tB?this.detailedError(new rX(d.VALUE,eq.ScalarExpected)):this.config.smartRounding&&tD(e)?this.cellValueRounding(tI(e)):e instanceof rX?this.detailedError(e):e===tN?null:tI(e)}exportScalarOrRange(e){return e instanceof tB?e.rawData().map(e=>e.map(e=>this.exportValue(e))):this.exportValue(e)}detailedError(e){var t,r;let n,o=null==(t=e.root)?void 0:t.getAddress(this.lazilyTransformingService);return void 0!==o&&(n=o.sheet===tG.SHEET_FOR_WORKBOOK_EXPRESSIONS?null==(r=this.namedExpressions.namedExpressionInAddress(o.row))?void 0:r.displayName:eI(this.sheetMapping.getSheetNameOrThrowError.bind(this.sheetMapping),o,-1)),new nA(e,this.config.translationPackage.getErrorTranslation(e.type),n)}cellValueRounding(e){if(0===e)return e;let t=Math.floor(Math.log10(Math.abs(e))),r=Math.pow(10,this.config.precisionRounding-t);return e<0?-Math.round(-e*r)/r:Math.round(e*r)/r}}class oZ{constructor(e,t,r,n,o,i){this.dependencyGraph=e,this.columnSearch=t,this.parser=r,this.cellContentParser=n,this.stats=o,this.arraySizePredictor=i,this.buildStrategy=new oJ(e,t,r,o,n,i)}buildGraph(e,t){let r=t.measure(a.COLLECT_DEPENDENCIES,()=>this.buildStrategy.run(e));this.dependencyGraph.getAndClearContentChanges(),t.measure(a.PROCESS_DEPENDENCIES,()=>this.processDependencies(r))}processDependencies(e){e.forEach((e,t)=>{this.dependencyGraph.processCellDependencies(e,t)})}}class oJ{constructor(e,t,r,n,o,i){this.dependencyGraph=e,this.columnIndex=t,this.parser=r,this.stats=n,this.cellContentParser=o,this.arraySizePredictor=i}run(e){let t=new Map;for(let r in e){let n=this.dependencyGraph.getSheetId(r),o=e[r];for(let e=0;e<o.length;++e){let r=o[e];for(let o=0;o<r.length;++o){let i=r[o],s=r1(n,o,e),l=this.cellContentParser.parse(i);if(l instanceof y.Formula){let e=this.stats.measure(a.PARSER,()=>this.parser.parse(l.formula,s));if(e.errors.length>0){this.shrinkArrayIfNeeded(s);let t=new rW(e.errors,l.formula);this.dependencyGraph.addVertex(s,t)}else{this.shrinkArrayIfNeeded(s);let r=this.arraySizePredictor.checkArraySize(e.ast,s);if(r.isScalar()){let r=new rM(e.ast,s,0);t.set(r,tM(e.dependencies,s)),this.dependencyGraph.addVertex(s,r),e.hasVolatileFunction&&this.dependencyGraph.markAsVolatile(r),e.hasStructuralChangeFunction&&this.dependencyGraph.markAsDependentOnStructureChange(r)}else{let n=new rA(e.ast,s,new nE(r.width,r.height));t.set(n,tM(e.dependencies,s)),this.dependencyGraph.addArrayVertex(s,n)}}}else if(l instanceof y.Empty);else{this.shrinkArrayIfNeeded(s);let e=new rz(l.value,i);this.columnIndex.add(tI(l.value),s),this.dependencyGraph.addVertex(s,e)}}}}return t}shrinkArrayIfNeeded(e){let t=this.dependencyGraph.getCell(e);t instanceof rA&&this.dependencyGraph.shrinkArrayToCorner(t)}}let o0=new Map([["gpl-v3",1],["missing",2],["invalid",3],["expired",4]]);class o1 extends nR{version(e,t){return this.runFunction(e.args,t,this.metadata("VERSION"),()=>{let e,{licenseKeyValidityState:t,licenseKey:r}=this.config;return o0.has(r)?e=o0.get(r):o0.has(t)?e=o0.get(t):"valid"===t&&(e=r.slice(-5)),`HyperFormula v${ip.version}, ${e}`})}}function o2(e,t){var r;let n=t.implementedFunctions[e],o=null==(r=t.aliases)?void 0:r[e];if(void 0!==o){if(void 0!==n)throw new ry(e,t.name);n=t.implementedFunctions[o]}if(void 0===n)throw rc.functionNotDeclaredInPlugin(e,t.name);return n}o1.implementedFunctions={VERSION:{method:"version",parameters:[]}};class o3{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)for(const t of(this.instancePlugins=new Map,e.functionPlugins))o3.loadPluginFunctions(t,this.instancePlugins);else this.instancePlugins=new Map(o3.plugins);for(const[e,t]of o3.protectedFunctions())o3.loadFunctionUnprotected(t,e,this.instancePlugins);for(const[e,t]of this.instancePlugins.entries())this.categorizeFunction(e,o2(e,t))}static registerFunctionPlugin(e,t){this.loadPluginFunctions(e,this.plugins),void 0!==t&&this.loadTranslations(t)}static registerFunction(e,t,r){this.loadPluginFunction(t,e,this.plugins),void 0!==r&&this.loadTranslations(r)}static unregisterFunction(e){if(this.functionIsProtected(e))throw rg.cannotUnregisterFunctionWithId(e);this.plugins.delete(e)}static unregisterFunctionPlugin(e){for(let t of this.protectedPlugins())if(t===e)throw rg.cannotUnregisterProtectedPlugin();for(let[t,r]of this.plugins.entries())r===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){if(!this.functionIsProtected(e))return this.plugins.get(e)}static functionIsProtected(e){return this._protectedPlugins.has(e)}static loadTranslations(e){let t=new Set(ip.getRegisteredLanguagesCodes());Object.keys(e).forEach(r=>{t.has(r)&&ip.getLanguage(r).extendFunctions(e[r])})}static loadPluginFunctions(e,t){Object.keys(e.implementedFunctions).forEach(r=>{this.loadPluginFunction(e,r,t)}),void 0!==e.aliases&&Object.keys(e.aliases).forEach(r=>{this.loadPluginFunction(e,r,t)})}static loadPluginFunction(e,t,r){if(this.functionIsProtected(t))throw rg.cannotRegisterFunctionWithId(t);this.loadFunctionUnprotected(e,t,r)}static handleDeprecatedMetadata(e,t){t&&void 0!==t.arrayFunction&&(console.warn(`${e}: 'arrayFunction' parameter is deprecated since 3.1.0; Use 'enableArrayArithmeticForArguments' instead.`),t.enableArrayArithmeticForArguments=t.arrayFunction),t&&void 0!==t.arraySizeMethod&&(console.warn(`${e}: 'arraySizeMethod' parameter is deprecated since 3.1.0; Use 'sizeOfResultArrayMethod' instead.`),t.sizeOfResultArrayMethod=t.arraySizeMethod)}static loadFunctionUnprotected(e,t,r){let n=o2(t,e),o=n.method;if(this.handleDeprecatedMetadata(t,n),Object.prototype.hasOwnProperty.call(e.prototype,o))r.set(t,e);else throw rc.functionMethodNotFound(o,e.name)}static*protectedFunctions(){for(let[e,t]of this._protectedPlugins)void 0!==t&&(yield[e,t])}static*protectedPlugins(){for(let[,e]of this._protectedPlugins)void 0!==e&&(yield e)}initializePlugins(e){let t=[];for(let[r,n]of this.instancePlugins.entries()){let o=t.find(e=>e instanceof n);void 0===o&&(o=new n(e),t.push(o));let i=o2(r,n),s=i.method;this.functions.set(r,[s,o]);let a=i.sizeOfResultArrayMethod;void 0!==a&&this.arraySizeFunctions.set(r,[a,o])}}getFunctionPlugin(e){if(!o3.functionIsProtected(e))return this.instancePlugins.get(e)}getFunction(e){let t=this.functions.get(e);if(void 0!==t&&this.config.translationPackage.isFunctionTranslated(e)){let[e,r]=t;return(t,n)=>r[e](t,n)}}getArraySizeFunction(e){let t=this.arraySizeFunctions.get(e);if(void 0!==t&&this.config.translationPackage.isFunctionTranslated(e)){let[e,r]=t;return(t,n)=>r[e](t,n)}}getMetadata(e){return this.functionsMetadata.get(e)}getPlugins(){let e=new Set;for(let[t,r]of this.instancePlugins)o3.functionIsProtected(t)||e.add(r);return Array.from(e)}getRegisteredFunctionIds(){return Array.from(this.functions.keys())}categorizeFunction(e,t){t.isVolatile&&this.volatileFunctions.add(e),t.enableArrayArithmeticForArguments&&this.arrayFunctions.add(e),t.doesNotNeedArgumentsToBeComputed&&this.functionsWhichDoesNotNeedArgumentsToBeComputed.add(e),t.isDependentOnSheetStructureChange&&this.structuralChangeFunctions.add(e),this.functionsMetadata.set(e,t)}}o3.plugins=new Map,o3._protectedPlugins=new Map([["VERSION",o1],["OFFSET",void 0]]),(V=w||(w={})).GREATER_THAN="GREATER_THAN",V.GREATER_THAN_OR_EQUAL="GREATER_THAN_OR_EQUAL",V.LESS_THAN="LESS_THAN",V.LESS_THAN_OR_EQUAL="LESS_THAN_OR_EQUAL",V.NOT_EQUAL="NOT_EQUAL",V.EQUAL="EQUAL";let o6=(e,t)=>({operator:e,value:t});class o4{constructor(e){var t,r,n,o;this.trueString=null!=(r=null==(t=e.translationPackage.getMaybeFunctionTranslation("TRUE"))?void 0:t.toLowerCase())?r:"true",this.falseString=null!=(o=null==(n=e.translationPackage.getMaybeFunctionTranslation("FALSE"))?void 0:n.toLowerCase())?o:"false"}fromCellValue(e,t){if("string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e)return;let r=this.parseCriterion(e,t);if(void 0!==r)return{raw:e,lambda:o9(r,t)}}parseCriterion(e,t){if("number"==typeof e||"boolean"==typeof e)return o6(w.EQUAL,e);if("string"==typeof e){let r,n,o=o5.exec(e);o?(n=function(e){switch(e){case">":return w.GREATER_THAN;case">=":return w.GREATER_THAN_OR_EQUAL;case"<":return w.LESS_THAN;case"<=":return w.LESS_THAN_OR_EQUAL;case"<>":return w.NOT_EQUAL;case"=":return w.EQUAL;default:return}}(o[1]),r=o[2]):(n=w.EQUAL,r=e);let i=t.coerceToMaybeNumber(r),s=r.toLowerCase()===this.trueString||r.toLowerCase()!==this.falseString&&void 0;if(void 0===n)return;if(""===r)return o6(n,null);if(void 0!==i)return o6(n,tI(i));if(n===w.EQUAL||n===w.NOT_EQUAL)return o6(n,null!=s?s:r)}}}let o5=/([<>=]+)(.*)/,o9=(e,t)=>{switch(e.operator){case w.GREATER_THAN:if("number"==typeof e.value)return r=>"number"==typeof r&&t.floatCmp(r,e.value)>0;return e=>!1;case w.GREATER_THAN_OR_EQUAL:if("number"==typeof e.value)return r=>"number"==typeof r&&t.floatCmp(r,e.value)>=0;return e=>!1;case w.LESS_THAN:if("number"==typeof e.value)return r=>"number"==typeof r&&0>t.floatCmp(r,e.value);return e=>!1;case w.LESS_THAN_OR_EQUAL:if("number"==typeof e.value)return r=>"number"==typeof r&&0>=t.floatCmp(r,e.value);return e=>!1;case w.EQUAL:if("number"==typeof e.value)return r=>{if("number"==typeof r)return 0===t.floatCmp(r,e.value);if("string"!=typeof r)return!1;{if(""===r)return!1;let n=t.coerceToMaybeNumber(r);return void 0!==n&&0===t.floatCmp(n,e.value)}};if("string"==typeof e.value)return t.eqMatcherFunction(e.value);if("boolean"==typeof e.value)return t=>"boolean"==typeof t&&t===e.value;else return e=>e===tN;case w.NOT_EQUAL:if("number"==typeof e.value)return r=>{if("number"==typeof r)return 0!==t.floatCmp(r,e.value);if("string"!=typeof r)return!0;{if(""===r)return!0;let n=t.coerceToMaybeNumber(r);return void 0===n||0!==t.floatCmp(n,e.value)}};if("string"==typeof e.value)return t.neqMatcherFunction(e.value);if("boolean"==typeof e.value)return t=>"boolean"!=typeof t||t!==e.value;else return e=>e!==tN}};class o7{constructor(e,t,r,n,o,i,s,a,l,h){this.config=e,this.dependencyGraph=t,this.columnSearch=r,this.stats=n,this.arithmeticHelper=o,this.functionRegistry=i,this.namedExpressions=s,this.serialization=a,this.arraySizePredictor=l,this.dateTimeHelper=h,this.equalOp=(e,t)=>ie(this.arithmeticHelper.eq,e,t),this.notEqualOp=(e,t)=>ie(this.arithmeticHelper.neq,e,t),this.greaterThanOp=(e,t)=>ie(this.arithmeticHelper.gt,e,t),this.lessThanOp=(e,t)=>ie(this.arithmeticHelper.lt,e,t),this.greaterThanOrEqualOp=(e,t)=>ie(this.arithmeticHelper.geq,e,t),this.lessThanOrEqualOp=(e,t)=>ie(this.arithmeticHelper.leq,e,t),this.concatOp=(e,t)=>ie(this.arithmeticHelper.concat,nu(e),nu(t)),this.plusOp=(e,t)=>ie(this.arithmeticHelper.addWithEpsilon,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.minusOp=(e,t)=>ie(this.arithmeticHelper.subtract,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.timesOp=(e,t)=>ie(this.arithmeticHelper.multiply,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.powerOp=(e,t)=>ie(this.arithmeticHelper.pow,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.divOp=(e,t)=>ie(this.arithmeticHelper.divide,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.unaryMinusOp=e=>o8(this.arithmeticHelper.unaryMinus,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.percentOp=e=>o8(this.arithmeticHelper.unaryPercent,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.unaryPlusOp=e=>this.arithmeticHelper.unaryPlus(e),this.functionRegistry.initializePlugins(this),this.criterionBuilder=new o4(e)}evaluateAst(e,t){var r,n,o;let i=this.evaluateAstWithoutPostprocessing(e,t);if(tD(i))if(np(tI(i)))return new rX(d.NUM,eq.NaN);else{i=tO(i,0===(r=tI(i))?0:r)}return i instanceof tB&&1===i.height()&&1===i.width()&&([[i]]=i.data),n=i,o=t.formulaVertex,n instanceof rX&&void 0!==o?n.attachRootVertex(o):n}evaluateAstWithoutPostprocessing(e,t){switch(e.type){case o.EMPTY:return tN;case o.CELL_REFERENCE:{let r=e.reference.toSimpleCellAddress(t.formulaAddress);if(r2(r))return new rX(d.REF,eq.BadRef);if(!this.isSheetValid(e.reference))return new rX(d.REF,eq.SheetRef);return this.dependencyGraph.getCellValue(r)}case o.NUMBER:case o.STRING:return e.value;case o.CONCATENATE_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.concatOp,r,n,t)}case o.EQUALS_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.equalOp,r,n,t)}case o.NOT_EQUAL_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.notEqualOp,r,n,t)}case o.GREATER_THAN_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.greaterThanOp,r,n,t)}case o.LESS_THAN_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.lessThanOp,r,n,t)}case o.GREATER_THAN_OR_EQUAL_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.greaterThanOrEqualOp,r,n,t)}case o.LESS_THAN_OR_EQUAL_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.lessThanOrEqualOp,r,n,t)}case o.PLUS_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.plusOp,r,n,t)}case o.MINUS_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.minusOp,r,n,t)}case o.TIMES_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.timesOp,r,n,t)}case o.POWER_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.powerOp,r,n,t)}case o.DIV_OP:{let r=this.evaluateAst(e.left,t),n=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.divOp,r,n,t)}case o.PLUS_UNARY_OP:{let r=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.unaryPlusOp,r,t)}case o.MINUS_UNARY_OP:{let r=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.unaryMinusOp,r,t)}case o.PERCENT_OP:{let r=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.percentOp,r,t)}case o.FUNCTION_CALL:{if("valid"!==this.config.licenseKeyValidityState&&!o3.functionIsProtected(e.procedureName))return new rX(d.LIC,eq.LicenseKey(this.config.licenseKeyValidityState));let r=this.functionRegistry.getFunction(e.procedureName);if(void 0!==r)return r(e,new nn(t.formulaAddress,t.arraysFlag||this.functionRegistry.isArrayFunction(e.procedureName),t.formulaVertex));return new rX(d.NAME,eq.FunctionName(e.procedureName))}case o.NAMED_EXPRESSION:{let r=this.namedExpressions.nearestNamedExpression(e.expressionName,t.formulaAddress.sheet);if(r)return this.dependencyGraph.getCellValue(r.address);return new rX(d.NAME,eq.NamedExpressionName(e.expressionName))}case o.CELL_RANGE:{if(!this.isSheetValid(e.start)||!this.isSheetValid(e.end))return new rX(d.REF,eq.SheetRef);if(!this.rangeSpansOneSheet(e))return new rX(d.REF,eq.RangeManySheets);let r=ne.fromCellRange(e,t.formulaAddress),n=this.dependencyGraph.getArray(r);if(n){let e=n.array;if(e instanceof rw)throw Error("Array should be already computed");if(e instanceof rX)return e;if(e instanceof rS)return tB.fromRange(e.raw(),r,this.dependencyGraph);else throw Error("Unknown array")}return tB.onlyRange(r,this.dependencyGraph)}case o.COLUMN_RANGE:{if(!this.isSheetValid(e.start)||!this.isSheetValid(e.end))return new rX(d.REF,eq.SheetRef);if(!this.rangeSpansOneSheet(e))return new rX(d.REF,eq.RangeManySheets);let r=nt.fromColumnRange(e,t.formulaAddress);return tB.onlyRange(r,this.dependencyGraph)}case o.ROW_RANGE:{if(!this.isSheetValid(e.start)||!this.isSheetValid(e.end))return new rX(d.REF,eq.SheetRef);if(!this.rangeSpansOneSheet(e))return new rX(d.REF,eq.RangeManySheets);let r=nr.fromRowRangeAst(e,t.formulaAddress);return tB.onlyRange(r,this.dependencyGraph)}case o.PARENTHESIS:return this.evaluateAst(e.expression,t);case o.ARRAY:{let r,n=[];for(let o of e.args){let e,i=[];for(let r of o){let n=na(this.evaluateAst(r,t)),o=n.height();if(void 0===e)e=o,i.push(...n.data);else if(e!==o)return new rX(d.REF,eq.SizeMismatch);else for(let e=0;e<o;e++)i[e].push(...n.data[e])}let s=i[0].length;if(void 0===r)r=s,n.push(...i);else{if(r!==s)return new rX(d.REF,eq.SizeMismatch);n.push(...i)}}return tB.onlyValues(n)}case o.ERROR_WITH_RAW_INPUT:case o.ERROR:return e.error}}isSheetValid(e){return void 0===e.sheet||e.sheet===tG.SHEET_FOR_WORKBOOK_EXPRESSIONS||this.dependencyGraph.sheetMapping.hasSheetWithId(e.sheet,{includePlaceholders:!1})}rangeSpansOneSheet(e){return e.start.sheet===e.end.sheet}unaryRangeWrapper(e,t,r){var n;if(t instanceof tB&&!r.arraysFlag&&(t=null!=(n=nS(t,r))?n:new rX(d.VALUE,eq.ScalarExpected)),t instanceof rX)return t;if(t instanceof tB){let r=t.data.map(t=>t.map(e));return tB.onlyValues(r)}return e(t)}binaryRangeWrapper(e,t,r,n){var o,i;if(t instanceof tB&&!n.arraysFlag&&(t=null!=(o=nS(t,n))?o:new rX(d.VALUE,eq.ScalarExpected)),t instanceof rX)return t;if(r instanceof tB&&!n.arraysFlag&&(r=null!=(i=nS(r,n))?i:new rX(d.VALUE,eq.ScalarExpected)),r instanceof rX)return r;if(t instanceof tB||r instanceof tB){if(!(t instanceof tB))if(r.isAdHoc()){let n=r.data;for(let r=0;r<n.length;r++)for(let o=0;o<n[0].length;o++)n[r][o]=e(t,n[r][o]);return tB.onlyValues(n)}else t=tB.fromScalar(t);if(!(r instanceof tB))if(t.isAdHoc()){let n=t.data;for(let t=0;t<n.length;t++)for(let o=0;o<n[0].length;o++)n[t][o]=e(n[t][o],r);return tB.onlyValues(n)}else r=tB.fromScalar(r);if(t.width()===r.width()&&t.height()===r.height()){if(t.isAdHoc()){let n=t.data,o=r.data;for(let t=0;t<n.length;t++)for(let r=0;r<n[0].length;r++)n[t][r]=e(n[t][r],o[t][r]);return tB.onlyValues(n)}if(r.isAdHoc()){let n=t.data,o=r.data;for(let t=0;t<n.length;t++)for(let r=0;r<n[0].length;r++)o[t][r]=e(n[t][r],o[t][r]);return tB.onlyValues(o)}}let n=Math.max(t.width(),r.width()),o=Math.max(t.height(),r.height()),i=Array(o);for(let e=0;e<o;e++)i[e]=Array(n);for(let s=0;s<o;s++){let o=1!==t.height()?s:0,a=1!==r.height()?s:0;for(let l=0;l<n;l++){let n=1!==t.width()?l:0,h=1!==r.width()?l:0;o<t.height()&&a<r.height()&&n<t.width()&&h<r.width()?i[s][l]=e(t.data[o][n],r.data[a][h]):i[s][l]=new rX(d.NA)}}return tB.onlyValues(i)}return e(t,r)}}function o8(e,t){return t instanceof rX?t:e(t)}function ie(e,t,r){return t instanceof rX?t:r instanceof rX?r:e(t,r)}class it{constructor(e){this.sheet=e,this.transformations=[]}add(e){this.transformations.push(e)}performEagerTransformations(e,t){this.transformations.forEach(r=>r.performEagerTransformations(e,t))}transformSingleAst(e,t){let[r,n]=[e,t];return this.transformations.forEach(e=>{[r,n]=e.transformSingleAst(r,n)}),[r,n]}isIrreversible(){return!0}}class ir{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 it(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,r){this.stats.start(a.TRANSFORM_ASTS_POSTPONED);for(let n=r;n<this.transformations.length;n++){let r=this.transformations[n];r.isIrreversible()&&(this.undoRedo.storeDataForVersion(n,t,this.parser.computeHashFromAst(e)),this.parser.rememberNewAst(e));let[o,i]=r.transformSingleAst(e,t);e=o,t=i}let n=this.parser.rememberNewAst(e);return this.stats.end(a.TRANSFORM_ASTS_POSTPONED),[n,t,this.transformations.length]}*getTransformationsFrom(e,t){for(let r=e;r<this.transformations.length;r++){let e=this.transformations[r];(!t||t(e))&&(yield e)}}}function io(e,t){return typeof e==typeof t?e===tN?0:e<t?-1:+(e>t):e===tN?-1:t===tN?1:t instanceof rX||"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 ii{constructor(e){this.dependencyGraph=e}advancedFind(e,t,{returnOccurrence:r}={returnOccurrence:"first"}){let n=t.range,o=void 0===n?t.valuesFromTopLeftCorner():this.dependencyGraph.computeListOfValuesInRange(n),i="first"===r?0:o.length-1,s="first"===r?e=>e<o.length:e=>e>=0,a="first"===r?e=>e+1:e=>e-1;for(let t=i;s(t);t=a(t))if(e(tI(o[t])))return t;return -1}basicFind(e,t,r,{ordering:n,ifNoMatch:o,returnOccurrence:i}){let s="string"==typeof e?nw(e):e,a=t.range;return void 0===a?this.findNormalizedValue(s,t.valuesFromTopLeftCorner(),o,i):"none"===n?this.findNormalizedValue(s,this.dependencyGraph.computeListOfValuesInRange(a),o,i):function(e,t,{searchCoordinate:r,orderingDirection:n,ifNoMatch:o},i){let s=t.start[r],a="col"===r?t.effectiveEndColumn(i):t.effectiveEndRow(i),l="col"===r?e=>tI(i.getCellValue(r1(t.sheet,e,t.start.row))):e=>tI(i.getCellValue(r1(t.sheet,t.start.col,e))),h="asc"===n?(e,t)=>io(e,t):(e,t)=>-io(e,t),d=function(e,t,r){let n=t,o=r;for(;n<o;){let t=Math.ceil((n+o)/2);e(t)?n=t:o=t-1}return n===o&&e(n)?n:-1}(t=>h(e,l(t))>=0,s,a),u=l(d);if(u===e)return d-s;if("returnLowerBound"===o){if(-1===d)return"asc"===n?-1:0;if(typeof u!=typeof e)return -1;if("asc"===n)return d-s;let t=d+1;return t<=a?t-s:-1}if("returnUpperBound"===o){if(-1===d)return"asc"===n?0:-1;if(typeof u!=typeof e)return -1;if("desc"===n)return d-s;let t=d+1;return t<=a?t-s:-1}return -1}(s,a,{searchCoordinate:r,orderingDirection:n,ifNoMatch:o},this.dependencyGraph)}findNormalizedValue(e,t,r="returnNotFound",n="first"){let o=t.map(tI).map(e=>"string"==typeof e?nw(e):e);if("returnNotFound"===r)return"first"===n?o.indexOf(e):o.lastIndexOf(e);let i="returnLowerBound"===r?(e,t)=>io(e,t):(e,t)=>-io(e,t),s="returnLowerBound"===r?-1/0:1/0,a=-1,l="first"===n?0:o.length-1,h="first"===n?e=>e<o.length:e=>e>=0,d="first"===n?e=>e+1:e=>e-1;for(let t=l;h(t);t=d(t)){let r=o[t];if(r===e)return t;!(i(r,e)>0)&&0>i(s,r)&&(s=r,a=t)}return a}}class is extends ii{constructor(e){super(e),this.dependencyGraph=e}add(e,t){}remove(e,t){}change(e,t,r){}applyChanges(e){}addColumns(e){}removeColumns(e){}removeSheet(e){}moveValues(e,t,r,n){}removeValues(e){}find(e,t,r){return this.basicFind(e,t,"row",r)}}class ia{constructor(e,t,r){this.dependencyGraph=e,this.config=t,this.stats=r,this.index=new Map,this.transformingService=this.dependencyGraph.lazilyTransformingAstService,this.binarySearchStrategy=new is(e)}add(e,t){if(e!==tN&&!(e instanceof rX))if(e instanceof tB)for(let[r,n]of e.entriesFromTopLeftCorner(t))this.addSingleCellValue(tI(r),n);else this.addSingleCellValue(e,t)}remove(e,t){if(void 0!==e)if(e instanceof tB)for(let[r,n]of e.entriesFromTopLeftCorner(t))this.removeSingleValue(tI(r),n);else this.removeSingleValue(e,t)}change(e,t,r){e!==t&&(this.remove(e,r),this.add(t,r))}applyChanges(e){for(let t of e)void 0!==t.oldValue&&this.change(tI(t.oldValue),tI(t.value),t.address)}moveValues(e,t,r,n){for(let[o,i]of e){let e=r3(i,n,t,r);this.remove(o,i),this.add(o,e)}}removeValues(e){for(let[t,r]of e)this.remove(t,r)}find(e,t,{ordering:r,ifNoMatch:n,returnOccurrence:o}){null==o&&(o="none"===r?"first":"last");let i=this.findUsingColumnIndex(e,t,o);return void 0!==i?i:this.binarySearchStrategy.find(e,t,{ordering:r,ifNoMatch:n,returnOccurrence:o})}findUsingColumnIndex(e,t,r){let n=t.range;if(void 0===n)return;this.ensureRecentData(n.sheet,n.start.col,e);let o=this.getColumnMap(n.sheet,n.start.col);if(!o)return -1;let i="string"==typeof e?nw(e):e,s=o.get(i);if(!s||!s.index||0===s.index.length)return;let a=ia.findRowBelongingToRange(s,n,r);return void 0!==a?a-n.start.row:void 0}static findRowBelongingToRange(e,t,r){let n=t.start.row,o=t.end.row,i="first"===r?il(n,e.index,"upperBound"):il(o,e.index,"lowerBound");if(-1===i)return;let s=e.index[i];return s>=n&&s<=o?s:void 0}advancedFind(e,t,r={returnOccurrence:"first"}){return this.binarySearchStrategy.advancedFind(e,t,r)}addColumns(e){let t=this.index.get(e.sheet);t&&t.splice(e.columnStart,0,...Array(e.numberOfColumns))}removeColumns(e){let 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,[]);let r=this.index.get(e),n=r[t];return n||(n=new Map,r[t]=n),n}getValueIndex(e,t,r){let n=this.getColumnMap(e,t),o=this.getColumnMap(e,t).get(r);return o||(o={version:this.transformingService.version(),index:[]},n.set(r,o)),o}ensureRecentData(e,t,r){let n=this.getValueIndex(e,t,r),o=this.transformingService.version();if(n.version!==o){for(let o of this.transformingService.getTransformationsFrom(n.version,t=>t.sheet===e&&(t instanceof ol||t instanceof og)))o instanceof ol?this.addRows(t,o.rowsSpan,r):o instanceof og&&this.removeRows(t,o.rowsSpan,r);n.version=o}}addSingleCellValue(e,t){this.stats.measure(a.BUILD_COLUMN_INDEX,()=>{this.ensureRecentData(t.sheet,t.col,e),"string"==typeof e&&(e=nw(e));let r=this.getValueIndex(t.sheet,t.col,e);ia.addValue(r,t.row)})}removeSingleValue(e,t){this.stats.measure(a.BUILD_COLUMN_INDEX,()=>{this.ensureRecentData(t.sheet,t.col,e);let r=this.getColumnMap(t.sheet,t.col);"string"==typeof e&&(e=nw(e));let n=r.get(e);if(!n)return;let o=il(t.row,n.index);o>-1&&n.index.splice(o,1),0===n.index.length&&r.delete(e),0===r.size&&delete this.index.get(t.sheet)[t.col]})}addRows(e,t,r){let n=this.getValueIndex(t.sheet,e,r);ia.shiftRows(n,t.rowStart,t.numberOfRows)}removeRows(e,t,r){let n=this.getValueIndex(t.sheet,e,r);ia.removeRowsFromValues(n,t),ia.shiftRows(n,t.rowEnd+1,-t.numberOfRows)}static addValue(e,t){let r=il(t,e.index,"lowerBound");e.index[r]!==t&&e.index.splice(r+1,0,t)}static removeRowsFromValues(e,t){let r=il(t.rowStart,e.index,"upperBound"),n=il(t.rowEnd,e.index,"lowerBound");r>-1&&n>-1&&r<=n&&e.index[r]<=t.rowEnd&&e.index.splice(r,n-r+1)}static shiftRows(e,t,r){let n=il(t,e.index,"upperBound");if(-1!==n)for(let t=n;t<e.index.length;++t)e.index[t]+=r}}function il(e,t,r="upperBound"){let n=0,o=t.length-1;for(;n<=o;){let r=Math.floor((n+o)/2);if(e>t[r])n=r+1;else{if(!(e<t[r]))return r;o=r-1}}let i="lowerBound"===r?o:n;return i>=0&&i<=t.length?i:-1}class ih{constructor(e){this.config=e;const t="."===this.config.thousandSeparator?`\\${this.config.thousandSeparator}`:this.config.thousandSeparator,r="."===this.config.decimalSeparator?`\\${this.config.decimalSeparator}`:this.config.decimalSeparator;this.numberPattern=RegExp(`^([+-]?((${r}\\d+)|(\\d+(${t}\\d{3,})*(${r}\\d*)?)))([eE][+-]?\\d+)?$`),this.allThousandSeparatorsRegex=RegExp(`${t}`,"g")}numericStringToMaybeNumber(e){if(this.numberPattern.test(e)){let t=this.numericStringToNumber(e);if(!isNaN(t))return t}}numericStringToNumber(e){return Number(e.replace(this.allThousandSeparatorsRegex,"").replace(this.config.decimalSeparator,"."))}}class id{constructor(e,t,r){this.dependencyGraph=e,this.unparser=t,this.exporter=r}getCellHyperlink(e){let t=this.dependencyGraph.getCell(e);if(t instanceof rM){let e=t.getFormula(this.dependencyGraph.lazilyTransformingAstService);if("HYPERLINK"===e.procedureName)return e.hyperlink}}getCellFormula(e,t){let r=this.dependencyGraph.getCell(e);if(r instanceof rM){let n=r.getFormula(this.dependencyGraph.lazilyTransformingAstService);return t=null!=t?t:e,this.unparser.unparse(n,t)}if(r instanceof rA){let n=r.getAddress(this.dependencyGraph.lazilyTransformingAstService);if(n.row!==e.row||n.col!==e.col||n.sheet!==e.sheet)return;t=null!=t?t:e;let o=r.getFormula(this.dependencyGraph.lazilyTransformingAstService);if(void 0!==o)return this.unparser.unparse(o,t)}else if(r instanceof rW)return r.getFormula()}getCellSerialized(e,t){var r;return null!=(r=this.getCellFormula(e,t))?r: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){let r=this.dependencyGraph.getSheetHeight(e),n=this.dependencyGraph.getSheetWidth(e),o=Array(r);for(let i=0;i<r;i++){o[i]=Array(n);for(let r=0;r<n;r++){let n=r1(e,r,i);o[i][r]=t(n)}for(let e=n-1;e>=0;e--)if(null===o[i][e]||void 0===o[i][e])o[i].pop();else break}for(let e=r-1;e>=0;e--)if(0===o[e].length)o.pop();else break;return o}genericAllSheetsGetter(e){let t={};for(let r of this.dependencyGraph.sheetMapping.iterateSheetNames()){let n=this.dependencyGraph.sheetMapping.getSheetIdOrThrowError(r);t[r]=e(n)}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(){let e=[],t=0;for(let r of this.dependencyGraph.sheetMapping.iterateSheetNames())e[this.dependencyGraph.sheetMapping.getSheetIdOrThrowError(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){let r=new ty(e,this.dependencyGraph.sheetMapping,t);return new id(this.dependencyGraph,r,this.exporter)}}class iu{static buildFromSheets(e,t={},r=[]){let n=new iy(t);return this.buildEngine(n,e,r)}static buildFromSheet(e,t={},r=[]){let n=new iy(t),o=n.translationPackage.getUITranslation(h.NEW_SHEET_PREFIX)+"1";return this.buildEngine(n,{[o]:e},r)}static buildEmpty(e={},t=[]){return this.buildEngine(new iy(e),{},t)}static rebuildWithConfig(e,t,r,n){return this.buildEngine(e,t,r,n)}static buildEngine(e,t={},r=[],n=e.useStats?new tq:new tK){n.start(a.BUILD_ENGINE_TOTAL);let o=new tG,i=new o3(e),s=new ir(n),l=rV.buildEmpty(s,e,i,o,n),h=e.useColumnIndex?new ia(l,e,n):new is(l),d=l.sheetMapping,u=l.addressMapping;for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];rF(n);let o=rB(n);if(o.height>e.maxRows||o.width>e.maxColumns)throw new tJ;let i=d.addSheet(r);u.addSheetAndSetStrategyBasedOnBoundaries(i,o,{throwIfSheetAlreadyExists:!0})}let c=new tC(e,i,l.sheetReferenceRegistrar.ensureSheetRegistered.bind(l.sheetReferenceRegistrar));s.parser=c;let g=new ty(e,d,o),p=new nY(e),m=new ih(e),f=new ni(e,p,m),y=new on(e,p,m),b=new nT(e,i),C=new oC(e,l,h,y,c,n,s,o,b),w=new oG(e,C);s.undoRedo=w;let S=new oi(e,l,C),R=new o$(e,C,w,S,l,h,c,y,s,o),E=new oQ(e,o,d,s),T=new id(l,g,E),A=new o7(e,l,h,n,f,i,o,T,b,p);n.measure(a.GRAPH_BUILD,()=>{new oZ(l,h,c,y,n,b).buildGraph(t,n)}),r.forEach(e=>{R.ensureItIsPossibleToAddNamedExpression(e.name,e.expression,e.scope),R.operations.addNamedExpression(e.name,e.expression,e.scope,e.options)});let M=new oq(e,n,A,s,l,h);return M.run(),n.end(a.BUILD_ENGINE_TOTAL),{config:e,stats:n,dependencyGraph:l,columnSearch:h,parser:c,unparser:g,cellContentParser:y,evaluator:M,lazilyTransformingAstService:s,crudOperations:R,exporter:E,namedExpressions:o,serialization:T,functionRegistry:i}}}var ic=r(3732);(U=S||(S={})).SheetAdded="sheetAdded",U.SheetRemoved="sheetRemoved",U.SheetRenamed="sheetRenamed",U.NamedExpressionAdded="namedExpressionAdded",U.NamedExpressionRemoved="namedExpressionRemoved",U.ValuesUpdated="valuesUpdated",U.EvaluationSuspended="evaluationSuspended",U.EvaluationResumed="evaluationResumed";class ig extends ic.TinyEmitter{emit(e,...t){return super.emit(e,...t),this}}class ip{constructor(e,t,r,n,o,i,s,a,l,h,d,u,c,g){this._config=e,this._stats=t,this._dependencyGraph=r,this._columnSearch=n,this._parser=o,this._unparser=i,this._cellContentParser=s,this._evaluator=a,this._lazilyTransformingAstService=l,this._crudOperations=h,this._exporter=d,this._namedExpressions=u,this._serialization=c,this._functionRegistry=g,this._emitter=new ig,this._evaluationSuspended=!1}static get defaultConfig(){return ib({})}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={},r=[]){return this.buildFromEngineState(iu.buildFromSheet(e,t,r))}static buildFromSheets(e,t={},r=[]){return this.buildFromEngineState(iu.buildFromSheets(e,t,r))}static buildEmpty(e={},t=[]){return this.buildFromEngineState(iu.buildEmpty(e,t))}static getLanguage(e){nO(e,"string","languageCode");let t=this.registeredLanguages.get(e);if(void 0!==t)return t;throw new rd}static registerLanguage(e,t){if(nO(e,"string","languageCode"),this.registeredLanguages.has(e))throw new ru;this.registeredLanguages.set(e,new rH(Object.assign({},t.functions),Object.assign({},t.errors),Object.assign({},t.ui)))}static unregisterLanguage(e){if(nO(e,"string","languageCode"),this.registeredLanguages.has(e))this.registeredLanguages.delete(e);else throw new rd}static getRegisteredLanguagesCodes(){return Array.from(this.registeredLanguages.keys())}static registerFunctionPlugin(e,t){o3.registerFunctionPlugin(e,t)}static unregisterFunctionPlugin(e){o3.unregisterFunctionPlugin(e)}static registerFunction(e,t,r){nO(e,"string","functionId"),o3.registerFunction(e,t,r)}static unregisterFunction(e){nO(e,"string","functionId"),o3.unregisterFunction(e)}static unregisterAllFunctions(){o3.unregisterAll()}static getRegisteredFunctionNames(e){nO(e,"string","code");let t=o3.getRegisteredFunctionIds();return this.getLanguage(e).getFunctionTranslations(t)}static getFunctionPlugin(e){return nO(e,"string","functionId"),o3.getFunctionPlugin(e)}static getAllFunctionPlugins(){return o3.getPlugins()}static buildFromEngineState(e){return new ip(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(!r4(e))throw new rr("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellValue(e)}getCellFormula(e){if(!r4(e))throw new rr("SimpleCellAddress","cellAddress");return this._serialization.getCellFormula(e)}getCellHyperlink(e){if(!r4(e))throw new rr("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellHyperlink(e)}getCellSerialized(e){if(!r4(e))throw new rr("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellSerialized(e)}getSheetValues(e){return nO(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetValues(e)}getSheetFormulas(e){return nO(e,"number","sheetId"),this._serialization.getSheetFormulas(e)}getSheetSerialized(e){return nO(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetSerialized(e)}getAllSheetsDimensions(){return this._serialization.genericAllSheetsGetter(e=>this.getSheetDimensions(e))}getSheetDimensions(e){return nO(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(r4(e))t=new ne(e,e);else if(r7(e))t=new ne(e.start,e.end);else throw new rr("SimpleCellAddress | SimpleCellRange","address");try{for(let e of(this._crudOperations.ensureRangeInSizeLimits(t),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 nO(e,"number","sheetId"),this._crudOperations.setRowOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapRowIndexes(e,t){nO(e,"number","sheetId");try{return this._crudOperations.validateSwapRowIndexes(e,t),this._crudOperations.testRowOrderForArrays(e,t),!0}catch(e){return!1}}setRowOrder(e,t){nO(e,"number","sheetId");let r=this._crudOperations.mappingFromOrder(e,t,"row");return this.swapRowIndexes(e,r)}isItPossibleToSetRowOrder(e,t){nO(e,"number","sheetId");try{let r=this._crudOperations.mappingFromOrder(e,t,"row");return this._crudOperations.validateSwapRowIndexes(e,r),this._crudOperations.testRowOrderForArrays(e,r),!0}catch(e){return!1}}swapColumnIndexes(e,t){return nO(e,"number","sheetId"),this._crudOperations.setColumnOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapColumnIndexes(e,t){nO(e,"number","sheetId");try{return this._crudOperations.validateSwapColumnIndexes(e,t),this._crudOperations.testColumnOrderForArrays(e,t),!0}catch(e){return!1}}setColumnOrder(e,t){nO(e,"number","sheetId");let r=this._crudOperations.mappingFromOrder(e,t,"column");return this.swapColumnIndexes(e,r)}isItPossibleToSetColumnOrder(e,t){nO(e,"number","sheetId");try{let r=this._crudOperations.mappingFromOrder(e,t,"column");return this._crudOperations.validateSwapColumnIndexes(e,r),this._crudOperations.testColumnOrderForArrays(e,r),!0}catch(e){return!1}}isItPossibleToAddRows(e,...t){nO(e,"number","sheetId");let r=oS(t);try{return this._crudOperations.ensureItIsPossibleToAddRows(e,...r),!0}catch(e){return!1}}addRows(e,...t){return nO(e,"number","sheetId"),this._crudOperations.addRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveRows(e,...t){nO(e,"number","sheetId");let r=ow(t);try{return this._crudOperations.ensureItIsPossibleToRemoveRows(e,...r),!0}catch(e){return!1}}removeRows(e,...t){return nO(e,"number","sheetId"),this._crudOperations.removeRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToAddColumns(e,...t){nO(e,"number","sheetId");let r=oS(t);try{return this._crudOperations.ensureItIsPossibleToAddColumns(e,...r),!0}catch(e){return!1}}addColumns(e,...t){return nO(e,"number","sheetId"),this._crudOperations.addColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveColumns(e,...t){nO(e,"number","sheetId");let r=ow(t);try{return this._crudOperations.ensureItIsPossibleToRemoveColumns(e,...r),!0}catch(e){return!1}}removeColumns(e,...t){return nO(e,"number","sheetId"),this._crudOperations.removeColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveCells(e,t){if(!r4(t))throw new rr("SimpleCellAddress","destinationLeftCorner");if(!r7(e))throw new rr("SimpleCellRange","source");try{let r=new ne(e.start,e.end);return this._crudOperations.operations.ensureItIsPossibleToMoveCells(r.start,r.width(),r.height(),t),!0}catch(e){return!1}}moveCells(e,t){if(!r4(t))throw new rr("SimpleCellAddress","destinationLeftCorner");if(!r7(e))throw new rr("SimpleCellRange","source");let r=new ne(e.start,e.end);return this._crudOperations.moveCells(r.start,r.width(),r.height(),t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveRows(e,t,r,n){nO(e,"number","sheetId"),nO(t,"number","startRow"),nO(r,"number","numberOfRows"),nO(n,"number","targetRow");try{return this._crudOperations.ensureItIsPossibleToMoveRows(e,t,r,n),!0}catch(e){return!1}}moveRows(e,t,r,n){return nO(e,"number","sheetId"),nO(t,"number","startRow"),nO(r,"number","numberOfRows"),nO(n,"number","targetRow"),this._crudOperations.moveRows(e,t,r,n),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveColumns(e,t,r,n){nO(e,"number","sheetId"),nO(t,"number","startColumn"),nO(r,"number","numberOfColumns"),nO(n,"number","targetColumn");try{return this._crudOperations.ensureItIsPossibleToMoveColumns(e,t,r,n),!0}catch(e){return!1}}moveColumns(e,t,r,n){return nO(e,"number","sheetId"),nO(t,"number","startColumn"),nO(r,"number","numberOfColumns"),nO(n,"number","targetColumn"),this._crudOperations.moveColumns(e,t,r,n),this.recomputeIfDependencyGraphNeedsIt()}copy(e){if(!r7(e))throw new rr("SimpleCellRange","source");let t=new ne(e.start,e.end);return this._crudOperations.copy(t.start,t.width(),t.height()),this.getRangeValues(e)}cut(e){if(!r7(e))throw new rr("SimpleCellRange","source");let t=new ne(e.start,e.end);return this._crudOperations.cut(t.start,t.width(),t.height()),this.getRangeValues(e)}paste(e){if(!r4(e))throw new rr("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(!r7(e))throw new rr("SimpleCellRange","source");return new ne(e.start,e.end).arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellValue(e)))}getRangeFormulas(e){if(!r7(e))throw new rr("SimpleCellRange","source");return new ne(e.start,e.end).arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellFormula(e)))}getRangeSerialized(e){if(!r7(e))throw new rr("SimpleCellRange","source");return new ne(e.start,e.end).arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellSerialized(e)))}getFillRangeData(e,t,r=!1){if(!r7(e))throw new rr("SimpleCellRange","source");if(!r7(t))throw new rr("SimpleCellRange","target");let n=new ne(e.start,e.end),o=new ne(t.start,t.end);return this.ensureEvaluationIsNotSuspended(),o.arrayOfAddressesInRange().map(o=>o.map(o=>{let i=((o.row-(r?t:e).start.row)%n.height()+n.height())%n.height()+e.start.row,s=((o.col-(r?t:e).start.col)%n.width()+n.width())%n.width()+e.start.col;return this._serialization.getCellSerialized({row:i,col:s,sheet:n.sheet},o)}))}isItPossibleToAddSheet(e){nO(e,"string","sheetName");try{return this._crudOperations.ensureItIsPossibleToAddSheet(e),!0}catch(e){return!1}}addSheet(e){void 0!==e&&nO(e,"string","sheetName");let t=this._crudOperations.addSheet(e);return this.recomputeIfDependencyGraphNeedsIt(),this._emitter.emit(S.SheetAdded,t),t}isItPossibleToRemoveSheet(e){nO(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(e){return!1}}removeSheet(e){nO(e,"number","sheetId");let t=this.sheetMapping.getSheetName(e);this._crudOperations.removeSheet(e);let r=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(S.SheetRemoved,t,r),r}isItPossibleToClearSheet(e){nO(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(e){return!1}}clearSheet(e){return nO(e,"number","sheetId"),this._crudOperations.clearSheet(e),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToReplaceSheetContent(e,t){nO(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),this._crudOperations.ensureItIsPossibleToChangeSheetContents(e,t),!0}catch(e){return!1}}setSheetContent(e,t){return nO(e,"number","sheetId"),this._crudOperations.setSheetContent(e,t),this.recomputeIfDependencyGraphNeedsIt()}simpleCellAddressFromString(e,t){return nO(e,"string","cellAddress"),nO(t,"number","sheetId"),eN(this.sheetMapping.getSheetId.bind(this.sheetMapping),e,t)}simpleCellRangeFromString(e,t){return nO(e,"string","cellRange"),nO(t,"number","sheetId"),((e,t,r)=>{let n=t.split(":");if(2!==n.length)return;let[o,i]=n,s=eN(e,o,r);if(void 0===s)return;let a=eN(e,i,s.sheet);if(void 0!==a&&s.sheet===a.sheet)return r8(s,a)})(this.sheetMapping.getSheetId.bind(this.sheetMapping),e,t)}simpleCellAddressToString(e,t={}){if(!r4(e))throw new rr("SimpleCellAddress","cellAddress");let r="number"==typeof t?t:t.includeSheetName?e.sheet+1:e.sheet;return eI(this.sheetMapping.getSheetNameOrThrowError.bind(this.sheetMapping),e,r)}simpleCellRangeToString(e,t={}){if(!r7(e))throw new rr("SimpleCellRange","cellRange");let r="number"==typeof t?t:t.includeSheetName?e.start.sheet+e.end.sheet+1:e.start.sheet;var n=this.sheetMapping.getSheetNameOrThrowError.bind(this.sheetMapping);let o=eI(n,e.start,r),i=eI(n,e.end,e.start.sheet);if(void 0!==o&&void 0!==i)return`${o}:${i}`}getCellDependents(e){let t;if(r4(e))t=this._dependencyGraph.addressMapping.getCell(e);else if(r7(e))t=this._dependencyGraph.rangeMapping.getRangeVertex(e.start,e.end);else throw new rr("SimpleCellAddress | SimpleCellRange",e);return void 0===t?[]:this._dependencyGraph.getAdjacentNodesAddresses(t)}getCellPrecedents(e){let t;if(r4(e))t=this._dependencyGraph.addressMapping.getCell(e);else if(r7(e))t=this._dependencyGraph.rangeMapping.getRangeVertex(e.start,e.end);else throw new rr("SimpleCellAddress | SimpleCellRange",e);return void 0===t?[]:this._dependencyGraph.dependencyQueryAddresses(t)}getSheetName(e){return nO(e,"number","sheetId"),this.sheetMapping.getSheetName(e)}getSheetNames(){return this.sheetMapping.getSheetNames()}getSheetId(e){return nO(e,"string","sheetName"),this.sheetMapping.getSheetId(e)}doesSheetExist(e){return nO(e,"string","sheetName"),this.sheetMapping.hasSheetWithName(e)}getCellType(e){if(!r4(e))throw new rr("SimpleCellAddress","cellAddress");var t=this.dependencyGraph.getCell(e);if(t instanceof rA)if(t.isLeftCorner(e))return u.ARRAYFORMULA;else return u.ARRAY;return t instanceof rM||t instanceof rW?u.FORMULA:t instanceof rz?u.VALUE:u.EMPTY}doesCellHaveSimpleValue(e){if(!r4(e))throw new rr("SimpleCellAddress","cellAddress");return this.getCellType(e)===u.VALUE}doesCellHaveFormula(e){if(!r4(e))throw new rr("SimpleCellAddress","cellAddress");let t=this.getCellType(e);return t===u.FORMULA||t===u.ARRAYFORMULA}isCellEmpty(e){if(!r4(e))throw new rr("SimpleCellAddress","cellAddress");return this.getCellType(e)===u.EMPTY}isCellPartOfArray(e){if(!r4(e))throw new rr("SimpleCellAddress","cellAddress");let t=this.getCellType(e);return t===u.ARRAY||t===u.ARRAYFORMULA}getCellValueType(e){if(!r4(e))throw new rr("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),rK(this.dependencyGraph.getCellValue(e))}getCellValueDetailedType(e){if(!r4(e))throw new rr("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();var t=this.dependencyGraph.getCellValue(e);return tD(t)?t instanceof tx?t.getDetailedType():s.NUMBER_RAW:rK(t)}getCellValueFormat(e){if(!r4(e))throw new rr("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();var t=this.dependencyGraph.getCellValue(e);if(tD(t))return t instanceof tx?t.format:void 0}countSheets(){return this.sheetMapping.numberOfSheets()}isItPossibleToRenameSheet(e,t){nO(e,"number","sheetId"),nO(t,"string","newName");try{return this._crudOperations.ensureItIsPossibleToRenameSheet(e,t),!0}catch(e){return!1}}renameSheet(e,t){nO(e,"number","sheetId"),nO(t,"string","newName");let r=this._crudOperations.renameSheet(e,t);this.recomputeIfDependencyGraphNeedsIt(),void 0!==r&&this._emitter.emit(S.SheetRenamed,r,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(S.EvaluationSuspended)}resumeEvaluation(){this._evaluationSuspended=!1;let e=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(S.EvaluationResumed,e),e}isEvaluationSuspended(){return this._evaluationSuspended}isItPossibleToAddNamedExpression(e,t,r){nO(e,"string","expressionName"),void 0!==r&&nO(r,"number","scope");try{return this._crudOperations.ensureItIsPossibleToAddNamedExpression(e,t,r),!0}catch(e){return!1}}addNamedExpression(e,t,r,n){nO(e,"string","expressionName"),void 0!==r&&nO(r,"number","scope"),this._crudOperations.addNamedExpression(e,t,r,n);let o=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(S.NamedExpressionAdded,e,o),o}getNamedExpressionValue(e,t){nO(e,"string","expressionName"),void 0!==t&&nO(t,"number","scope"),this.ensureEvaluationIsNotSuspended(),this._crudOperations.ensureScopeIdIsValid(t);let r=this._namedExpressions.namedExpressionForScope(e,t);return r?this._serialization.getCellValue(r.address):void 0}getNamedExpressionFormula(e,t){nO(e,"string","expressionName"),void 0!==t&&nO(t,"number","scope"),this._crudOperations.ensureScopeIdIsValid(t);let r=this._namedExpressions.namedExpressionForScope(e,t);if(void 0!==r)return this._serialization.getCellFormula(r.address)}getNamedExpression(e,t){nO(e,"string","expressionName"),void 0!==t&&nO(t,"number","scope");let r=this._namedExpressions.namedExpressionForScope(e,t);if(void 0!==r)return{name:e,scope:t,expression:this._serialization.getCellFormula(r.address),options:r.options}}isItPossibleToChangeNamedExpression(e,t,r){nO(e,"string","expressionName"),void 0!==r&&nO(r,"number","scope");try{return this._crudOperations.ensureItIsPossibleToChangeNamedExpression(e,t,r),!0}catch(e){return!1}}changeNamedExpression(e,t,r,n){return nO(e,"string","expressionName"),void 0!==r&&nO(r,"number","scope"),this._crudOperations.changeNamedExpressionExpression(e,r,t,n),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveNamedExpression(e,t){nO(e,"string","expressionName"),void 0!==t&&nO(t,"number","scope");try{return this._crudOperations.isItPossibleToRemoveNamedExpression(e,t),!0}catch(e){return!1}}removeNamedExpression(e,t){nO(e,"string","expressionName"),void 0!==t&&nO(t,"number","scope");let r=this._crudOperations.removeNamedExpression(e,t);if(!r)return[];{let e=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(S.NamedExpressionRemoved,r.displayName,e),e}}listNamedExpressions(e){return void 0!==e&&nO(e,"number","scope"),this._crudOperations.ensureScopeIdIsValid(e),this._namedExpressions.getAllNamedExpressionsNamesInScope(e)}getAllNamedExpressionsSerialized(){return this._serialization.getAllNamedExpressionsSerialized()}normalizeFormula(e){nO(e,"string","formulaString");let{ast:t,address:r}=this.extractTemporaryFormula(e);if(void 0===t)throw new t0;return this._unparser.unparse(t,r)}calculateFormula(e,t){nO(e,"string","formulaString"),nO(t,"number","sheetId"),this._crudOperations.ensureScopeIdIsValid(t);let{ast:r,address:n,dependencies:o}=this.extractTemporaryFormula(e,t);if(void 0===r)throw new t0;let i=this.evaluator.runAndForget(r,n,o);return this._exporter.exportScalarOrRange(i)}getNamedExpressionsFromFormula(e){nO(e,"string","formulaString");let{ast:t,dependencies:r}=this.extractTemporaryFormula(e);if(void 0===t)throw new t0;return[...new Set(r.filter(e=>e instanceof tA).map(e=>e.name))]}validateFormula(e){nO(e,"string","formulaString");let{ast:t}=this.extractTemporaryFormula(e);return void 0!==t}getRegisteredFunctionNames(){return ip.getLanguage(this._config.language).getFunctionTranslations(this._functionRegistry.getRegisteredFunctionIds())}getFunctionPlugin(e){return nO(e,"string","functionId"),this._functionRegistry.getFunctionPlugin(e)}getAllFunctionPlugins(){return this._functionRegistry.getPlugins()}numberToDateTime(e){return nO(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDateTime(e)}numberToDate(e){return nO(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDate(e)}numberToTime(e){return nO(e,"number","val"),nK(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(){for(let[e,t]of Object.entries(this))t instanceof Function?this[e]=function(e){return()=>{throw Error(`The "${e}" method cannot be called because this HyperFormula instance has been destroyed`)}}(t):delete this[e]}ensureEvaluationIsNotSuspended(){if(this._evaluationSuspended)throw new ra}extractTemporaryFormula(e,t=1){let r=this._cellContentParser.parse(e),n={sheet:t,col:0,row:0};if(!(r instanceof y.Formula))return{address:n,dependencies:[]};let{ast:o,errors:i,dependencies:s}=this._parser.parse(r.formula,n);return i.length>0?{address:n,dependencies:[]}:{ast:o,address:n,dependencies:s}}rebuildWithConfig(e){let t=this._config.mergeConfig(e),r=this._config.mergeConfig({language:e.language}),n=this._serialization.withNewConfig(r,this._namedExpressions).getAllSheetsSerialized(),o=this._serialization.getAllNamedExpressionsSerialized(),i=iu.rebuildWithConfig(t,n,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[];{let e=this._crudOperations.getAndClearContentChanges(),t=this.dependencyGraph.verticesToRecompute();this.dependencyGraph.clearDirtyVertices(),t.length>0&&e.addAll(this.evaluator.partialRun(t));let r=e.exportChanges(this._exporter);return e.isEmpty()||this._emitter.emit(S.ValuesUpdated,r),r}}}ip.version="3.2.0",ip.buildDate="19/02/2026 12:14:46",ip.releaseDate="19/02/2026",ip.languages={},ip.registeredLanguages=new Map;let im=new WeakMap;class iy{constructor(e={},t=!0){const{accentSensitive:r,caseSensitive:n,caseFirst:o,chooseAddressMappingPolicy:i,context:s,currencySymbol:a,dateFormats:l,decimalSeparator:h,evaluateNullToZero:d,functionArgSeparator:u,functionPlugins:c,ignorePunctuation:g,leapYear1900:p,localeLang:m,language:f,ignoreWhiteSpace:y,licenseKey:b,matchWholeCell:C,arrayColumnSeparator:w,arrayRowSeparator:S,maxRows:R,maxColumns:E,nullYear:T,nullDate:A,parseDateTime:M,precisionEpsilon:N,precisionRounding:I,stringifyDateTime:x,stringifyDuration:O,smartRounding:_,timeFormats:k,thousandSeparator:H,useArrayArithmetic:L,useStats:P,undoLimit:D,useColumnIndex:F,useRegularExpressions:B,useWildcards:V}=e;t&&iy.warnDeprecatedOptions(e),this.useArrayArithmetic=nM(L,"boolean","useArrayArithmetic"),this.accentSensitive=nM(r,"boolean","accentSensitive"),this.caseSensitive=nM(n,"boolean","caseSensitive"),this.caseFirst=nM(o,["upper","lower","false"],"caseFirst"),this.ignorePunctuation=nM(g,"boolean","ignorePunctuation"),this.chooseAddressMappingPolicy=null!=i?i:iy.defaultConfig.chooseAddressMappingPolicy,this.dateFormats=[...nI(l,Array.isArray,"array","dateFormats")],this.timeFormats=[...nI(k,Array.isArray,"array","timeFormats")],this.functionArgSeparator=nM(u,"string","functionArgSeparator"),this.decimalSeparator=nM(h,[".",","],"decimalSeparator"),this.language=nM(f,"string","language"),this.ignoreWhiteSpace=nM(y,["standard","any"],"ignoreWhiteSpace"),this.licenseKey=nM(b,"string","licenseKey"),this.thousandSeparator=nM(H,["",","," ","."],"thousandSeparator"),this.arrayColumnSeparator=nM(w,[",",";"],"arrayColumnSeparator"),this.arrayRowSeparator=nM(S,[";","|"],"arrayRowSeparator"),this.localeLang=nM(m,"string","localeLang"),this.functionPlugins=[...null!=c?c:iy.defaultConfig.functionPlugins],this.smartRounding=nM(_,"boolean","smartRounding"),this.evaluateNullToZero=nM(d,"boolean","evaluateNullToZero"),this.nullYear=nM(T,"number","nullYear"),nN(this.nullYear,"nullYear",0),function(e,t){if(e>100)throw new ri(t,100)}(this.nullYear,"nullYear"),this.precisionRounding=nM(I,"number","precisionRounding"),nN(this.precisionRounding,"precisionRounding",0),this.precisionEpsilon=nM(N,"number","precisionEpsilon"),nN(this.precisionEpsilon,"precisionEpsilon",0),this.useColumnIndex=nM(F,"boolean","useColumnIndex"),this.useStats=nM(P,"boolean","useStats"),this.parseDateTime=nM(M,"function","parseDateTime"),this.stringifyDateTime=nM(x,"function","stringifyDateTime"),this.stringifyDuration=nM(O,"function","stringifyDuration"),this.translationPackage=ip.getLanguage(this.language),this.errorMapping=this.translationPackage.buildErrorMapping(),this.nullDate=nI(A,nW,"IDate","nullDate"),this.leapYear1900=nM(p,"boolean","leapYear1900"),this.undoLimit=nM(D,"number","undoLimit"),this.useRegularExpressions=nM(B,"boolean","useRegularExpressions"),this.useWildcards=nM(V,"boolean","useWildcards"),this.matchWholeCell=nM(C,"boolean","matchWholeCell"),nN(this.undoLimit,"undoLimit",0),this.maxRows=nM(R,"number","maxRows"),nN(this.maxRows,"maxRows",1),this.maxColumns=nM(E,"number","maxColumns"),this.currencySymbol=this.setupCurrencySymbol(a),nN(this.maxColumns,"maxColumns",1),this.context=s,im.set(this,{licenseKeyValidityState:function(e){let 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,""))[n5]!==n7("Z"))return!1;let t=0;return 0===[[0,n7("G")+1],[n7("H"),n7("H")-1],[n7("G")+n7("H"),n7("G")]].reduce((r,[n,o],i)=>{let s,a,l,h,d;return r|=(parseInt(`${parseInt((s=e,a=t+n-2*(0!==i),l=o+2*!!i,parseInt(s.substr(a,l),16)+(h=e,d=t+n+o,parseInt(h.substr(d,2),16)+[]).padStart(2,"0")),10)}`,10)%97||2)>>1,t+=2,r},n7("A"))}(e)){var r,n;let o,i,s,a,l,h,d,u,c,[g,p,m]="19/02/2026".split("/"),f=Math.floor(new Date(`${p}/${g}/${m}`).getTime()/864e5),y=25===n9(r=e)[n5]?(o=n9(r),i=parseInt("12",16),s=n7("F"),parseInt(o.substr(i,s),16)/(a=n9(r),l=n7("C"),h=n7("Y")>>4,parseInt(a.substr(l,h),16)||(~~![][n5]<<3)+1)):0;t.vars.keyValidityDate=(d=["January","February","March","April","May","June","July","August","September","October","November","December"][(n=new Date((y+1)*864e5)).getMonth()],u=n.getDate(),c=n.getFullYear(),`${d} ${u}, ${c}`),f>y?t.template="expired":t.template="valid"}else""!==e&&(t.template="invalid");return oe||"valid"===t.template||(console.warn(n8[t.template](t.vars)),oe=!0),t.template}(this.licenseKey)}),nx({value:this.decimalSeparator,name:"decimalSeparator"},{value:this.functionArgSeparator,name:"functionArgSeparator"},{value:this.thousandSeparator,name:"thousandSeparator"}),nx({value:this.arrayRowSeparator,name:"arrayRowSeparator"},{value:this.arrayColumnSeparator,name:"arrayColumnSeparator"})}setupCurrencySymbol(e){let t=[...nI(e,Array.isArray,"array","currencySymbol")];return t.forEach(e=>{if("string"!=typeof e)throw new rr("string[]","currencySymbol");if(""===e)throw new rn("currencySymbol")}),t}get licenseKeyValidityState(){return im.get(this).licenseKeyValidityState}getConfig(){return ib(this)}mergeConfig(e){let t=Object.assign({},this.getConfig(),e);return iy.warnDeprecatedOptions(e),new iy(t,!1)}static warnDeprecatedOptions(e){}static warnDeprecatedIfUsed(e,t,r,n){void 0!==e&&(void 0===n?console.warn(`${t} option is deprecated since ${r}`):console.warn(`${t} option is deprecated since ${r}, please use ${n}`))}}function ib(e){var t;let r={};for(let n in iy.defaultConfig){let o=null!=(t=e[n])?t:iy.defaultConfig[n];Array.isArray(o)?r[n]=[...o]:r[n]=o}return r}iy.defaultConfig={accentSensitive:!1,currencySymbol:["$"],caseSensitive:!1,caseFirst:"lower",context:void 0,chooseAddressMappingPolicy:new class{call(){return r$}},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,r){var n;if(void 0===t&&void 0===r)return;let o=e.replace(nH," ").trim().toLowerCase();if(n=o,!nk.test(n))return;let i=o.substring(o.length-2);"am"===i||"pm"===i?o=o.substring(0,o.length-2).trim():"a"===(i=o.substring(o.length-1))||"p"===i?o=o.substring(0,o.length-1).trim():i=void 0;let s=o.split(nL);s.length>=2&&s[s.length-2].includes(":")&&(s[s.length-2]=s[s.length-2]+"."+s[s.length-1],s.pop());let a=s[s.length-1].split(":");if(void 0!==i&&a.push(i),1===s.length)return nF(a,r);if(1===a.length)return nB(s,t);let l=nB(s.slice(0,s.length-1),t),h=nF(a,r);return void 0===l||void 0===h?void 0:Object.assign(Object.assign({},l),h)},precisionEpsilon:1e-13,precisionRounding:10,smartRounding:!0,stringifyDateTime:function(e,t){let r=n2(t);if(void 0===r)return;let n=r.tokens,o="",i=!1,s=n.some(e=>e.type===m.FORMAT&&("a/p"===e.value||"A/P"===e.value||"am/pm"===e.value||"AM/PM"===e.value));for(let t=0;t<n.length;t++){let r=n[t];if(r.type===m.FREE_TEXT){o+=r.value;continue}switch(r.value.toLowerCase()){case"h":case"hh":i=!0,o+=n6(s?(e.hours+11)%12+1:e.hours,r.value.length);break;case"d":case"dd":o+=n6(e.day,r.value.length);break;case"s":case"ss":o+=n6(Math.floor(e.seconds),r.value.length);break;case"m":case"mm":t+1<n.length&&n[t+1].value.startsWith(":")&&(i=!0),i?o+=n6(e.minutes,r.value.length):o+=n6(e.month,r.value.length),i=!0;break;case"yy":o+=n6(e.year%100,r.value.length);break;case"yyyy":o+=e.year;break;case"am/pm":case"a/p":{let[t,n]=r.value.split("/");o+=e.hours<12?t:n;break}default:if(n_.test(r.value)){let t=r.value.length-3;o+=`${e.seconds<10?"0":""}${Math.floor(e.seconds*Math.pow(10,t))/Math.pow(10,t)}`;continue}return}}return o},stringifyDuration:function(e,t){let r=n2(t);if(void 0===r)return;let n=r.tokens,o="";for(let t of n){if(t.type===m.FREE_TEXT){o+=t.value;continue}switch(t.value.toLowerCase()){case"h":case"hh":o+=n6(e.hours,t.value.length),e.hours=0;break;case"[hh]":o+=n6(e.hours,t.value.length-2),e.hours=0;break;case"m":case"mm":o+=n6(e.minutes,t.value.length),e.minutes=0;break;case"[mm]":o+=n6(e.minutes+60*e.hours,t.value.length-2),e.minutes=0,e.hours=0;break;case"s":case"ss":o+=n6(Math.floor(e.seconds),t.value.length);break;default:if(n_.test(t.value)){let r=Math.max(t.value.length-3,0);o+=`${e.seconds<10?"0":""}${Math.floor(e.seconds*Math.pow(10,r))/Math.pow(10,r)}`;continue}return}}return o},timeFormats:["hh:mm","hh:mm:ss.sss"],thousandSeparator:"",undoLimit:20,useRegularExpressions:!1,useWildcards:!0,useColumnIndex:!1,useStats:!1,useArrayArithmetic:!1};let iC={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",IRR:"IRR",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",N:"N",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",VALUE:"VALUE",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"}};(z=R||(R={}))[z.FullyAbsolute=1]="FullyAbsolute",z[z.RowAbsoluteColRelative=2]="RowAbsoluteColRelative",z[z.RowRelativeColAbsolute=3]="RowRelativeColAbsolute",z[z.FullyRelative=4]="FullyRelative";class iw extends nR{verifyAddressArguments(e,t,r,n){if(n){if(e<1||t<1)return new rX(d.VALUE,eq.LessThanOne)}else if(R.FullyAbsolute==r){if(e<1||t<1)return new rX(d.VALUE,eq.LessThanOne)}else if(R.RowAbsoluteColRelative==r){if(e<1)return new rX(d.VALUE,eq.LessThanOne)}else if(R.RowRelativeColAbsolute==r&&t<1)return new rX(d.VALUE,eq.LessThanOne)}address(e,t){return this.runFunction(e.args,t,this.metadata("ADDRESS"),(e,t,r,n,o)=>{let i=this.verifyAddressArguments(e,t,r,n);if(void 0!==i)return i;let s=eO(t-1),a="";null!=o&&(a=`${o}!`);let l=0==t?"C":`C[${t}]`,h=0==e?"R":`R[${e}]`;return R.FullyRelative==r?n?`${a}${s}${e}`:`${a}${h}${l}`:R.RowRelativeColAbsolute==r?n?`${a}$${s}${e}`:`${a}${h}C${t}`:R.RowAbsoluteColRelative==r?n?`${a}${s}$${e}`:`${a}R${e}${l}`:n?`${a}$${s}$${e}`:`${a}R${e}C${t}`})}}iw.implementedFunctions={ADDRESS:{method:"address",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0,defaultValue:1,minValue:1,maxValue:4},{argumentType:p.BOOLEAN,optionalArg:!0,defaultValue:!0},{argumentType:p.STRING,optionalArg:!0}]}};class iS extends nR{arrayformula(e,t){return this.runFunction(e.args,t,this.metadata("ARRAYFORMULA"),e=>e)}arrayformulaArraySize(e,t){if(1!==e.args.length)return nE.error();let r=this.metadata("ARRAYFORMULA");return e.args.map(e=>{var n;return this.arraySizeForAst(e,new nn(t.formulaAddress,t.arraysFlag||null!=(n=null==r?void 0:r.enableArrayArithmeticForArguments)&&n))})[0]}arrayconstrain(e,t){return this.runFunction(e.args,t,this.metadata("ARRAY_CONSTRAIN"),(e,t,r)=>{t=Math.min(t,e.height()),r=Math.min(r,e.width());let n=e.data,o=[];for(let e=0;e<t;e++)o.push(n[e].slice(0,r));return tB.onlyValues(o)})}arrayconstrainArraySize(e,t){if(3!==e.args.length)return nE.error();let r=this.metadata("ARRAY_CONSTRAIN"),{height:n,width:i}=e.args.map(e=>{var n;return this.arraySizeForAst(e,new nn(t.formulaAddress,t.arraysFlag||null!=(n=null==r?void 0:r.enableArrayArithmeticForArguments)&&n))})[0];return(e.args[1].type===o.NUMBER&&(n=Math.min(n,e.args[1].value)),e.args[2].type===o.NUMBER&&(i=Math.min(i,e.args[2].value)),n<1||i<1||!Number.isInteger(n)||!Number.isInteger(i))?nE.error():new nE(i,n)}filter(e,t){return this.runFunction(e.args,t,this.metadata("FILTER"),(e,...t)=>{for(let r of t)if(e.width()!==r.width()||e.height()!==r.height())return new rX(d.NA,eq.EqualLength);if(e.width()>1&&e.height()>1)return new rX(d.NA,eq.WrongDimension);let r=e.data,n=[];for(let o=0;o<e.height();o++){let i=[];for(let n=0;n<e.width();n++){let e=!0;for(let r of t)if(!0!==nd(r.data[o][n])){e=!1;break}e&&i.push(r[o][n])}i.length>0&&n.push(i)}return n.length>0?tB.onlyValues(n):new rX(d.NA,eq.EmptyRange)})}filterArraySize(e,t){if(e.args.length<=1)return nE.error();let r=this.metadata("FILTER"),n=e.args.map(e=>{var n;return this.arraySizeForAst(e,new nn(t.formulaAddress,t.arraysFlag||null!=(n=null==r?void 0:r.enableArrayArithmeticForArguments)&&n))});return new nE(Math.max(...n.map(e=>e.width)),Math.max(...n.map(e=>e.height)))}}iS.implementedFunctions={ARRAYFORMULA:{method:"arrayformula",sizeOfResultArrayMethod:"arrayformulaArraySize",enableArrayArithmeticForArguments:!0,parameters:[{argumentType:p.ANY}]},ARRAY_CONSTRAIN:{method:"arrayconstrain",sizeOfResultArrayMethod:"arrayconstrainArraySize",parameters:[{argumentType:p.RANGE},{argumentType:p.INTEGER,minValue:1},{argumentType:p.INTEGER,minValue:1}],vectorizationForbidden:!0},FILTER:{method:"filter",sizeOfResultArrayMethod:"filterArraySize",enableArrayArithmeticForArguments:!0,parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}],repeatLastArgs:1}};class iv extends nR{abs(e,t){return this.runFunction(e.args,t,this.metadata("ABS"),Math.abs)}}iv.implementedFunctions={ABS:{method:"abs",parameters:[{argumentType:p.NUMBER}]}};class iR extends nR{bitlshift(e,t){return this.runFunction(e.args,t,this.metadata("BITLSHIFT"),iE)}bitrshift(e,t){return this.runFunction(e.args,t,this.metadata("BITRSHIFT"),iT)}}function iE(e,t){return t<0?iT(e,-t):iA(e*Math.pow(2,t))}function iT(e,t){return t<0?iE(e,-t):iA(Math.floor(e/Math.pow(2,t)))}function iA(e){return e>0xffffffffffff?new rX(d.NUM,eq.BitshiftLong):e}iR.implementedFunctions={BITLSHIFT:{method:"bitlshift",parameters:[{argumentType:p.INTEGER,minValue:0},{argumentType:p.INTEGER,minValue:-53,maxValue:53}]},BITRSHIFT:{method:"bitrshift",parameters:[{argumentType:p.INTEGER,minValue:0},{argumentType:p.INTEGER,minValue:-53,maxValue:53}]}};class iM extends nR{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)}}iM.implementedFunctions={BITAND:{method:"bitand",parameters:[{argumentType:p.INTEGER,minValue:0},{argumentType:p.INTEGER,minValue:0}]},BITOR:{method:"bitor",parameters:[{argumentType:p.INTEGER,minValue:0},{argumentType:p.INTEGER,minValue:0}]},BITXOR:{method:"bitxor",parameters:[{argumentType:p.INTEGER,minValue:0},{argumentType:p.INTEGER,minValue:0}]}};class iN extends nR{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,r)=>e?t:r)}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 rX(d.NA,eq.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)=>{let r=t.length,n=0;for(;n+1<r;n+=2)if(!(t[n]instanceof rX)&&this.arithmeticHelper.eq(e,t[n]))return t[n+1];return n<r?t[n]:new rX(d.NA,eq.NoDefault)})}iferror(e,t){return this.runFunction(e.args,t,this.metadata("IFERROR"),(e,t)=>e instanceof rX?t:e)}ifna(e,t){return this.runFunction(e.args,t,this.metadata("IFNA"),(e,t)=>e instanceof rX&&e.type===d.NA?t:e)}choose(e,t){return this.runFunction(e.args,t,this.metadata("CHOOSE"),(e,...t)=>e>t.length?new rX(d.NUM,eq.Selector):t[e-1])}}iN.implementedFunctions={TRUE:{method:"literalTrue",parameters:[]},FALSE:{method:"literalFalse",parameters:[]},IF:{method:"conditionalIf",parameters:[{argumentType:p.BOOLEAN},{argumentType:p.SCALAR,passSubtype:!0},{argumentType:p.SCALAR,defaultValue:!1,passSubtype:!0}]},IFS:{method:"ifs",parameters:[{argumentType:p.BOOLEAN},{argumentType:p.SCALAR,passSubtype:!0}],repeatLastArgs:2},AND:{method:"and",parameters:[{argumentType:p.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},OR:{method:"or",parameters:[{argumentType:p.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},XOR:{method:"xor",parameters:[{argumentType:p.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},NOT:{method:"not",parameters:[{argumentType:p.BOOLEAN}]},SWITCH:{method:"switch",parameters:[{argumentType:p.NOERROR},{argumentType:p.SCALAR,passSubtype:!0},{argumentType:p.SCALAR,passSubtype:!0}],repeatLastArgs:1},IFERROR:{method:"iferror",parameters:[{argumentType:p.SCALAR,passSubtype:!0},{argumentType:p.SCALAR,passSubtype:!0}]},IFNA:{method:"ifna",parameters:[{argumentType:p.SCALAR,passSubtype:!0},{argumentType:p.SCALAR,passSubtype:!0}]},CHOOSE:{method:"choose",parameters:[{argumentType:p.INTEGER,minValue:1},{argumentType:p.SCALAR,passSubtype:!0}],repeatLastArgs:1}};class iI extends nR{char(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),e=>e<1||e>=256?new rX(d.VALUE,eq.CharacterCodeBounds):String.fromCharCode(Math.trunc(e)))}unichar(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),e=>e<1||e>=1114112?new rX(d.VALUE,eq.CharacterCodeBounds):String.fromCodePoint(Math.trunc(e)))}}iI.implementedFunctions={CHAR:{method:"char",parameters:[{argumentType:p.NUMBER}]},UNICHAR:{method:"unichar",parameters:[{argumentType:p.NUMBER}]}};class ix extends nR{code(e,t){return this.runFunction(e.args,t,this.metadata("CODE"),e=>0===e.length?new rX(d.VALUE,eq.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))?t:new rX(d.VALUE,eq.EmptyString)})}}ix.implementedFunctions={CODE:{method:"code",parameters:[{argumentType:p.STRING}]},UNICODE:{method:"unicode",parameters:[{argumentType:p.STRING}]}};class iO extends nR{countblank(e,t){return this.runFunction(e.args,t,this.metadata("COUNTBLANK"),(...e)=>{let t=0;return e.forEach(e=>{e===tN&&t++}),t})}}iO.implementedFunctions={COUNTBLANK:{method:"countblank",parameters:[{argumentType:p.SCALAR}],repeatLastArgs:1,expandRanges:!0}};class i_ extends nR{countunique(e,t){return this.runFunction(e.args,t,this.metadata("COUNTUNIQUE"),(...e)=>{let t=new Set,r=new Set;for(let n of e)n instanceof rX?r.add(n.type):""!==n&&t.add(n);return t.size+r.size})}}i_.implementedFunctions={COUNTUNIQUE:{method:"countunique",parameters:[{argumentType:p.SCALAR}],repeatLastArgs:1,expandRanges:!0}};class ik extends nR{constructor(){super(...arguments),this.isoweeknumCore=e=>{let t=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),r=this.dateTimeHelper.numberToSimpleDate(e),n=this.dateTimeHelper.dateToNumber({year:r.year,month:1,day:1}),o=this.dateTimeHelper.relativeNumberToAbsoluteNumber(n),i=Math.floor((t-1)/7)-Math.floor((o+((4-o)%7+7)%7-1)/7)+1;return 0===i?this.isoweeknumCore(e-7)+1:i},this.days360Core=(e,t,r)=>{let n,o,i=this.dateTimeHelper.numberToSimpleDate(e),s=this.dateTimeHelper.numberToSimpleDate(t);return r?(n=nQ(i),o=nQ(s)):[n,o]=this.dateTimeHelper.toBasisUS(i,s),360*(o.year-n.year)+30*(o.month-n.month)+o.day-n.day}}date(e,t){return this.runFunction(e.args,t,this.metadata("DATE"),(e,t,r)=>{let n=Math.trunc(r),o=Math.trunc(t),i=Math.trunc(e);i<this.dateTimeHelper.getEpochYearZero()&&(i+=this.dateTimeHelper.getEpochYearZero());let s=Math.floor((o-1)/12),a={year:i+=s,month:o-=12*s,day:1};if(this.dateTimeHelper.isValidDate(a)){let e=this.dateTimeHelper.dateToNumber(a)+(n-1);return void 0===(e=this.dateTimeHelper.getWithinBounds(e))?new rX(d.NUM,eq.DateBounds):e}return new rX(d.VALUE,eq.InvalidDate)})}time(e,t){return this.runFunction(e.args,t,this.metadata("TIME"),(e,t,r)=>{let n=nX({hours:Math.trunc(e),minutes:Math.trunc(t),seconds:Math.trunc(r)});return n<0?new rX(d.NUM,eq.NegativeTime):n%1})}eomonth(e,t){return this.runFunction(e.args,t,this.metadata("EOMONTH"),(e,t)=>{let r=this.dateTimeHelper.numberToSimpleDate(e),n=this.dateTimeHelper.dateToNumber(this.dateTimeHelper.endOfMonth(nj(r,t)));return void 0===(n=this.dateTimeHelper.getWithinBounds(n))?new rX(d.NUM,eq.DateBounds):n})}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=>nK(nq(e)%1).hours)}minute(e,t){return this.runFunction(e.args,t,this.metadata("MINUTE"),e=>nK(nq(e)%1).minutes)}second(e,t){return this.runFunction(e.args,t,this.metadata("SECOND"),e=>nK(nq(e)%1).seconds)}text(e,t){return this.runFunction(e.args,t,this.metadata("TEXT"),(e,t)=>(function(e,t,r,n){let o=r.stringifyDateTime(n.numberToSimpleDateTime(e),t);if(void 0!==o)return o;let i=r.stringifyDuration(nK(e),t);if(void 0!==i)return i;let s=function(e){let t,r=(nJ.lastIndex=0,null!==(t=nJ.exec(e))?[t]:[]);if(!r.every(e=>n3(e)))return{type:f.NUMBER,tokens:n1(r,e)}}(t);return void 0!==s?function(e,t){let r="";for(let n=0;n<e.length;++n){let o=e[n];if(o.type===m.FREE_TEXT){r+=o.value;continue}let i=o.value.split("."),s=i[0],a=i[1]||"",l=i[1]?".":"",h=Number(t.toFixed(a.length)).toString().split("."),d=h[0]||"",u=h[1]||"";if(s.length>d.length){let e=n4(s.substr(0,s.length-d.length),"0");d=n6(d,e+d.length)}let c=n4(a.substr(u.length,a.length-u.length),"0");r+=d+l+(u=function(e,t){let r=`${e}`;for(;r.length<t;)r+="0";return r}(u,c+u.length))}return r}(s.tokens,e):t})(e,t,this.config,this.dateTimeHelper))}weekday(e,t){return this.runFunction(e.args,t,this.metadata("WEEKDAY"),(e,t)=>{let r=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e));if(3===t)return(r-1)%7;let n=iP.get(t);return void 0===n?new rX(d.NUM,eq.BadMode):(r-n)%7+1})}weeknum(e,t){return this.runFunction(e.args,t,this.metadata("WEEKNUM"),(e,t)=>{let r=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),n=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.dateToNumber({year:n.year,month:1,day:1}),i=this.dateTimeHelper.relativeNumberToAbsoluteNumber(o);if(21===t)return this.isoweeknumCore(e);let s=iP.get(t);return void 0===s?new rX(d.NUM,eq.BadMode):Math.floor((r-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=>{let{dateTime:t}=this.dateTimeHelper.parseDateTimeFromConfigFormats(e);return void 0===t?new rX(d.VALUE,eq.IncorrectDateTime):nW(t)?(nG(t)?Math.trunc(nX(t)):0)+this.dateTimeHelper.dateToNumber(t):0})}timevalue(e,t){return this.runFunction(e.args,t,this.metadata("TIMEVALUE"),e=>{let t=this.dateTimeHelper.dateStringToDateNumber(e);return void 0===t?new rX(d.VALUE,eq.IncorrectDateTime):tI(t)%1})}now(e,t){return this.runFunction(e.args,t,this.metadata("NOW"),()=>{let e=new Date(Date.now());return nX({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"),()=>{let 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)=>{var r;let n={year:(r=nj(this.dateTimeHelper.numberToSimpleDate(e),t)).year,month:r.month,day:Math.min(r.day,nU[r.month-1])},o=this.dateTimeHelper.dateToNumber(n);return void 0===(o=this.dateTimeHelper.getWithinBounds(o))?new rX(d.NUM,eq.DateBounds):o})}datedif(e,t){return this.runFunction(e.args,t,this.metadata("DATEDIF"),(e,t,r)=>{if(e>t)return new rX(d.NUM,eq.StartEndDate);if("D"===r)return Math.floor(t)-Math.floor(e);let n=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.numberToSimpleDate(t);switch(r){case"M":return(o.year-n.year)*12+(o.month-n.month)-(o.day<n.day);case"YM":return(12+(o.month-n.month)-(o.day<n.day))%12;case"Y":if(o.month>n.month||o.month===n.month&&o.day>=n.day)return o.year-n.year;return o.year-n.year-1;case"MD":if(o.day>=n.day)return o.day-n.day;{let 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-n.day}case"YD":if(o.month>n.month||o.month===n.month&&o.day>=n.day)return Math.floor(t)-this.dateTimeHelper.dateToNumber({year:o.year,month:n.month,day:n.day});return Math.floor(t)-Math.floor(e)-365*(o.year-n.year-1)-this.dateTimeHelper.leapYearsCount(o.year-1)+this.dateTimeHelper.leapYearsCount(n.year);default:return new rX(d.NUM,eq.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,r)=>{switch((e=Math.trunc(e))>(t=Math.trunc(t))&&([e,t]=[t,e]),r){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 Error("Should not be reachable.")})}interval(e,t){return this.runFunction(e.args,t,this.metadata("INTERVAL"),e=>{let t=(e=Math.trunc(e))%60,r=(e=Math.trunc(e/60))%60,n=(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"+(n>0?`${n}H`:"")+(r>0?`${r}M`:"")+(t>0?`${t}S`:"")})}networkdays(e,t){return this.runFunction(e.args,t,this.metadata("NETWORKDAYS"),(e,t,r)=>this.networkdayscore(e,t,1,r))}networkdaysintl(e,t){return this.runFunction(e.args,t,this.metadata("NETWORKDAYS.INTL"),(e,t,r,n)=>this.networkdayscore(e,t,r,n))}workday(e,t){return this.runFunction(e.args,t,this.metadata("WORKDAY"),(e,t,r)=>this.workdaycore(e,t,1,r))}workdayintl(e,t){return this.runFunction(e.args,t,this.metadata("WORKDAY.INTL"),(e,t,r,n)=>this.workdaycore(e,t,r,n))}networkdayscore(e,t,r,n){let o=1;(e=Math.trunc(e))>(t=Math.trunc(t))&&([e,t]=[t,e],o=-1);let i=iL(r);if(i instanceof rX)return i;let s=this.simpleRangeToFilteredHolidays(i,n);return s instanceof rX?s:o*this.countWorkdays(e,t,i,s)}workdaycore(e,t,r,n){e=Math.trunc(e),t=Math.trunc(t);let o=iL(r);if(o instanceof rX)return o;let i=this.simpleRangeToFilteredHolidays(o,n);if(i instanceof rX)return i;if(t>0){let r=1;for(;this.countWorkdays(e+1,e+r,o,i)<t;)r*=2;let n=1;for(;n+1<r;){let s=Math.trunc((n+r)/2);this.countWorkdays(e+1,e+s,o,i)<t?n=s:r=s}return e+r}if(!(t<0))return e;{t*=-1;let r=1;for(;this.countWorkdays(e-r,e-1,o,i)<t;)r*=2;let n=1;for(;n+1<r;){let s=Math.trunc((n+r)/2);this.countWorkdays(e-s,e-1,o,i)<t?n=s:r=s}return e-r}}countWorkdays(e,t,r,n){let o=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(t)),i=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),s=0;for(let e=0;e<7;e++)"0"===r.charAt(e)&&(s+=Math.floor((o+6-e)/7),s-=Math.floor((i-1+6-e)/7));return s-(iH(t+1,n)-iH(e,n))}simpleRangeToFilteredHolidays(e,t){var r;let n=null!=(r=null==t?void 0:t.valuesFromTopLeftCorner())?r:[];for(let e of n)if(e instanceof rX)return e;let o=[];for(let e of n)if(e!==tN)if(!tD(e))return new rX(d.VALUE,eq.WrongType);else o.push(Math.trunc(tI(e)));return[...new Set(o)].sort((e,t)=>e-t).filter(t=>{let r=this.dateTimeHelper.relativeNumberToAbsoluteNumber(t);return"0"===e.charAt((r-1)%7)})}}function iH(e,t){if(0===t.length||e<=t[0])return 0;if(t[t.length-1]<e)return t.length;let r=0,n=t.length-1;for(;r+1<n;){let o=Math.floor((n+r)/2);t[o]>=e?n=o:r=o}return n}function iL(e){var t;return"number"!=typeof e&&"string"!=typeof e?new rX(d.VALUE,eq.WrongType):"string"!=typeof e?null!=(t=iD.get(e))?t:new rX(d.NUM,eq.BadMode):7===e.length&&/^(0|1)*$/.test(e)&&"1111111"!==e?e:new rX(d.NUM,eq.WeekendString)}ik.implementedFunctions={DATE:{method:"date",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER}],returnNumberType:s.NUMBER_DATE},TIME:{method:"time",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER}],returnNumberType:s.NUMBER_TIME},MONTH:{method:"month",parameters:[{argumentType:p.NUMBER,minValue:0}]},YEAR:{method:"year",parameters:[{argumentType:p.NUMBER,minValue:0}]},HOUR:{method:"hour",parameters:[{argumentType:p.NUMBER,minValue:0}]},MINUTE:{method:"minute",parameters:[{argumentType:p.NUMBER,minValue:0}]},SECOND:{method:"second",parameters:[{argumentType:p.NUMBER,minValue:0}]},TEXT:{method:"text",parameters:[{argumentType:p.NUMBER},{argumentType:p.STRING}]},EOMONTH:{method:"eomonth",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER}],returnNumberType:s.NUMBER_DATE},DAY:{method:"day",parameters:[{argumentType:p.NUMBER,minValue:0}]},DAYS:{method:"days",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0}]},WEEKDAY:{method:"weekday",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,defaultValue:1}]},WEEKNUM:{method:"weeknum",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,defaultValue:1}]},ISOWEEKNUM:{method:"isoweeknum",parameters:[{argumentType:p.NUMBER,minValue:0}]},DATEVALUE:{method:"datevalue",parameters:[{argumentType:p.STRING}],returnNumberType:s.NUMBER_DATE},TIMEVALUE:{method:"timevalue",parameters:[{argumentType:p.STRING}],returnNumberType:s.NUMBER_TIME},NOW:{method:"now",parameters:[],isVolatile:!0,returnNumberType:s.NUMBER_DATETIME},TODAY:{method:"today",parameters:[],isVolatile:!0,returnNumberType:s.NUMBER_DATE},EDATE:{method:"edate",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER}],returnNumberType:s.NUMBER_DATE},DAYS360:{method:"days360",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.BOOLEAN,defaultValue:!1}]},DATEDIF:{method:"datedif",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.STRING}]},YEARFRAC:{method:"yearfrac",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.INTEGER,defaultValue:0,minValue:0,maxValue:4}]},INTERVAL:{method:"interval",parameters:[{argumentType:p.NUMBER,minValue:0}]},NETWORKDAYS:{method:"networkdays",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.RANGE,optionalArg:!0}]},"NETWORKDAYS.INTL":{method:"networkdaysintl",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.NOERROR,defaultValue:1},{argumentType:p.RANGE,optionalArg:!0}]},WORKDAY:{method:"workday",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER},{argumentType:p.RANGE,optionalArg:!0}]},"WORKDAY.INTL":{method:"workdayintl",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER},{argumentType:p.NOERROR,defaultValue:1},{argumentType:p.RANGE,optionalArg:!0}]}};let iP=new Map([[1,0],[2,1],[11,1],[12,2],[13,3],[14,4],[15,5],[16,6],[17,0]]),iD=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 iF extends nR{degrees(e,t){return this.runFunction(e.args,t,this.metadata("DEGREES"),e=>180/Math.PI*e)}}iF.implementedFunctions={DEGREES:{method:"degrees",parameters:[{argumentType:p.NUMBER}]}};class iB extends nR{delta(e,t){return this.runFunction(e.args,t,this.metadata("DELTA"),(e,t)=>+(e===t))}}iB.implementedFunctions={DELTA:{method:"delta",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0}]}};class iV extends nR{exp(e,t){return this.runFunction(e.args,t,this.metadata("EXP"),Math.exp)}}iV.implementedFunctions={EXP:{method:"exp",parameters:[{argumentType:p.NUMBER}]}};class iU extends nR{pmt(e,t){return this.runFunction(e.args,t,this.metadata("PMT"),iz)}ipmt(e,t){return this.runFunction(e.args,t,this.metadata("IPMT"),iW)}ppmt(e,t){return this.runFunction(e.args,t,this.metadata("PPMT"),i$)}fv(e,t){return this.runFunction(e.args,t,this.metadata("FV"),iG)}cumipmt(e,t){return this.runFunction(e.args,t,this.metadata("CUMIPMT"),(e,t,r,n,o,i)=>{if(n>o)return new rX(d.NUM,eq.EndStartPeriod);let s=0;for(let a=n;a<=o;a++)s+=iW(e,a,t,r,0,i);return s})}cumprinc(e,t){return this.runFunction(e.args,t,this.metadata("CUMPRINC"),(e,t,r,n,o,i)=>{if(n>o)return new rX(d.NUM,eq.EndStartPeriod);let s=0;for(let a=n;a<=o;a++)s+=i$(e,a,t,r,0,i);return s})}db(e,t){return this.runFunction(e.args,t,this.metadata("DB"),(e,t,r,n,o)=>{if(12===o&&n>r||n>r+1)return new rX(d.NUM,eq.PeriodLong);if(t>=e)return 0;let i=Math.round((1-Math.pow(t/e,1/r))*1e3)/1e3,s=e*i*o/12;if(1===n)return s;let a=s;for(let t=0;t<n-2;t++)a+=(e-a)*i;return n===r+1?(e-a)*i*(12-o)/12:(e-a)*i})}ddb(e,t){return this.runFunction(e.args,t,this.metadata("DDB"),(e,t,r,n,o)=>{let i;if(n>r)return new rX(d.NUM);let s=o/r;return s>=1?(s=1,i=1===n?e:0):i=e*Math.pow(1-s,n-1),Math.max(i-Math.max(t,e*Math.pow(1-s,n)),0)})}dollarde(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARDE"),(e,t)=>{if(t<1)return new rX(d.DIV_BY_ZERO);for(t=Math.trunc(t);t>10;)t/=10;return Math.trunc(e)+(e-Math.trunc(e))*10/t})}dollarfr(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARFR"),(e,t)=>{if(t<1)return new rX(d.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)=>Math.pow(1+e/(t=Math.trunc(t)),t)-1)}ispmt(e,t){return this.runFunction(e.args,t,this.metadata("ISPMT"),(e,t,r,n)=>0===r?new rX(d.DIV_BY_ZERO):n*e*(t/r-1))}nominal(e,t){return this.runFunction(e.args,t,this.metadata("NOMINAL"),(e,t)=>(Math.pow(e+1,1/(t=Math.trunc(t)))-1)*t)}nper(e,t){return this.runFunction(e.args,t,this.metadata("NPER"),(e,t,r,n,o)=>0===e?0===t?new rX(d.DIV_BY_ZERO):(-r-n)/t:(o&&(t*=1+e),Math.log((t-n*e)/(r*e+t))/Math.log(1+e)))}rate(e,t){return this.runFunction(e.args,t,this.metadata("RATE"),(e,t,r,n,o,i)=>{if(i<=-1)return new rX(d.VALUE);let s=i;o=+!!o;for(let i=0;i<50;i++){let i,a;if(s<=-1)break;if(1e-7>Math.abs(s))i=r*(1+e*s)+t*(1+s*o)*e+n;else{let a=Math.pow(1+s,e);i=r*a+t*(1/s+o)*(a-1)+n}if(1e-7>Math.abs(i))return s;if(1e-7>Math.abs(s))a=r*e+t*o*e;else{let n=Math.pow(1+s,e),i=e*Math.pow(1+s,e-1);a=r*i+t*(1/s+o)*i+-1/(s*s)*t*(n-1)}s-=i/a}return new rX(d.NUM)})}pv(e,t){return this.runFunction(e.args,t,this.metadata("PV"),(e,t,r,n,o)=>{if(o=+!!o,-1===e)if(0===t)return new rX(d.NUM);else return new rX(d.DIV_BY_ZERO);return 0===e?-r*t-n:((1-Math.pow(1+e,t))*r*(1+e*o)/e-n)/Math.pow(1+e,t)})}rri(e,t){return this.runFunction(e.args,t,this.metadata("RRI"),(e,t,r)=>0===t||r<0&&t>0||r>0&&t<0?new rX(d.NUM):Math.pow(r/t,1/e)-1)}sln(e,t){return this.runFunction(e.args,t,this.metadata("SLN"),(e,t,r)=>0===r?new rX(d.DIV_BY_ZERO):(e-t)/r)}syd(e,t){return this.runFunction(e.args,t,this.metadata("SYD"),(e,t,r,n)=>n>r?new rX(d.NUM):(e-t)*(r-n+1)*2/(r*(r+1)))}tbilleq(e,t){return this.runFunction(e.args,t,this.metadata("TBILLEQ"),(e,t,r)=>{if((e=Math.round(e))>=(t=Math.round(t)))return new rX(d.NUM);let n=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.numberToSimpleDate(t);if(o.year>n.year+1||o.year===n.year+1&&(o.month>n.month||o.month===n.month&&o.day>n.day))return new rX(d.NUM);let i=360-r*(t-e);return 0===i?0:i<0?new rX(d.NUM):365*r/i})}tbillprice(e,t){return this.runFunction(e.args,t,this.metadata("TBILLPRICE"),(e,t,r)=>{if((e=Math.round(e))>=(t=Math.round(t)))return new rX(d.NUM);let n=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.numberToSimpleDate(t);if(o.year>n.year+1||o.year===n.year+1&&(o.month>n.month||o.month===n.month&&o.day>n.day))return new rX(d.NUM);let i=360-r*(t-e);return 0===i?0:i<0?new rX(d.NUM):100*(1-r*(t-e)/360)})}tbillyield(e,t){return this.runFunction(e.args,t,this.metadata("TBILLYIELD"),(e,t,r)=>{if((e=Math.round(e))>=(t=Math.round(t)))return new rX(d.NUM);let n=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.numberToSimpleDate(t);return o.year>n.year+1||o.year===n.year+1&&(o.month>n.month||o.month===n.month&&o.day>n.day)?new rX(d.NUM):(100-r)*360/(r*(t-e))})}fvschedule(e,t){return this.runFunction(e.args,t,this.metadata("FVSCHEDULE"),(e,t)=>{let r=t.valuesFromTopLeftCorner();for(let e of r)if(e instanceof rX)return e;for(let t of r)if(tD(t))e*=1+tI(t);else if(t!==tN)return new rX(d.VALUE,eq.NumberExpected);return e})}npv(e,t){return this.runFunction(e.args,t,this.metadata("NPV"),(e,...t)=>{let r=this.arithmeticHelper.coerceNumbersExactRanges(t);return r instanceof rX?r:iY(e,r)})}mirr(e,t){return this.runFunction(e.args,t,this.metadata("MIRR"),(e,t,r)=>{let n=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(n instanceof rX)return n;let o=!1,i=!1,s=[],a=[];for(let e of n)e>0?(o=!0,s.push(e),a.push(0)):(e<0?(i=!0,a.push(e)):a.push(0),s.push(0));if(!o||!i)return new rX(d.DIV_BY_ZERO);let l=n.length,h=iY(r,s);if(h instanceof rX)return h;let u=iY(t,a);return u instanceof rX?u:Math.pow(-h*Math.pow(1+r,l)/u/(1+t),1/(l-1))-1})}pduration(e,t){return this.runFunction(e.args,t,this.metadata("PDURATION"),(e,t,r)=>(Math.log(r)-Math.log(t))/Math.log(1+e))}xnpv(e,t){return this.runFunction(e.args,t,this.metadata("XNPV"),(e,t,r)=>{let n=t.valuesFromTopLeftCorner();for(let e of n)if("number"!=typeof e)return new rX(d.VALUE,eq.NumberExpected);let o=r.valuesFromTopLeftCorner();for(let e of o)if("number"!=typeof e)return new rX(d.VALUE,eq.NumberExpected);if(o.length!==n.length)return new rX(d.NUM,eq.EqualLength);let i=o.length,s=0;if(o[0]<0)return new rX(d.NUM,eq.ValueSmall);for(let t=0;t<i;t++){if(o[t]=Math.floor(o[t]),o[t]<o[0])return new rX(d.NUM,eq.ValueSmall);s+=n[t]/Math.pow(1+e,(o[t]-o[0])/365)}return s})}irr(e,t){return this.runFunction(e.args,t,this.metadata("IRR"),(e,t)=>{if(t<=-1)return new rX(d.VALUE);let r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(r instanceof rX)return r;let n=r.some(e=>e>0),o=r.some(e=>e<0);return n&&o?function(e,t){let r=t;for(let t=0;t<50;t++){let t=0,n=0;for(let o=0;o<e.length;o++){let i=Math.pow(1+r,o);if(!isFinite(i)||0===i)return new rX(d.NUM);t+=e[o]/i,o>0&&(n-=o*e[o]/(i*(1+r)))}if(1e-10>Math.abs(t))return r;if(1e-10>Math.abs(n))break;let o=r-t/n;if(1e-10>Math.abs(o-r))return o;if(!isFinite(r=o)||r<=-1)break}return new rX(d.NUM)}(r,t):new rX(d.NUM)})}}function iz(e,t,r,n,o){if(0===e)return(-r-n)/t;{let i=Math.pow(1+e,t);return(n*e+r*e*i)*(o?1/(1+e):1)/(1-i)}}function iW(e,t,r,n,o,i){let s=iz(e,r,n,o,i);return 1===t?e*(i?0:-n):e*(i?iG(e,t-2,s,n,i)-s:iG(e,t-1,s,n,i))}function iG(e,t,r,n,o){if(0===e)return-n-r*t;{let i=Math.pow(1+e,t);return r*(o?1+e:1)*(1-i)/e-n*i}}function i$(e,t,r,n,o,i){return iz(e,r,n,o,i)-iW(e,t,r,n,o,i)}function iY(e,t){let r=0;for(let n=t.length-1;n>=0;n--){if(r+=t[n],-1===e)if(0===r)continue;else return new rX(d.DIV_BY_ZERO);r/=1+e}return r}iU.implementedFunctions={PMT:{method:"pmt",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:0}],returnNumberType:s.NUMBER_CURRENCY},IPMT:{method:"ipmt",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:0}],returnNumberType:s.NUMBER_CURRENCY},PPMT:{method:"ppmt",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:0}],returnNumberType:s.NUMBER_CURRENCY},FV:{method:"fv",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:0}],returnNumberType:s.NUMBER_CURRENCY},CUMIPMT:{method:"cumipmt",parameters:[{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.INTEGER,minValue:1},{argumentType:p.INTEGER,minValue:1},{argumentType:p.INTEGER,minValue:0,maxValue:1}],returnNumberType:s.NUMBER_CURRENCY},CUMPRINC:{method:"cumprinc",parameters:[{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.INTEGER,minValue:1},{argumentType:p.INTEGER,minValue:1},{argumentType:p.INTEGER,minValue:0,maxValue:1}],returnNumberType:s.NUMBER_CURRENCY},DB:{method:"db",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.INTEGER,minValue:0},{argumentType:p.INTEGER,minValue:0},{argumentType:p.INTEGER,minValue:1,maxValue:12,defaultValue:12}],returnNumberType:s.NUMBER_CURRENCY},DDB:{method:"ddb",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.INTEGER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0,defaultValue:2}],returnNumberType:s.NUMBER_CURRENCY},DOLLARDE:{method:"dollarde",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:0}]},DOLLARFR:{method:"dollarfr",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:0}]},EFFECT:{method:"effect",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:1}],returnNumberType:s.NUMBER_PERCENT},ISPMT:{method:"ispmt",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER}]},NOMINAL:{method:"nominal",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:1}],returnNumberType:s.NUMBER_PERCENT},NPER:{method:"nper",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:0}]},PV:{method:"pv",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:0}],returnNumberType:s.NUMBER_CURRENCY},RATE:{method:"rate",parameters:[{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:.1}],returnNumberType:s.NUMBER_PERCENT},RRI:{method:"rri",parameters:[{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER},{argumentType:p.NUMBER}],returnNumberType:s.NUMBER_PERCENT},SLN:{method:"sln",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER}],returnNumberType:s.NUMBER_CURRENCY},SYD:{method:"syd",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0}],returnNumberType:s.NUMBER_CURRENCY},TBILLEQ:{method:"tbilleq",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0}],returnNumberType:s.NUMBER_PERCENT},TBILLPRICE:{method:"tbillprice",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0}],returnNumberType:s.NUMBER_CURRENCY},TBILLYIELD:{method:"tbillyield",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0}],returnNumberType:s.NUMBER_PERCENT},FVSCHEDULE:{method:"fvschedule",parameters:[{argumentType:p.NUMBER},{argumentType:p.RANGE}],returnNumberType:s.NUMBER_CURRENCY},NPV:{method:"npv",parameters:[{argumentType:p.NUMBER},{argumentType:p.ANY}],repeatLastArgs:1,returnNumberType:s.NUMBER_CURRENCY},MIRR:{method:"mirr",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER},{argumentType:p.NUMBER}],returnNumberType:s.NUMBER_PERCENT},PDURATION:{method:"pduration",parameters:[{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0}]},XNPV:{method:"xnpv",parameters:[{argumentType:p.NUMBER,greaterThan:-1},{argumentType:p.RANGE},{argumentType:p.RANGE}]},IRR:{method:"irr",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER,defaultValue:.1}],returnNumberType:s.NUMBER_PERCENT}};class ij extends nR{formulatext(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("FORMULATEXT"),()=>new rX(d.NA,eq.WrongArgNumber),e=>{var t;return null!=(t=this.serialization.getCellFormula(e))?t:new rX(d.NA,eq.Formula)})}}ij.implementedFunctions={FORMULATEXT:{method:"formulatext",parameters:[{argumentType:p.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,isDependentOnSheetStructureChange:!0,vectorizationForbidden:!0}};class iq extends nR{hyperlink(e,t){return this.runFunction(e.args,t,this.metadata("HYPERLINK"),(t,r)=>(e.hyperlink=t,null!=r?r:t))}}iq.implementedFunctions={HYPERLINK:{method:"hyperlink",parameters:[{argumentType:p.STRING},{argumentType:p.STRING,optionalArg:!0}]}};class iK extends nR{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 rX&&e.type!==d.NA)}iserror(e,t){return this.runFunction(e.args,t,this.metadata("ISERROR"),e=>e instanceof rX)}isformula(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ISFORMULA"),()=>new rX(d.NA,eq.WrongArgNumber),e=>this.dependencyGraph.addressMapping.getCell(e)instanceof rT)}isblank(e,t){return this.runFunction(e.args,t,this.metadata("ISBLANK"),e=>e===tN)}isna(e,t){return this.runFunction(e.args,t,this.metadata("ISNA"),e=>e instanceof rX&&e.type==d.NA)}isnumber(e,t){return this.runFunction(e.args,t,this.metadata("ISNUMBER"),tD)}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 rX&&(e.type==d.REF||e.type==d.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 rX(d.NA,eq.WrongArgNumber);if(e.args.some(e=>e.type===o.EMPTY))return new rX(d.NUM,eq.EmptyArg);let r=e.args[0];for(;r.type===o.PARENTHESIS;)r=r.expression;if(r.type===o.CELL_RANGE||r.type===o.COLUMN_RANGE)return r.end.col-r.start.col+1;{if(r.type===o.CELL_REFERENCE)return 1;if(r.type===o.ROW_RANGE)return this.config.maxColumns;let e=this.evaluateAst(r,t);return e instanceof tB?e.width():e instanceof rX?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 rX(d.NA,eq.WrongArgNumber);if(e.args.some(e=>e.type===o.EMPTY))return new rX(d.NUM,eq.EmptyArg);let r=e.args[0];for(;r.type===o.PARENTHESIS;)r=r.expression;if(r.type===o.CELL_RANGE||r.type===o.ROW_RANGE)return r.end.row-r.start.row+1;{if(r.type===o.CELL_REFERENCE)return 1;if(r.type===o.COLUMN_RANGE)return this.config.maxRows;let e=this.evaluateAst(r,t);return e instanceof tB?e.height():e instanceof rX?e:1}}index(e,t){return this.runFunction(e.args,t,this.metadata("INDEX"),(e,t,r)=>{var n,o,i,s,a,l;return r<1||t<1?new rX(d.VALUE,eq.LessThanOne):r>e.width()||t>e.height()?new rX(d.NUM,eq.ValueLarge):null!=(l=null!=(i=null==(o=null==(n=null==e?void 0:e.data)?void 0:n[t-1])?void 0:o[r-1])?i:null==(a=null==(s=null==e?void 0:e.data)?void 0:s[0])?void 0:a[0])?l:new rX(d.VALUE,eq.CellRangeExpected)})}na(e,t){return new rX(d.NA)}sheet(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEET"),()=>t.formulaAddress.sheet+1,e=>e.sheet+1,e=>{let t=this.dependencyGraph.sheetMapping.getSheetId(e);return void 0!==t?t+1:new rX(d.NA,eq.SheetRef)})}sheets(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEETS"),()=>this.dependencyGraph.sheetMapping.numberOfSheets(),()=>1,()=>new rX(d.VALUE,eq.CellRefExpected))}}iK.implementedFunctions={COLUMN:{method:"column",parameters:[{argumentType:p.NOERROR,optionalArg:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},COLUMNS:{method:"columns",parameters:[{argumentType:p.RANGE}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ISBINARY:{method:"isbinary",parameters:[{argumentType:p.STRING}]},ISERR:{method:"iserr",parameters:[{argumentType:p.SCALAR}]},ISFORMULA:{method:"isformula",parameters:[{argumentType:p.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ISNA:{method:"isna",parameters:[{argumentType:p.SCALAR}]},ISREF:{method:"isref",parameters:[{argumentType:p.SCALAR}],vectorizationForbidden:!0},ISERROR:{method:"iserror",parameters:[{argumentType:p.SCALAR}]},ISBLANK:{method:"isblank",parameters:[{argumentType:p.SCALAR}]},ISNUMBER:{method:"isnumber",parameters:[{argumentType:p.SCALAR}]},ISLOGICAL:{method:"islogical",parameters:[{argumentType:p.SCALAR}]},ISTEXT:{method:"istext",parameters:[{argumentType:p.SCALAR}]},ISNONTEXT:{method:"isnontext",parameters:[{argumentType:p.SCALAR}]},INDEX:{method:"index",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:1}]},NA:{method:"na",parameters:[]},ROW:{method:"row",parameters:[{argumentType:p.NOERROR,optionalArg:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ROWS:{method:"rows",parameters:[{argumentType:p.RANGE}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},SHEET:{method:"sheet",parameters:[{argumentType:p.STRING}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},SHEETS:{method:"sheets",parameters:[{argumentType:p.STRING}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0}};class iX extends nR{iseven(e,t){return this.runFunction(e.args,t,this.metadata("ISEVEN"),e=>e%2==0)}}iX.implementedFunctions={ISEVEN:{method:"iseven",parameters:[{argumentType:p.NUMBER}]}};class iQ extends nR{isodd(e,t){return this.runFunction(e.args,t,this.metadata("ISODD"),e=>e%2==1)}}iQ.implementedFunctions={ISODD:{method:"isodd",parameters:[{argumentType:p.NUMBER}]}};class iZ extends nR{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)}}iZ.implementedFunctions={LOG10:{method:"log10",parameters:[{argumentType:p.NUMBER}]},LOG:{method:"log",parameters:[{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,defaultValue:10,greaterThan:0}]},LN:{method:"ln",parameters:[{argumentType:p.NUMBER}]}};let iJ=parseFloat(Math.PI.toFixed(14));class i0 extends nR{pi(e,t){return this.runFunction(e.args,t,this.metadata("PI"),()=>iJ)}sqrtpi(e,t){return this.runFunction(e.args,t,this.metadata("SQRTPI"),e=>Math.sqrt(iJ*e))}}function i1(e,t){return new nE(t.width,e.height)}function i2(e,t,r){return new nE(1+(e.width-t)/r,1+(e.height-t)/r)}i0.implementedFunctions={PI:{method:"pi",parameters:[]},SQRTPI:{method:"sqrtpi",parameters:[{argumentType:p.NUMBER,minValue:0}]}};class i3 extends nR{mmult(e,t){return this.runFunction(e.args,t,this.metadata("MMULT"),(e,t)=>{if(!e.hasOnlyNumbers()||!t.hasOnlyNumbers())return new rX(d.VALUE,eq.NumberRange);if(t.height()!==e.width())return new rX(d.VALUE,eq.ArrayDimensions);let r=i1(e.size,t.size),n=this.createKernel(function(e,t,r){let n=0;for(let o=0;o<r;++o)n+=e[this.thread.y][o]*t[o][this.thread.x];return n},r)(e.rawNumbers(),t.rawNumbers(),e.width());return tB.onlyNumbers(n)})}mmultArraySize(e,t){if(2!==e.args.length)return nE.error();let r=this.metadata("MMULT"),[n,o]=e.args.map(e=>{var n;return this.arraySizeForAst(e,new nn(t.formulaAddress,t.arraysFlag||null!=(n=null==r?void 0:r.enableArrayArithmeticForArguments)&&n))});return i1(n,o)}maxpool(e,t){return this.runFunction(e.args,t,this.metadata("MAXPOOL"),(e,t,r=t)=>{if(!e.hasOnlyNumbers())return new rX(d.VALUE,eq.NumberRange);let n=i2(e.size,t,r),o=this.createKernel(function(e,t,r){let n=this.thread.x*r,o=this.thread.y*r,i=e[o][n];for(let r=0;r<t;r++)for(let s=0;s<t;s++)i=Math.max(i,e[o+r][n+s]);return i},n)(e.rawNumbers(),t,r);return tB.onlyNumbers(o)})}medianpool(e,t){return this.runFunction(e.args,t,this.metadata("MEDIANPOOL"),(e,t,r=t)=>{if(!e.hasOnlyNumbers())return new rX(d.VALUE,eq.NumberRange);let n=i2(e.size,t,r),o=this.createKernel(function(e,t,r){let n=this.thread.x*r,o=this.thread.y*r,i=e[o][n];for(let r=0;r<t;r++)for(let s=0;s<t;s++)i=Math.max(i,e[o+r][n+s]);let s=e[o][n];for(let r=0;r<t;r++)for(let i=0;i<t;i++)s=Math.min(s,e[o+r][n+i]);let a=t*t,l=s,h=i,d=42;for(let r=0;r<32;r++){let r=(l+h)/2,i=0;for(let s=0;s<t;s++)for(let a=0;a<t;a++)e[o+s][n+a]>r&&i++;if(t%2==0)if(i===a/2){d=r;break}else i>a/2?l=r:h=r;else if(i===(a-1)/2){d=r;break}else i>(a-1)/2?l=r:h=r}return d},n)(e.rawNumbers(),t,r);return tB.onlyNumbers(o)})}maxpoolArraySize(e,t){let r;if(e.args.length<2||e.args.length>3)return nE.error();let n=this.metadata("MAXPOOL"),i=e.args.map(e=>{var r;return this.arraySizeForAst(e,new nn(t.formulaAddress,t.arraysFlag||null!=(r=null==n?void 0:n.enableArrayArithmeticForArguments)&&r))})[0],s=e.args[1],a=r=s.type===o.NUMBER?s.value:1;if(3===e.args.length){let t=e.args[2];a=t.type===o.NUMBER?t.value:1}return r>i.width||r>i.height||a>r||(i.width-r)%a!=0||(i.height-r)%a!=0?nE.error():i2(i,r,a)}medianpoolArraySize(e,t){return this.maxpoolArraySize(e,t)}transpose(e,t){return this.runFunction(e.args,t,this.metadata("TRANSPOSE"),e=>{let t=e.rawData(),r=e.size,n=[];for(let e=0;e<r.width;++e){n[e]=[];for(let o=0;o<r.height;++o)n[e][o]=t[o][e]}return tB.onlyValues(n)})}transposeArraySize(e,t){if(1!==e.args.length)return nE.error();let r=this.metadata("TRANSPOSE"),[n]=e.args.map(e=>{var n;return this.arraySizeForAst(e,new nn(t.formulaAddress,t.arraysFlag||null!=(n=null==r?void 0:r.enableArrayArithmeticForArguments)&&n))});return new nE(n.height,n.width)}createKernel(e,t){return function(...r){let n=[];for(let o=0;o<t.height;++o){n.push([]);for(let i=0;i<t.width;++i)n[o][i]=e.apply({thread:{x:i,y:o}},r)}return n}}}i3.implementedFunctions={MMULT:{method:"mmult",sizeOfResultArrayMethod:"mmultArraySize",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}],vectorizationForbidden:!0},TRANSPOSE:{method:"transpose",sizeOfResultArrayMethod:"transposeArraySize",parameters:[{argumentType:p.RANGE}],vectorizationForbidden:!0},MAXPOOL:{method:"maxpool",sizeOfResultArrayMethod:"maxpoolArraySize",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0}],vectorizationForbidden:!0},MEDIANPOOL:{method:"medianpool",sizeOfResultArrayMethod:"medianpoolArraySize",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0}],vectorizationForbidden:!0}};class i6 extends nR{median(e,t){return this.runFunction(e.args,t,this.metadata("MEDIAN"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);return t instanceof rX?t:0===t.length?new rX(d.NUM,eq.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)=>{let r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return r instanceof rX?r:(r.sort((e,t)=>e-t),(t=Math.trunc(t))>r.length)?new rX(d.NUM,eq.ValueLarge):r[r.length-t]})}small(e,t){return this.runFunction(e.args,t,this.metadata("SMALL"),(e,t)=>{let r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return r instanceof rX?r:(r.sort((e,t)=>e-t),(t=Math.trunc(t))>r.length)?new rX(d.NUM,eq.ValueLarge):r[t-1]})}}i6.implementedFunctions={MEDIAN:{method:"median",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},LARGE:{method:"large",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER,minValue:1}]},SMALL:{method:"small",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER,minValue:1}]}};class i4 extends nR{mod(e,t){return this.runFunction(e.args,t,this.metadata("MOD"),(e,t)=>0===t?new rX(d.DIV_BY_ZERO):e%t)}}function i5(e){return tD(e)&&!Number.isFinite(tI(e))?0:e}i4.implementedFunctions={MOD:{method:"mod",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]}};class i9{constructor(e,t,r){this.sumsq=e,this.sum=t,this.count=r}static single(e){return new i9(e*e,e,1)}compose(e){return new i9(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}}i9.empty=new i9(0,0,0);class i7 extends nR{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(tI(e),2),i8)}max(e,t){return this.doMax(e.args,t)}maxa(e,t){return i5(this.reduce(e.args,t,-1/0,"MAXA",(e,t)=>Math.max(e,t),tI,se))}min(e,t){return this.doMin(e.args,t)}mina(e,t){return i5(this.reduce(e.args,t,1/0,"MINA",(e,t)=>Math.min(e,t),tI,se))}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 r;let n=this.reduce(e.args,t,i9.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>i9.single(tI(e)),se);return n instanceof rX?n:null!=(r=n.averageValue())?r:new rX(d.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 r;let n=this.reduceAggregateA(e.args,t);return n instanceof rX?n:null!=(r=n.varSValue())?r:new rX(d.DIV_BY_ZERO)}varpa(e,t){var r;let n=this.reduceAggregateA(e.args,t);return n instanceof rX?n:null!=(r=n.varPValue())?r:new rX(d.DIV_BY_ZERO)}stdevs(e,t){return this.doStdevS(e.args,t)}stdevp(e,t){return this.doStdevP(e.args,t)}stdeva(e,t){let r=this.reduceAggregateA(e.args,t);if(r instanceof rX)return r;{let e=r.varSValue();return void 0===e?new rX(d.DIV_BY_ZERO):Math.sqrt(e)}}stdevpa(e,t){let r=this.reduceAggregateA(e.args,t);if(r instanceof rX)return r;{let e=r.varPValue();return void 0===e?new rX(d.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 rX(d.NA,eq.WrongArgNumber);let r=this.coerceToType(this.evaluateAst(e.args[0],t),{argumentType:p.NUMBER},t),n=e.args.slice(1);switch(r){case 1:case 101:return this.doAverage(n,t);case 2:case 102:return this.doCount(n,t);case 3:case 103:return this.doCounta(n,t);case 4:case 104:return this.doMax(n,t);case 5:case 105:return this.doMin(n,t);case 6:case 106:return this.doProduct(n,t);case 7:case 107:return this.doStdevS(n,t);case 8:case 108:return this.doStdevP(n,t);case 9:case 109:return this.doSum(n,t);case 10:case 110:return this.doVarS(n,t);case 11:case 111:return this.doVarP(n,t);default:return new rX(d.VALUE,eq.BadMode)}}reduceAggregate(e,t){return this.reduce(e,t,i9.empty,"_AGGREGATE",(e,t)=>e.compose(t),e=>i9.single(tI(e)),i8)}reduceAggregateA(e,t){return this.reduce(e,t,i9.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>i9.single(tI(e)),se)}doAverage(e,t){var r;let n=this.reduceAggregate(e,t);return n instanceof rX?n:null!=(r=n.averageValue())?r:new rX(d.DIV_BY_ZERO)}doVarS(e,t){var r;let n=this.reduceAggregate(e,t);return n instanceof rX?n:null!=(r=n.varSValue())?r:new rX(d.DIV_BY_ZERO)}doVarP(e,t){var r;let n=this.reduceAggregate(e,t);return n instanceof rX?n:null!=(r=n.varPValue())?r:new rX(d.DIV_BY_ZERO)}doStdevS(e,t){let r=this.reduceAggregate(e,t);if(r instanceof rX)return r;{let e=r.varSValue();return void 0===e?new rX(d.DIV_BY_ZERO):Math.sqrt(e)}}doStdevP(e,t){let r=this.reduceAggregate(e,t);if(r instanceof rX)return r;{let e=r.varPValue();return void 0===e?new rX(d.DIV_BY_ZERO):Math.sqrt(e)}}doCount(e,t){return this.reduce(e,t,0,"COUNT",(e,t)=>e+t,tI,e=>+!!tD(e))}doCounta(e,t){return this.reduce(e,t,0,"COUNTA",(e,t)=>e+t,tI,e=>+(e!==tN))}doMax(e,t){return i5(this.reduce(e,t,-1/0,"MAX",(e,t)=>Math.max(e,t),tI,i8))}doMin(e,t){return i5(this.reduce(e,t,1/0,"MIN",(e,t)=>Math.min(e,t),tI,i8))}doSum(e,t){return this.reduce(e,t,0,"SUM",this.addWithEpsilonRaw,tI,i8)}doProduct(e,t){return this.reduce(e,t,1,"PRODUCT",(e,t)=>e*t,tI,i8)}reduce(e,t,r,n,i,s,a){return e.length<1?new rX(d.NA,eq.WrongArgNumber):e.reduce((e,l)=>{let h;if(e instanceof rX)return e;if(l.type===o.CELL_RANGE||l.type===o.COLUMN_RANGE||l.type===o.ROW_RANGE){let o=this.evaluateRange(l,t,r,n,i,s,a);return o instanceof rX?o:i(o,e)}if((h=this.evaluateAst(l,t))instanceof tB)return Array.from(h.valuesFromTopLeftCorner()).map(a).filter(e=>void 0!==e).map(e=>e instanceof rX?e:s(e)).reduce((e,t)=>e instanceof rX?e:t instanceof rX?t:i(e,t),e);if(l.type===o.CELL_REFERENCE){if(void 0===(h=a(h)))return e}else if(void 0===(h=a(h=this.coerceScalarToNumberOrError(h))))return e;return h instanceof rX?h:i(e,s(h))},r)}evaluateRange(e,t,r,n,o,i,s){let a;try{a=ne.fromAst(e,t.formulaAddress)}catch(e){if(e instanceof t3)return new rX(d.REF,eq.RangeManySheets);throw e}if(!this.isSheetValid(a))return new rX(d.REF,eq.SheetRef);let l=this.dependencyGraph.getRange(a.start,a.end);if(void 0===l)throw Error("Range does not exists in graph");let h=l.getFunctionValue(n);return void 0===h&&(h=this.getRangeValues(n,a,l,i,s).reduce((e,t)=>e instanceof rX?e:t instanceof rX?t:o(e,t),r),l.setFunctionValue(n,h)),h}isSheetValid(e){return this.dependencyGraph.sheetMapping.hasSheetWithId(e.start.sheet,{includePlaceholders:!1})&&this.dependencyGraph.sheetMapping.hasSheetWithId(e.end.sheet,{includePlaceholders:!1})}getRangeValues(e,t,r,n,o){let i,s=[],{smallerRangeVertex:a,restRange:l}=this.dependencyGraph.rangeMapping.findSmallerRange(t);if(void 0!==a&&this.dependencyGraph.existsEdge(a,r)){let t=a.getFunctionValue(e);if(void 0!==t)s.push(t);else for(let e of a.range.addresses(this.dependencyGraph)){let t=o(this.dependencyGraph.getScalarValue(e));t instanceof rX?s.push(t):void 0!==t&&s.push(n(t))}i=l}else i=t;for(let e of i.addresses(this.dependencyGraph)){let t=o(this.dependencyGraph.getScalarValue(e));t instanceof rX?s.push(t):void 0!==t&&s.push(n(t))}return s}}function i8(e){return tD(e)||e instanceof rX?e:void 0}function se(e){return"boolean"==typeof e?nl(e):tD(e)||e instanceof rX?e:"string"==typeof e?0:void 0}i7.implementedFunctions={SUM:{method:"sum",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},SUMSQ:{method:"sumsq",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},MAX:{method:"max",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},MIN:{method:"min",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},MAXA:{method:"maxa",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},MINA:{method:"mina",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},COUNT:{method:"count",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},COUNTA:{method:"counta",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},AVERAGE:{method:"average",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},AVERAGEA:{method:"averagea",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},PRODUCT:{method:"product",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},"VAR.S":{method:"vars",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},"VAR.P":{method:"varp",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},VARA:{method:"vara",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},VARPA:{method:"varpa",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},"STDEV.S":{method:"stdevs",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},"STDEV.P":{method:"stdevp",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},STDEVA:{method:"stdeva",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},STDEVPA:{method:"stdevpa",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},SUBTOTAL:{method:"subtotal",parameters:[{argumentType:p.NUMBER},{argumentType:p.ANY}],repeatLastArgs:1}},i7.aliases={VAR:"VAR.S",VARP:"VAR.P",STDEV:"STDEV.S",STDEVP:"STDEV.P",VARS:"VAR.S",STDEVS:"STDEV.S"};class st extends nR{power(e,t){return this.runFunction(e.args,t,this.metadata("POWER"),Math.pow)}}st.implementedFunctions={POWER:{method:"power",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]}};class sr extends nR{radians(e,t){return this.runFunction(e.args,t,this.metadata("RADIANS"),e=>Math.PI/180*e)}}sr.implementedFunctions={RADIANS:{method:"radians",parameters:[{argumentType:p.NUMBER}]}};class sn extends nR{dec2bin(e,t){return this.runFunction(e.args,t,this.metadata("DEC2BIN"),(e,t)=>si(e,2,t))}dec2oct(e,t){return this.runFunction(e.args,t,this.metadata("DEC2OCT"),(e,t)=>si(e,8,t))}dec2hex(e,t){return this.runFunction(e.args,t,this.metadata("DEC2HEX"),(e,t)=>si(e,16,t))}bin2dec(e,t){return this.runFunction(e.args,t,this.metadata("BIN2DEC"),e=>{let t=so(e,2,10);return void 0===t?new rX(d.NUM,eq.NotBinary):sh(t,2)})}bin2oct(e,t){return this.runFunction(e.args,t,this.metadata("BIN2OCT"),(e,t)=>{let r=so(e,2,10);return void 0===r?new rX(d.NUM,eq.NotBinary):si(sh(r,2),8,t)})}bin2hex(e,t){return this.runFunction(e.args,t,this.metadata("BIN2HEX"),(e,t)=>{let r=so(e,2,10);return void 0===r?new rX(d.NUM,eq.NotBinary):si(sh(r,2),16,t)})}oct2dec(e,t){return this.runFunction(e.args,t,this.metadata("OCT2DEC"),e=>{let t=so(e,8,10);return void 0===t?new rX(d.NUM,eq.NotOctal):sh(t,8)})}oct2bin(e,t){return this.runFunction(e.args,t,this.metadata("OCT2BIN"),(e,t)=>{let r=so(e,8,10);return void 0===r?new rX(d.NUM,eq.NotOctal):si(sh(r,8),2,t)})}oct2hex(e,t){return this.runFunction(e.args,t,this.metadata("OCT2HEX"),(e,t)=>{let r=so(e,8,10);return void 0===r?new rX(d.NUM,eq.NotOctal):si(sh(r,8),16,t)})}hex2dec(e,t){return this.runFunction(e.args,t,this.metadata("HEX2DEC"),e=>{let t=so(e,16,10);return void 0===t?new rX(d.NUM,eq.NotHex):sh(t,16)})}hex2bin(e,t){return this.runFunction(e.args,t,this.metadata("HEX2BIN"),(e,t)=>{let r=so(e,16,10);return void 0===r?new rX(d.NUM,eq.NotHex):si(sh(r,16),2,t)})}hex2oct(e,t){return this.runFunction(e.args,t,this.metadata("HEX2OCT"),(e,t)=>{let r=so(e,16,10);return void 0===r?new rX(d.NUM,eq.NotHex):si(sh(r,16),8,t)})}base(e,t){return this.runFunction(e.args,t,this.metadata("BASE"),sa)}decimal(e,t){return this.runFunction(e.args,t,this.metadata("DECIMAL"),(e,t)=>{let r=so(e,t,255);return void 0===r?new rX(d.NUM,eq.NotHex):parseInt(r,t)})}}function so(e,t,r){let n=RegExp(`^[${"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".substr(0,t)}]+$`);if(!(e.length>r)&&n.test(e))return e}function si(e,t,r){if(e>-ss(t)-1)return new rX(d.NUM,eq.ValueBaseLarge);if(e<ss(t))return new rX(d.NUM,eq.ValueBaseSmall);let n=sl(e,t);return void 0===r||e<0?n:n.length>r?new rX(d.NUM,eq.ValueBaseLong):n6(n,r)}function ss(e){return-Math.pow(e,10)/2}function sa(e,t,r){let n=sl(e,t);return void 0!==r&&r>n.length?n6(n,r):n}function sl(e,t){let r=e<0?Math.pow(t,10):0;return(e+r).toString(t).toUpperCase()}function sh(e,t){let r=parseInt(e,t),n=Math.pow(t,10);return r>=n/2?r-n:r}sn.implementedFunctions={DEC2BIN:{method:"dec2bin",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},DEC2OCT:{method:"dec2oct",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},DEC2HEX:{method:"dec2hex",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},BIN2DEC:{method:"bin2dec",parameters:[{argumentType:p.STRING}]},BIN2OCT:{method:"bin2oct",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},BIN2HEX:{method:"bin2hex",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},OCT2DEC:{method:"oct2dec",parameters:[{argumentType:p.STRING}]},OCT2BIN:{method:"oct2bin",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},OCT2HEX:{method:"oct2hex",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},HEX2DEC:{method:"hex2dec",parameters:[{argumentType:p.STRING}]},HEX2BIN:{method:"hex2bin",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},HEX2OCT:{method:"hex2oct",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},DECIMAL:{method:"decimal",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,minValue:2,maxValue:36}]},BASE:{method:"base",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:2,maxValue:36},{argumentType:p.NUMBER,optionalArg:!0,minValue:0,maxValue:255}]}};class sd extends nR{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 rX(d.NUM,eq.WrongOrder):((e=Math.ceil(e))===(t=Math.floor(t)+1)&&(t+=1),e+Math.floor(Math.random()*(t-e))))}}function su(e){let t=Math.ceil(e);return t%2==1?t:t+1}function sc(e){let t=Math.ceil(e);return t%2==0?t:t+1}sd.implementedFunctions={RAND:{method:"rand",parameters:[],isVolatile:!0},RANDBETWEEN:{method:"randbetween",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}],isVolatile:!0}};class sg extends nR{roundup(e,t){return this.runFunction(e.args,t,this.metadata("ROUNDDOWN"),(e,t)=>{let r=Math.pow(10,t);return e<0?-Math.ceil(-e*r)/r:Math.ceil(e*r)/r})}rounddown(e,t){return this.runFunction(e.args,t,this.metadata("ROUNDDOWN"),(e,t)=>{let r=Math.pow(10,t);return e<0?-Math.floor(-e*r)/r:Math.floor(e*r)/r})}round(e,t){return this.runFunction(e.args,t,this.metadata("ROUND"),(e,t)=>{let r=Math.pow(10,t);return e<0?-Math.round(-e*r)/r:Math.round(e*r)/r})}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?-sc(-e):sc(e))}odd(e,t){return this.runFunction(e.args,t,this.metadata("ODD"),e=>e<0?-su(-e):su(e))}ceilingmath(e,t){return this.runFunction(e.args,t,this.metadata("CEILING.MATH"),(e,t,r)=>0===t||0===e?0:(t=Math.abs(t),1===r&&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 rX(d.DIV_BY_ZERO):e>0&&t<0?new rX(d.NUM,eq.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:Math.ceil(e/(t=Math.abs(t)))*t)}floormath(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR.MATH"),(e,t,r)=>0===t||0===e?0:(t=Math.abs(t),1===r&&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 rX(d.DIV_BY_ZERO):e>0&&t<0?new rX(d.NUM,eq.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:Math.floor(e/(t=Math.abs(t)))*t)}}sg.implementedFunctions={ROUNDUP:{method:"roundup",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0}]},ROUNDDOWN:{method:"rounddown",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0}]},ROUND:{method:"round",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0}]},INT:{method:"intFunc",parameters:[{argumentType:p.NUMBER}]},EVEN:{method:"even",parameters:[{argumentType:p.NUMBER}]},ODD:{method:"odd",parameters:[{argumentType:p.NUMBER}]},"CEILING.MATH":{method:"ceilingmath",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:1},{argumentType:p.NUMBER,defaultValue:0}]},CEILING:{method:"ceiling",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]},"CEILING.PRECISE":{method:"ceilingprecise",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:1}]},"FLOOR.MATH":{method:"floormath",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:1},{argumentType:p.NUMBER,defaultValue:0}]},FLOOR:{method:"floor",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]},"FLOOR.PRECISE":{method:"floorprecise",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:1}]}},sg.aliases={"ISO.CEILING":"CEILING.PRECISE",TRUNC:"ROUNDDOWN"};class sp extends nR{sqrt(e,t){return this.runFunction(e.args,t,this.metadata("SQRT"),Math.sqrt)}}sp.implementedFunctions={SQRT:{method:"sqrt",parameters:[{argumentType:p.NUMBER}]}};class sm{constructor(e,t,r,n,o){this.interpreter=e,this.cacheKey=t,this.reduceInitialValue=r,this.composeFunction=n,this.mapFunction=o,this.dependencyGraph=this.interpreter.dependencyGraph}compute(e,t){for(let r of t)if(!r.conditionRange.sameDimensionsAs(e))return new rX(d.VALUE,eq.EqualLength);let r=this.tryToGetRangeVertexForRangeValue(e),n=t.map(e=>this.tryToGetRangeVertexForRangeValue(e.conditionRange));if(!(r&&n.every(e=>void 0!==e)))return this.evaluateRangeValue(e,t);{let o=t.map(e=>e.criterionPackage.raw).join(","),i=this.findAlreadyComputedValueInCache(r,this.cacheKey(t),o);if(void 0!==i)return this.interpreter.stats.incrementCriterionFunctionFullCacheUsed(),i;let 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)]),r.setCriterionFunctionValues(this.cacheKey(t),s),n.forEach(e=>{void 0!==e&&e.addDependentCacheRange(r)}),s.get(o)[0]}}tryToGetRangeVertexForRangeValue(e){let t=e.range;if(void 0!==t)return this.dependencyGraph.getRange(t.start,t.end)}reduceFunction(e){let t=this.reduceInitialValue;for(let r of e)t=this.composeFunction(t,r);return t}findAlreadyComputedValueInCache(e,t,r){return e.getCriterionFunctionValue(t,r)}evaluateRangeValue(e,t){let r=t.map(e=>e.criterionPackage.lambda),n=Array.from(e.valuesFromTopLeftCorner()).map(this.mapFunction)[Symbol.iterator](),o=sb(r,t.map(e=>e.conditionRange.iterateValuesFromTopLeftCorner()),n);return this.reduceFunction(o)}buildNewCriterionCache(e,t,r){let n,o=this.dependencyGraph.getRange(r.start,r.end),{smallerRangeVertex:i,restConditionRanges:s,restValuesRange:a}=((e,t,r)=>{if(r.end.row>r.start.row){let n=r1(r.end.sheet,r.end.col,r.end.row-1),o=e.getRange(r.start,n);if(void 0!==o)return{smallerRangeVertex:o,restValuesRange:r.withStart(r1(r.start.sheet,r.start.col,r.end.row)),restConditionRanges:t.map(e=>e.withStart(r1(e.start.sheet,e.start.col,e.end.row)))}}return{restValuesRange:r,restConditionRanges:t}})(this.dependencyGraph,t,r);n=void 0!==i&&this.dependencyGraph.existsEdge(i,o)?i.getCriterionFunctionValues(e):new Map;let l=new Map;return n.forEach(([e,t],r)=>{let n=sb(t,s.map(e=>sy(this.dependencyGraph,e)),Array.from(sy(this.dependencyGraph,a)).map(this.mapFunction)[Symbol.iterator]()),o=this.composeFunction(e,this.reduceFunction(n));this.interpreter.stats.incrementCriterionFunctionPartialCacheUsed(),l.set(r,[o,t])}),l}}class sf{constructor(e,t){this.conditionRange=e,this.criterionPackage=t}}function*sy(e,t){for(let r of t.addresses(e))yield tI(e.getScalarValue(r))}function*sb(e,t,r){for(let n of r){let r=t.map(e=>(function(e){let t=e[Symbol.iterator](),{done:r,value:n}=t.next();return r?{rest:function*(){}()}:{value:n,rest:t}})(e));if(!r.every(e=>Object.prototype.hasOwnProperty.call(e,"value")))return;(function(e,t){let r=[];for(let n=0;n<Math.min(e.length,t.length);n++)r.push([e[n],t[n]]);return r})(r.map(e=>tI(e.value)),e).every(([e,t])=>t(e))&&(yield n),t=r.map(e=>e.rest)}}class sC{constructor(e,t){this.sum=e,this.count=t}static single(e){return new sC(e,1)}compose(e){return new sC(this.sum+e.sum,this.count+e.count)}averageValue(){return this.count>0?this.sum/this.count:void 0}}function sw(e){return tD(e)&&!Number.isFinite(tI(e))?0:e}function sS(e){return e instanceof rX?e:tD(e)?tI(e):void 0}sC.empty=new sC(0,0);class sv extends nR{sumif(e,t){let r="SUMIF",n=(e,t,n)=>this.computeConditionalAggregationFunction(null!=n?n:e,[e,t],r,0,(e,t)=>this.arithmeticHelper.nonstrictadd(e,t),sS);return this.runFunction(e.args,t,this.metadata(r),n)}sumifs(e,t){let r="SUMIFS",n=(e,...t)=>this.computeConditionalAggregationFunction(e,t,r,0,(e,t)=>this.arithmeticHelper.nonstrictadd(e,t),sS);return this.runFunction(e.args,t,this.metadata(r),n)}averageif(e,t){let r="AVERAGEIF",n=(e,t,n)=>{let o=this.computeConditionalAggregationFunction(null!=n?n:e,[e,t],r,sC.empty,(e,t)=>e.compose(t),e=>tD(e)?sC.single(tI(e)):sC.empty);return o instanceof rX?o:o.averageValue()||new rX(d.DIV_BY_ZERO)};return this.runFunction(e.args,t,this.metadata(r),n)}countif(e,t){let r="COUNTIF",n=(e,t)=>this.computeConditionalAggregationFunction(e,[e,t],r,0,(e,t)=>e+t,()=>1);return this.runFunction(e.args,t,this.metadata(r),n)}countifs(e,t){let r="COUNTIFS",n=(...e)=>this.computeConditionalAggregationFunction(e[0],e,r,0,(e,t)=>e+t,()=>1);return this.runFunction(e.args,t,this.metadata(r),n)}minifs(e,t){let r="MINIFS",n=(e,t)=>void 0===t||void 0===e?void 0===t?e:t:Math.min(e,t),o=(e,...t)=>sw(this.computeConditionalAggregationFunction(e,t,r,1/0,n,sS));return this.runFunction(e.args,t,this.metadata(r),o)}maxifs(e,t){let r="MAXIFS",n=(e,t)=>void 0===t||void 0===e?void 0===t?e:t:Math.max(e,t),o=(e,...t)=>sw(this.computeConditionalAggregationFunction(e,t,r,-1/0,n,sS));return this.runFunction(e.args,t,this.metadata(r),o)}computeConditionalAggregationFunction(e,t,r,n,o,i){let s=[];for(let e=0;e<t.length;e+=2){let r=t[e],n=this.interpreter.criterionBuilder.fromCellValue(t[e+1],this.arithmeticHelper);if(void 0===n)return new rX(d.VALUE,eq.BadCriterion);s.push(new sf(r,n))}return new sm(this.interpreter,e=>[r,...e.map(e=>`${e.conditionRange.range.sheet},${e.conditionRange.range.start.col},${e.conditionRange.range.start.row}`)].join(","),n,o,i).compute(e,s)}}sv.implementedFunctions={SUMIF:{method:"sumif",parameters:[{argumentType:p.RANGE},{argumentType:p.NOERROR},{argumentType:p.RANGE,optionalArg:!0}]},COUNTIF:{method:"countif",parameters:[{argumentType:p.RANGE},{argumentType:p.NOERROR}]},AVERAGEIF:{method:"averageif",parameters:[{argumentType:p.RANGE},{argumentType:p.NOERROR},{argumentType:p.RANGE,optionalArg:!0}]},SUMIFS:{method:"sumifs",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE},{argumentType:p.NOERROR}],repeatLastArgs:2},COUNTIFS:{method:"countifs",parameters:[{argumentType:p.RANGE},{argumentType:p.NOERROR}],repeatLastArgs:2},MINIFS:{method:"minifs",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE},{argumentType:p.NOERROR}],repeatLastArgs:2},MAXIFS:{method:"maxifs",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE},{argumentType:p.NOERROR}],repeatLastArgs:2}};class sR extends nR{sumproduct(e,t){return this.runFunction(e.args,t,this.metadata("SUMPRODUCT"),(...e)=>{let t=e[0].width(),r=e[0].height();for(let n of e)if(n.width()!==t||n.height()!==r)return new rX(d.VALUE,eq.EqualLength);let n=0,o=e.map(e=>e.iterateValuesFromTopLeftCorner());for(let e=0;e<t*r;e++){let e=1;for(let t of o){let r=t.next().value;if(r instanceof rX)return r;let n=this.coerceScalarToNumberOrError(r);tD(n)?e*=tI(n):e=0}n+=e}return n})}}sR.implementedFunctions={SUMPRODUCT:{method:"sumproduct",parameters:[{argumentType:p.RANGE}],repeatLastArgs:1}};class sE extends nR{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)=>{let r=e.split(" ");return t>=r.length||t<0?new rX(d.VALUE,eq.IndexBounds):r[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,"").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 rX(d.VALUE,eq.NegativeCount):e.repeat(t))}right(e,t){return this.runFunction(e.args,t,this.metadata("RIGHT"),(e,t)=>t<0?new rX(d.VALUE,eq.NegativeLength):0===t?"":e.slice(-t))}left(e,t){return this.runFunction(e.args,t,this.metadata("LEFT"),(e,t)=>t<0?new rX(d.VALUE,eq.NegativeLength):e.slice(0,t))}mid(e,t){return this.runFunction(e.args,t,this.metadata("MID"),(e,t,r)=>t<1?new rX(d.VALUE,eq.LessThanOne):r<0?new rX(d.VALUE,eq.NegativeLength):e.substring(t-1,t+r-1))}replace(e,t){return this.runFunction(e.args,t,this.metadata("REPLACE"),(e,t,r,n)=>t<1?new rX(d.VALUE,eq.LessThanOne):r<0?new rX(d.VALUE,eq.NegativeLength):e.substring(0,t-1)+n+e.substring(t+r-1))}search(e,t){return this.runFunction(e.args,t,this.metadata("SEARCH"),(e,t,r)=>{if(r<1||r>t.length)return new rX(d.VALUE,eq.LengthBounds);let n=e.toLowerCase(),o=t.substring(r-1).toLowerCase(),i=this.arithmeticHelper.requiresRegex(n)?this.arithmeticHelper.searchString(n,o):o.indexOf(n);return i>-1?i+r:new rX(d.VALUE,eq.PatternNotFound)})}substitute(e,t){return this.runFunction(e.args,t,this.metadata("SUBSTITUTE"),(e,t,r,n)=>{let o,i=RegExp(this.escapeRegExpSpecialCharacters(t),"g");if(void 0===n)return e.replace(i,r);if(n<1)return new rX(d.VALUE,eq.LessThanOne);let s=0;for(;null!==(o=i.exec(e));)if(n===++s)return e.substring(0,o.index)+r+e.substring(i.lastIndex);return e})}find(e,t){return this.runFunction(e.args,t,this.metadata("FIND"),(e,t,r)=>{if(r<1||r>t.length)return new rX(d.VALUE,eq.IndexBounds);let n=t.substring(r-1).indexOf(e)+r;return n>0?n:new rX(d.VALUE,eq.PatternNotFound)})}t(e,t){return this.runFunction(e.args,t,this.metadata("T"),e=>e instanceof rX||"string"==typeof e?e:"")}n(e,t){return this.runFunction(e.args,t,this.metadata("N"),e=>{var t;let r=e instanceof tB?null==(t=e.data[0])?void 0:t[0]:e;return r instanceof rX||"number"==typeof r?r:"boolean"==typeof r?+!!r:0})}upper(e,t){return this.runFunction(e.args,t,this.metadata("UPPER"),e=>e.toUpperCase())}value(e,t){return this.runFunction(e.args,t,this.metadata("VALUE"),e=>{if(e instanceof rX||tD(e))return e;if("string"!=typeof e)return new rX(d.VALUE,eq.NumberCoercion);let t=e.trim(),r=/^\(([^()]+)\)$/.exec(t);if(r){let e=this.parseStringToNumber(r[1]);if(void 0!==e)return-e}let n=this.parseStringToNumber(t);return void 0!==n?n:new rX(d.VALUE,eq.NumberCoercion)})}parseStringToNumber(e){let t=e.trim();if(""!==t)return this.arithmeticHelper.coerceToMaybeNumber(t)}escapeRegExpSpecialCharacters(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}sE.implementedFunctions={CONCATENATE:{method:"concatenate",parameters:[{argumentType:p.STRING}],repeatLastArgs:1,expandRanges:!0},EXACT:{method:"exact",parameters:[{argumentType:p.STRING},{argumentType:p.STRING}]},SPLIT:{method:"split",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER}]},LEN:{method:"len",parameters:[{argumentType:p.STRING}]},LOWER:{method:"lower",parameters:[{argumentType:p.STRING}]},MID:{method:"mid",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER},{argumentType:p.NUMBER}]},TRIM:{method:"trim",parameters:[{argumentType:p.STRING}]},T:{method:"t",parameters:[{argumentType:p.SCALAR}]},N:{method:"n",parameters:[{argumentType:p.ANY}]},PROPER:{method:"proper",parameters:[{argumentType:p.STRING}]},CLEAN:{method:"clean",parameters:[{argumentType:p.STRING}]},REPT:{method:"rept",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER}]},RIGHT:{method:"right",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,defaultValue:1}]},LEFT:{method:"left",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER,defaultValue:1}]},REPLACE:{method:"replace",parameters:[{argumentType:p.STRING},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.STRING}]},SEARCH:{method:"search",parameters:[{argumentType:p.STRING},{argumentType:p.STRING},{argumentType:p.NUMBER,defaultValue:1}]},SUBSTITUTE:{method:"substitute",parameters:[{argumentType:p.STRING},{argumentType:p.STRING},{argumentType:p.STRING},{argumentType:p.NUMBER,optionalArg:!0}]},FIND:{method:"find",parameters:[{argumentType:p.STRING},{argumentType:p.STRING},{argumentType:p.NUMBER,defaultValue:1}]},UPPER:{method:"upper",parameters:[{argumentType:p.STRING}]},VALUE:{method:"value",parameters:[{argumentType:p.SCALAR}]}};class sT extends nR{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 rX(d.DIV_BY_ZERO):Math.atan2(t,e))}cot(e,t){return this.runFunction(e.args,t,this.metadata("COT"),e=>0===e?new rX(d.DIV_BY_ZERO):1/Math.tan(e))}acot(e,t){return this.runFunction(e.args,t,this.metadata("ACOT"),e=>0===e?iJ/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 rX(d.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 rX(d.DIV_BY_ZERO):1/Math.tanh(e))}acoth(e,t){return this.runFunction(e.args,t,this.metadata("ACOTH"),e=>0===e?new rX(d.NUM,eq.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 rX(d.DIV_BY_ZERO):1/Math.sinh(e))}}sT.implementedFunctions={ACOS:{method:"acos",parameters:[{argumentType:p.NUMBER}]},ASIN:{method:"asin",parameters:[{argumentType:p.NUMBER}]},COS:{method:"cos",parameters:[{argumentType:p.NUMBER}]},SIN:{method:"sin",parameters:[{argumentType:p.NUMBER}]},TAN:{method:"tan",parameters:[{argumentType:p.NUMBER}]},ATAN:{method:"atan",parameters:[{argumentType:p.NUMBER}]},ATAN2:{method:"atan2",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]},COT:{method:"cot",parameters:[{argumentType:p.NUMBER}]},SEC:{method:"sec",parameters:[{argumentType:p.NUMBER}]},CSC:{method:"csc",parameters:[{argumentType:p.NUMBER}]},SINH:{method:"sinh",parameters:[{argumentType:p.NUMBER}]},COSH:{method:"cosh",parameters:[{argumentType:p.NUMBER}]},TANH:{method:"tanh",parameters:[{argumentType:p.NUMBER}]},COTH:{method:"coth",parameters:[{argumentType:p.NUMBER}]},SECH:{method:"sech",parameters:[{argumentType:p.NUMBER}]},CSCH:{method:"csch",parameters:[{argumentType:p.NUMBER}]},ACOT:{method:"acot",parameters:[{argumentType:p.NUMBER}]},ASINH:{method:"asinh",parameters:[{argumentType:p.NUMBER}]},ACOSH:{method:"acosh",parameters:[{argumentType:p.NUMBER}]},ATANH:{method:"atanh",parameters:[{argumentType:p.NUMBER}]},ACOTH:{method:"acoth",parameters:[{argumentType:p.NUMBER}]}};class sA extends ii{constructor(e){super(e),this.dependencyGraph=e}find(e,t,r){return this.basicFind(e,t,"col",r)}}class sM extends nR{constructor(){super(...arguments),this.rowSearch=new sA(this.dependencyGraph)}vlookup(e,t){return this.runFunction(e.args,t,this.metadata("VLOOKUP"),(e,t,r,n)=>{let o=t.range;return void 0===o?new rX(d.VALUE,eq.WrongType):r<1?new rX(d.VALUE,eq.LessThanOne):r>o.width()?new rX(d.REF,eq.IndexLarge):this.doVlookup(nc(e),t,r-1,{ordering:n?"asc":"none",ifNoMatch:n?"returnLowerBound":"returnNotFound"})})}hlookup(e,t){return this.runFunction(e.args,t,this.metadata("HLOOKUP"),(e,t,r,n)=>{let o=t.range;return void 0===o?new rX(d.VALUE,eq.WrongType):r<1?new rX(d.VALUE,eq.LessThanOne):r>o.height()?new rX(d.REF,eq.IndexLarge):this.doHlookup(nc(e),t,r-1,{ordering:n?"asc":"none",ifNoMatch:n?"returnLowerBound":"returnNotFound"})})}xlookup(e,t){return this.runFunction(e.args,t,this.metadata("XLOOKUP"),(e,t,r,n,o,i)=>{if(![0,-1,1,2].includes(o)||![1,-1,2,-2].includes(i))return new rX(d.VALUE,eq.BadMode);let s=t instanceof tB?t:tB.fromScalar(t),a=r instanceof tB?r:tB.fromScalar(r);return this.doXlookup(nc(e),s,a,n,2===o,{ordering:2===i?"asc":-2===i?"desc":"none",returnOccurrence:-1===i?"last":"first",ifNoMatch:-1===o?"returnLowerBound":1===o?"returnUpperBound":"returnNotFound"})})}xlookupArraySize(e){var t,r;let n=null==(t=null==e?void 0:e.args)?void 0:t[1],o=null==(r=null==e?void 0:e.args)?void 0:r[2];if((null==n?void 0:n.start)==null||(null==n?void 0:n.end)==null||(null==o?void 0:o.start)==null||(null==o?void 0:o.end)==null)return nE.error();let i=n.end.row-n.start.row+1,s=n.end.col-n.start.col+1,a=o.end.row-o.start.row+1,l=o.end.col-o.start.col+1,h=1===s&&a===i,d=1===i&&l===s;return h||d?h?new nE(l,1):new nE(1,a):nE.error()}match(e,t){return this.runFunction(e.args,t,this.metadata("MATCH"),(e,t,r)=>this.doMatch(nc(e),t,r))}searchInRange(e,t,r,n,o){return r&&"string"==typeof e&&this.arithmeticHelper.requiresRegex(e)?o.advancedFind(this.arithmeticHelper.eqMatcherFunction(e),t,{returnOccurrence:n.returnOccurrence}):o.find(e,t,n)}doVlookup(e,t,r,n){let o,i;this.dependencyGraph.stats.start(a.VLOOKUP);let s=t.range;o=void 0===s?tB.onlyValues(t.data.map(e=>[e[0]])):tB.onlyRange(ne.spanFrom(s.start,1,s.height()),this.dependencyGraph);let l=this.searchInRange(e,o,"none"===n.ordering,n,this.columnSearch);if(this.dependencyGraph.stats.end(a.VLOOKUP),-1===l)return new rX(d.NA,eq.ValueNotFound);if(void 0===s)i=t.data[l][r];else{let e=r1(s.sheet,s.start.col+r,s.start.row+l);i=this.dependencyGraph.getCellValue(e)}return i instanceof tB?new rX(d.VALUE,eq.WrongType):i}doHlookup(e,t,r,n){let o,i,s=t.range;o=void 0===s?tB.onlyValues([t.data[0]]):tB.onlyRange(ne.spanFrom(s.start,s.width(),1),this.dependencyGraph);let a=this.searchInRange(e,o,"none"===n.ordering,n,this.rowSearch);if(-1===a)return new rX(d.NA,eq.ValueNotFound);if(void 0===s)i=t.data[r][a];else{let e=r1(s.sheet,s.start.col+a,s.start.row+r);i=this.dependencyGraph.getCellValue(e)}return i instanceof tB?new rX(d.VALUE,eq.WrongType):i}doXlookup(e,t,r,n,o,i){let s=1===t.width()&&r.height()===t.height(),a=1===t.height()&&r.width()===t.width();if(!s&&!a)return new rX(d.VALUE,eq.WrongDimension);let l=s?this.columnSearch:this.rowSearch,h=this.searchInRange(e,t,o,i,l);if(-1===h)return n==d.NA?new rX(d.NA,eq.ValueNotFound):n;let u=s?[r.data[h]]:r.data.map(e=>[e[h]]);return tB.onlyValues(u)}doMatch(e,t,r){if(![-1,0,1].includes(r))return new rX(d.VALUE,eq.BadMode);if(t.width()>1&&t.height()>1)return new rX(d.NA);let n=(1===t.width()?this.columnSearch:this.rowSearch).find(e,t,0===r?{ordering:"none",ifNoMatch:"returnNotFound"}:{ordering:-1===r?"desc":"asc",ifNoMatch:-1===r?"returnUpperBound":"returnLowerBound"});return -1===n?new rX(d.NA,eq.ValueNotFound):n+1}}sM.implementedFunctions={VLOOKUP:{method:"vlookup",parameters:[{argumentType:p.NOERROR},{argumentType:p.RANGE},{argumentType:p.NUMBER},{argumentType:p.BOOLEAN,defaultValue:!0}]},HLOOKUP:{method:"hlookup",parameters:[{argumentType:p.NOERROR},{argumentType:p.RANGE},{argumentType:p.NUMBER},{argumentType:p.BOOLEAN,defaultValue:!0}]},XLOOKUP:{method:"xlookup",sizeOfResultArrayMethod:"xlookupArraySize",parameters:[{argumentType:p.NOERROR},{argumentType:p.RANGE},{argumentType:p.RANGE},{argumentType:p.SCALAR,optionalArg:!0,defaultValue:d.NA},{argumentType:p.NUMBER,optionalArg:!0,defaultValue:0},{argumentType:p.NUMBER,optionalArg:!0,defaultValue:1}]},MATCH:{method:"match",parameters:[{argumentType:p.NOERROR},{argumentType:p.RANGE},{argumentType:p.NUMBER,defaultValue:1}]}};class sN extends nR{roman(e,t){return this.runFunction(e.args,t,this.metadata("ROMAN"),(e,t)=>{var r,n;let o;return(e=Math.trunc(e),!1===t?t=4:!0===t&&(t=0),(t=tI(this.coerceScalarToNumberOrError(t)))instanceof rX)?t:(t=Math.trunc(t))<0?new rX(d.VALUE,eq.ValueSmall):t>4?new rX(d.VALUE,eq.ValueLarge):(r=e,n=t,o={val:r%1e3,acc:"M".repeat(Math.floor(r/1e3))},4===n&&(sx(o,"IM",999,1e3),sx(o,"ID",499,500)),n>=3&&(sx(o,"VM",995,1e3),sx(o,"VD",495,500)),n>=2&&(sx(o,"XM",990,1e3),sx(o,"XD",490,500)),n>=1&&(sx(o,"LM",950,1e3),sx(o,"LD",450,500)),sx(o,"CM",900,1e3),sx(o,"CD",400,500),sx(o,"D",500,900),o.acc+="C".repeat(Math.floor(o.val/100)),o.val%=100,n>=2&&(sx(o,"IC",99,100),sx(o,"IL",49,50)),n>=1&&(sx(o,"VC",95,100),sx(o,"VL",45,50)),sx(o,"XC",90,100),sx(o,"XL",40,50),sx(o,"L",50,90),o.acc+="X".repeat(Math.floor(o.val/10)),o.val%=10,sx(o,"IX",9,10),sx(o,"IV",4,5),sx(o,"V",5,9),o.acc+="I".repeat(o.val),o.acc)})}arabic(e,t){return this.runFunction(e.args,t,this.metadata("ARABIC"),e=>{e=e.trim().toUpperCase();let t=!1;if(e.startsWith("-")&&(e=e.slice(1),t=!0,""===e))return new rX(d.VALUE,eq.InvalidRoman);let r={input:e,acc:0};return(sI(r,{token:"MMM",val:3e3},{token:"MM",val:2e3},{token:"M",val:1e3}),sI(r,{token:"IM",val:999},{token:"VM",val:995},{token:"XM",val:990},{token:"LM",val:950},{token:"CM",val:900}),sI(r,{token:"D",val:500},{token:"ID",val:499},{token:"VD",val:495},{token:"XD",val:490},{token:"LD",val:450},{token:"CD",val:400}),sI(r,{token:"CCC",val:300},{token:"CC",val:200},{token:"C",val:100}),sI(r,{token:"IC",val:99},{token:"VC",val:95},{token:"XC",val:90}),sI(r,{token:"L",val:50},{token:"IL",val:49},{token:"VL",val:45},{token:"XL",val:40}),sI(r,{token:"XXX",val:30},{token:"XX",val:20},{token:"X",val:10}),sI(r,{token:"IX",val:9}),sI(r,{token:"V",val:5},{token:"IV",val:4}),sI(r,{token:"III",val:3},{token:"II",val:2},{token:"I",val:1}),""!==r.input)?new rX(d.VALUE,eq.InvalidRoman):t?-r.acc:r.acc})}}function sI(e,...t){for(let r of t)if(e.input.startsWith(r.token)){e.input=e.input.slice(r.token.length),e.acc+=r.val;break}}function sx(e,t,r,n){e.val>=r&&e.val<n&&(e.val-=r,e.acc+=t)}sN.implementedFunctions={ROMAN:{method:"roman",parameters:[{argumentType:p.NUMBER,minValue:1,lessThan:4e3},{argumentType:p.NOERROR,optionalArg:!0,defaultValue:0}]},ARABIC:{method:"arabic",parameters:[{argumentType:p.STRING}]}};class sO extends nR{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)}}sO.implementedFunctions={"HF.ADD":{method:"add",parameters:[{argumentType:p.NUMBER,passSubtype:!0},{argumentType:p.NUMBER,passSubtype:!0}]},"HF.CONCAT":{method:"concat",parameters:[{argumentType:p.STRING,passSubtype:!0},{argumentType:p.STRING,passSubtype:!0}]},"HF.DIVIDE":{method:"divide",parameters:[{argumentType:p.NUMBER,passSubtype:!0},{argumentType:p.NUMBER,passSubtype:!0}]},"HF.EQ":{method:"eq",parameters:[{argumentType:p.NOERROR,passSubtype:!0},{argumentType:p.NOERROR,passSubtype:!0}]},"HF.GT":{method:"gt",parameters:[{argumentType:p.NOERROR,passSubtype:!0},{argumentType:p.NOERROR,passSubtype:!0}]},"HF.GTE":{method:"gte",parameters:[{argumentType:p.NOERROR,passSubtype:!0},{argumentType:p.NOERROR,passSubtype:!0}]},"HF.LT":{method:"lt",parameters:[{argumentType:p.NOERROR,passSubtype:!0},{argumentType:p.NOERROR,passSubtype:!0}]},"HF.LTE":{method:"lte",parameters:[{argumentType:p.NOERROR,passSubtype:!0},{argumentType:p.NOERROR,passSubtype:!0}]},"HF.MINUS":{method:"minus",parameters:[{argumentType:p.NUMBER,passSubtype:!0},{argumentType:p.NUMBER,passSubtype:!0}]},"HF.MULTIPLY":{method:"multiply",parameters:[{argumentType:p.NUMBER,passSubtype:!0},{argumentType:p.NUMBER,passSubtype:!0}]},"HF.NE":{method:"ne",parameters:[{argumentType:p.NOERROR,passSubtype:!0},{argumentType:p.NOERROR,passSubtype:!0}]},"HF.POW":{method:"pow",parameters:[{argumentType:p.NUMBER,passSubtype:!0},{argumentType:p.NUMBER,passSubtype:!0}]},"HF.UMINUS":{method:"uminus",parameters:[{argumentType:p.NUMBER,passSubtype:!0}]},"HF.UNARY_PERCENT":{method:"upercent",parameters:[{argumentType:p.NUMBER,passSubtype:!0}]},"HF.UPLUS":{method:"uplus",parameters:[{argumentType:p.NUMBER,passSubtype:!0}]}};var s_=Math;function sk(e,t){for(var r=0,n=0;r<e.length;++r)n=t*n+e[r];return n}function sH(e,t,r,n,o){if(0===t)return r;if(1===t)return n;for(var i=2/e,s=n,a=1;a<t;++a)s=n*a*i+o*r,r=n,n=s;return s}function sL(e,t,r,n,o){return function(r,i){if(n){if(0===r)return 1==n?-1/0:1/0;else if(r<0)return NaN}if(0===i)return e(r);if(1===i)return t(r);if(i<0)return NaN;i|=0;var s=e(r),a=t(r);return sH(r,i,s,a,o)}}var sP=function(){var e=[0xd6759744e,-0x31c78f292,651619640.7,-11214424.18,77392.33017,-184.9052456].reverse(),t=[0xd675973ab,0x3d5d6d39,9494680.718,59272.64853,267.8532712,1].reverse(),r=[1,-.001098628627,2734510407e-14,-2073370639e-15,2093887211e-16].reverse(),n=[-.01562499995,1430488765e-13,-6911147651e-15,7621095161e-16,-934935152e-16].reverse();function o(o){var i=0,s=0,a=0,l=o*o;if(o<8)i=(s=sk(e,l))/(a=sk(t,l));else{var h=o-.785398164;s=sk(r,l=64/l),a=sk(n,l),i=s_.sqrt(.636619772/o)*(s_.cos(h)*s-s_.sin(h)*a*8/o)}return i}var i=[0x10d925ddd8,-0x1d6950b23,242396853.1,-2972611.439,15704.4826,-30.16036606].reverse(),s=[0x21b24bbb9a,0x891f618a,18583304.74,99447.43394,376.9991397,1].reverse(),a=[1,.00183105,-3516396496e-14,2457520174e-15,-240337019e-15].reverse(),l=[.04687499995,-2002690873e-13,8449199096e-15,-88228987e-14,105787412e-15].reverse();function h(e){var t=0,r=0,n=0,o=e*e,h=s_.abs(e)-2.356194491;return 8>Math.abs(e)?t=(r=e*sk(i,o))/(n=sk(s,o)):(r=sk(a,o=64/o),n=sk(l,o),t=s_.sqrt(.636619772/s_.abs(e))*(s_.cos(h)*r-s_.sin(h)*n*8/s_.abs(e)),e<0&&(t=-t)),t}return function e(t,r){if(r=Math.round(r),!isFinite(t))return isNaN(t)?t:0;if(r<0)return(r%2?-1:1)*e(t,-r);if(t<0)return(r%2?-1:1)*e(-t,r);if(0===r)return o(t);if(1===r)return h(t);if(0===t)return 0;var n=0;if(t>r)n=sH(t,r,o(t),h(t),-1);else{for(var i=2*s_.floor((r+s_.floor(s_.sqrt(40*r)))/2),s=!1,a=0,l=0,d=1,u=0,c=2/t,g=i;g>0;g--)u=g*c*d-a,a=d,d=u,s_.abs(d)>1e10&&(d*=1e-10,a*=1e-10,n*=1e-10,l*=1e-10),s&&(l+=d),s=!s,g==r&&(n=a);n/=l=2*l-d}return n}}(),sD=(W=[-0xb04cc5cd,0x1a4fa4b91,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),G=[0x954bf890d,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),$=[1,-.001098628627,2734510407e-14,-2073370639e-15,2093887211e-16].reverse(),Y=[-.01562499995,1430488765e-13,-6911147651e-15,7621095161e-16,-934945152e-16].reverse(),j=[-4900604943e3,127527439e4,-0xbffb0414e,734926455.1,-4237922.726,8511.937935].reverse(),q=[249958057e5,0x62d2b66f40,0xde8afbbf,22459040.02,102042.605,354.9632885,1].reverse(),K=[1,.00183105,-3516396496e-14,2457520174e-15,-240337019e-15].reverse(),X=[.04687499995,-2002690873e-13,8449199096e-15,-88228987e-14,105787412e-15].reverse(),sL(function(e){var t=0,r=0,n=0,o=e*e,i=e-.785398164;return e<8?t=(r=sk(W,o))/(n=sk(G,o))+.636619772*sP(e,0)*s_.log(e):(r=sk($,o=64/o),n=sk(Y,o),t=s_.sqrt(.636619772/e)*(s_.sin(i)*r+s_.cos(i)*n*8/e)),t},function(e){var t=0,r=0,n=0,o=e*e,i=e-2.356194491;return e<8?t=(r=e*sk(j,o))/(n=sk(q,o))+.636619772*(sP(e,1)*s_.log(e)-1/e):(r=sk(K,o=64/o),n=sk(X,o),t=s_.sqrt(.636619772/e)*(s_.sin(i)*r+s_.cos(i)*n*8/e)),t},"BESSELY",1,-1)),sF=(Q=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),Z=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse(),J=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),ee=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse(),function e(t,r){if(0===(r=Math.round(r)))return t<=3.75?sk(Q,t*t/14.0625):s_.exp(s_.abs(t))/s_.sqrt(s_.abs(t))*sk(Z,3.75/s_.abs(t));if(1===r)return t<3.75?t*sk(J,t*t/14.0625):(t<0?-1:1)*s_.exp(s_.abs(t))/s_.sqrt(s_.abs(t))*sk(ee,3.75/s_.abs(t));if(r<0)return NaN;if(0===s_.abs(t))return 0;if(t==1/0)return 1/0;var n,o=0,i=2/s_.abs(t),s=0,a=1,l=0;for(n=2*s_.round((r+s_.round(s_.sqrt(40*r)))/2);n>0;n--)l=n*i*a+s,s=a,a=l,s_.abs(a)>1e10&&(a*=1e-10,s*=1e-10,o*=1e-10),n==r&&(o=s);return o*=e(t,0)/a,t<0&&r%2?-o:o}),sB=(et=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),er=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse(),en=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),eo=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse(),sL(function(e){return e<=2?-s_.log(e/2)*sF(e,0)+sk(et,e*e/4):s_.exp(-e)/s_.sqrt(e)*sk(er,2/e)},function(e){return e<=2?s_.log(e/2)*sF(e,1)+1/e*sk(en,e*e/4):s_.exp(-e)/s_.sqrt(e)*sk(eo,2/e)},"BESSELK",2,1));function sV(e){let t,r,n,o,i=[-1.3026537197817094,.6419697923564902,.019476473204185836,-.00956151478680863,-946595344482036e-18,366839497852761e-18,42523324806907e-18,-20278578112534e-18,-1624290004647e-18,130365583558e-17,15626441722e-18,-85238095915e-18,6529054439e-18,5059343495e-18,-991364156e-18,-227365122e-18,96467911e-18,2394038e-18,-6886027e-18,894487e-18,313092e-18,-112708e-18,381e-18,7106e-18,-1523e-18,-94e-18,121e-18,-28e-18],s=i.length-1,a=!1,l=0,h=0;if(0===e)return 0;for(e<0&&(e=-e,a=!0),r=4*(t=2/(2+e))-2;s>0;s--)n=l,l=r*l-h+i[s],h=n;return o=t*Math.exp(-e*e+.5*(i[0]+r*l)-h),a?o-1:1-o}function sU(e){return 1-sV(e)}function sz(e){let t,r,n,o,i=0;if(e>=2)return -100;if(e<=0)return 100;for(t=-.70711*((2.30753+.27061*(n=Math.sqrt(-2*Math.log((o=e<1?e:2-e)/2))))/(1+n*(.99229+.04481*n))-n);i<2;i++)r=sU(t)-o,t+=r/(1.1283791670955126*Math.exp(-t*t)-t*r);return e<1?t:-t}function sW(e){let t,r,n,o,i=[-1.716185138865495,24.76565080557592,-379.80425647094563,629.3311553128184,866.9662027904133,-31451.272968848367,-36144.413418691176,66456.14382024054],s=[-30.8402300119739,315.35062697960416,-1015.1563674902192,-3107.771671572311,22538.11842098015,4755.846277527881,-134659.9598649693,-115132.2596755535],a=!1,l=0,h=0,d=0,u=e;if(e>171.6243769536076)return 1/0;if(u<=0){if(!(o=u%1))return 1/0;a=(1&u?-1:1)*Math.PI/Math.sin(Math.PI*o),u=1-u}for(t=0,n=u,r=u<1?u++:(u-=l=(0|u)-1)-1;t<8;++t)d=(d+i[t])*r,h=h*r+s[t];if(o=d/h+1,n<u)o/=n;else if(n>u)for(t=0;t<l;++t)o*=u,u++;return a&&(o=a/o),o}let sG=function(e,t,r){return sj(e,t)*r};function s$(e){let t,r,n=0,o=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],i=1.000000000190015;for(r=(t=e)+5.5,r-=(e+.5)*Math.log(r);n<6;n++)i+=o[n]/++t;return Math.log(2.5066282746310007*i/e)-r}function sY(e,t){let r,n=s$(e),o=e,i=1/e,s=i,a=t+1-e,l=1/1e-30,h=1/a,d=h,u=1,c=-~(8.5*Math.log(e>=1?e:1/e)+.4*e+17);if(t<0||e<=0)return NaN;if(t<e+1){for(;u<=c;u++)i+=s*=t/++o;return i*Math.exp(-t+e*Math.log(t)-n)}for(;u<=c;u++)a+=2,d*=(h=1/(h=(r=-u*(u-e))*h+a))*(l=a+r/l);return 1-d*Math.exp(-t+e*Math.log(t)-n)}function sj(e,t){let r,n,o,i,s,a=0,l=t-1,h=s$(t);if(e>=1)return Math.max(100,t+100*Math.sqrt(t));if(e<=0)return 0;for(t>1?(i=Math.log(l),s=Math.exp(l*(i-1)-h),r=(2.30753+.27061*(n=Math.sqrt(-2*Math.log(e<.5?e:1-e))))/(1+n*(.99229+.04481*n))-n,e<.5&&(r=-r),r=Math.max(.001,t*Math.pow(1-1/(9*t)-r/(3*Math.sqrt(t)),3))):r=e<(n=1-t*(.253+.12*t))?Math.pow(e/n,1/t):1-Math.log(1-(e-n)/(1-n));a<12;a++){if(r<=0)return 0;if(o=(sY(t,r)-e)/(n=t>1?s*Math.exp(-(r-l)+l*(Math.log(r)-i)):Math.exp(-r+l*Math.log(r)-h)),(r-=n=o/(1-.5*Math.min(1,o*((t-1)/r-1))))<=0&&(r=.5*(r+n)),Math.abs(n)<1e-8*r)break}return r}let sq=function(e,t,r){return Math.exp(-.5*Math.log(2*Math.PI)-Math.log(r)-Math.pow(e-t,2)/(2*r*r))},sK=function(e,t,r){return .5*(1+sV((e-t)/Math.sqrt(2*r*r)))},sX=function(e,t,r){return -1.4142135623730951*r*sz(2*e)+t};function sQ(e,t){if(!(e<=0)&&!(t<=0))return e+t>170?Math.exp(sZ(e,t)):sW(e)*sW(t)/sW(e+t)}function sZ(e,t){return s$(e)+s$(t)-s$(e+t)}function sJ(e,t,r){var n,o,i,s,a,l,h,d,u,c=t-1,g=r-1,p=0;if(e<=0)return 0;if(e>=1)return 1;for(t>=1&&r>=1?(a=(2.30753+.27061*(i=Math.sqrt(-2*Math.log(e<.5?e:1-e))))/(1+i*(.99229+.04481*i))-i,e<.5&&(a=-a),l=(a*a-3)/6,d=a*Math.sqrt(l+(h=2/(1/(2*t-1)+1/(2*r-1))))/h-(1/(2*r-1)-1/(2*t-1))*(l+5/6-2/(3*h)),a=t/(t+r*Math.exp(2*d))):(n=Math.log(t/(t+r)),o=Math.log(r/(t+r)),d=(i=Math.exp(t*n)/t)+(s=Math.exp(r*o)/r),a=e<i/d?Math.pow(t*d*e,1/t):1-Math.pow(r*d*(1-e),1/r)),u=-s$(t)-s$(r)+s$(t+r);p<10&&0!==a&&1!==a&&(s=(s0(a,t,r)-e)/(i=Math.exp(c*Math.log(a)+g*Math.log(1-a)+u)),(a-=i=s/(1-.5*Math.min(1,s*(c/a-g/(1-a)))))<=0&&(a=.5*(a+i)),a>=1&&(a=.5*(a+i+1)),!(Math.abs(i)<1e-8*a)||!(p>0));p++);return a}function s0(e,t,r){var n=0===e||1===e?0:Math.exp(s$(t+r)-s$(t)-s$(r)+t*Math.log(e)+r*Math.log(1-e));return!(e<0)&&!(e>1)&&(e<(t+1)/(t+r+2)?n*s1(e,t,r)/t:1-n*s1(1-e,r,t)/r)}function s1(e,t,r){var n,o,i,s,a=1,l=t+r,h=t+1,d=t-1,u=1,c=1-l*e/h;for(1e-30>Math.abs(c)&&(c=1e-30),s=c=1/c;a<=100&&(n=2*a,1e-30>Math.abs(c=1+(o=a*(r-a)*e/((d+n)*(t+n)))*c)&&(c=1e-30),1e-30>Math.abs(u=1+o/u)&&(u=1e-30),s*=(c=1/c)*u,1e-30>Math.abs(c=1+(o=-(t+a)*(l+a)*e/((t+n)*(h+n)))*c)&&(c=1e-30),1e-30>Math.abs(u=1+o/u)&&(u=1e-30),s*=i=(c=1/c)*u,!(3e-7>Math.abs(i-1)));a++);return s}let s2=function(e,t,r){return 0===r||1===r?+(t*r===e):s4(t,e)*Math.pow(r,e)*Math.pow(1-r,t-e)},s3=function(e,t,r){if(e<0)return 0;if(e>=t)return 1;if(r<0||r>1||t<=0)return NaN;var n=(e=Math.floor(e))+1,o=t-e,i=n+o,s=Math.exp(s$(i)-s$(o)-s$(n)+n*Math.log(r)+o*Math.log(1-r));return Math.round(1e10*(1-(r<(n+1)/(i+2)?s*s6(r,n,o,1e-10):1-s*s6(1-r,o,n,1e-10))))/1e10};function s6(e,t,r,n){for(var o,i=0,s=1,a=1,l=1,h=0,d=0;Math.abs((a-d)/a)>n;)d=a,i=a+(o=-(t+h)*(t+r+h)*e/(t+2*h)/(t+2*h+1))*i,s=l+o*s,h+=1,a=i+(o=h*(r-h)*e/(t+2*h-1)/(t+2*h))*a,i/=l=s+o*l,s/=l,a/=l,l=1;return a/t}function s4(e,t){var r,n;return e>170||t>170?Math.exp((r=e,n=t,s5(r)-s5(n)-s5(r-n))):s9(e)/s9(t)/s9(e-t)}function s5(e){return e<0?NaN:s$(e+1)}function s9(e){return e<0?NaN:sW(e+1)}let s7=function(e,t){return e<0?0:sY(t/2,e/2)},s8=function(e,t){return 2*sj(e,.5*t)},ae=function(e,t,r){return e<0?0:s0(t*e/(t*e+r),t/2,r/2)},at=function(e,t,r){return r/(t*(1/sJ(e,t/2,r/2)-1))},ar={pdf:function(e,t){return t<0||e%1!=0||e<0?0:Math.pow(t,e)*Math.exp(-t)/s9(e)},cdf:function(e,t){var r=0;if(e<0)return 0;for(var n=0;r<=e;r++)n+=ar.pdf(r,t);return n}},an={pdf:function(e,t,r,n){if(e<0||e<r-(t-n)||e>n||e>r)return 0;if(2*r>t)if(2*n>t)return an.pdf(t-r-n+e,t,t-r,t-n);else return an.pdf(n-e,t,t-r,n);if(2*n>t)return an.pdf(r-e,t,r,t-n);if(r<n)return an.pdf(e,t,n,r);for(var o=1,i=0,s=0;s<e;s++){for(;o>1&&i<n;)o*=1-r/(t-i),i++;o*=(n-s)*(r-s)/((s+1)*(t-r-n+s+1))}for(;i<n;i++)o*=1-r/(t-i);return Math.min(1,Math.max(0,o))},cdf:function e(t,r,n,o){if(t<0||t<n-(r-o))return 0;if(t>=o||t>=n)return 1;if(2*n>r)if(2*o>r)return e(r-n-o+t,r,r-n,r-o);else return 1-an.cdf(o-t-1,r,r-n,o);if(2*o>r)return 1-an.cdf(n-t-1,r,n,r-o);if(n<o)return an.cdf(t,r,o,n);for(var i=1,s=1,a=0,l=0;l<t;l++){for(;i>1&&a<o;){var h=1-n/(r-a);s*=h,i*=h,a++}s*=(o-l)*(n-l)/((l+1)*(r-n-o+l+1)),i+=s}for(;a<o;a++)i*=1-n/(r-a);return Math.min(1,Math.max(0,i))}},ao=function(e,t){var r=t/2;return s0((e+Math.sqrt(e*e+t))/(2*Math.sqrt(e*e+t)),r,r)},ai=function(e,t){var r=sJ(2*Math.min(e,1-e),.5*t,.5);return r=Math.sqrt(t*(1-r)/r),e>.5?r:-r},as={pdf:function(e,t,r){return e===e>>>0&&(e<0?0:s4(e+t-1,t-1)*Math.pow(1-r,e)*Math.pow(r,t))},cdf:function(e,t,r){var n=0,o=0;if(e<0)return 0;for(;o<=e;o++)n+=as.pdf(o,t,r);return n}};function aa(e){for(var t=0,r=e.length;--r>=0;)t+=e[r];return t}function al(e){return aa(e)/e.length}function ah(e){for(var t,r=al(e),n=0,o=e.length;--o>=0;)n+=(t=e[o]-r)*t;return n}function ad(e,t){return ah(e)/(e.length-!!t)}function au(e,t){return Math.sqrt(ad(e,t))}function ac(e,t){var r,n=al(e),o=al(t),i=e.length,s=Array(i);for(r=0;r<i;r++)s[r]=(e[r]-n)*(t[r]-o);return aa(s)/(i-1)}function ag(e,t){return ac(e,t)/au(e,1)/au(t,1)}class ap extends nR{erf(e,t){return this.runFunction(e.args,t,this.metadata("ERF"),(e,t)=>void 0===t?sV(e):sV(t)-sV(e))}erfc(e,t){return this.runFunction(e.args,t,this.metadata("ERFC"),sU)}expondist(e,t){return this.runFunction(e.args,t,this.metadata("EXPON.DIST"),(e,t,r)=>{let n,o,i,s;return r?(n=e,o=t,n<0?0:1-Math.exp(-o*n)):(i=e,s=t,i<0?0:s*Math.exp(-s*i))})}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"),sW)}gammadist(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.DIST"),(e,t,r,n)=>{var o,i,s,a,l,h;return n?(o=e,i=t,s=r,o<0?0:sY(i,o/s)):(a=e,l=t,h=r,a<0?0:0===a&&1===l?1/h:Math.exp((l-1)*Math.log(a)-a/h-s$(l)-l*Math.log(h)))})}gammaln(e,t){return this.runFunction(e.args,t,this.metadata("GAMMALN"),s$)}gammainv(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.INV"),sG)}gauss(e,t){return this.runFunction(e.args,t,this.metadata("GAUSS"),e=>sK(e,0,1)-.5)}betadist(e,t){return this.runFunction(e.args,t,this.metadata("BETA.DIST"),(e,t,r,n,o,i)=>{var s,a,l,h,u,c;return e<=o?new rX(d.NUM,eq.ValueSmall):e>=i?new rX(d.NUM,eq.ValueLarge):(e=(e-o)/(i-o),n)?(s=e,a=t,l=r,s>1||s<0?+(s>1):s0(s,a,l)):(h=e,u=t,c=r,h>1||h<0?0:1==u&&1==c?1:u<512&&c<512?Math.pow(h,u-1)*Math.pow(1-h,c-1)/sQ(u,c):Math.exp((u-1)*Math.log(h)+(c-1)*Math.log(1-h)-sZ(u,c)))})}betainv(e,t){return this.runFunction(e.args,t,this.metadata("BETA.INV"),(e,t,r,n,o)=>n>=o?new rX(d.NUM,eq.WrongOrder):sJ(e,t,r)*(o-n)+n)}binomialdist(e,t){return this.runFunction(e.args,t,this.metadata("BINOM.DIST"),(e,t,r,n)=>e>t?new rX(d.NUM,eq.WrongOrder):(e=Math.trunc(e),t=Math.trunc(t),n)?s3(e,t,r):s2(e,t,r))}binomialinv(e,t){return this.runFunction(e.args,t,this.metadata("BINOM.INV"),(e,t,r)=>{let n=-1,o=e=Math.trunc(e);for(;o>n+1;){let i=Math.trunc((n+o)/2);s3(i,e,t)>=r?o=i:n=i}return o})}besselifn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELI"),(e,t)=>sF(e,Math.trunc(t)))}besseljfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELJ"),(e,t)=>sP(e,Math.trunc(t)))}besselkfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELK"),(e,t)=>sB(e,Math.trunc(t)))}besselyfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELY"),(e,t)=>sD(e,Math.trunc(t)))}chisqdist(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST"),(e,t,r)=>{var n,o;return(t=Math.trunc(t),r)?s7(e,t):(n=e,o=t,n<0?0:0===n&&2===o?.5:Math.exp((o/2-1)*Math.log(n)-n/2-o/2*Math.log(2)-s$(o/2)))})}chisqdistrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST.RT"),(e,t)=>1-s7(e,Math.trunc(t)))}chisqinv(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV"),(e,t)=>s8(e,Math.trunc(t)))}chisqinvrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV.RT"),(e,t)=>s8(1-e,Math.trunc(t)))}fdist(e,t){return this.runFunction(e.args,t,this.metadata("F.DIST"),(e,t,r,n)=>{var o,i,s;return(t=Math.trunc(t),r=Math.trunc(r),n)?ae(e,t,r):(o=e,i=t,s=r,o<0?0:i<=2?0===o&&i<2?1/0:0===o&&2===i?1:1/sQ(i/2,s/2)*Math.pow(i/s,i/2)*Math.pow(o,i/2-1)*Math.pow(1+i/s*o,-(i+s)/2):s/(s+o*i)*i/2*s2((i-2)/2,(i+s-2)/2,i*o/(s+o*i)))})}fdistrt(e,t){return this.runFunction(e.args,t,this.metadata("F.DIST.RT"),(e,t,r)=>1-ae(e,Math.trunc(t),Math.trunc(r)))}finv(e,t){return this.runFunction(e.args,t,this.metadata("F.INV"),(e,t,r)=>at(e,Math.trunc(t),Math.trunc(r)))}finvrt(e,t){return this.runFunction(e.args,t,this.metadata("F.INV.RT"),(e,t,r)=>at(1-e,Math.trunc(t),Math.trunc(r)))}weibulldist(e,t){return this.runFunction(e.args,t,this.metadata("WEIBULL.DIST"),(e,t,r,n)=>{var o,i,s,a,l,h;return n?(o=e,i=r,s=t,o<0?0:1-Math.exp(-Math.pow(o/i,s))):(a=e,l=r,h=t,a<0||l<0||h<0?0:h/l*Math.pow(a/l,h-1)*Math.exp(-Math.pow(a/l,h)))})}poissondist(e,t){return this.runFunction(e.args,t,this.metadata("POISSON.DIST"),(e,t,r)=>(e=Math.trunc(e),r)?ar.cdf(e,t):ar.pdf(e,t))}hypgeomdist(e,t){return this.runFunction(e.args,t,this.metadata("HYPGEOM.DIST"),(e,t,r,n,o)=>e>t||e>r||t>n||r>n||e+n<r+t?new rX(d.NUM,eq.ValueLarge):(e=Math.trunc(e),t=Math.trunc(t),r=Math.trunc(r),n=Math.trunc(n),o)?an.cdf(e,n,r,t):an.pdf(e,n,r,t))}tdist(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST"),(e,t,r)=>{var n,o;return(t=Math.trunc(t),r)?ao(e,t):(n=e,1/(Math.sqrt(o=(o=t)>1e100?1e100:o)*sQ(.5,o/2))*Math.pow(1+n*n/o,-((o+1)/2)))})}tdist2t(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.2T"),(e,t)=>(1-ao(e,Math.trunc(t)))*2)}tdistrt(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.RT"),(e,t)=>1-ao(e,Math.trunc(t)))}tdistold(e,t){return this.runFunction(e.args,t,this.metadata("TDIST"),(e,t,r)=>r*(1-ao(e,Math.trunc(t))))}tinv(e,t){return this.runFunction(e.args,t,this.metadata("T.INV"),(e,t)=>ai(e,Math.trunc(t)))}tinv2t(e,t){return this.runFunction(e.args,t,this.metadata("T.INV.2T"),(e,t)=>ai(1-e/2,Math.trunc(t)))}lognormdist(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.DIST"),(e,t,r,n)=>{var o,i,s,a,l,h;return n?(o=e,i=t,s=r,o<0?0:.5+.5*sV((Math.log(o)-i)/Math.sqrt(2*s*s))):(a=e,l=t,h=r,a<=0?0:Math.exp(-Math.log(a)-.5*Math.log(2*Math.PI)-Math.log(h)-Math.pow(Math.log(a)-l,2)/(2*h*h)))})}lognorminv(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.INV"),(e,t,r)=>{var n,o;return n=e,o=t,Math.exp(-1.4142135623730951*r*sz(2*n)+o)})}normdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.DIST"),(e,t,r,n)=>n?sK(e,t,r):sq(e,t,r))}norminv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.INV"),(e,t,r)=>sX(e,t,r))}normsdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.DIST"),(e,t)=>t?sK(e,0,1):sq(e,0,1))}normsinv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.INV"),e=>sX(e,0,1))}phi(e,t){return this.runFunction(e.args,t,this.metadata("PHI"),e=>sq(e,0,1))}negbinomdist(e,t){return this.runFunction(e.args,t,this.metadata("NEGBINOM.DIST"),(e,t,r,n)=>(e=Math.trunc(e),t=Math.trunc(t),n)?as.cdf(e,t,r):as.pdf(e,t,r))}confidencenorm(e,t){return this.runFunction(e.args,t,this.metadata("CONFIDENCE.NORM"),(e,t,r)=>(function(){var e,t=[].slice.call(arguments),r=[,,];return e=4===t.length?Math.abs(sX(t[1]/2,0,1)*t[2]/Math.sqrt(t[3])):Math.abs(sX(t[1]/2,0,1)*au(t[2])/Math.sqrt(t[2].length)),r[0]=t[0]-e,r[1]=t[0]+e,r})(1,e,t,Math.trunc(r))[1]-1)}confidencet(e,t){return this.runFunction(e.args,t,this.metadata("CONFIDENCE.T"),(e,t,r)=>1===(r=Math.trunc(r))?new rX(d.DIV_BY_ZERO):function(){var e,t=[].slice.call(arguments),r=[,,];return e=4===t.length?Math.abs(ai(t[1]/2,t[3]-1)*t[2]/Math.sqrt(t[3])):Math.abs(ai(t[1]/2,t[2].length-1)*au(t[2],!0)/Math.sqrt(t[2].length)),r[0]=t[0]-e,r[1]=t[0]+e,r}(1,e,t,r)[1]-1)}standardize(e,t){return this.runFunction(e.args,t,this.metadata("STANDARDIZE"),(e,t,r)=>(e-t)/r)}}ap.implementedFunctions={ERF:{method:"erf",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0}]},ERFC:{method:"erfc",parameters:[{argumentType:p.NUMBER}]},"EXPON.DIST":{method:"expondist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.BOOLEAN}]},FISHER:{method:"fisher",parameters:[{argumentType:p.NUMBER,greaterThan:-1,lessThan:1}]},FISHERINV:{method:"fisherinv",parameters:[{argumentType:p.NUMBER}]},GAMMA:{method:"gamma",parameters:[{argumentType:p.NUMBER}]},"GAMMA.DIST":{method:"gammadist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.BOOLEAN}]},GAMMALN:{method:"gammaln",parameters:[{argumentType:p.NUMBER,greaterThan:0}]},"GAMMA.INV":{method:"gammainv",parameters:[{argumentType:p.NUMBER,minValue:0,lessThan:1},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0}]},GAUSS:{method:"gauss",parameters:[{argumentType:p.NUMBER}]},"BETA.DIST":{method:"betadist",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.BOOLEAN},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:1}]},"BETA.INV":{method:"betainv",parameters:[{argumentType:p.NUMBER,greaterThan:0,maxValue:1},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,defaultValue:0},{argumentType:p.NUMBER,defaultValue:1}]},"BINOM.DIST":{method:"binomialdist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0,maxValue:1},{argumentType:p.BOOLEAN}]},"BINOM.INV":{method:"binomialinv",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0,maxValue:1},{argumentType:p.NUMBER,greaterThan:0,lessThan:1}]},BESSELI:{method:"besselifn",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:0}]},BESSELJ:{method:"besseljfn",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:0}]},BESSELK:{method:"besselkfn",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:0}]},BESSELY:{method:"besselyfn",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:0}]},"CHISQ.DIST":{method:"chisqdist",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:1,maxValue:1e10},{argumentType:p.BOOLEAN}]},"CHISQ.DIST.RT":{method:"chisqdistrt",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:1,maxValue:1e10}]},"CHISQ.INV":{method:"chisqinv",parameters:[{argumentType:p.NUMBER,minValue:0,maxValue:1},{argumentType:p.NUMBER,minValue:1,maxValue:1e10}]},"CHISQ.INV.RT":{method:"chisqinvrt",parameters:[{argumentType:p.NUMBER,minValue:0,maxValue:1},{argumentType:p.NUMBER,minValue:1}]},"F.DIST":{method:"fdist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:1},{argumentType:p.NUMBER,minValue:1},{argumentType:p.BOOLEAN}]},"F.DIST.RT":{method:"fdistrt",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:1},{argumentType:p.NUMBER,minValue:1}]},"F.INV":{method:"finv",parameters:[{argumentType:p.NUMBER,minValue:0,maxValue:1},{argumentType:p.NUMBER,minValue:1},{argumentType:p.NUMBER,minValue:1}]},"F.INV.RT":{method:"finvrt",parameters:[{argumentType:p.NUMBER,minValue:0,maxValue:1},{argumentType:p.NUMBER,minValue:1},{argumentType:p.NUMBER,minValue:1}]},"WEIBULL.DIST":{method:"weibulldist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.BOOLEAN}]},"POISSON.DIST":{method:"poissondist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0},{argumentType:p.BOOLEAN}]},"HYPGEOM.DIST":{method:"hypgeomdist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.BOOLEAN}]},"T.DIST":{method:"tdist",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:1},{argumentType:p.BOOLEAN}]},"T.DIST.2T":{method:"tdist2t",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:1}]},"T.DIST.RT":{method:"tdistrt",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,minValue:1}]},TDIST:{method:"tdistold",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:1},{argumentType:p.INTEGER,minValue:1,maxValue:2}]},"T.INV":{method:"tinv",parameters:[{argumentType:p.NUMBER,greaterThan:0,lessThan:1},{argumentType:p.NUMBER,minValue:1}]},"T.INV.2T":{method:"tinv2t",parameters:[{argumentType:p.NUMBER,greaterThan:0,maxValue:1},{argumentType:p.NUMBER,minValue:1}]},"LOGNORM.DIST":{method:"lognormdist",parameters:[{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.BOOLEAN}]},"LOGNORM.INV":{method:"lognorminv",parameters:[{argumentType:p.NUMBER,greaterThan:0,lessThan:1},{argumentType:p.NUMBER},{argumentType:p.NUMBER,greaterThan:0}]},"NORM.DIST":{method:"normdist",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.BOOLEAN}]},"NORM.INV":{method:"norminv",parameters:[{argumentType:p.NUMBER,greaterThan:0,lessThan:1},{argumentType:p.NUMBER},{argumentType:p.NUMBER,greaterThan:0}]},"NORM.S.DIST":{method:"normsdist",parameters:[{argumentType:p.NUMBER},{argumentType:p.BOOLEAN}]},"NORM.S.INV":{method:"normsinv",parameters:[{argumentType:p.NUMBER,greaterThan:0,lessThan:1}]},PHI:{method:"phi",parameters:[{argumentType:p.NUMBER}]},"NEGBINOM.DIST":{method:"negbinomdist",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:1},{argumentType:p.NUMBER,minValue:0,maxValue:1},{argumentType:p.BOOLEAN}]},"CONFIDENCE.NORM":{method:"confidencenorm",parameters:[{argumentType:p.NUMBER,greaterThan:0,lessThan:1},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,minValue:1}]},"CONFIDENCE.T":{method:"confidencet",parameters:[{argumentType:p.NUMBER,greaterThan:0,lessThan:1},{argumentType:p.NUMBER,greaterThan:0},{argumentType:p.NUMBER,minValue:1}]},STANDARDIZE:{method:"standardize",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,greaterThan:0}]}},ap.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 am extends nR{fact(e,t){return this.runFunction(e.args,t,this.metadata("FACT"),e=>{e=Math.trunc(e);let t=1;for(let r=1;r<=e;r++)t*=r;return t})}factdouble(e,t){return this.runFunction(e.args,t,this.metadata("FACTDOUBLE"),e=>{e=Math.trunc(e);let t=1;for(let r=e;r>=1;r-=2)t*=r;return t})}combin(e,t){return this.runFunction(e.args,t,this.metadata("COMBIN"),(e,t)=>t>e?new rX(d.NUM,eq.WrongOrder):af(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 rX(d.NUM,eq.ValueLarge):0===e&&0===t?1:af(e+t-1,t))}gcd(e,t){return this.runFunction(e.args,t,this.metadata("GCD"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(e);if(t instanceof rX)return t;let r=0;for(let e of t){if(e<0)return new rX(d.NUM,eq.ValueSmall);r=ay(r,Math.trunc(e))}return r>Number.MAX_SAFE_INTEGER?new rX(d.NUM,eq.ValueLarge):r})}lcm(e,t){return this.runFunction(e.args,t,this.metadata("LCM"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(e);if(t instanceof rX)return t;let r=1;for(let e of t){var n,o;if(e<0)return new rX(d.NUM,eq.ValueSmall);n=r,o=Math.trunc(e),r=0===n||0===o?0:n*(o/ay(n,o))}return r>Number.MAX_SAFE_INTEGER?new rX(d.NUM,eq.ValueLarge):r})}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 rX(d.NUM,eq.DistinctSigns):Math.round(e/t)*t)}multinomial(e,t){return this.runFunction(e.args,t,this.metadata("MULTINOMIAL"),(...e)=>{let t=0,r=1;for(let n of e){if(n<0)return new rX(d.NUM,eq.ValueSmall);n=Math.trunc(n);for(let e=1;e<=n;e++)r*=(t+e)/e;t+=n}return Math.round(r)})}quotient(e,t){return this.runFunction(e.args,t,this.metadata("QUOTIENT"),(e,t)=>0===t?new rX(d.DIV_BY_ZERO):Math.trunc(e/t))}seriessum(e,t){return this.runFunction(e.args,t,this.metadata("SERIESSUM"),(e,t,r,n)=>{let o=this.arithmeticHelper.manyToOnlyNumbersDropNulls(n.valuesFromTopLeftCorner());if(o instanceof rX)return o;let i=0;for(let t of(o.reverse(),o))i*=Math.pow(e,r),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)=>{let r=e.valuesFromTopLeftCorner(),n=t.valuesFromTopLeftCorner();if(r.length!==n.length)return new rX(d.NA,eq.EqualLength);let o=r.length,i=0;for(let e=0;e<o;e++){let t=r[e],o=n[e];if(t instanceof rX)return t;if(o instanceof rX)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)=>{let r=e.valuesFromTopLeftCorner(),n=t.valuesFromTopLeftCorner();if(r.length!==n.length)return new rX(d.NA,eq.EqualLength);let o=r.length,i=0;for(let e=0;e<o;e++){let t=r[e],o=n[e];if(t instanceof rX)return t;if(o instanceof rX)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)=>{let r=e.valuesFromTopLeftCorner(),n=t.valuesFromTopLeftCorner();if(r.length!==n.length)return new rX(d.NA,eq.EqualLength);let o=r.length,i=0;for(let e=0;e<o;e++){let t=r[e],o=n[e];if(t instanceof rX)return t;if(o instanceof rX)return o;"number"==typeof t&&"number"==typeof o&&(i+=Math.pow(t-o,2))}return i})}}function af(e,t){2*t>e&&(t=e-t);let r=1;for(let n=1;n<=t;n++)r*=(e-t+n)/n;return Math.round(r)}function ay(e,t){for(e<t&&([e,t]=[t,e]);t>0;)[e,t]=[t,e%t];return e}am.implementedFunctions={FACT:{method:"fact",parameters:[{argumentType:p.NUMBER,minValue:0,maxValue:170}]},FACTDOUBLE:{method:"factdouble",parameters:[{argumentType:p.NUMBER,minValue:0,maxValue:288}]},COMBIN:{method:"combin",parameters:[{argumentType:p.NUMBER,minValue:0,lessThan:1030},{argumentType:p.NUMBER,minValue:0}]},COMBINA:{method:"combina",parameters:[{argumentType:p.NUMBER,minValue:0},{argumentType:p.NUMBER,minValue:0}]},GCD:{method:"gcd",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},LCM:{method:"lcm",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},MROUND:{method:"mround",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]},MULTINOMIAL:{method:"multinomial",parameters:[{argumentType:p.NUMBER}],repeatLastArgs:1,expandRanges:!0},QUOTIENT:{method:"quotient",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]},SERIESSUM:{method:"seriessum",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.RANGE}]},SIGN:{method:"sign",parameters:[{argumentType:p.NUMBER}]},SUMX2MY2:{method:"sumx2my2",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},SUMX2PY2:{method:"sumx2py2",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},SUMXMY2:{method:"sumxmy2",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]}};class ab extends nR{complex(e,t){return this.runFunction(e.args,t,this.metadata("COMPLEX"),(e,t,r)=>"i"!==r&&"j"!==r?new rX(d.VALUE,eq.ShouldBeIorJ):ns([e,t],r))}imabs(e,t){return this.runFunction(e.args,t,this.metadata("IMABS"),aA)}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 rX(d.DIV_BY_ZERO):Math.atan2(t,e))}imconjugate(e,t){return this.runFunction(e.args,t,this.metadata("IMCONJUGATE"),([e,t])=>ns([e,-t]))}imcos(e,t){return this.runFunction(e.args,t,this.metadata("IMCOS"),e=>ns(aS(e)))}imcosh(e,t){return this.runFunction(e.args,t,this.metadata("IMCOSH"),e=>ns(av(e)))}imcot(e,t){return this.runFunction(e.args,t,this.metadata("IMCOT"),e=>ns(aw(aS(e),aR(e))))}imcsc(e,t){return this.runFunction(e.args,t,this.metadata("IMCSC"),e=>ns(aw([1,0],aR(e))))}imcsch(e,t){return this.runFunction(e.args,t,this.metadata("IMCSCH"),e=>ns(aw([1,0],aE(e))))}imsec(e,t){return this.runFunction(e.args,t,this.metadata("IMSEC"),e=>ns(aw([1,0],aS(e))))}imsech(e,t){return this.runFunction(e.args,t,this.metadata("IMSECH"),e=>ns(aw([1,0],av(e))))}imsin(e,t){return this.runFunction(e.args,t,this.metadata("IMSIN"),e=>ns(aR(e)))}imsinh(e,t){return this.runFunction(e.args,t,this.metadata("IMSINH"),e=>ns(aE(e)))}imtan(e,t){return this.runFunction(e.args,t,this.metadata("IMTAN"),e=>ns(aw(aR(e),aS(e))))}imdiv(e,t){return this.runFunction(e.args,t,this.metadata("IMDIV"),(e,t)=>ns(aw(e,t)))}improduct(e,t){return this.runFunction(e.args,t,this.metadata("IMPRODUCT"),(...e)=>{let t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof rX)return t;let r=[1,0];for(let e of t)r=aC(r,e);return ns(r)})}imsum(e,t){return this.runFunction(e.args,t,this.metadata("IMSUM"),(...e)=>{let t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof rX)return t;let r=[0,0];for(let e of t)r=function([e,t],[r,n]){return[e+r,t+n]}(r,e);return ns(r)})}imsub(e,t){return this.runFunction(e.args,t,this.metadata("IMSUB"),(e,t)=>ns(function([e,t],[r,n]){return[e-r,t-n]}(e,t)))}imexp(e,t){return this.runFunction(e.args,t,this.metadata("IMEXP"),e=>ns(aT(e)))}imln(e,t){return this.runFunction(e.args,t,this.metadata("IMLN"),e=>ns(aM(e)))}imlog10(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG10"),e=>{let[t,r]=aM(e),n=Math.log(10);return ns([t/n,r/n])})}imlog2(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG2"),e=>{let[t,r]=aM(e),n=Math.log(2);return ns([t/n,r/n])})}impower(e,t){return this.runFunction(e.args,t,this.metadata("IMPOWER"),(e,t)=>ns(aN(e,t)))}imsqrt(e,t){return this.runFunction(e.args,t,this.metadata("IMSQRT"),e=>ns(aN(e,.5)))}}function aC([e,t],[r,n]){return[e*r-t*n,e*n+r*t]}function aw([e,t],[r,n]){let o=Math.pow(r,2)+Math.pow(n,2),[i,s]=aC([e,t],[r,-n]);return[i/o,s/o]}function aS([e,t]){return[Math.cos(e)*Math.cosh(t),-Math.sin(e)*Math.sinh(t)]}function av([e,t]){return[Math.cosh(e)*Math.cos(t),Math.sinh(e)*Math.sin(t)]}function aR([e,t]){return[Math.sin(e)*Math.cosh(t),Math.cos(e)*Math.sinh(t)]}function aE([e,t]){return[Math.sinh(e)*Math.cos(t),Math.cosh(e)*Math.sin(t)]}function aT([e,t]){return[Math.exp(e)*Math.cos(t),Math.exp(e)*Math.sin(t)]}function aA([e,t]){return Math.sqrt(e*e+t*t)}function aM([e,t]){return[Math.log(aA([e,t])),Math.atan2(t,e)]}function aN(e,t){let[r,n]=aM(e);return aT([t*r,t*n])}ab.implementedFunctions={COMPLEX:{method:"complex",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.STRING,defaultValue:"i"}]},IMABS:{method:"imabs",parameters:[{argumentType:p.COMPLEX}]},IMAGINARY:{method:"imaginary",parameters:[{argumentType:p.COMPLEX}]},IMREAL:{method:"imreal",parameters:[{argumentType:p.COMPLEX}]},IMARGUMENT:{method:"imargument",parameters:[{argumentType:p.COMPLEX}]},IMCONJUGATE:{method:"imconjugate",parameters:[{argumentType:p.COMPLEX}]},IMCOS:{method:"imcos",parameters:[{argumentType:p.COMPLEX}]},IMCOSH:{method:"imcosh",parameters:[{argumentType:p.COMPLEX}]},IMCOT:{method:"imcot",parameters:[{argumentType:p.COMPLEX}]},IMCSC:{method:"imcsc",parameters:[{argumentType:p.COMPLEX}]},IMCSCH:{method:"imcsch",parameters:[{argumentType:p.COMPLEX}]},IMSEC:{method:"imsec",parameters:[{argumentType:p.COMPLEX}]},IMSECH:{method:"imsech",parameters:[{argumentType:p.COMPLEX}]},IMSIN:{method:"imsin",parameters:[{argumentType:p.COMPLEX}]},IMSINH:{method:"imsinh",parameters:[{argumentType:p.COMPLEX}]},IMTAN:{method:"imtan",parameters:[{argumentType:p.COMPLEX}]},IMDIV:{method:"imdiv",parameters:[{argumentType:p.COMPLEX},{argumentType:p.COMPLEX}]},IMPRODUCT:{method:"improduct",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},IMSUM:{method:"imsum",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},IMSUB:{method:"imsub",parameters:[{argumentType:p.COMPLEX},{argumentType:p.COMPLEX}]},IMEXP:{method:"imexp",parameters:[{argumentType:p.COMPLEX}]},IMLN:{method:"imln",parameters:[{argumentType:p.COMPLEX}]},IMLOG10:{method:"imlog10",parameters:[{argumentType:p.COMPLEX}]},IMLOG2:{method:"imlog2",parameters:[{argumentType:p.COMPLEX}]},IMPOWER:{method:"impower",parameters:[{argumentType:p.COMPLEX},{argumentType:p.NUMBER}]},IMSQRT:{method:"imsqrt",parameters:[{argumentType:p.COMPLEX}]}};class aI extends nR{avedev(e,t){return this.runFunction(e.args,t,this.metadata("AVEDEV"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rX)return t;if(0===t.length)return new rX(d.DIV_BY_ZERO);let r=al(t);return t.reduce((e,t)=>e+Math.abs(t-r),0)/t.length})}devsq(e,t){return this.runFunction(e.args,t,this.metadata("DEVSQ"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);return t instanceof rX?t:0===t.length?0:ah(t)})}geomean(e,t){return this.runFunction(e.args,t,this.metadata("GEOMEAN"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rX)return t;if(0===t.length)return new rX(d.NUM,eq.OneValue);for(let e of t)if(e<=0)return new rX(d.NUM,eq.ValueSmall);return Math.pow(function(e){for(var t=1,r=e.length;--r>=0;)t*=e[r];return t}(t),1/t.length)})}harmean(e,t){return this.runFunction(e.args,t,this.metadata("HARMEAN"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rX)return t;if(0===t.length)return new rX(d.NUM,eq.OneValue);for(let e of t)if(e<=0)return new rX(d.NUM,eq.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 rX(d.NA,eq.EqualLength);let r=ax(e,t);return r instanceof rX?r:r[0].length<=1?new rX(d.DIV_BY_ZERO,eq.TwoValues):ag(r[0],r[1])})}rsq(e,t){return this.runFunction(e.args,t,this.metadata("RSQ"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new rX(d.NA,eq.EqualLength);let r=ax(e,t);return r instanceof rX?r:r[0].length<=1?new rX(d.DIV_BY_ZERO,eq.TwoValues):Math.pow(ag(r[0],r[1]),2)})}covariancep(e,t){return this.runFunction(e.args,t,this.metadata("COVARIANCE.P"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new rX(d.NA,eq.EqualLength);let r=ax(e,t);if(r instanceof rX)return r;let n=r[0].length;return n<1?new rX(d.DIV_BY_ZERO,eq.OneValue):1===n?0:ac(r[0],r[1])*(n-1)/n})}covariances(e,t){return this.runFunction(e.args,t,this.metadata("COVARIANCE.S"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new rX(d.NA,eq.EqualLength);let r=ax(e,t);return r instanceof rX?r:r[0].length<=1?new rX(d.DIV_BY_ZERO,eq.TwoValues):ac(r[0],r[1])})}ztest(e,t){return this.runFunction(e.args,t,this.metadata("Z.TEST"),(e,t,r)=>{let n=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(n instanceof rX)return n;let o=n.length;if(void 0===r){if(o<2)return new rX(d.DIV_BY_ZERO,eq.TwoValues);r=au(n,!0)}return o<1?new rX(d.NA,eq.OneValue):0===r?new rX(d.DIV_BY_ZERO):1-sK((al(n)-t)/(r/Math.sqrt(o)),0,1)})}ftest(e,t){return this.runFunction(e.args,t,this.metadata("F.TEST"),(e,t)=>{let r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner()),n=this.arithmeticHelper.manyToExactNumbers(t.valuesFromTopLeftCorner());if(r instanceof rX)return r;if(n instanceof rX)return n;if(r.length<=1||n.length<=1)return new rX(d.DIV_BY_ZERO);let o=ad(r,!0),i=ad(n,!0);if(0===o||0===i)return new rX(d.DIV_BY_ZERO);let s=ae(o/i,r.length-1,n.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 rX(d.NA,eq.EqualLength);let r=ax(e,t);if(r instanceof rX)return r;let n=r[0].length;return n<=2?new rX(d.DIV_BY_ZERO,eq.ThreeValues):Math.sqrt((ah(r[0])-Math.pow(ac(r[0],r[1])*(n-1),2)/ah(r[1]))/(n-2))})}slope(e,t){return this.runFunction(e.args,t,this.metadata("SLOPE"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new rX(d.NA,eq.EqualLength);let r=ax(e,t);if(r instanceof rX)return r;let n=r[0].length;return n<=1?new rX(d.DIV_BY_ZERO,eq.TwoValues):ac(r[0],r[1])*(n-1)/ah(r[1])})}chisqtest(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.TEST"),(e,t)=>{let r=e.height(),n=e.width();if(t.height()!==r||t.width()!==n)return new rX(d.NA,eq.EqualLength);let o=ax(e,t);if(o instanceof rX)return o;if(o[0].length<=1)return new rX(d.DIV_BY_ZERO,eq.TwoValues);let i=0;for(let e=0;e<o[0].length;e++){if(0===o[1][e])return new rX(d.DIV_BY_ZERO);i+=Math.pow(o[0][e]-o[1][e],2)/o[1][e]}return i<0?new rX(d.NUM,eq.NaN):1-s7(i,r>1&&n>1?(r-1)*(n-1):r*n-1)})}ttest(e,t){return this.runFunction(e.args,t,this.metadata("T.TEST"),(e,t,r,n)=>{let o=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner()),i=this.arithmeticHelper.manyToExactNumbers(t.valuesFromTopLeftCorner());if(o instanceof rX)return o;if(i instanceof rX)return i;let s=o.length,a=i.length;if(1===n){if(a!==s)return new rX(d.NA,eq.EqualLength);if(s<=1)return new rX(d.DIV_BY_ZERO,eq.TwoValues);let e=Array(s);for(let t=0;t<s;t++)e[t]=o[t]-i[t];let t=au(e,!0);return 0===t?new rX(d.DIV_BY_ZERO):r*(1-ao(Math.abs(Math.sqrt(s)*al(e)/t),s-1))}if(2===n){if(s<=1||a<=1)return new rX(d.DIV_BY_ZERO,eq.TwoValues);let e=(ah(o)+ah(i))/(s+a-2);return 0===e?new rX(d.DIV_BY_ZERO):r*(1-ao(Math.abs((al(o)-al(i))/Math.sqrt(e*(1/s+1/a))),s+a-2))}{if(s<=1||a<=1)return new rX(d.DIV_BY_ZERO,eq.TwoValues);let e=ad(o,!0),t=ad(i,!0);return 0===e&&0===t?new rX(d.DIV_BY_ZERO):r*(1-ao(Math.abs((al(o)-al(i))/Math.sqrt(e/s+t/a)),Math.pow(e/s+t/a,2)/(Math.pow(e/s,2)/(s-1)+Math.pow(t/a,2)/(a-1))))}})}skew(e,t){return this.runFunction(e.args,t,this.metadata("SKEW"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rX)return t;let r=t.length;if(r<3)return new rX(d.DIV_BY_ZERO,eq.ThreeValues);let n=al(t),o=au(t,!0);return 0===o?new rX(d.DIV_BY_ZERO):t.reduce((e,t)=>e+Math.pow((t-n)/o,3),0)*r/(r-1)/(r-2)})}skewp(e,t){return this.runFunction(e.args,t,this.metadata("SKEW.P"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rX)return t;let r=t.length;if(r<3)return new rX(d.DIV_BY_ZERO,eq.ThreeValues);let n=al(t),o=au(t,!1);return 0===o?new rX(d.DIV_BY_ZERO):t.reduce((e,t)=>e+Math.pow((t-n)/o,3),0)/r})}}function ax(e,t){let r,n,o=e.iterateValuesFromTopLeftCorner(),i=t.iterateValuesFromTopLeftCorner(),s=[],a=[];for(;r=o.next(),n=i.next(),!r.done&&!n.done;){let e=r.value,t=n.value;if(e instanceof rX)return e;if(t instanceof rX)return t;tD(e)&&tD(t)&&(s.push(tI(e)),a.push(tI(t)))}return[s,a]}aI.implementedFunctions={AVEDEV:{method:"avedev",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},DEVSQ:{method:"devsq",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},GEOMEAN:{method:"geomean",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},HARMEAN:{method:"harmean",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},CORREL:{method:"correl",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},RSQ:{method:"rsq",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},"COVARIANCE.P":{method:"covariancep",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},"COVARIANCE.S":{method:"covariances",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},"Z.TEST":{method:"ztest",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0}]},"F.TEST":{method:"ftest",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},STEYX:{method:"steyx",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},SLOPE:{method:"slope",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},"CHISQ.TEST":{method:"chisqtest",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE}]},"T.TEST":{method:"ttest",parameters:[{argumentType:p.RANGE},{argumentType:p.RANGE},{argumentType:p.INTEGER,minValue:1,maxValue:2},{argumentType:p.INTEGER,minValue:1,maxValue:3}]},SKEW:{method:"skew",parameters:[{argumentType:p.ANY}],repeatLastArgs:1},"SKEW.P":{method:"skewp",parameters:[{argumentType:p.ANY}],repeatLastArgs:1}},aI.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 aO extends ip{}aO.HyperFormula=ip,aO.ErrorType=d,aO.CellError=rX,aO.CellType=u,aO.CellValueType=rY,aO.CellValueDetailedType=rj,aO.DetailedCellError=nA,aO.ExportedCellChange=oK,aO.ExportedNamedExpressionChange=oX,aO.ConfigValueTooBigError=ri,aO.ConfigValueTooSmallError=ro,aO.EvaluationSuspendedError=ra,aO.ExpectedOneOfValuesError=rs,aO.ExpectedValueOfTypeError=rr,aO.ArraySize=nE,aO.SimpleRangeValue=tB,aO.EmptyValue=tN,aO.FunctionPlugin=nR,aO.FunctionArgumentType=p,aO.FunctionPluginValidationError=rc,aO.InvalidAddressError=t1,aO.InvalidArgumentsError=t2,aO.LanguageNotRegisteredError=rd,aO.LanguageAlreadyRegisteredError=ru,aO.MissingTranslationError=rl,aO.NamedExpressionDoesNotExistError=t5,aO.NamedExpressionNameIsAlreadyTakenError=t6,aO.NamedExpressionNameIsInvalidError=t4,aO.NoOperationToRedoError=t7,aO.NoOperationToUndoError=t9,aO.NoRelativeAddressesAllowedError=rf,aO.NoSheetWithIdError=tX,aO.NoSheetWithNameError=tQ,aO.NotAFormulaError=t0,aO.NothingToPasteError=t8,aO.ProtectedFunctionTranslationError=rh,aO.SheetNameAlreadyTakenError=tZ,aO.SheetSizeLimitExceededError=tJ,aO.SourceLocationHasArrayError=rp,aO.TargetLocationHasArrayError=rm,aO.UnableToParseError=rt;let a_=iy.defaultConfig.language;for(let e of(ip.registerLanguage(a_,iC),ip.languages[iC.langCode]=iC,Object.getOwnPropertyNames(ei)))e.startsWith("_")||ip.registerFunctionPlugin(ei[e]);window.HyperFormula=ip})(),(()=>{"use strict";let e,t,o,i;r.d(n,{default:()=>b$});var s,a={};r.r(a),r.d(a,{arrayAvg:()=>eF,arrayEach:()=>eH,arrayFilter:()=>e_,arrayFlatten:()=>function e(t){return eO(t,(t,r)=>t.concat(Array.isArray(r)?e(r):r),[])},arrayMap:()=>ek,arrayMax:()=>eP,arrayMin:()=>eD,arrayReduce:()=>eO,arraySum:()=>eL,arrayToString:()=>eG,arrayUnique:()=>eB,extendArray:()=>eI,getDifferenceOfArrays:()=>eV,getIntersectionOfArrays:()=>eU,getUnionOfArrays:()=>ez,pivot:()=>ex,stringToArray:()=>eW,to2dArray:()=>eN});var l={};r.r(l),r.d(l,{_injectProductInfo:()=>e9,isDefined:()=>eq,isEmpty:()=>eX,isRegExp:()=>eQ,isUndefined:()=>eK,stringify:()=>ej});var h={};r.r(h),r.d(h,{equalsIgnoreCase:()=>e8,isJSON:()=>tt,isPercentValue:()=>tr,randomString:()=>te,sanitize:()=>ti,stripTags:()=>to,substitute:()=>tn,toHyphen:()=>ts,toUpperCaseFirst:()=>e7});var d={};r.r(d),r.d(d,{throwWithCause:()=>t_});var u={};r.r(u),r.d(u,{assignObjectDefaults:()=>tK,clone:()=>tF,createObjectPropListener:()=>tj,deepClone:()=>tD,deepExtend:()=>tP,deepMerge:()=>tX,deepObjectSize:()=>tY,defineGetter:()=>tz,duckSchema:()=>tk,extend:()=>tL,getProperty:()=>tG,hasOwnProperty:()=>tq,inherit:()=>tH,isKeyValueObject:()=>tQ,isObject:()=>tU,isObjectEqual:()=>tV,mixin:()=>tB,objectEach:()=>tW,setProperty:()=>t$});var c={};r.r(c),r.d(c,{cancelAnimationFrame:()=>tJ,getComparisonFunction:()=>t2,isCSR:()=>t1,isTouchSupported:()=>t0,requestAnimationFrame:()=>tZ});var g={};r.r(g),r.d(g,{isChrome:()=>t7,isChromeWebKit:()=>t8,isEdge:()=>ro,isEdgeWebKit:()=>ri,isFirefox:()=>re,isFirefoxWebKit:()=>rt,isIOS:()=>ra,isIpadOS:()=>rl,isLinuxOS:()=>ru,isMacOS:()=>rd,isMobileBrowser:()=>rs,isSafari:()=>rr,isSafariBefore261:()=>rn,isWindowsOS:()=>rh,setBrowserMeta:()=>t5,setPlatformMeta:()=>t9});var p={};r.r(p),r.d(p,{HTML_CHARACTERS:()=>rD,addClass:()=>rO,addEvent:()=>r6,clearTextSelection:()=>r8,closest:()=>rS,closestDown:()=>rv,empty:()=>rP,fastInnerHTML:()=>rB,fastInnerText:()=>rV,findFirstParentWithClass:()=>rR,getCaretPosition:()=>r5,getCssTransform:()=>ns,getFractionalScalingCompensation:()=>nt,getFrameElement:()=>rb,getMaximumScrollLeft:()=>rX,getMaximumScrollTop:()=>rK,getParent:()=>rf,getParentWindow:()=>rC,getScrollLeft:()=>rj,getScrollTop:()=>rY,getScrollableElement:()=>rq,getScrollbarWidth:()=>nr,getSelectionEndPosition:()=>r9,getSelectionText:()=>r7,getStyle:()=>rZ,getTrimmingContainer:()=>rQ,getWindowScrollLeft:()=>r$,getWindowScrollTop:()=>rG,hasAccessToParentWindow:()=>rw,hasClass:()=>rx,hasHorizontalScrollbar:()=>no,hasVerticalScrollbar:()=>nn,hasZeroHeight:()=>rz,index:()=>rT,innerHeight:()=>r2,innerWidth:()=>r3,isBottomMostColumnHeader:()=>rM,isChildOf:()=>rE,isDetached:()=>nu,isHTMLElement:()=>nf,isInput:()=>nl,isInternalElement:()=>ry,isOutsideInput:()=>nh,isVisible:()=>rU,makeElementContentEditableAndSelectItsContent:()=>ng,matchesCSSRules:()=>rJ,observeVisibilityChangeOnce:()=>nc,offset:()=>rW,outerHeight:()=>r1,outerWidth:()=>r0,overlayContainsElement:()=>rA,removeAttribute:()=>rH,removeClass:()=>r_,removeContentEditableFromElementAndDeselect:()=>np,removeEvent:()=>r4,removeTextNodes:()=>rL,resetCssTransform:()=>na,runWithSelectedContendEditableElement:()=>nm,selectElementIfAllowed:()=>nd,setAttribute:()=>rk,setCaretPosition:()=>ne,setOverlayPosition:()=>ni});var m={};r.r(m),r.d(m,{curry:()=>nR,curryRight:()=>nE,debounce:()=>nw,fastCall:()=>nT,isFunction:()=>ny,partial:()=>nv,pipe:()=>nS,throttle:()=>nb,throttleAfterHits:()=>nC});var f={};r.r(f),r.d(f,{KEY_CODES:()=>nA,isCtrlKey:()=>nx,isCtrlMetaKey:()=>nO,isFunctionKey:()=>nI,isKey:()=>n_,isPrintableChar:()=>nN});var y={};r.r(y),r.d(y,{isImmediatePropagationStopped:()=>nH,isLeftClick:()=>nP,isRightClick:()=>nL,isTouchEvent:()=>nD,offsetRelativeTo:()=>nF,stopImmediatePropagation:()=>nk});var b={};r.r(b),r.d(b,{_dataToHTML:()=>ot,htmlToGridSettings:()=>os,instanceToHTML:()=>oe,replaceTdCellsWithTextContent:()=>oi});var C={};r.r(C),r.d(C,{clamp:()=>og,getParsedNumber:()=>op,isCommaThousandsGroupedInteger:()=>oh,isNumeric:()=>oa,isNumericLike:()=>ol,isUnsignedNumber:()=>om,rangeEach:()=>od,rangeEachReverse:()=>ou,valueAccordingPercent:()=>oc});var w={};r.r(w),r.d(w,{countFirstRowKeys:()=>sp,createEmptySpreadsheetData:()=>su,createSpreadsheetData:()=>sh,createSpreadsheetObjectData:()=>sd,dataRowToChangesArray:()=>sc,hasChangeForCell:()=>sg,isArrayOfArrays:()=>sm,isArrayOfObjects:()=>sf,spreadsheetColumnIndex:()=>sl,spreadsheetColumnLabel:()=>sa});var S={};r.r(S),r.d(S,{CANCEL:()=>sG,CHECKBOX_CHECKED:()=>lu,CHECKBOX_RENDERER_NAMESPACE:()=>ld,CHECKBOX_UNCHECKED:()=>lc,COMMON_NAMESPACE:()=>sz,CONTEXTMENU_ITEMS_ADD_COMMENT:()=>ai,CONTEXTMENU_ITEMS_ALIGNMENT:()=>ah,CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM:()=>af,CONTEXTMENU_ITEMS_ALIGNMENT_CENTER:()=>au,CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY:()=>ag,CONTEXTMENU_ITEMS_ALIGNMENT_LEFT:()=>ad,CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE:()=>am,CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT:()=>ac,CONTEXTMENU_ITEMS_ALIGNMENT_TOP:()=>ap,CONTEXTMENU_ITEMS_BORDERS:()=>ay,CONTEXTMENU_ITEMS_BORDERS_BOTTOM:()=>aw,CONTEXTMENU_ITEMS_BORDERS_LEFT:()=>aS,CONTEXTMENU_ITEMS_BORDERS_RIGHT:()=>aC,CONTEXTMENU_ITEMS_BORDERS_TOP:()=>ab,CONTEXTMENU_ITEMS_CLEAR_COLUMN:()=>s2,CONTEXTMENU_ITEMS_COPY:()=>s3,CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY:()=>s5,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS:()=>s4,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS:()=>s6,CONTEXTMENU_ITEMS_CUT:()=>s9,CONTEXTMENU_ITEMS_EDIT_COMMENT:()=>as,CONTEXTMENU_ITEMS_EXPORT:()=>s7,CONTEXTMENU_ITEMS_EXPORT_FILE_CSV:()=>s8,CONTEXTMENU_ITEMS_EXPORT_FILE_XLSX:()=>ae,CONTEXTMENU_ITEMS_FREEZE_COLUMN:()=>at,CONTEXTMENU_ITEMS_HIDE_COLUMN:()=>aT,CONTEXTMENU_ITEMS_HIDE_ROW:()=>aM,CONTEXTMENU_ITEMS_INSERT_LEFT:()=>sK,CONTEXTMENU_ITEMS_INSERT_RIGHT:()=>sX,CONTEXTMENU_ITEMS_MERGE_CELLS:()=>an,CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD:()=>aE,CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD:()=>aR,CONTEXTMENU_ITEMS_NO_ITEMS:()=>sY,CONTEXTMENU_ITEMS_READ_ONLY:()=>s1,CONTEXTMENU_ITEMS_READ_ONLY_COMMENT:()=>al,CONTEXTMENU_ITEMS_REDO:()=>s0,CONTEXTMENU_ITEMS_REMOVE_BORDERS:()=>av,CONTEXTMENU_ITEMS_REMOVE_COLUMN:()=>sZ,CONTEXTMENU_ITEMS_REMOVE_COMMENT:()=>aa,CONTEXTMENU_ITEMS_REMOVE_ROW:()=>sQ,CONTEXTMENU_ITEMS_ROW_ABOVE:()=>sj,CONTEXTMENU_ITEMS_ROW_BELOW:()=>sq,CONTEXTMENU_ITEMS_SHOW_COLUMN:()=>aA,CONTEXTMENU_ITEMS_SHOW_ROW:()=>aN,CONTEXTMENU_ITEMS_UNDO:()=>sJ,CONTEXTMENU_ITEMS_UNFREEZE_COLUMN:()=>ar,CONTEXTMENU_ITEMS_UNMERGE_CELLS:()=>ao,CONTEXT_MENU_ITEMS_NAMESPACE:()=>s$,DATA_PROVIDER_BUTTONS_REFETCH:()=>lk,DATA_PROVIDER_ERRORS_CREATE:()=>lI,DATA_PROVIDER_ERRORS_FETCH:()=>lN,DATA_PROVIDER_ERRORS_REMOVE:()=>lO,DATA_PROVIDER_ERRORS_REQUEST_FAILED:()=>l_,DATA_PROVIDER_ERRORS_UPDATE:()=>lx,DATA_PROVIDER_NAMESPACE:()=>lM,EMPTY_DATA_STATE_BUTTONS_FILTERS_RESET:()=>lE,EMPTY_DATA_STATE_DESCRIPTION:()=>lS,EMPTY_DATA_STATE_DESCRIPTION_FILTERS:()=>lR,EMPTY_DATA_STATE_DESCRIPTION_LOADING:()=>lA,EMPTY_DATA_STATE_NAMESPACE:()=>lC,EMPTY_DATA_STATE_TITLE:()=>lw,EMPTY_DATA_STATE_TITLE_FILTERS:()=>lv,EMPTY_DATA_STATE_TITLE_LOADING:()=>lT,EXPORT_FILE_DIALOG_TITLE:()=>lb,EXPORT_FILE_NAMESPACE:()=>ly,FILTERS_BUTTONS_CANCEL:()=>a5,FILTERS_BUTTONS_CLEAR:()=>a6,FILTERS_BUTTONS_OK:()=>a4,FILTERS_BUTTONS_PLACEHOLDER_SEARCH:()=>a9,FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE:()=>a8,FILTERS_BUTTONS_PLACEHOLDER_VALUE:()=>a7,FILTERS_BUTTONS_SELECT_ALL:()=>a3,FILTERS_CONDITIONS_AFTER:()=>aj,FILTERS_CONDITIONS_BEFORE:()=>aq,FILTERS_CONDITIONS_BEGINS_WITH:()=>aP,FILTERS_CONDITIONS_BETWEEN:()=>a$,FILTERS_CONDITIONS_BY_VALUE:()=>aV,FILTERS_CONDITIONS_CONTAINS:()=>aF,FILTERS_CONDITIONS_EMPTY:()=>a_,FILTERS_CONDITIONS_ENDS_WITH:()=>aD,FILTERS_CONDITIONS_EQUAL:()=>aH,FILTERS_CONDITIONS_GREATER_THAN:()=>aU,FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL:()=>az,FILTERS_CONDITIONS_LESS_THAN:()=>aW,FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL:()=>aG,FILTERS_CONDITIONS_NAMESPACE:()=>ax,FILTERS_CONDITIONS_NONE:()=>aO,FILTERS_CONDITIONS_NOT_BETWEEN:()=>aY,FILTERS_CONDITIONS_NOT_CONTAIN:()=>aB,FILTERS_CONDITIONS_NOT_EMPTY:()=>ak,FILTERS_CONDITIONS_NOT_EQUAL:()=>aL,FILTERS_CONDITIONS_TODAY:()=>aK,FILTERS_CONDITIONS_TOMORROW:()=>aX,FILTERS_CONDITIONS_YESTERDAY:()=>aQ,FILTERS_DIVS_FILTER_BY_CONDITION:()=>aZ,FILTERS_DIVS_FILTER_BY_VALUE:()=>aJ,FILTERS_LABELS_CONJUNCTION:()=>a0,FILTERS_LABELS_DISJUNCTION:()=>a1,FILTERS_NAMESPACE:()=>aI,FILTERS_VALUES_BLANK_CELLS:()=>a2,LOADING_NAMESPACE:()=>lg,LOADING_TITLE:()=>lp,NOTIFICATION_BUTTONS_CLOSE:()=>lf,NOTIFICATION_NAMESPACE:()=>lm,OK:()=>sW,PAGINATION_COUNTER_SECTION:()=>lo,PAGINATION_FIRST_PAGE:()=>ls,PAGINATION_LAST_PAGE:()=>lh,PAGINATION_NAMESPACE:()=>le,PAGINATION_NAV_SECTION:()=>li,PAGINATION_NEXT_PAGE:()=>ll,PAGINATION_PAGE_SIZE_AUTO:()=>lr,PAGINATION_PAGE_SIZE_SECTION:()=>ln,PAGINATION_PREV_PAGE:()=>la,PAGINATION_SECTION:()=>lt});var R={};r.r(R),r.d(R,{ISO_DATE_REGEX:()=>uA,TIME_REGEX:()=>ux,getNormalizedDate:()=>uM,isValidISODate:()=>uI,isValidTime:()=>u_,parseToLocalDate:()=>uN,parseToLocalTime:()=>uO});let{entries:E,setPrototypeOf:T,isFrozen:A,getPrototypeOf:M,getOwnPropertyDescriptor:N}=Object,{freeze:I,seal:x,create:O}=Object,{apply:_,construct:k}="u">typeof Reflect&&Reflect;I||(I=function(e){return e}),x||(x=function(e){return e}),_||(_=function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return e.apply(t,n)}),k||(k=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return new e(...r)});let H=ee(Array.prototype.forEach),L=ee(Array.prototype.lastIndexOf),P=ee(Array.prototype.pop),D=ee(Array.prototype.push),F=ee(Array.prototype.splice),B=Array.isArray,V=ee(String.prototype.toLowerCase),U=ee(String.prototype.toString),z=ee(String.prototype.match),W=ee(String.prototype.replace),G=ee(String.prototype.indexOf),$=ee(String.prototype.trim),Y=ee(Number.prototype.toString),j=ee(Boolean.prototype.toString),q="u"<typeof BigInt?null:ee(BigInt.prototype.toString),K="u"<typeof Symbol?null:ee(Symbol.prototype.toString),X=ee(Object.prototype.hasOwnProperty),Q=ee(Object.prototype.toString),Z=ee(RegExp.prototype.test),J=(s=TypeError,function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return k(s,t)});function ee(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return _(e,t,n)}}function et(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:V;if(T&&T(e,null),!B(t))return e;let n=t.length;for(;n--;){let o=t[n];if("string"==typeof o){let e=r(o);e!==o&&(A(t)||(t[n]=e),o=e)}e[o]=!0}return e}function er(e){let t=O(null);for(let[r,n]of E(e))X(e,r)&&(B(n)?t[r]=function(e){for(let t=0;t<e.length;t++)X(e,t)||(e[t]=null);return e}(n):n&&"object"==typeof n&&n.constructor===Object?t[r]=er(n):t[r]=n);return t}function en(e,t){for(;null!==e;){let r=N(e,t);if(r){if(r.get)return ee(r.get);if("function"==typeof r.value)return ee(r.value)}e=M(e)}return function(){return null}}let eo=I(["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","search","section","select","shadow","slot","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"]),ei=I(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),es=I(["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"]),ea=I(["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"]),el=I(["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"]),eh=I(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ed=I(["#text"]),eu=I(["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","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),ec=I(["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","mask-type","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"]),eg=I(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),ep=I(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),em=x(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ef=x(/<%[\w\W]*|[\w\W]*%>/gm),ey=x(/\$\{[\w\W]*/gm),eb=x(/^data-[\-\w.\u00B7-\uFFFF]+$/),eC=x(/^aria-[\-\w]+$/),ew=x(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),eS=x(/^(?:\w+script|data):/i),ev=x(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eR=x(/^html$/i);var eE=Object.freeze({__proto__:null,ARIA_ATTR:eC,ATTR_WHITESPACE:ev,CUSTOM_ELEMENT:x(/^[a-z][.\w]*(-[.\w]+)+$/i),DATA_ATTR:eb,DOCTYPE_NAME:eR,ERB_EXPR:ef,IS_ALLOWED_URI:ew,IS_SCRIPT_OR_DATA:eS,MUSTACHE_EXPR:em,TMPLIT_EXPR:ey});let eT=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let r=null,n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));let o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}},eA=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};var eM=function e(){let t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"u"<typeof window?null:window,n=t=>e(t);if(n.version="3.4.2",n.removed=[],!r||!r.document||9!==r.document.nodeType||!r.Element)return n.isSupported=!1,n;let{document:o}=r,i=o,s=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:h,Element:d,NodeFilter:u,NamedNodeMap:c=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:g,DOMParser:p,trustedTypes:m}=r,f=d.prototype,y=en(f,"cloneNode"),b=en(f,"remove"),C=en(f,"nextSibling"),w=en(f,"childNodes"),S=en(f,"parentNode");if("function"==typeof l){let e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let R="",{implementation:T,createNodeIterator:A,createDocumentFragment:M,getElementsByTagName:N}=o,{importNode:x}=i,_=eA();n.isSupported="function"==typeof E&&"function"==typeof S&&T&&void 0!==T.createHTMLDocument;let{MUSTACHE_EXPR:k,ERB_EXPR:ee,TMPLIT_EXPR:em,DATA_ATTR:ef,ARIA_ATTR:ey,IS_SCRIPT_OR_DATA:eb,ATTR_WHITESPACE:eC,CUSTOM_ELEMENT:eS}=eE,{IS_ALLOWED_URI:ev}=eE,eM=null,eN=et({},[...eo,...ei,...es,...el,...ed]),eI=null,ex=et({},[...eu,...ec,...eg,...ep]),eO=Object.seal(O(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}})),e_=null,ek=null,eH=Object.seal(O(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),eL=!0,eP=!0,eD=!1,eF=!0,eB=!1,eV=!0,eU=!1,ez=!1,eW=!1,eG=!1,e$=!1,eY=!1,ej=!0,eq=!1,eK="user-content-",eX=!0,eQ=!1,eZ={},eJ=null,e0=et({},["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"]),e1=null,e2=et({},["audio","video","img","source","image","track"]),e3=null,e6=et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),e4="http://www.w3.org/1998/Math/MathML",e5="http://www.w3.org/2000/svg",e9="http://www.w3.org/1999/xhtml",e7=e9,e8=!1,te=null,tt=et({},[e4,e5,e9],U),tr=et({},["mi","mo","mn","ms","mtext"]),tn=et({},["annotation-xml"]),to=et({},["title","style","font","a","script"]),ti=null,ts=["application/xhtml+xml","text/html"],ta=null,tl=null,th=o.createElement("form"),td=function(e){return e instanceof RegExp||e instanceof Function},tu=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(tl&&tl===e)return;e&&"object"==typeof e||(e={}),e=er(e),ta="application/xhtml+xml"===(ti=-1===ts.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?U:V,eM=X(e,"ALLOWED_TAGS")&&B(e.ALLOWED_TAGS)?et({},e.ALLOWED_TAGS,ta):eN,eI=X(e,"ALLOWED_ATTR")&&B(e.ALLOWED_ATTR)?et({},e.ALLOWED_ATTR,ta):ex,te=X(e,"ALLOWED_NAMESPACES")&&B(e.ALLOWED_NAMESPACES)?et({},e.ALLOWED_NAMESPACES,U):tt,e3=X(e,"ADD_URI_SAFE_ATTR")&&B(e.ADD_URI_SAFE_ATTR)?et(er(e6),e.ADD_URI_SAFE_ATTR,ta):e6,e1=X(e,"ADD_DATA_URI_TAGS")&&B(e.ADD_DATA_URI_TAGS)?et(er(e2),e.ADD_DATA_URI_TAGS,ta):e2,eJ=X(e,"FORBID_CONTENTS")&&B(e.FORBID_CONTENTS)?et({},e.FORBID_CONTENTS,ta):e0,e_=X(e,"FORBID_TAGS")&&B(e.FORBID_TAGS)?et({},e.FORBID_TAGS,ta):er({}),ek=X(e,"FORBID_ATTR")&&B(e.FORBID_ATTR)?et({},e.FORBID_ATTR,ta):er({}),eZ=!!X(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?er(e.USE_PROFILES):e.USE_PROFILES),eL=!1!==e.ALLOW_ARIA_ATTR,eP=!1!==e.ALLOW_DATA_ATTR,eD=e.ALLOW_UNKNOWN_PROTOCOLS||!1,eF=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,eB=e.SAFE_FOR_TEMPLATES||!1,eV=!1!==e.SAFE_FOR_XML,eU=e.WHOLE_DOCUMENT||!1,eG=e.RETURN_DOM||!1,e$=e.RETURN_DOM_FRAGMENT||!1,eY=e.RETURN_TRUSTED_TYPE||!1,eW=e.FORCE_BODY||!1,ej=!1!==e.SANITIZE_DOM,eq=e.SANITIZE_NAMED_PROPS||!1,eX=!1!==e.KEEP_CONTENT,eQ=e.IN_PLACE||!1,ev=!function(e){try{return Z(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?ew:e.ALLOWED_URI_REGEXP,e7="string"==typeof e.NAMESPACE?e.NAMESPACE:e9,tr=X(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?er(e.MATHML_TEXT_INTEGRATION_POINTS):et({},["mi","mo","mn","ms","mtext"]),tn=X(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?er(e.HTML_INTEGRATION_POINTS):et({},["annotation-xml"]);let r=X(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?er(e.CUSTOM_ELEMENT_HANDLING):O(null);if(eO=O(null),X(r,"tagNameCheck")&&td(r.tagNameCheck)&&(eO.tagNameCheck=r.tagNameCheck),X(r,"attributeNameCheck")&&td(r.attributeNameCheck)&&(eO.attributeNameCheck=r.attributeNameCheck),X(r,"allowCustomizedBuiltInElements")&&"boolean"==typeof r.allowCustomizedBuiltInElements&&(eO.allowCustomizedBuiltInElements=r.allowCustomizedBuiltInElements),eB&&(eP=!1),e$&&(eG=!0),eZ&&(eM=et({},ed),eI=O(null),!0===eZ.html&&(et(eM,eo),et(eI,eu)),!0===eZ.svg&&(et(eM,ei),et(eI,ec),et(eI,ep)),!0===eZ.svgFilters&&(et(eM,es),et(eI,ec),et(eI,ep)),!0===eZ.mathMl&&(et(eM,el),et(eI,eg),et(eI,ep))),eH.tagCheck=null,eH.attributeCheck=null,X(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?eH.tagCheck=e.ADD_TAGS:B(e.ADD_TAGS)&&(eM===eN&&(eM=er(eM)),et(eM,e.ADD_TAGS,ta))),X(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?eH.attributeCheck=e.ADD_ATTR:B(e.ADD_ATTR)&&(eI===ex&&(eI=er(eI)),et(eI,e.ADD_ATTR,ta))),X(e,"ADD_URI_SAFE_ATTR")&&B(e.ADD_URI_SAFE_ATTR)&&et(e3,e.ADD_URI_SAFE_ATTR,ta),X(e,"FORBID_CONTENTS")&&B(e.FORBID_CONTENTS)&&(eJ===e0&&(eJ=er(eJ)),et(eJ,e.FORBID_CONTENTS,ta)),X(e,"ADD_FORBID_CONTENTS")&&B(e.ADD_FORBID_CONTENTS)&&(eJ===e0&&(eJ=er(eJ)),et(eJ,e.ADD_FORBID_CONTENTS,ta)),eX&&(eM["#text"]=!0),eU&&et(eM,["html","head","body"]),eM.table&&(et(eM,["tbody"]),delete e_.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');R=(t=e.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===t&&(t=eT(m,s)),null!==t&&"string"==typeof R&&(R=t.createHTML(""));I&&I(e),tl=e},tc=et({},[...ei,...es,...ea]),tg=et({},[...el,...eh]),tp=function(e){let t=S(e);t&&t.tagName||(t={namespaceURI:e7,tagName:"template"});let r=V(e.tagName),n=V(t.tagName);return!!te[e.namespaceURI]&&(e.namespaceURI===e5?t.namespaceURI===e9?"svg"===r:t.namespaceURI===e4?"svg"===r&&("annotation-xml"===n||tr[n]):!!tc[r]:e.namespaceURI===e4?t.namespaceURI===e9?"math"===r:t.namespaceURI===e5?"math"===r&&tn[n]:!!tg[r]:e.namespaceURI===e9?(t.namespaceURI!==e5||!!tn[n])&&(t.namespaceURI!==e4||!!tr[n])&&!tg[r]&&(to[r]||!tc[r]):"application/xhtml+xml"===ti&&!!te[e.namespaceURI])},tm=function(e){D(n.removed,{element:e});try{S(e).removeChild(e)}catch(t){b(e)}},tf=function(e,t){try{D(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){D(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(eG||e$)try{tm(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ty=function(e){let r=null,n=null;if(eW)e="<remove></remove>"+e;else{let t=z(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ti&&e7===e9&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let i=t?t.createHTML(e):e;if(e7===e9)try{r=new p().parseFromString(i,ti)}catch(e){}if(!r||!r.documentElement){r=T.createDocument(e7,"template",null);try{r.documentElement.innerHTML=e8?R:i}catch(e){}}let s=r.body||r.documentElement;return(e&&n&&s.insertBefore(o.createTextNode(n),s.childNodes[0]||null),e7===e9)?N.call(r,eU?"html":"body")[0]:eU?r.documentElement:s},tb=function(e){return A.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},tC=function(e){return e instanceof g&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof c)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},tw=function(e){return"function"==typeof h&&e instanceof h};function tS(e,t,r){H(e,e=>{e.call(n,t,r,tl)})}let tv=function(e){let t=null;if(tS(_.beforeSanitizeElements,e,null),tC(e))return tm(e),!0;let r=ta(e.nodeName);if(tS(_.uponSanitizeElement,e,{tagName:r,allowedTags:eM}),eV&&e.hasChildNodes()&&!tw(e.firstElementChild)&&Z(/<[/\w!]/g,e.innerHTML)&&Z(/<[/\w!]/g,e.textContent)||eV&&e.namespaceURI===e9&&"style"===r&&tw(e.firstElementChild)||7===e.nodeType||eV&&8===e.nodeType&&Z(/<[/\w]/g,e.data))return tm(e),!0;if(e_[r]||!(eH.tagCheck instanceof Function&&eH.tagCheck(r))&&!eM[r]){if(!e_[r]&&tT(r)&&(eO.tagNameCheck instanceof RegExp&&Z(eO.tagNameCheck,r)||eO.tagNameCheck instanceof Function&&eO.tagNameCheck(r)))return!1;if(eX&&!eJ[r]){let t=S(e)||e.parentNode,r=w(e)||e.childNodes;if(r&&t){let n=r.length;for(let o=n-1;o>=0;--o){let n=y(r[o],!0);t.insertBefore(n,C(e))}}}return tm(e),!0}return e instanceof d&&!tp(e)||("noscript"===r||"noembed"===r||"noframes"===r)&&Z(/<\/no(script|embed|frames)/i,e.innerHTML)?(tm(e),!0):(eB&&3===e.nodeType&&(t=e.textContent,H([k,ee,em],e=>{t=W(t,e," ")}),e.textContent!==t&&(D(n.removed,{element:e.cloneNode()}),e.textContent=t)),tS(_.afterSanitizeElements,e,null),!1)},tR=function(e,t,r){if(ek[t]||ej&&("id"===t||"name"===t)&&(r in o||r in th))return!1;let n=eI[t]||eH.attributeCheck instanceof Function&&eH.attributeCheck(t,e);if(eP&&!ek[t]&&Z(ef,t));else if(eL&&Z(ey,t));else if(!n||ek[t]){if(!(tT(e)&&(eO.tagNameCheck instanceof RegExp&&Z(eO.tagNameCheck,e)||eO.tagNameCheck instanceof Function&&eO.tagNameCheck(e))&&(eO.attributeNameCheck instanceof RegExp&&Z(eO.attributeNameCheck,t)||eO.attributeNameCheck instanceof Function&&eO.attributeNameCheck(t,e))||"is"===t&&eO.allowCustomizedBuiltInElements&&(eO.tagNameCheck instanceof RegExp&&Z(eO.tagNameCheck,r)||eO.tagNameCheck instanceof Function&&eO.tagNameCheck(r))))return!1}else if(e3[t]);else if(Z(ev,W(r,eC,"")));else if(("src"===t||"xlink:href"===t||"href"===t)&&"script"!==e&&0===G(r,"data:")&&e1[e]);else if(eD&&!Z(eb,W(r,eC,"")));else if(r)return!1;return!0},tE=et({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),tT=function(e){return!tE[V(e)]&&Z(eS,e)},tA=function(e){tS(_.beforeSanitizeAttributes,e,null);let{attributes:r}=e;if(!r||tC(e))return;let o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:eI,forceKeepAttr:void 0},i=r.length;for(;i--;){let{name:s,namespaceURI:a,value:l}=r[i],h=ta(s),d="value"===s?l:$(l);if(o.attrName=h,o.attrValue=d,o.keepAttr=!0,o.forceKeepAttr=void 0,tS(_.uponSanitizeAttribute,e,o),d=o.attrValue,eq&&("id"===h||"name"===h)&&0!==G(d,eK)&&(tf(s,e),d=eK+d),eV&&Z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)||"attributename"===h&&z(d,"href")){tf(s,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr||!eF&&Z(/\/>/i,d)){tf(s,e);continue}eB&&H([k,ee,em],e=>{d=W(d,e," ")});let u=ta(e.nodeName);if(!tR(u,h,d)){tf(s,e);continue}if(t&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(a);else switch(m.getAttributeType(u,h)){case"TrustedHTML":d=t.createHTML(d);break;case"TrustedScriptURL":d=t.createScriptURL(d)}if(d!==l)try{a?e.setAttributeNS(a,s,d):e.setAttribute(s,d),tC(e)?tm(e):P(n.removed)}catch(t){tf(s,e)}}tS(_.afterSanitizeAttributes,e,null)},tM=function(e){let t=null,r=tb(e);for(tS(_.beforeSanitizeShadowDOM,e,null);t=r.nextNode();)tS(_.uponSanitizeShadowNode,t,null),tv(t),tA(t),t.content instanceof a&&tM(t.content);tS(_.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,s=null,l=null,d=null;if((e8=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!tw(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return Y(e);case"boolean":return j(e);case"bigint":return q?q(e):"0";case"symbol":return K?K(e):"Symbol()";case"undefined":default:return Q(e);case"function":case"object":{if(null===e)return Q(e);let t=en(e,"toString");if("function"==typeof t){let r=t(e);return"string"==typeof r?r:Q(r)}return Q(e)}}}(e)))throw J("dirty is not a string, aborting");if(!n.isSupported)return e;if(ez||tu(r),n.removed=[],"string"==typeof e&&(eQ=!1),eQ){let t=e.nodeName;if("string"==typeof t){let e=ta(t);if(!eM[e]||e_[e])throw J("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof h)1===(s=(o=ty("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?o=s:o.appendChild(s);else{if(!eG&&!eB&&!eU&&-1===e.indexOf("<"))return t&&eY?t.createHTML(e):e;if(!(o=ty(e)))return eG?null:eY?R:""}o&&eW&&tm(o.firstChild);let u=tb(eQ?e:o);for(;l=u.nextNode();)tv(l),tA(l),l.content instanceof a&&tM(l.content);if(eQ)return e;if(eG){if(eB){o.normalize();let e=o.innerHTML;H([k,ee,em],t=>{e=W(e,t," ")}),o.innerHTML=e}if(e$)for(d=M.call(o.ownerDocument);o.firstChild;)d.appendChild(o.firstChild);else d=o;return(eI.shadowroot||eI.shadowrootmode)&&(d=x.call(i,d,!0)),d}let c=eU?o.outerHTML:o.innerHTML;return eU&&eM["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&Z(eR,o.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+c),eB&&H([k,ee,em],e=>{c=W(c,e," ")}),t&&eY?t.createHTML(c):c},n.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tu(e),ez=!0},n.clearConfig=function(){tl=null,ez=!1},n.isValidAttribute=function(e,t,r){return tl||tu({}),tR(ta(e),ta(t),r)},n.addHook=function(e,t){"function"==typeof t&&D(_[e],t)},n.removeHook=function(e,t){if(void 0!==t){let r=L(_[e],t);return -1===r?void 0:F(_[e],r,1)[0]}return P(_[e])},n.removeHooks=function(e){_[e]=[]},n.removeAllHooks=function(){_=eA()},n}();function eN(e){let t=e.length,r=0;for(;r<t;)e[r]=[e[r]],r+=1}function eI(e,t){let r=t.length,n=0;for(;n<r;)e.push(t[n]),n+=1}function ex(e){let t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;let r=e.length,n=e[0].length;for(let o=0;o<r;o++)for(let r=0;r<n;r++)t[r]||(t[r]=[]),t[r][o]=e[o][r];return t}function eO(e,t,r,n){let o=-1,i=e,s=r;Array.isArray(e)||(i=Array.from(e));let a=i.length;for(n&&a&&(o+=1,s=i[o]),o+=1;o<a;)s=t(s,i[o],o,i),o+=1;return s}function e_(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));let o=n.length,i=[],s=-1;for(;r<o;){let e=n[r];t(e,r,n)&&(i[s+=1]=e),r+=1}return i}function ek(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));let o=n.length,i=[],s=-1;for(;r<o;){let e=n[r];i[s+=1]=t(e,r,n),r+=1}return i}function eH(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));let o=n.length;for(;r<o&&!1!==t(n[r],r,n);)r+=1;return e}function eL(e){return eO(e,(e,t)=>e+t,0)}function eP(e){return eO(e,(e,t)=>e>t?e:t,Array.isArray(e)?e[0]:void 0)}function eD(e){return eO(e,(e,t)=>e<t?e:t,Array.isArray(e)?e[0]:void 0)}function eF(e){return e.length?eL(e)/e.length:0}function eB(e){let t=[];return eH(e,e=>{-1===t.indexOf(e)&&t.push(e)}),t}function eV(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[n,...o]=[...t],i=n;return eH(o,e=>{i=i.filter(t=>!e.includes(t))}),i}function eU(){let e;for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];let o=r[r.length-1],i=r;"function"==typeof o&&(e=o,i=i.slice(0,-1));let s=e?(t,r)=>r.some(r=>e(t,r)):(e,t)=>t.includes(e),[a,...l]=i,h=a;return eH(l,e=>{h=h.filter(t=>s(t,e))}),h}function ez(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[n,...o]=[...t],i=new Set(n);return eH(o,e=>{eH(e,e=>{i.has(e)||i.add(e)})}),Array.from(i)}function eW(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)}function eG(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.join(t)}function e$(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return eO(e,(e,t,n)=>e+t.replace(/\r?\n\s*/g,"")+(r[n]?r[n]:""),"").trim()}function eY(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];let o=document.createElement("template");o.innerHTML=e.reduce((e,t,n)=>e+t+(r[n]??""),"");let i=o.content.cloneNode(!0),s={};return i.querySelectorAll("[data-ref]").forEach(e=>{let t=e.getAttribute("data-ref");e.removeAttribute("data-ref"),s[t]=e}),{fragment:i,refs:s}}function ej(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 eq(e){return void 0!==e}function eK(e){return void 0===e}function eX(e){return null===e||""===e||eK(e)}function eQ(e){return"[object RegExp]"===Object.prototype.toString.call(e)}window.DOMPurify=eM;let eZ="length",eJ=e=>parseInt(e,16),e0=e=>parseInt(e,10),e1=(e,t,r)=>e.substr(t,r),e2=e=>e.codePointAt(0)-65,e3=e=>`${e}`.replace(/\-/g,""),e6=!1,e4={invalid:()=>e$`
|
|
32
32
|
The license key for Handsontable is invalid.\x20
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
|
|
50
50
|
passing the key: 'non-commercial-and-evaluation'.\x20
|
|
51
51
|
<a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in\x20
|
|
52
|
-
the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,non_commercial:()=>""};function e9(e,t,r){let n,o=!eX(e),i="string"==typeof e&&("non-commercial-and-evaluation"===e.toLowerCase()||"ht68e-1f2b7-47158-70b05-0842f"===e.toLowerCase()),s="17.1.0-rc13",a="invalid",l="invalid",h=function(e){let t=[][eZ],r=t;if(e[eZ]!==e2("Z"))return!1;for(let t="",n="B<H4P+".split(""),o=e2(n.shift());o;o=e2(n.shift()||"A"))--o<""[eZ]?r|=(e0(`${e0(eJ(t)+(eJ(e1(e,Math.abs(o),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=e1(e,o,o?1===n[eZ]?9:8:6);return r===t}(e=e3(e||""));if(i)a="non_commercial",l="valid";else if(o||h)if(h){let t,[o,i,s]=r.split("/").map(Number),h=Math.floor(Date.UTC(s,i-1,o)/864e5),d=eJ(e1(e3(t=e),eJ("12"),e2("F")))/(eJ(e1(e3(t),e2("B"),~~![][eZ]))||9);n=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",timeZone:"UTC"}).format((d+1)*864e5),h>d?(a="expired",l="expired"):(a="valid",l="valid")}else a="invalid",l="invalid";else a="missing",l="missing";if("u">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)&&(a="valid",l="valid"),e6||"valid"===a||(e4[a]({keyValidityDate:n,hotVersion:s})&&console["non_commercial"===a?"info":"warn"](e4[a]({keyValidityDate:n,hotVersion:s})),e6=!0),"valid"!==l&&t&&e5[l]({keyValidityDate:n,hotVersion:s})){let e=document.createElement("div");e.className="handsontable hot-display-license-info",e.innerHTML=e5[l]({keyValidityDate:n,hotVersion:s}),t.appendChild(e)}}function e7(e){return e[0].toUpperCase()+e.substr(1)}function e8(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let n=[],o=t.length;for(;o;){let e=ej(t[o-=1]).toLowerCase();-1===n.indexOf(e)&&n.push(e)}return 1===n.length}function te(){function e(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return e()+e()+e()+e()}function tt(e){if("string"!=typeof e)return!1;try{let t=JSON.parse(e);return"object"==typeof t&&null!==t}catch{return!1}}function tr(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)}function tn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return`${e}`.replace(/(?:\\)?\[([^[\]]+)]/g,(e,r)=>"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[r]?"":t[r])}function to(e){return ti(`${e}`,{ALLOWED_TAGS:[]})}function ti(e,t){return eM.sanitize(e,t)}function ts(e){return"string"!=typeof e?e:e.replace(/([A-Z])/g,"-$1").replace(/_/g,"-").toLowerCase()}let ta=e=>["tabindex",e],tl=()=>["role","presentation"],th=()=>["role","gridcell"],td=()=>["role","gridcell button"],tu=()=>["role","rowheader"],tc=()=>["role","rowgroup"],tg=()=>["role","columnheader"],tp=()=>["role","row"],tm=()=>["role","listbox"],tf=()=>["scope","col"],ty=()=>["scope","row"],tb=e=>["aria-label",e],tC=()=>["aria-hidden","true"],tw=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return["aria-disabled",e]},tS=e=>["aria-haspopup",e],tv=e=>["aria-rowcount",e],tR=e=>["aria-colcount",e],tE=e=>["aria-rowindex",e],tT=e=>["aria-colindex",e],tA=e=>["aria-expanded",e],tM=()=>["aria-readonly","true"],tN=()=>["aria-invalid","true"],tI=e=>["aria-checked",e],tx=()=>["aria-selected","true"],tO=()=>["aria-busy","true"];function t_(e){throw Error(e,{cause:{handsontable:!0}})}function tk(e){let t;return Array.isArray(e)?t=e.length?Array(e.length).fill(null):[]:(t={},tW(e,(e,r)=>{"__children"!==r&&(e&&"object"==typeof e&&!Array.isArray(e)?t[r]=tk(e):Array.isArray(e)?e.length&&"object"==typeof e[0]&&!Array.isArray(e[0])?t[r]=[tk(e[0])]:t[r]=[]:t[r]=null)})),t}function tH(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function tL(e,t,r){let n=Array.isArray(r);return tW(t,(t,o)=>{(!1===n||r.includes(o))&&(e[o]=t)}),e}function tP(e,t){tW(t,(r,n)=>{t[n]&&"object"==typeof t[n]?(e[n]||(Array.isArray(t[n])?e[n]=[]:"[object Date]"===Object.prototype.toString.call(t[n])?e[n]=t[n]:e[n]={}),tP(e[n],t[n])):e[n]=t[n]})}function tD(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}function tF(e){let t={};return tW(e,(e,r)=>{t[r]=e}),t}function tB(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.MIXINS||(e.MIXINS=[]),eH(r,t=>{e.MIXINS.push(t.MIXIN_NAME),tW(t,(t,r)=>{if(void 0!==e.prototype[r]&&t_(`Mixin conflict. Property '${r}' already exist and cannot be overwritten.`),"function"==typeof t)e.prototype[r]=t;else{let n,o;Object.defineProperty(e.prototype,r,{get:(n=`_${r}`,function(){let e;return void 0===this[n]&&(this[n]=((Array.isArray(e=t)||tU(e))&&(e=tD(e)),e)),this[n]}),set:(o=`_${r}`,function(e){this[o]=e}),configurable:!0})}})}),e}function tV(e,t){return JSON.stringify(e)===JSON.stringify(t)}function tU(e){return"[object Object]"===Object.prototype.toString.call(e)}function tz(e,t,r,n){n.value=r,n.writable=!1!==n.writable,n.enumerable=!1!==n.enumerable,n.configurable=!1!==n.configurable,Object.defineProperty(e,t,n)}function tW(e,t){for(let r in e)if((!e.hasOwnProperty||e.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e,r))&&!1===t(e[r],r,e))break;return e}function tG(e,t){let r=t.split("."),n=e;return tW(r,e=>{if(void 0===(n=n[e]))return n=void 0,!1}),n}function t$(e,t,r){if("string"!=typeof t)return;let n=t.split("."),o=e;n.forEach((e,t)=>{"__proto__"!==e&&"constructor"!==e&&"prototype"!==e&&(t!==n.length-1?(tq(o,e)||(o[e]={}),o=o[e]):o[e]=r)})}function tY(e){if(!tU(e))return 0;let t=function(e){let r=0;return tU(e)?tW(e,(e,n)=>{"__children"!==n&&(r+=t(e))}):r+=1,r};return t(e)}function tj(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r=`_${t}`,n={_touched:!1,[r]:e,isTouched(){return this._touched}};return Object.defineProperty(n,t,{get(){return this[r]},set(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),n}function tq(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function tK(e,t){if("object"!=typeof e||null===e)return t;if("object"!=typeof t||null===t)return e;let r={};return Object.keys(t).forEach(n=>{"object"!=typeof t[n]||null===t[n]||Array.isArray(t[n])?r[n]=tq(e,n)&&void 0!==e[n]?e[n]:t[n]:r[n]=tK(e[n],t[n])}),Object.keys(e).forEach(t=>{tq(r,t)||(r[t]=e[t])}),r}function tX(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={...e};return Object.keys(t).forEach(e=>{if("__proto__"===e||"constructor"===e||"prototype"===e)return;let n=t[e],o=r[e];tU(n)&&tU(o)?r[e]=tX(o,n):r[e]=n}),r}function tQ(e){return tU(e)&&eq(e.key)&&eq(e.value)}function tZ(e){return window.requestAnimationFrame(e)}function tJ(e){window.cancelAnimationFrame(e)}function t0(){return"ontouchstart"in window}function t1(){return"u">typeof window}function t2(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e||(e="object"==typeof Intl?new Intl.Collator(t,r).compare:"function"==typeof String.prototype.localeCompare?(e,t)=>`${e}`.localeCompare(t):(e,t)=>e===t?0:e>t?-1:1)}let t3=e=>{let t={value:!1};return t.test=(r,n)=>{t.value=e(r,n)},t},t6={chrome:t3((e,t)=>/Chrome/.test(e)&&/Google/.test(t)),chromeWebKit:t3(e=>/CriOS/.test(e)),edge:t3(e=>/Edge/.test(e)),edgeWebKit:t3(e=>/EdgiOS/.test(e)),firefox:t3(e=>/Firefox/.test(e)),firefoxWebKit:t3(e=>/FxiOS/.test(e)),mobile:t3(e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)),safari:t3((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t)),safariBefore261:t3((e,t)=>{if(!/Safari/.test(e)||!/Apple Computer/.test(t))return!1;let r=/Version\/(\d+(?:\.\d+)?)/i.exec(e);return(r?Number.parseFloat(r[1]):0)<26.1})},t4={mac:t3(e=>/^Mac/.test(e)),win:t3(e=>/^Win/.test(e)),linux:t3(e=>/^Linux/.test(e)),ios:t3(e=>/iPhone|iPad|iPod/i.test(e))};function t5(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tW(t6,r=>{let{test:n}=r;n(e,t)})}function t9(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tW(t4,t=>{let{test:r}=t;r(e)})}function t7(){return t6.chrome.value}function t8(){return t6.chromeWebKit.value}function re(){return t6.firefox.value}function rt(){return t6.firefoxWebKit.value}function rr(){return t6.safari.value}function rn(){return t6.safariBefore261.value}function ro(){return t6.edge.value}function ri(){return t6.edgeWebKit.value}function rs(){return t6.mobile.value}function ra(){return t4.ios.value}function rl(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&t4.mac.value}function rh(){return t4.win.value}function rd(){return t4.mac.value}function ru(){return t4.linux.value}function rc(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];eq(console)&&console.log(...t)}function rg(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];eq(console)&&console.warn(...t)}function rp(e){eq(console)&&console.warn(`Deprecated: ${e}`)}function rm(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];eq(console)&&console.error(...t)}function rf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=-1,n=null,o=e;for(;null!==o;){if(r===t){n=o;break}o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o=o.host:(r+=1,o=o.parentNode)}return n}function ry(e,t){let r=e.closest(".handsontable");return!!r&&(r.parentNode===t||r===t)}function rb(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function rC(e){return rb(e)&&e.parent}function rw(e){return!!Object.getPrototypeOf(e.parent)}function rS(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,{ELEMENT_NODE:n,DOCUMENT_FRAGMENT_NODE:o}=Node,i=e;for(;null!=i&&i!==r;){let{nodeType:e,nodeName:r}=i;if(e===n&&(t.includes(r)||t.includes(i)))return i;let{host:s}=i;i=s&&e===o?s:i.parentNode}return null}function rv(e,t,r){let n=[],o=e;for(;o&&(o=rS(o,t,r))&&(!r||r.contains(o));)n.push(o),o=o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.host:o.parentNode;let i=n.length;return i?n[i-1]:null}function rR(e,t){let r={element:void 0,classNames:[]},n=e;for(;null!==n&&n!==e.ownerDocument.documentElement&&!r.element;){if("string"==typeof t&&n.classList.contains(t))r.element=n,r.classNames.push(t);else if(t instanceof RegExp){let e=Array.from(n.classList).filter(e=>t.test(e));e.length&&(r.element=n,r.classNames.push(...e))}n=n.parentElement}return r}function rE(e,t){let r=e.parentNode,n=[];for("string"==typeof t?n=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):n.push(t);null!==r;){if(n.indexOf(r)>-1)return!0;r=r.parentNode}return!1}function rT(e){let t=0,r=e;if(r.previousSibling)for(;r=r.previousSibling;)t+=1;return t}function rA(e,t,r){let n=r.parentElement.querySelector(`.ht_clone_${e}`);return n?n.contains(t):null}function rM(e){if(!e||!e.classList||!e.parentNode||!e.parentNode.parentNode||e.classList.contains("hiddenHeader")||"none"===e.style.display)return!1;let t=e.parentNode,r=Array.from(t.parentNode.childNodes);return r.indexOf(t)+(Number.parseInt(e.getAttribute("rowspan"),10)||1)>=r.length}function rN(e){return e&&e.length?e.filter(e=>!!e):[]}function rI(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];let r=[],n=[];return n.push(...e.filter(e=>{let n=e instanceof RegExp;return n&&t&&r.push(e),!n})),t?{regexFree:n,regexes:r}:n}function rx(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)}function rO(e,t){"string"==typeof t&&(t=t.split(" ")),(t=rN(t)).length>0&&e.classList.add(...t)}function r_(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:n}=rI(t,!0);(r=rN(r)).length>0&&e.classList.remove(...r),n.forEach(t=>{e.classList.forEach(r=>{t.test(r)&&e.classList.remove(r)})})}function rk(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,r]]),t.forEach(t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)})}function rH(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:n}=rI(t,!0);r.forEach(t=>{""!==t&&e.removeAttribute(t)}),n.forEach(t=>{e.getAttributeNames().forEach(r=>{t.test(r)&&e.removeAttribute(r)})})}function rL(e){if(3===e.nodeType)e.parentNode.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1){let t=e.childNodes;for(let e=t.length-1;e>=0;e--)rL(t[e])}}function rP(e){let t;for(;t=e.lastChild;)e.removeChild(t)}t1()&&(t5(),t9());let rD=/(<(.*)>|&(.*);)/,rF=!1;function rB(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ti;rD.test(t)?(rF||r!==ti||(rF=!0,rp("The HTML sanitization using DOMPurify library is deprecated and will be removed in the next major release. Use the `sanitizer` option instead.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`sanitizer` documentation: https://handsontable.com/docs/api/options/#sanitizer")),e.innerHTML="function"==typeof r?r(t,"innerHTML"):t):rV(e,t)}function rV(e,t){let r=e.firstChild;r&&3===r.nodeType&&null===r.nextSibling?r.textContent=t:(rP(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function rU(e){let t=e.ownerDocument.documentElement,r=e.ownerDocument.defaultView,n=e;for(;n!==t;){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE)if(!n.host)return!1;else{if(n.host.impl)return rU(n.host.impl);if(n.host)return rU(n.host);t_("Lost in Web Components world")}else if("none"===r.getComputedStyle(n).display)return!1;n=n.parentNode}return!0}function rz(e){let t=e.ownerDocument.defaultView,r=e;for(;r.parentNode;){if("0px"===r.style.height||"0"===r.style.height){let e=t.getComputedStyle(r).getPropertyValue("overflow");return"hidden"===e||"clip"===e}r=r.parentNode}return!1}function rW(e){let t,r,n,o=e.ownerDocument,i=o.defaultView,s=o.documentElement,a=e;for(t=a.offsetLeft,r=a.offsetTop,n=a;(a=a.offsetParent)&&a!==o.body&&"offsetLeft"in a;)t+=a.offsetLeft,r+=a.offsetTop,n=a;return n&&"fixed"===n.style.position&&(t+=i.pageXOffset||s.scrollLeft,r+=i.pageYOffset||s.scrollTop),{left:t,top:r}}function rG(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollY}function r$(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollX}function rY(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?rG(t):e.scrollTop}function rj(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?r$(t):e.scrollLeft}function rq(e){let t=e.ownerDocument,r=t?t.defaultView:void 0;t||(r=(t=e.document?e.document:e).defaultView);let n=["auto","scroll"],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")||({overflow:e,overflowX:t,overflowY:i}=r.getComputedStyle(o),n.includes(e)||n.includes(t)||n.includes(i))||o.clientHeight<=o.scrollHeight+1&&(n.includes(i)||n.includes(e))||o.clientWidth<=o.scrollWidth+1&&(n.includes(t)||n.includes(e)))return o;o=o.parentNode}return r}function rK(e){return e.scrollHeight-e.clientHeight}function rX(e){return e.scrollWidth-e.clientWidth}function rQ(e){let t=e.ownerDocument,r=t.defaultView,n=e.parentNode;for(;n&&n.style&&t.body!==n;){if("visible"!==n.style.overflow&&""!==n.style.overflow)return n;let e=r.getComputedStyle(n),t=["scroll","hidden","auto","clip"],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 n;n=n.parentNode}return r}function rZ(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===r)return"width"===t?`${r.innerWidth}px`:"height"===t?`${r.innerHeight}px`:void 0;let n=e.style[t];if(""!==n&&void 0!==n)return n;let o=r.getComputedStyle(e);if(""!==o[t]&&void 0!==o[t])return o[t]}function rJ(e,t){let{selectorText:r}=t,n=!1;return t.type===CSSRule.STYLE_RULE&&r&&(e.msMatchesSelector?n=e.msMatchesSelector(r):e.matches&&(n=e.matches(r))),n}function r0(e){return e.offsetWidth}function r1(e){return e.offsetHeight}function r2(e){return e.clientHeight||e.innerHeight}function r3(e){return e.clientWidth||e.innerWidth}function r6(e,t,r){e.addEventListener(t,r,!1)}function r4(e,t,r){e.removeEventListener(t,r,!1)}function r5(e){return e.selectionStart?e.selectionStart:0}function r9(e){return e.selectionEnd?e.selectionEnd:0}function r7(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.document,r="";return e.getSelection?r=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(r=t.selection.createRange().text),r}function r8(){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 ne(e,t,r){if(void 0===r&&(r=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,r)}catch(i){let n=e.parentNode,o=n.style.display;n.style.display="block",e.setSelectionRange(t,r),n.style.display=o}}}function nt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return rh()?2*!Number.isInteger(e.defaultView.devicePixelRatio||1):0}function nr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return void 0===t&&(t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=e.createElement("div");r.style.height="200px",r.style.width="100%";let n=e.createElement("div");n.classList.add("htScrollbarTest"),t&&n.classList.add("htScrollbarSafariTest"),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(r),e.body.appendChild(n);let o=r.offsetWidth;n.style.overflow="scroll";let i=r.offsetWidth;return o===i&&(i=n.clientWidth),e.body.removeChild(n),o-i},r=t();return 0===r&&rn()&&!rs()&&!rl()?t(!0):r}(e)),t}function nn(e){return e instanceof Window?e.document.body.scrollHeight>e.innerHeight:e.offsetWidth!==e.clientWidth}function no(e){return e instanceof Window?e.document.body.scrollWidth>e.innerWidth:e.offsetHeight!==e.clientHeight}function ni(e,t,r){e.style.transform=`translate3d(${t},${r},0)`}function ns(e){let t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:-1}function na(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")}function nl(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function nh(e){return nl(e)&&!1===e.hasAttribute("data-hot-input")}function nd(e){nh(e.ownerDocument.activeElement)||e.select()}function nu(e){return!e.parentNode}function nc(e,t){new IntersectionObserver((e,r)=>{e.forEach(e=>{e.isIntersecting&&(t(),r.disconnect())})}).observe(e)}function ng(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=e.ownerDocument,o=n.createRange(),i=n.defaultView.getSelection();rk(e,"contenteditable",!0),r&&rk(e,...tC()),t&&rO(e,"invisibleSelection"),o.selectNodeContents(e),i.removeAllRanges(),i.addRange(o)}function np(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),r.removeAllRanges(),t&&r_(e,"invisibleSelection"),e.removeAttribute("contenteditable")}function nm(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];ng(e,r),t(),np(e,r)}function nf(e){let t=e?.ownerDocument?.defaultView.Element;return!!(t&&null!==t&&e instanceof t)}function ny(e){return"function"==typeof e}function nb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=0,n={lastCallThrottled:!0},o=null;return function(){for(var i=arguments.length,s=Array(i),a=0;a<i;a++)s[a]=arguments[a];let l=Date.now(),h=!1;n.lastCallThrottled=!0,r||(r=l,h=!0);let d=t-(l-r);return h?(n.lastCallThrottled=!1,e.apply(this,s)):(o&&clearTimeout(o),o=setTimeout(()=>{n.lastCallThrottled=!1,e.apply(this,s),r=0,o=void 0},d)),n}}function nC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n=nb(e,t),o=r;function i(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];return o?(o-=1,e.apply(this,r)):n.apply(this,r)}return i.clearHits=function(){o=r},i}function nw(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=null;function o(){for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return n&&clearTimeout(n),n=setTimeout(()=>{n=null,t=e.apply(this,i)},r),t}return o.cancel=function(){null!==n&&(clearTimeout(n),n=null)},o}function nS(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[n,...o]=t;return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return eO(o,(e,t)=>t(e),n.apply(this,t))}}function nv(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.apply(this,r.concat(n))}}function nR(e){let t=e.length;return function r(n){return function(){for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];let a=n.concat(i);return a.length>=t?e.apply(this,a):r(a)}}([])}function nE(e){let t=e.length;return function r(n){return function(){for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];let a=n.concat(i.reverse());return a.length>=t?e.apply(this,a):r(a)}}([])}function nT(e,t,r,n,o,i,s,a){if(eq(a))return e.call(t,r,n,o,i,s,a);if(eq(s))return e.call(t,r,n,o,i,s);if(eq(i))return e.call(t,r,n,o,i);if(eq(o))return e.call(t,r,n,o);if(eq(n))return e.call(t,r,n);else if(eq(r))return e.call(t,r);return e.call(t)}let nA={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:re()?182:174,AUDIO_MUTE:re()?181:173,AUDIO_UP:re()?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},nM=[nA.ALT,nA.ARROW_DOWN,nA.ARROW_LEFT,nA.ARROW_RIGHT,nA.ARROW_UP,nA.AUDIO_DOWN,nA.AUDIO_MUTE,nA.AUDIO_UP,nA.BACKSPACE,nA.CAPS_LOCK,nA.DELETE,nA.END,nA.ENTER,nA.ESCAPE,nA.F1,nA.F2,nA.F3,nA.F4,nA.F5,nA.F6,nA.F7,nA.F8,nA.F9,nA.F10,nA.F11,nA.F12,nA.F13,nA.F14,nA.F15,nA.F16,nA.F17,nA.F18,nA.F19,nA.HOME,nA.INSERT,nA.MEDIA_NEXT,nA.MEDIA_PLAY_PAUSE,nA.MEDIA_PREV,nA.MEDIA_STOP,nA.NULL,nA.NUM_LOCK,nA.PAGE_DOWN,nA.PAGE_UP,nA.PAUSE,nA.SCROLL_LOCK,nA.SHIFT,nA.TAB];function nN(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 nI(e){return nM.includes(e)}function nx(e){let t=[];return rd()?t.push(nA.COMMAND_LEFT,nA.COMMAND_RIGHT,nA.COMMAND_FIREFOX):t.push(nA.CONTROL),t.includes(e)}function nO(e){return[nA.CONTROL,nA.COMMAND_LEFT,nA.COMMAND_RIGHT,nA.COMMAND_FIREFOX].includes(e)}function n_(e,t){let r=t.split("|"),n=!1;return eH(r,t=>{if(e===nA[t])return n=!0,!1}),n}function nk(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function nH(e){return!1===e.isImmediatePropagationEnabled}function nL(e){return 2===e.button}function nP(e){return 0===e.button}function nD(e){return"u">typeof TouchEvent&&e instanceof TouchEvent}function nF(e,t){let r={x:e.offsetX,y:e.offsetY},n=e.target;if(!nf(t)||n!==t&&n.contains(t))return r;for(;n!==t;)r.x+=n.offsetLeft,r.y+=n.offsetTop,n=n.offsetParent;return r}let nB=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceCacheUpdate","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","beforeAlter","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","beforeCompositionStart","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterDataProviderFetch","afterDataProviderFetchError","afterDataProviderFetchAbort","hasExternalDataSource","beforeRowsMutation","afterRowsMutation","afterRowsMutationError","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","afterRowSequenceCacheUpdate","afterRowSequenceChange","beforeViewportScrollVertically","beforeViewportScrollHorizontally","beforeViewportScroll","afterScrollHorizontally","afterScrollVertically","afterScroll","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSelectionFocusSet","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","beforeSelectAll","afterSelectAll","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterSetTheme","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeHeightChange","beforeWidthChange","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeDataProviderFetch","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","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","beforePageChange","afterPageChange","beforePageSizeChange","afterPageSizeChange","afterPageSizeVisibilityChange","afterPageCounterVisibilityChange","afterPageNavigationVisibilityChange","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","afterDialogHide","afterDialogShow","beforeDialogHide","beforeDialogShow","dialogFocusPreviousElement","dialogFocusNextElement","afterDialogFocus","beforeLoadingShow","afterLoadingShow","beforeLoadingHide","afterLoadingHide","beforeEmptyDataStateShow","afterEmptyDataStateShow","beforeEmptyDataStateHide","afterEmptyDataStateHide","beforeNotificationShow","afterNotificationShow","beforeNotificationHide","afterNotificationHide","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],nV=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"]]),nU=new Map([[]]);class nz{#e=new Map;#t=new Map;#r=new Set;constructor(){nB.forEach(e=>this.#n(e))}getHooks(e){return this.#e.get(e)??[]}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.#e.has(e)||(this.#n(e),nB.push(e));let n=this.#e.get(e),o=n.find(e=>e.callback===t);if(o){!0===o.skip&&(o.skip=!1);return}let i=Number.isInteger(r.orderIndex)?r.orderIndex:0,s=!!r.runOnce,a=!!r.initialHook,l=!1;if(a){let e=n.find(e=>e.initialHook);e&&(e.callback=t,l=!0)}if(!l){n.push({callback:t,orderIndex:i,runOnce:s,initialHook:a,skip:!1});let r=this.#r.has(e);r||0===i||(r=!0,this.#r.add(e)),r&&n.length>1&&this.#e.set(e,n.toSorted((e,t)=>e.orderIndex-t.orderIndex))}}has(e){return this.#e.has(e)&&this.#e.get(e).length>0}remove(e,t){if(!this.#e.has(e))return!1;let r=this.#e.get(e),n=r.find(e=>e.callback===t);if(n){let t=this.#t.get(e);return n.skip=!0,(t+=1)>100&&(this.#e.set(e,r.filter(e=>!e.skip)),t=0),this.#t.set(e,t),!0}return!1}destroy(){this.#e.clear(),this.#t.clear(),this.#e=null,this.#t=null}#n(e){this.#e.set(e,[]),this.#t.set(e,0)}}let nW=e$`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
|
|
52
|
+
the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,non_commercial:()=>""};function e9(e,t,r){let n,o=!eX(e),i="string"==typeof e&&("non-commercial-and-evaluation"===e.toLowerCase()||"ht68e-1f2b7-47158-70b05-0842f"===e.toLowerCase()),s="17.1.0-rc15",a="invalid",l="invalid",h=function(e){let t=[][eZ],r=t;if(e[eZ]!==e2("Z"))return!1;for(let t="",n="B<H4P+".split(""),o=e2(n.shift());o;o=e2(n.shift()||"A"))--o<""[eZ]?r|=(e0(`${e0(eJ(t)+(eJ(e1(e,Math.abs(o),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=e1(e,o,o?1===n[eZ]?9:8:6);return r===t}(e=e3(e||""));if(i)a="non_commercial",l="valid";else if(o||h)if(h){let t,[o,i,s]=r.split("/").map(Number),h=Math.floor(Date.UTC(s,i-1,o)/864e5),d=eJ(e1(e3(t=e),eJ("12"),e2("F")))/(eJ(e1(e3(t),e2("B"),~~![][eZ]))||9);n=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",timeZone:"UTC"}).format((d+1)*864e5),h>d?(a="expired",l="expired"):(a="valid",l="valid")}else a="invalid",l="invalid";else a="missing",l="missing";if("u">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)&&(a="valid",l="valid"),e6||"valid"===a||(e4[a]({keyValidityDate:n,hotVersion:s})&&console["non_commercial"===a?"info":"warn"](e4[a]({keyValidityDate:n,hotVersion:s})),e6=!0),"valid"!==l&&t&&e5[l]({keyValidityDate:n,hotVersion:s})){let e=document.createElement("div");e.className="handsontable hot-display-license-info",e.innerHTML=e5[l]({keyValidityDate:n,hotVersion:s}),t.appendChild(e)}}function e7(e){return e[0].toUpperCase()+e.substr(1)}function e8(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let n=[],o=t.length;for(;o;){let e=ej(t[o-=1]).toLowerCase();-1===n.indexOf(e)&&n.push(e)}return 1===n.length}function te(){function e(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return e()+e()+e()+e()}function tt(e){if("string"!=typeof e)return!1;try{let t=JSON.parse(e);return"object"==typeof t&&null!==t}catch{return!1}}function tr(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)}function tn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return`${e}`.replace(/(?:\\)?\[([^[\]]+)]/g,(e,r)=>"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[r]?"":t[r])}function to(e){return ti(`${e}`,{ALLOWED_TAGS:[]})}function ti(e,t){return eM.sanitize(e,t)}function ts(e){return"string"!=typeof e?e:e.replace(/([A-Z])/g,"-$1").replace(/_/g,"-").toLowerCase()}let ta=e=>["tabindex",e],tl=()=>["role","presentation"],th=()=>["role","gridcell"],td=()=>["role","gridcell button"],tu=()=>["role","rowheader"],tc=()=>["role","rowgroup"],tg=()=>["role","columnheader"],tp=()=>["role","row"],tm=()=>["role","listbox"],tf=()=>["scope","col"],ty=()=>["scope","row"],tb=e=>["aria-label",e],tC=()=>["aria-hidden","true"],tw=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return["aria-disabled",e]},tS=e=>["aria-haspopup",e],tv=e=>["aria-rowcount",e],tR=e=>["aria-colcount",e],tE=e=>["aria-rowindex",e],tT=e=>["aria-colindex",e],tA=e=>["aria-expanded",e],tM=()=>["aria-readonly","true"],tN=()=>["aria-invalid","true"],tI=e=>["aria-checked",e],tx=()=>["aria-selected","true"],tO=()=>["aria-busy","true"];function t_(e){throw Error(e,{cause:{handsontable:!0}})}function tk(e){let t;return Array.isArray(e)?t=e.length?Array(e.length).fill(null):[]:(t={},tW(e,(e,r)=>{"__children"!==r&&(e&&"object"==typeof e&&!Array.isArray(e)?t[r]=tk(e):Array.isArray(e)?e.length&&"object"==typeof e[0]&&!Array.isArray(e[0])?t[r]=[tk(e[0])]:t[r]=[]:t[r]=null)})),t}function tH(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function tL(e,t,r){let n=Array.isArray(r);return tW(t,(t,o)=>{(!1===n||r.includes(o))&&(e[o]=t)}),e}function tP(e,t){tW(t,(r,n)=>{t[n]&&"object"==typeof t[n]?(e[n]||(Array.isArray(t[n])?e[n]=[]:"[object Date]"===Object.prototype.toString.call(t[n])?e[n]=t[n]:e[n]={}),tP(e[n],t[n])):e[n]=t[n]})}function tD(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}function tF(e){let t={};return tW(e,(e,r)=>{t[r]=e}),t}function tB(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.MIXINS||(e.MIXINS=[]),eH(r,t=>{e.MIXINS.push(t.MIXIN_NAME),tW(t,(t,r)=>{if(void 0!==e.prototype[r]&&t_(`Mixin conflict. Property '${r}' already exist and cannot be overwritten.`),"function"==typeof t)e.prototype[r]=t;else{let n,o;Object.defineProperty(e.prototype,r,{get:(n=`_${r}`,function(){let e;return void 0===this[n]&&(this[n]=((Array.isArray(e=t)||tU(e))&&(e=tD(e)),e)),this[n]}),set:(o=`_${r}`,function(e){this[o]=e}),configurable:!0})}})}),e}function tV(e,t){return JSON.stringify(e)===JSON.stringify(t)}function tU(e){return"[object Object]"===Object.prototype.toString.call(e)}function tz(e,t,r,n){n.value=r,n.writable=!1!==n.writable,n.enumerable=!1!==n.enumerable,n.configurable=!1!==n.configurable,Object.defineProperty(e,t,n)}function tW(e,t){for(let r in e)if((!e.hasOwnProperty||e.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e,r))&&!1===t(e[r],r,e))break;return e}function tG(e,t){let r=t.split("."),n=e;return tW(r,e=>{if(void 0===(n=n[e]))return n=void 0,!1}),n}function t$(e,t,r){if("string"!=typeof t)return;let n=t.split("."),o=e;n.forEach((e,t)=>{"__proto__"!==e&&"constructor"!==e&&"prototype"!==e&&(t!==n.length-1?(tq(o,e)||(o[e]={}),o=o[e]):o[e]=r)})}function tY(e){if(!tU(e))return 0;let t=function(e){let r=0;return tU(e)?tW(e,(e,n)=>{"__children"!==n&&(r+=t(e))}):r+=1,r};return t(e)}function tj(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r=`_${t}`,n={_touched:!1,[r]:e,isTouched(){return this._touched}};return Object.defineProperty(n,t,{get(){return this[r]},set(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),n}function tq(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function tK(e,t){if("object"!=typeof e||null===e)return t;if("object"!=typeof t||null===t)return e;let r={};return Object.keys(t).forEach(n=>{"object"!=typeof t[n]||null===t[n]||Array.isArray(t[n])?r[n]=tq(e,n)&&void 0!==e[n]?e[n]:t[n]:r[n]=tK(e[n],t[n])}),Object.keys(e).forEach(t=>{tq(r,t)||(r[t]=e[t])}),r}function tX(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={...e};return Object.keys(t).forEach(e=>{if("__proto__"===e||"constructor"===e||"prototype"===e)return;let n=t[e],o=r[e];tU(n)&&tU(o)?r[e]=tX(o,n):r[e]=n}),r}function tQ(e){return tU(e)&&eq(e.key)&&eq(e.value)}function tZ(e){return window.requestAnimationFrame(e)}function tJ(e){window.cancelAnimationFrame(e)}function t0(){return"ontouchstart"in window}function t1(){return"u">typeof window}function t2(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e||(e="object"==typeof Intl?new Intl.Collator(t,r).compare:"function"==typeof String.prototype.localeCompare?(e,t)=>`${e}`.localeCompare(t):(e,t)=>e===t?0:e>t?-1:1)}let t3=e=>{let t={value:!1};return t.test=(r,n)=>{t.value=e(r,n)},t},t6={chrome:t3((e,t)=>/Chrome/.test(e)&&/Google/.test(t)),chromeWebKit:t3(e=>/CriOS/.test(e)),edge:t3(e=>/Edge/.test(e)),edgeWebKit:t3(e=>/EdgiOS/.test(e)),firefox:t3(e=>/Firefox/.test(e)),firefoxWebKit:t3(e=>/FxiOS/.test(e)),mobile:t3(e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)),safari:t3((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t)),safariBefore261:t3((e,t)=>{if(!/Safari/.test(e)||!/Apple Computer/.test(t))return!1;let r=/Version\/(\d+(?:\.\d+)?)/i.exec(e);return(r?Number.parseFloat(r[1]):0)<26.1})},t4={mac:t3(e=>/^Mac/.test(e)),win:t3(e=>/^Win/.test(e)),linux:t3(e=>/^Linux/.test(e)),ios:t3(e=>/iPhone|iPad|iPod/i.test(e))};function t5(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tW(t6,r=>{let{test:n}=r;n(e,t)})}function t9(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tW(t4,t=>{let{test:r}=t;r(e)})}function t7(){return t6.chrome.value}function t8(){return t6.chromeWebKit.value}function re(){return t6.firefox.value}function rt(){return t6.firefoxWebKit.value}function rr(){return t6.safari.value}function rn(){return t6.safariBefore261.value}function ro(){return t6.edge.value}function ri(){return t6.edgeWebKit.value}function rs(){return t6.mobile.value}function ra(){return t4.ios.value}function rl(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&t4.mac.value}function rh(){return t4.win.value}function rd(){return t4.mac.value}function ru(){return t4.linux.value}function rc(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];eq(console)&&console.log(...t)}function rg(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];eq(console)&&console.warn(...t)}function rp(e){eq(console)&&console.warn(`Deprecated: ${e}`)}function rm(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];eq(console)&&console.error(...t)}function rf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=-1,n=null,o=e;for(;null!==o;){if(r===t){n=o;break}o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o=o.host:(r+=1,o=o.parentNode)}return n}function ry(e,t){let r=e.closest(".handsontable");return!!r&&(r.parentNode===t||r===t)}function rb(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function rC(e){return rb(e)&&e.parent}function rw(e){return!!Object.getPrototypeOf(e.parent)}function rS(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,{ELEMENT_NODE:n,DOCUMENT_FRAGMENT_NODE:o}=Node,i=e;for(;null!=i&&i!==r;){let{nodeType:e,nodeName:r}=i;if(e===n&&(t.includes(r)||t.includes(i)))return i;let{host:s}=i;i=s&&e===o?s:i.parentNode}return null}function rv(e,t,r){let n=[],o=e;for(;o&&(o=rS(o,t,r))&&(!r||r.contains(o));)n.push(o),o=o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.host:o.parentNode;let i=n.length;return i?n[i-1]:null}function rR(e,t){let r={element:void 0,classNames:[]},n=e;for(;null!==n&&n!==e.ownerDocument.documentElement&&!r.element;){if("string"==typeof t&&n.classList.contains(t))r.element=n,r.classNames.push(t);else if(t instanceof RegExp){let e=Array.from(n.classList).filter(e=>t.test(e));e.length&&(r.element=n,r.classNames.push(...e))}n=n.parentElement}return r}function rE(e,t){let r=e.parentNode,n=[];for("string"==typeof t?n=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):n.push(t);null!==r;){if(n.indexOf(r)>-1)return!0;r=r.parentNode}return!1}function rT(e){let t=0,r=e;if(r.previousSibling)for(;r=r.previousSibling;)t+=1;return t}function rA(e,t,r){let n=r.parentElement.querySelector(`.ht_clone_${e}`);return n?n.contains(t):null}function rM(e){if(!e||!e.classList||!e.parentNode||!e.parentNode.parentNode||e.classList.contains("hiddenHeader")||"none"===e.style.display)return!1;let t=e.parentNode,r=Array.from(t.parentNode.childNodes);return r.indexOf(t)+(Number.parseInt(e.getAttribute("rowspan"),10)||1)>=r.length}function rN(e){return e&&e.length?e.filter(e=>!!e):[]}function rI(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];let r=[],n=[];return n.push(...e.filter(e=>{let n=e instanceof RegExp;return n&&t&&r.push(e),!n})),t?{regexFree:n,regexes:r}:n}function rx(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)}function rO(e,t){"string"==typeof t&&(t=t.split(" ")),(t=rN(t)).length>0&&e.classList.add(...t)}function r_(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:n}=rI(t,!0);(r=rN(r)).length>0&&e.classList.remove(...r),n.forEach(t=>{e.classList.forEach(r=>{t.test(r)&&e.classList.remove(r)})})}function rk(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,r]]),t.forEach(t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)})}function rH(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:n}=rI(t,!0);r.forEach(t=>{""!==t&&e.removeAttribute(t)}),n.forEach(t=>{e.getAttributeNames().forEach(r=>{t.test(r)&&e.removeAttribute(r)})})}function rL(e){if(3===e.nodeType)e.parentNode.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1){let t=e.childNodes;for(let e=t.length-1;e>=0;e--)rL(t[e])}}function rP(e){let t;for(;t=e.lastChild;)e.removeChild(t)}t1()&&(t5(),t9());let rD=/(<(.*)>|&(.*);)/,rF=!1;function rB(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ti;rD.test(t)?(rF||r!==ti||(rF=!0,rp("The HTML sanitization using DOMPurify library is deprecated and will be removed in the next major release. Use the `sanitizer` option instead.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`sanitizer` documentation: https://handsontable.com/docs/api/options/#sanitizer")),e.innerHTML="function"==typeof r?r(t,"innerHTML"):t):rV(e,t)}function rV(e,t){let r=e.firstChild;r&&3===r.nodeType&&null===r.nextSibling?r.textContent=t:(rP(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function rU(e){let t=e.ownerDocument.documentElement,r=e.ownerDocument.defaultView,n=e;for(;n!==t;){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE)if(!n.host)return!1;else{if(n.host.impl)return rU(n.host.impl);if(n.host)return rU(n.host);t_("Lost in Web Components world")}else if("none"===r.getComputedStyle(n).display)return!1;n=n.parentNode}return!0}function rz(e){let t=e.ownerDocument.defaultView,r=e;for(;r.parentNode;){if("0px"===r.style.height||"0"===r.style.height){let e=t.getComputedStyle(r).getPropertyValue("overflow");return"hidden"===e||"clip"===e}r=r.parentNode}return!1}function rW(e){let t,r,n,o=e.ownerDocument,i=o.defaultView,s=o.documentElement,a=e;for(t=a.offsetLeft,r=a.offsetTop,n=a;(a=a.offsetParent)&&a!==o.body&&"offsetLeft"in a;)t+=a.offsetLeft,r+=a.offsetTop,n=a;return n&&"fixed"===n.style.position&&(t+=i.pageXOffset||s.scrollLeft,r+=i.pageYOffset||s.scrollTop),{left:t,top:r}}function rG(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollY}function r$(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollX}function rY(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?rG(t):e.scrollTop}function rj(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?r$(t):e.scrollLeft}function rq(e){let t=e.ownerDocument,r=t?t.defaultView:void 0;t||(r=(t=e.document?e.document:e).defaultView);let n=["auto","scroll"],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")||({overflow:e,overflowX:t,overflowY:i}=r.getComputedStyle(o),n.includes(e)||n.includes(t)||n.includes(i))||o.clientHeight<=o.scrollHeight+1&&(n.includes(i)||n.includes(e))||o.clientWidth<=o.scrollWidth+1&&(n.includes(t)||n.includes(e)))return o;o=o.parentNode}return r}function rK(e){return e.scrollHeight-e.clientHeight}function rX(e){return e.scrollWidth-e.clientWidth}function rQ(e){let t=e.ownerDocument,r=t.defaultView,n=e.parentNode;for(;n&&n.style&&t.body!==n;){if("visible"!==n.style.overflow&&""!==n.style.overflow)return n;let e=r.getComputedStyle(n),t=["scroll","hidden","auto","clip"],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 n;n=n.parentNode}return r}function rZ(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===r)return"width"===t?`${r.innerWidth}px`:"height"===t?`${r.innerHeight}px`:void 0;let n=e.style[t];if(""!==n&&void 0!==n)return n;let o=r.getComputedStyle(e);if(""!==o[t]&&void 0!==o[t])return o[t]}function rJ(e,t){let{selectorText:r}=t,n=!1;return t.type===CSSRule.STYLE_RULE&&r&&(e.msMatchesSelector?n=e.msMatchesSelector(r):e.matches&&(n=e.matches(r))),n}function r0(e){return e.offsetWidth}function r1(e){return e.offsetHeight}function r2(e){return e.clientHeight||e.innerHeight}function r3(e){return e.clientWidth||e.innerWidth}function r6(e,t,r){e.addEventListener(t,r,!1)}function r4(e,t,r){e.removeEventListener(t,r,!1)}function r5(e){return e.selectionStart?e.selectionStart:0}function r9(e){return e.selectionEnd?e.selectionEnd:0}function r7(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.document,r="";return e.getSelection?r=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(r=t.selection.createRange().text),r}function r8(){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 ne(e,t,r){if(void 0===r&&(r=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,r)}catch(i){let n=e.parentNode,o=n.style.display;n.style.display="block",e.setSelectionRange(t,r),n.style.display=o}}}function nt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return rh()?2*!Number.isInteger(e.defaultView.devicePixelRatio||1):0}function nr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return void 0===t&&(t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=e.createElement("div");r.style.height="200px",r.style.width="100%";let n=e.createElement("div");n.classList.add("htScrollbarTest"),t&&n.classList.add("htScrollbarSafariTest"),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(r),e.body.appendChild(n);let o=r.offsetWidth;n.style.overflow="scroll";let i=r.offsetWidth;return o===i&&(i=n.clientWidth),e.body.removeChild(n),o-i},r=t();return 0===r&&rn()&&!rs()&&!rl()?t(!0):r}(e)),t}function nn(e){return e instanceof Window?e.document.body.scrollHeight>e.innerHeight:e.offsetWidth!==e.clientWidth}function no(e){return e instanceof Window?e.document.body.scrollWidth>e.innerWidth:e.offsetHeight!==e.clientHeight}function ni(e,t,r){e.style.transform=`translate3d(${t},${r},0)`}function ns(e){let t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:-1}function na(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")}function nl(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function nh(e){return nl(e)&&!1===e.hasAttribute("data-hot-input")}function nd(e){nh(e.ownerDocument.activeElement)||e.select()}function nu(e){return!e.parentNode}function nc(e,t){new IntersectionObserver((e,r)=>{e.forEach(e=>{e.isIntersecting&&(t(),r.disconnect())})}).observe(e)}function ng(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=e.ownerDocument,o=n.createRange(),i=n.defaultView.getSelection();rk(e,"contenteditable",!0),r&&rk(e,...tC()),t&&rO(e,"invisibleSelection"),o.selectNodeContents(e),i.removeAllRanges(),i.addRange(o)}function np(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),r.removeAllRanges(),t&&r_(e,"invisibleSelection"),e.removeAttribute("contenteditable")}function nm(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];ng(e,r),t(),np(e,r)}function nf(e){let t=e?.ownerDocument?.defaultView.Element;return!!(t&&null!==t&&e instanceof t)}function ny(e){return"function"==typeof e}function nb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=0,n={lastCallThrottled:!0},o=null;return function(){for(var i=arguments.length,s=Array(i),a=0;a<i;a++)s[a]=arguments[a];let l=Date.now(),h=!1;n.lastCallThrottled=!0,r||(r=l,h=!0);let d=t-(l-r);return h?(n.lastCallThrottled=!1,e.apply(this,s)):(o&&clearTimeout(o),o=setTimeout(()=>{n.lastCallThrottled=!1,e.apply(this,s),r=0,o=void 0},d)),n}}function nC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n=nb(e,t),o=r;function i(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];return o?(o-=1,e.apply(this,r)):n.apply(this,r)}return i.clearHits=function(){o=r},i}function nw(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=null;function o(){for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return n&&clearTimeout(n),n=setTimeout(()=>{n=null,t=e.apply(this,i)},r),t}return o.cancel=function(){null!==n&&(clearTimeout(n),n=null)},o}function nS(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[n,...o]=t;return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return eO(o,(e,t)=>t(e),n.apply(this,t))}}function nv(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.apply(this,r.concat(n))}}function nR(e){let t=e.length;return function r(n){return function(){for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];let a=n.concat(i);return a.length>=t?e.apply(this,a):r(a)}}([])}function nE(e){let t=e.length;return function r(n){return function(){for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];let a=n.concat(i.reverse());return a.length>=t?e.apply(this,a):r(a)}}([])}function nT(e,t,r,n,o,i,s,a){if(eq(a))return e.call(t,r,n,o,i,s,a);if(eq(s))return e.call(t,r,n,o,i,s);if(eq(i))return e.call(t,r,n,o,i);if(eq(o))return e.call(t,r,n,o);if(eq(n))return e.call(t,r,n);else if(eq(r))return e.call(t,r);return e.call(t)}let nA={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:re()?182:174,AUDIO_MUTE:re()?181:173,AUDIO_UP:re()?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},nM=[nA.ALT,nA.ARROW_DOWN,nA.ARROW_LEFT,nA.ARROW_RIGHT,nA.ARROW_UP,nA.AUDIO_DOWN,nA.AUDIO_MUTE,nA.AUDIO_UP,nA.BACKSPACE,nA.CAPS_LOCK,nA.DELETE,nA.END,nA.ENTER,nA.ESCAPE,nA.F1,nA.F2,nA.F3,nA.F4,nA.F5,nA.F6,nA.F7,nA.F8,nA.F9,nA.F10,nA.F11,nA.F12,nA.F13,nA.F14,nA.F15,nA.F16,nA.F17,nA.F18,nA.F19,nA.HOME,nA.INSERT,nA.MEDIA_NEXT,nA.MEDIA_PLAY_PAUSE,nA.MEDIA_PREV,nA.MEDIA_STOP,nA.NULL,nA.NUM_LOCK,nA.PAGE_DOWN,nA.PAGE_UP,nA.PAUSE,nA.SCROLL_LOCK,nA.SHIFT,nA.TAB];function nN(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 nI(e){return nM.includes(e)}function nx(e){let t=[];return rd()?t.push(nA.COMMAND_LEFT,nA.COMMAND_RIGHT,nA.COMMAND_FIREFOX):t.push(nA.CONTROL),t.includes(e)}function nO(e){return[nA.CONTROL,nA.COMMAND_LEFT,nA.COMMAND_RIGHT,nA.COMMAND_FIREFOX].includes(e)}function n_(e,t){let r=t.split("|"),n=!1;return eH(r,t=>{if(e===nA[t])return n=!0,!1}),n}function nk(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function nH(e){return!1===e.isImmediatePropagationEnabled}function nL(e){return 2===e.button}function nP(e){return 0===e.button}function nD(e){return"u">typeof TouchEvent&&e instanceof TouchEvent}function nF(e,t){let r={x:e.offsetX,y:e.offsetY},n=e.target;if(!nf(t)||n!==t&&n.contains(t))return r;for(;n!==t;)r.x+=n.offsetLeft,r.y+=n.offsetTop,n=n.offsetParent;return r}let nB=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceCacheUpdate","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","beforeAlter","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","beforeCompositionStart","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterDataProviderFetch","afterDataProviderFetchError","afterDataProviderFetchAbort","hasExternalDataSource","beforeRowsMutation","afterRowsMutation","afterRowsMutationError","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","afterRowSequenceCacheUpdate","afterRowSequenceChange","beforeViewportScrollVertically","beforeViewportScrollHorizontally","beforeViewportScroll","afterScrollHorizontally","afterScrollVertically","afterScroll","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSelectionFocusSet","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","beforeSelectAll","afterSelectAll","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterSetTheme","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeHeightChange","beforeWidthChange","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeDataProviderFetch","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","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","beforePageChange","afterPageChange","beforePageSizeChange","afterPageSizeChange","afterPageSizeVisibilityChange","afterPageCounterVisibilityChange","afterPageNavigationVisibilityChange","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","afterDialogHide","afterDialogShow","beforeDialogHide","beforeDialogShow","dialogFocusPreviousElement","dialogFocusNextElement","afterDialogFocus","beforeLoadingShow","afterLoadingShow","beforeLoadingHide","afterLoadingHide","beforeEmptyDataStateShow","afterEmptyDataStateShow","beforeEmptyDataStateHide","afterEmptyDataStateHide","beforeNotificationShow","afterNotificationShow","beforeNotificationHide","afterNotificationHide","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],nV=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"]]),nU=new Map([[]]);class nz{#e=new Map;#t=new Map;#r=new Set;constructor(){nB.forEach(e=>this.#n(e))}getHooks(e){return this.#e.get(e)??[]}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.#e.has(e)||(this.#n(e),nB.push(e));let n=this.#e.get(e),o=n.find(e=>e.callback===t);if(o){!0===o.skip&&(o.skip=!1);return}let i=Number.isInteger(r.orderIndex)?r.orderIndex:0,s=!!r.runOnce,a=!!r.initialHook,l=!1;if(a){let e=n.find(e=>e.initialHook);e&&(e.callback=t,l=!0)}if(!l){n.push({callback:t,orderIndex:i,runOnce:s,initialHook:a,skip:!1});let r=this.#r.has(e);r||0===i||(r=!0,this.#r.add(e)),r&&n.length>1&&this.#e.set(e,n.toSorted((e,t)=>e.orderIndex-t.orderIndex))}}has(e){return this.#e.has(e)&&this.#e.get(e).length>0}remove(e,t){if(!this.#e.has(e))return!1;let r=this.#e.get(e),n=r.find(e=>e.callback===t);if(n){let t=this.#t.get(e);return n.skip=!0,(t+=1)>100&&(this.#e.set(e,r.filter(e=>!e.skip)),t=0),this.#t.set(e,t),!0}return!1}destroy(){this.#e.clear(),this.#t.clear(),this.#e=null,this.#t=null}#n(e){this.#e.set(e,[]),this.#t.set(e,0)}}let nW=e$`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
|
|
53
53
|
Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
|
|
54
54
|
learn about the migration path.`;class nG{static getSingleton(){return n$}globalBucket=new nz;getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=new nz),e.pluginHookBucket):this.globalBucket}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3?arguments[3]:void 0;return Array.isArray(t)?eH(t,t=>this.add(e,t,r)):(nV.has(e)&&rg(tn(nW,{hookName:e,removedInVersion:nV.get(e)})),nU.has(e)&&rg(nU.get(e)),this.getBucket(r).add(e,t,{orderIndex:n,runOnce:!1})),this}once(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3?arguments[3]:void 0;return Array.isArray(t)?eH(t,t=>this.once(e,t,r)):this.getBucket(r).add(e,t,{orderIndex:n,runOnce:!0}),this}addAsFixed(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Array.isArray(t)?eH(t,t=>this.addAsFixed(e,t,r)):this.getBucket(r).add(e,t,{initialHook:!0}),this}remove(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.getBucket(r).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,r,n,o,i,s,a){{let l=this.getBucket().getHooks(t),h=l?l.length:0,d=0;if(h)for(;d<h;){if(!l[d]||l[d].skip){d+=1;continue}let h=nT(l[d].callback,e,r,n,o,i,s,a);void 0!==h&&(r=h),l[d]&&l[d].runOnce&&this.remove(t,l[d].callback),d+=1}}{let l=this.getBucket(e).getHooks(t),h=l?l.length:0,d=0;if(h)for(;d<h;){if(!l[d]||l[d].skip){d+=1;continue}let h=nT(l[d].callback,e,r,n,o,i,s,a);void 0!==h&&(r=h),l[d]&&l[d].runOnce&&this.remove(t,l[d].callback,e),d+=1}}return r}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getBucket(e).destroy()}register(e){this.isRegistered(e)||nB.push(e)}deregister(e){this.isRegistered(e)&&nB.splice(nB.indexOf(e),1)}isDeprecated(e){return nU.has(e)||nV.has(e)}isRegistered(e){return nB.indexOf(e)>=0}getRegistered(){return nB}}let n$=new nG,nY=new Map;function nj(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";nY.has(e)||nY.set(e,new Map);let t=nY.get(e);return{register:function(e,r){t.set(e,r)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return[...t.keys()]},getValues:function(){return[...t.values()]},clear:function(){nY.delete(e),t.clear()}}}let nq=new WeakMap,{register:nK,getItem:nX,hasItem:nQ,getNames:nZ,getValues:nJ}=nj("editors");function n0(e){let t={};this.getConstructor=function(){return e},this.getInstance=function(r){return r.guid in t||(t[r.guid]=new e(r)),t[r.guid]},nG.getSingleton().add("afterDestroy",function(){t[this.guid]=null})}function n1(e,t){let r;return"function"==typeof e?(nq.get(e)||n3(null,e),r=nq.get(e)):"string"==typeof e?r=nX(e):t_('Only strings and functions can be passed as "editor" parameter'),r||t_(`No editor registered under name "${e}"`),r.getInstance(t)}function n2(e){return"function"==typeof e?e:(nQ(e)||t_(`No registered editor found under "${e}" name`),nX(e).getConstructor())}function n3(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);let r=new n0(t);"string"==typeof e&&nK(e,r),nq.set(t,r)}let n6=0,n4=class{context;constructor(e=null){this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function o(e){var t;let n;r.call(this,(n=(t=e).stopImmediatePropagation,t.stopImmediatePropagation=function(){n.apply(this),nk(this)},t))}return this.context.eventListeners.push({element:e,event:t,callback:r,callbackProxy:o,options:n,eventManager:this}),e.addEventListener(t,o,n),n6+=1,()=>{this.removeEventListener(e,t,r)}}removeEventListener(e,t,r){let n,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.context.eventListeners.length;for(;i;)if(i-=1,(n=this.context.eventListeners[i]).event===t&&n.element===e){if(r&&r!==n.callback||o&&n.eventManager!==this)continue;this.context.eventListeners.splice(i,1),n.element.removeEventListener(n.event,n.callbackProxy,n.options),n6-=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;let r=this.context.eventListeners[t];e&&r.eventManager!==this||(this.context.eventListeners.splice(t,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),n6-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let r,n=e.document,o=e;n||(o=(n=e.ownerDocument?e.ownerDocument:e).defaultView);let i={bubbles:!0,cancelable:"mousemove"!==t,view:o,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};n.createEvent?(r=n.createEvent("MouseEvents")).initMouseEvent(t,i.bubbles,i.cancelable,i.view,i.detail,i.screenX,i.screenY,i.clientX,i.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,i.relatedTarget||n.body.parentNode):r=n.createEventObject(),e.dispatchEvent?e.dispatchEvent(r):e.fireEvent(`on${t}`,r)}};class n5{hot;tableMeta;selection;eventManager;destroyed=!1;activeEditor;cellProperties;constructor(e,t,r){this.hot=e,this.tableMeta=t,this.selection=r,this.eventManager=new n4(e),this.hot.addHook("afterDocumentKeyDown",e=>this.#o(e)),this.hot.addHook("beforeCompositionStart",e=>this.#o(e)),this.hot.view._wt.update("onCellDblClick",(e,t,r)=>this.#i(e,t,r))}getActiveEditor(){return this.activeEditor}prepareEditor(){if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,e=>{e&&this.prepareEditor()});let e=this.hot.getSelectedRangeActive()?.highlight;if(!e||e.isHeader())return;let{row:t,col:r}=e,n=this.hot.runHooks("modifyGetCellCoords",t,r,!1,"meta"),o=t,i=r;if(Array.isArray(n)&&([o,i]=n),this.cellProperties=this.hot.getCellMeta(o,i),!this.isCellEditable())return void this.clearActiveEditor();let s=this.hot.getCell(t,r,!0);if(s){let e=this.hot.getCellEditor(this.cellProperties),n=this.hot.colToProp(i),a=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(o),i);this.activeEditor=n1(e,this.hot),this.activeEditor.prepare(t,r,n,s,a,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.isCellEditable())return void this.clearActiveEditor();let n=this.hot.getSelectedRangeActive(),o=this.hot.runHooks("beforeBeginEditing",n.highlight.row,n.highlight.col,e,t,r);(t instanceof MouseEvent&&"boolean"!=typeof o&&(o=0===this.hot.selection.getLayerLevel()&&n.isSingle()),!1===o)?this.clearActiveEditor():(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(r&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t)))}closeEditor(e,t,r){this.activeEditor?this.activeEditor.finishEditing(e,t,r):r&&r(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){let e=this.hot.getSelectedRangeActive();if(!e)return!1;let t=this.hot.getCellEditor(this.cellProperties),{row:r,col:n}=e.highlight,{rowIndexMapper:o,columnIndexMapper:i}=this.hot,s=o.isHidden(this.hot.toPhysicalRow(r))||i.isHidden(this.hot.toPhysicalColumn(n));return!this.cellProperties.readOnly&&!!t&&!s}moveSelectionAfterEnter(e){if(!this.hot.getSelected())return;let 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)}#o(e){let t=this.hot.getSelectedRangeActive();if(!this.hot.isListening()||!t||t.highlight.isHeader()||nH(e))return;let{keyCode:r}=e,n=(e.ctrlKey||e.metaKey)&&!e.altKey;this.activeEditor&&(!this.activeEditor||this.activeEditor.isWaiting())||nI(r)||nO(r)||n||this.isEditorOpened()||this.openEditor("",e)}#i(e,t){t.isCell()&&(this.hot.getShortcutManager().isCtrlPressed()?this.clearActiveEditor():this.openEditor(null,e,!0))}destroy(){this.destroyed=!0,this.eventManager.destroy()}}let n9=new WeakMap;n5.getInstance=function(e,t,r){let n=n9.get(e);return n||(n=new n5(e,t,r),n9.set(e,n)),n};let n7={" ":" ","&":"&","<":"<",">":">"},n8=RegExp(Object.keys(n7).map(e=>`(${e})`).join("|"),"gi");function oe(e){let t=e.hasColHeaders(),r=e.hasRowHeaders(),n=[t?-1:0,r?-1:0,e.countRows()-1,e.countCols()-1],o=e.getData(...n),i=o.length,s=i>0?o[0].length:0,a=["<table>","</table>"],l=t?["<thead>","</thead>"]:[],h=["<tbody>","</tbody>"],d=+!!r,u=+!!t;for(let n=0;n<i;n+=1){let i=t&&0===n,a=[];for(let t=0;t<s;t+=1){let s=!i&&r&&0===t,l="";if(i)l=`<th>${e.getColHeader(t-d)}</th>`;else if(s)l=`<th>${e.getRowHeader(n-u)}</th>`;else{let r=o[n][t],{hidden:i,rowspan:s,colspan:a}=e.getCellMeta(n-u,t-d);if(!i){let e=[];if(s&&e.push(`rowspan="${s}"`),a&&e.push(`colspan="${a}"`),eX(r))l=`<td ${e.join(" ")}></td>`;else{let t=r.toString().replace(/</g,"<").replace(/>/g,">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi," ").replace(/\t/gi,"	");l=`<td ${e.join(" ")}>${t}</td>`}}}a.push(l)}let c=["<tr>",...a,"</tr>"].join("");i?l.splice(1,0,c):h.splice(-1,0,c)}return a.splice(1,0,l.join(""),h.join("")),a.join("")}function ot(e){let t=e.length,r=["<table>"];for(let n=0;n<t;n+=1){let o=e[n],i=o.length,s=[];0===n&&r.push("<tbody>");for(let e=0;e<i;e+=1){let t=o[e],r=eX(t)?"":t.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,e=>`<span style="mso-spacerun: yes">${" ".repeat(e.length-1)} </span>`).replace(/\t/gi,"	");s.push(`<td>${r}</td>`)}r.push("<tr>",...s,"</tr>"),n+1===t&&r.push("</tbody>")}return r.push("</table>"),r.join("")}let or=/<td\b[^>]*>/i,on=/<\/\s*td\s*>/i,oo=/<p.*?>/g;function oi(e){let t=[],r=0;for(;r<e.length;){let n=e.substring(r).match(or);if(!n){t.push(e.substring(r));break}let o=r+n.index,i=n[0],s=o+i.length;t.push(e.substring(r,o));let a=function(e,t){let r=1,n=t;for(;r>0;){let t=e.substring(n),o=t.match(or),i=t.match(on);if(!i)break;let s=n+i.index,a=i[0].length,l=o?n+o.index:e.length;if(l<s)r+=1,n=l+o[0].length;else{if(0==(r-=1))return{start:s,length:a};n=s+a}}return null}(e,s);if(!a){t.push(e.substring(o));break}let l=e.substring(o,a.start+a.length),h=a.start-o,d=l.substring(i.length,h).trim().replaceAll(/\n\s+/g," ").replaceAll(oo,"\n").replace(/^\n+/,"").replaceAll(/<\/(.*)>\s+$/mg,"</$1>").replace(/(<(?!br)([^>]+)>)/gi,"").replaceAll(/^ $/mg,"");t.push(`${i}${d}</td>`),r=a.start+a.length}return t.join("")}function os(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n={},o=r.createDocumentFragment(),i=r.createElement("div");o.appendChild(i);let s=e;if("string"==typeof s){let e=oi(s);i.insertAdjacentHTML("afterbegin",`${e}`),s=i.querySelector("table")}if(!s||"TABLE"!==((t=s)&&t.nodeName||""))return;let a=i.querySelector('meta[name$="enerator"]'),l=null!==s.querySelector("tbody th"),h=s.querySelector("tr"),d=h?Array.from(h.cells).reduce((e,t)=>e+t.colSpan,0)-!!l:0,u=s.tFoot&&Array.from(s.tFoot.rows)||[],c=[],g=!1,p=0,m=0;if(s.tHead){let e=Array.from(s.tHead.rows).filter(e=>{let t=null!==e.querySelector("td");return t&&c.push(e),!t});g=(p=e.length)>0,p>1?n.nestedHeaders=Array.from(e).reduce((e,t)=>{let r=Array.from(t.cells).reduce((e,t,r)=>{if(l&&0===r)return e;let{colSpan:n,innerHTML:o}=t;return e.push(n>1?{label:o,colspan:n}:o),e},[]);return e.push(r),e},[]):g&&(n.colHeaders=Array.from(e[0].children).reduce((e,t,r)=>(l&&0===r||e.push(t.innerHTML),e),[]))}c.length&&(n.fixedRowsTop=c.length),u.length&&(n.fixedRowsBottom=u.length);let f=[...c,...Array.from(s.tBodies).reduce((e,t)=>(Array.from(t.rows).forEach(t=>{e.push(t)}),e),[]),...u],y=Array(m=f.length);for(let e=0;e<m;e++)y[e]=Array(d);let b=[],C=[];for(let e=0;e<m;e++){let t=Array.from(f[e].cells),r=t.length;for(let n=0;n<r;n++){let r=t[n],{nodeName:o,innerHTML:i,rowSpan:s,colSpan:l}=r,h=y[e].findIndex(e=>void 0===e);if("TD"===o){if(s>1||l>1){for(let t=e;t<e+s;t++)if(t<m)for(let e=h;e<h+l;e++)y[t][e]=null;let t=r.getAttribute("style");t&&t.includes("mso-ignore:colspan")||b.push({col:h,row:e,rowspan:s,colspan:l})}let t="";t=a&&/excel/gi.test(a.content)?i.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):i.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),y[e][h]=t.replace(n8,e=>n7[e])}else C.push(i)}}return b.length&&(n.mergeCells=b),C.length&&(n.rowHeaders=C),y.length&&(n.data=y),n}function oa(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=typeof e;if("number"===r)return!isNaN(e)&&isFinite(e);if("string"===r){if(0===e.length)return!1;if(1===e.length)return/\d/.test(e);let r=Array.from(new Set([".",...t])).map(e=>`\\${e}`).join("|");return RegExp(`^[+-]?(((${r})?\\d+((${r})\\d+)?(e[+-]?\\d+)?)|(0x[a-f\\d]+))$`,"i").test(e.trim())}return"object"===r&&!!e&&"number"==typeof e.valueOf()&&!(e instanceof Date)}function ol(e){return oa(e,[","])}function oh(e,t){return"."===t&&"string"==typeof e&&/^[+-]?[1-9]\d{0,2}(,\d{3})+$/.test(e.trim())}function od(e,t,r){let n=-1;for("function"==typeof t?(r=t,t=e):n=e-1;++n<=t&&!1!==r(n););}function ou(e,t,r){let n=e+1;for("function"==typeof t&&(r=t,t=0);--n>=t&&!1!==r(n););}function oc(e,t){return parseInt(e*(t=isNaN(t=parseInt(t.toString().replace("%",""),10))?0:t)/100,10)}function og(e,t,r){return Math.min(e,t)===e?t:Math.max(e,r)===e?r:e}function op(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{decimalSeparator:r}=t,n=e.trim();if(oh(e,r))return parseFloat(n.replace(/,/g,""));let o=n.replace(",",".");return!1===isNaN(parseFloat(o))?parseFloat(o):null}function om(e){return Number.isInteger(e)&&e>=0}let of=new Map([["asc",[-1,1]],["desc",[1,-1]]]),oy=e=>`The priority '${e}' is already declared in a map.`,ob=e=>`The priority '${e}' is not a number.`,oC=e=>`The id '${e}' is already declared in a map.`;function ow(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new Map;function r(){return[...t]}function n(e){return t.has(e)}return e=ny(e)?e:oC,{addItem:function(r,o){n(r)&&t_(e(r)),t.set(r,o)},clear:function(){t.clear()},getId:function(e){let[t]=r().find(t=>{let[r,n]=t;return e===n&&r})||[null];return t},getItem:function(e){return t.get(e)},getItems:r,getValues:function(){return[...t.values()]},hasItem:n,removeItem:function(e){return t.delete(e)}}}let oS=e=>`'${e}' value is already declared in a unique set.`,ov=e=>`There is already registered "${e}" plugin.`,oR=function(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=new Map;return e=ny(e)?e:oy,t=ny(t)?t:ob,{addItem:function(n,o){oa(n)||t_(t(n)),r.has(n)&&t_(e(n)),r.set(n,o)},getItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"asc",[t,n]=of.get(e)||of.get("asc");return[...r].sort((e,r)=>e[0]<r[0]?t:n).map(e=>e[1])}}}({errorPriorityExists:e=>`There is already registered plugin on priority "${e}".`,errorPriorityNaN:e=>`The priority "${e}" is not a number.`}),oE=function(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new Set;return e=ny(e)?e:oS,{addItem:function(r){t.has(r)&&t_(e(r)),t.add(r)},clear:function(){t.clear()},getItems:function(){return[...t]}}}({errorItemExists:ov}),oT=ow({errorIdExists:ov});function oA(){return[...oR.getItems(),...oE.getItems()]}function oM(e){let t=e7(e);return oT.getItem(t)}function oN(e,t,r){var n,o,i,s,a,l;let h;[e,t,r]=(n=e,o=t,i=r,"function"==typeof n&&(n=(o=n).PLUGIN_KEY,i=o.PLUGIN_PRIORITY),[n,o,i]),void 0===oM(e)&&(s=e,a=t,l=r,h=e7(s),oT.hasItem(h)&&t_(ov(h)),void 0===l?oE.addItem(h):oR.addItem(l,h),oT.addItem(h,a))}let{register:oI,getItem:ox,hasItem:oO,getNames:o_,getValues:ok}=nj("renderers");function oH(e){return"function"==typeof e?e:(oO(e)||t_(`No registered renderer found under "${e}" name`),ox(e))}function oL(e,t){"string"!=typeof e&&(e=(t=e).RENDERER_TYPE),oI(e,t)}let{register:oP,getItem:oD,hasItem:oF,getNames:oB,getValues:oV}=nj("validators");function oU(e){return"function"==typeof e?e:(oF(e)||t_(`No registered validator found under "${e}" name`),oD(e))}function oz(e,t){"string"!=typeof e&&(e=(t=e).VALIDATOR_TYPE),oP(e,t)}let oW=class{#s;#a;#l;#h;#d;#u;#c;#g;#p=[null,null];#m=[null,null];#f=null;#y=null;constructor(e,t,r,n,o,i,s=null){this.#s=r,this.#a=t,this.#l=o,this.#h=i,this.#d=s,this.#u=n,this.#c=e,this.registerEvents()}registerEvents(){this.#u.addEventListener(this.#l.holder,"contextmenu",e=>this.onContextMenu(e)),this.#u.addEventListener(this.#l.TABLE,"mouseover",e=>this.onMouseOver(e)),this.#u.addEventListener(this.#l.TABLE,"mouseout",e=>this.onMouseOut(e));let e=()=>{this.#u.addEventListener(this.#l.holder,"touchstart",e=>this.onTouchStart(e)),this.#u.addEventListener(this.#l.holder,"touchend",e=>this.onTouchEnd(e)),this.#u.addEventListener(this.#l.holder,"touchmove",e=>this.#b(e)),this.momentumScrolling||(this.momentumScrolling={}),this.#u.addEventListener(this.#l.holder,"scroll",()=>{this.#C(),clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||this.#s.getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout(()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,this.#s.getSetting("onAfterMomentumScroll"))},200)})},t=()=>{this.#u.addEventListener(this.#l.holder,"mouseup",e=>this.onMouseUp(e)),this.#u.addEventListener(this.#l.holder,"mousedown",e=>this.onMouseDown(e))};rs()?e():(t0()&&e(),t())}selectedCellWasTouched(e){let t=this.parentCell(e).coords;if(this.#g&&t){let[e,r]=[t.row,this.#g.from.row],[n,o]=[t.col,this.#g.from.col];return e===r&&n===o}return!1}parentCell(e){let t={},r=rv(e,["TD","TH"],this.#l.TABLE);return r?(t.coords=this.#l.getCoords(r),t.TD=r):rx(e,"wtBorder")&&rx(e,"current")?(t.coords=this.#h.getFocusSelection().cellRange.highlight,t.TD=this.#l.getCell(t.coords)):rx(e,"wtBorder")&&rx(e,"area")&&this.#h.getAreaSelection().cellRange&&(t.coords=this.#h.getAreaSelection().cellRange.to,t.TD=this.#l.getCell(t.coords)),t}onMouseDown(e){let t=this.#a.rootDocument.activeElement,r=nv(rf,e.target),n=e.target;if(!["TD","TH"].includes(t.nodeName)&&(n===t||r(0)===t||r(1)===t))return;let o=this.parentCell(n);rx(n,"corner")?this.#s.getSetting("onCellCornerMouseDown",e,n):o.TD&&this.#s.has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,o.coords,o.TD),(0===e.button||this.touchApplied)&&o.TD&&(this.#m[0]=o.TD,clearTimeout(this.#p[0]),this.#p[0]=setTimeout(()=>{this.#m[0]=null},1e3))}onContextMenu(e){if(this.#C(),this.#s.has("onCellContextMenu")){let t=this.parentCell(e.target);t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!this.#s.has("onCellMouseOver"))return;let t=this.#l.TABLE,r=rv(e.target,["TD","TH"],t),n=this.#d||this;r&&r!==n.lastMouseOver&&rE(r,t)&&(n.lastMouseOver=r,this.callListener("onCellMouseOver",e,this.#l.getCoords(r),r))}onMouseOut(e){if(!this.#s.has("onCellMouseOut"))return;let t=this.#l.TABLE,r=rv(e.target,["TD","TH"],t),n=rv(e.relatedTarget,["TD","TH"],t),o=this.#d||this;r&&r!==n&&rE(r,t)&&(this.callListener("onCellMouseOut",e,this.#l.getCoords(r),r),null===n&&(o.lastMouseOver=null))}onMouseUp(e){let t=this.parentCell(e.target);t.TD&&this.#s.has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,t.coords,t.TD),(0===e.button||this.touchApplied)&&(t.TD===this.#m[0]&&t.TD===this.#m[1]?(rx(e.target,"corner")?this.callListener("onCellCornerDblClick",e,t.coords,t.TD):this.callListener("onCellDblClick",e,t.coords,t.TD),this.#m[0]=null,this.#m[1]=null):t.TD===this.#m[0]&&(this.#m[1]=t.TD,clearTimeout(this.#p[1]),this.#p[1]=setTimeout(()=>{this.#m[1]=null},500)))}onTouchStart(e){this.#g=this.#h.getFocusSelection().cellRange,this.touchApplied=!0,this.onMouseDown(e),this.#w(e)}onTouchEnd(e){this.#C();let t=e.target,r=this.parentCell(t)?.coords,n=eq(r)&&r.row>=0&&r.col>=0;e.cancelable&&n&&this.#s.getSetting("isDataViewInstance")&&(ra()&&(t8()||rt())&&this.selectedCellWasTouched(t)&&!["A","BUTTON","INPUT"].includes(t.tagName)?e.preventDefault():this.selectedCellWasTouched(t)||e.preventDefault()),this.onMouseUp(e),this.touchApplied=!1}#w(e){this.#C();let t=e.touches[0];t&&(this.#y={x:t.clientX,y:t.clientY},this.#f=setTimeout(()=>{this.#f=null,this.#y=null,this.#m[0]=null,this.#m[1]=null,clearTimeout(this.#p[0]),clearTimeout(this.#p[1]);let r=e.target,n=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY,screenX:t.screenX,screenY:t.screenY});r.dispatchEvent(n)},500))}#C(){null!==this.#f&&(clearTimeout(this.#f),this.#f=null),this.#y=null}#b(e){if(null===this.#f||null===this.#y)return;let t=e.touches[0];if(!t)return void this.#C();let r=Math.abs(t.clientX-this.#y.x),n=Math.abs(t.clientY-this.#y.y);(r>10||n>10)&&this.#C()}callListener(e,t,r,n){let o=this.#s.getSettingPure(e);o&&o(t,r,n,this.#c())}destroy(){clearTimeout(this.#p[0]),clearTimeout(this.#p[1]),this.#C(),this.#u.destroy()}},oG=class{offset;total;countTH;constructor(e,t,r){this.offset=e,this.total=t,this.countTH=r}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))}},o$=class{offset;total;countTH;constructor(e,t,r){this.offset=e,this.total=t,this.countTH=r}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))}};class oY{currentSize=0;nextSize=0;currentOffset=0;nextOffset=0;setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}class oj{size=new oY;workingSpace=0;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()}}class oq{order=[];#S=new Set;constructor(e,t){const r=Array(t),n=this.#S;for(let o=0;o<t;o++){const t=e+o;r[o]=t,n.add(t)}this.order=r}get length(){return this.order.length}has(e){return this.#S.has(e)}get(e){return e<this.order.length?this.order[e]:-1}remove(e){let t=this.order.indexOf(e);t>-1&&(this.order.splice(t,1),this.#S.delete(e))}prepend(e){this.order.unshift(e),this.#S.add(e);let t=this.order.pop();return this.#S.delete(t),t}}class oK{sizeSet;constructor(e){this.sizeSet=e}diff(){let{sizeSet:e}=this,{currentSize:t,nextSize:r,currentOffset:n,nextOffset:o}=e.getViewSize(),i=Math.max(r,t);if(0===i)return[];let s=new oq(n,t),a=!e.isShared()||e.isPlaceOn(2),l=[];for(let e=0;e<i;e++){let t=s.get(e),n=e<r?o+e:-1;if(-1===n)l.push([1,t]);else if(-1===t)a?l.push([2,n]):l.push([3,n]);else if(n>t)s.has(n)&&(s.remove(n),r<=s.length&&(i-=1)),l.push([5,n,t]);else if(n<t){let e=s.prepend(n);l.push([4,n,t,e])}else l.push([0,n])}return l}}class oX{leads=[];leadIndex=0;constructor(e){this.orderView=e}applyCommand(e){let{rootNode:t}=this.orderView,[r,n,o,i]=e,s=this.orderView.nodesPool(n);switch(this.orderView.collectedNodes.push(s),r){case 3:t.insertBefore(s,t.firstChild);break;case 2:t.appendChild(s);break;case 4:t.insertBefore(s,this.orderView.nodesPool(o)),t.removeChild(this.orderView.nodesPool(i));break;case 5:t.replaceChild(s,this.orderView.nodesPool(o));break;case 1:t.removeChild(s)}}start(){this.orderView.collectedNodes.length=0,this.leads=this.orderView.viewDiffer.diff(),this.leadIndex=0}render(){this.leadIndex<this.leads.length&&(this.applyCommand(this.leads[this.leadIndex]),this.leadIndex+=1)}end(){let{leads:e}=this;for(;this.leadIndex<e.length;)this.applyCommand(e[this.leadIndex]),this.leadIndex+=1}}class oQ{visualIndex=0;constructor(e){this.orderView=e}getRenderedChildCount(){let{rootNode:e,sizeSet:t}=this.orderView,r=0;if(this.orderView.isSharedViewSet()){let n=e.firstElementChild;for(;n;){if(n.tagName===this.orderView.childNodeType)r+=1;else if(t.isPlaceOn(1))break;n=n.nextElementSibling}}else r=e.childElementCount;return r}start(){this.orderView.collectedNodes.length=0,this.visualIndex=0;let{rootNode:e,sizeSet:t}=this.orderView,r=this.orderView.isSharedViewSet(),{nextSize:n}=t.getViewSize(),o=this.getRenderedChildCount();for(;o<n;){let n=this.orderView.nodesPool();!r||r&&t.isPlaceOn(2)?e.appendChild(n):e.insertBefore(n,e.firstChild),o+=1}let i=r&&t.isPlaceOn(1);for(;o>n;)e.removeChild(i?e.firstChild:e.lastChild),o-=1}render(){let{rootNode:e,sizeSet:t}=this.orderView,r=this.visualIndex;this.orderView.isSharedViewSet()&&t.isPlaceOn(2)&&(r+=t.sharedSize.nextSize);let n=e.childNodes[r];if(n.tagName!==this.orderView.childNodeType){let t=this.orderView.nodesPool();e.replaceChild(t,n),n=t}this.orderView.collectedNodes.push(n),this.visualIndex+=1}end(){}}class oZ{rootNode;nodesPool;sizeSet=new oj;collectedNodes=[];viewDiffer=new oK(this.sizeSet);childNodeType;rendererAdapter;constructor(e,t,r){this.rootNode=e,this.nodesPool=t,this.childNodeType=r,this.rendererAdapter=function(e){return re()?new oQ(e):new oX(e)}(this)}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(){let e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}start(){this.rendererAdapter.start()}render(){this.rendererAdapter.render()}end(){this.rendererAdapter.end()}}class oJ extends oZ{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}}class o0{nodeType;pool=new Map;constructor(e){this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(e,t){if(re())return this.rootDocument.createElement(this.nodeType);let r="number"==typeof t?1048576*e+t:e,n=this.pool.get(r);return void 0!==n||(n=this.rootDocument.createElement(this.nodeType),this.pool.set(r,n)),n}}class o1{nodesPool=null;nodeType;rootNode;table=null;renderedNodes=0;constructor(e,t){this.nodesPool="string"==typeof e?new o0(e):null,this.nodeType=e,this.rootNode=t}setTable(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}render(){}}class o2 extends o1{orderViews=new WeakMap;sourceRowIndex=0;constructor(){super("TH")}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new oJ(e,e=>this.nodesPool.obtain(this.sourceRowIndex,e),this.nodeType),this.orderViews.set(e,t)),t}render(){let{rowsToRender:e,rowHeaderFunctions:t,rowHeadersCount:r,rows:n,cells:o}=this.table;for(let i=0;i<e;i++){let e=this.table.renderedRowToSource(i),s=n.getRenderedNode(i);this.sourceRowIndex=e;let a=this.obtainOrderView(s),l=o.obtainOrderView(s);a.appendView(l).setSize(r).setOffset(0).start();for(let n=r-1;n>=0;n--){a.render();let r=a.getCurrentNode();r.className="",r.removeAttribute("style"),rH(r,[RegExp("aria-(.*)"),/role/]),this.table.isAriaEnabled()&&rk(r,[tu(),ty(),tT(n+1),ta(-1)]),t[n](e,r,n)}a.end()}}}class o3 extends o1{orderView;constructor(e){super("TR",e),this.orderView=new oZ(e,e=>this.nodesPool.obtain(e),this.nodeType)}getRenderedNode(e){return this.orderView.getNode(e)}render(){let{columnHeadersCount:e}=this.table;this.table.isAriaEnabled()&&rk(this.rootNode,[tc()]),this.orderView.setSize(e).setOffset(0).start();for(let t=0;t<e;t++){this.orderView.render();let e=this.orderView.getCurrentNode();this.table.isAriaEnabled()&&rk(e,[tp(),tE(t+1)])}this.orderView.end()}}class o6 extends o1{orderViews=new WeakMap;sourceRowIndex=0;constructor(){super("TH")}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new oZ(e,e=>this.nodesPool.obtain(this.sourceRowIndex,e),this.nodeType),this.orderViews.set(e,t)),t}render(){let{columnHeadersCount:e,columnHeaderFunctions:t,columnsToRender:r,rowHeadersCount:n,columnHeaderRows:o}=this.table,i=r+n;for(let r=0;r<e;r++){let e=o.getRenderedNode(r);this.sourceRowIndex=r;let s=this.obtainOrderView(e);s.setSize(i).setOffset(0).start();for(let e=0;e<i;e++){s.render();let o=e-n,i=this.table.renderedColumnToSource(o),a=s.getCurrentNode();a.className="",a.removeAttribute("style"),rH(a,[RegExp("aria-(.*)"),/role/]),this.table.isAriaEnabled()&&rk(a,[tT(e+1),ta(-1),tg(),...o>=0?[tf()]:[td(),tb("Select whole grid")]]),t[r](i,a,r)}s.end()}}}let o4=!1;class o5 extends o1{orderView;constructor(e){super("COL",e),this.orderView=new oZ(e,e=>this.nodesPool.obtain(e),this.nodeType)}render(){let{columnsToRender:e,rowHeadersCount:t}=this.table,r=e+t;!o4&&e>1e3&&(o4=!0,rg(e$`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
|
|
55
55
|
Consider limiting the number of rendered columns by specifying the table width and/or\x20
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
Cell type must be an object or a string mapped to an object registered by
|
|
63
63
|
"Handsontable.cellTypes.registerCellType" method`),hr(e)}function ha(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);let{editor:r,renderer:n,validator:o}=t;r&&n3(e,r),n&&oL(e,n),o&&oz(e,o),ht(e,t)}function hl(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,n="string"==typeof t.type?hs(t.type):t.type;if(e._automaticallyAssignedMetaProps&&tW(t,(t,r)=>void e._automaticallyAssignedMetaProps.delete(r)),!tU(n))return;r!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);let o={};tW(n,(t,n)=>{"CELL_TYPE"!==n&&(r._automaticallyAssignedMetaProps?.has(n)||!tq(r,n))&&(o[n]=t,e._automaticallyAssignedMetaProps?.add(n))}),tL(e,o)}function hh(e,t){e()||t_(`Assertion failed: ${t}`)}function hd(e){return null==e}let hu=()=>({_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,dataProvider:void 0,dataDotNotation:!0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",timeFormat:"h:mm:ss a",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dialog:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,emptyDataState:!1,enterBeginsEditing:!0,enterCommits:!0,enterMoves:{col:0,row:1},exportFile:void 0,fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,filterSelectedItems:!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,initialState:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(e){let t,r,n,o=!!this.getSettings().dataSchema,i=this.getSchema(),s=this.colToProp(e);for(t=0,r=this.countRows();t<r;t++)if(!1===eX(n=this.getDataAtCell(t,e))){if("object"==typeof n){if(!1===tV(i[s],n))return!1;continue}if(o&&i[s]===n)continue;return!1}return!0},isEmptyRow(e){let t,r,n,o=!!this.getSettings().dataSchema,i=this.getSchema();for(t=0,r=this.countCols();t<r;t++)if(!1===eX(n=this.getDataAtCell(e,t))){let e=this.colToProp(t);if("object"==typeof n){if(!1===tV(i[e],n))return!1;continue}if(o&&i[e]===n)continue;return!1}return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",loading:!1,notification:!1,manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,maxSelections:void 0,mergeCells:!1,minCols:0,minRowHeights:void 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,pagination:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:!1,renderAllColumns:!1,renderer:void 0,valueFormatter:void 0,valueParser:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,searchInput:!0,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,sourceSortFunction:void 0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,textEllipsis:!1,themeName:void 0,theme:void 0,injectCoreCss:!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,sourceDataValidator:void 0,sourceDataWarningMessage:void 0,valueGetter:void 0,valueSetter:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",viewportColumnRenderingThreshold:0,viewportRowRenderingThreshold:0,visibleRows:10,width:void 0,wordWrap:!0,sanitizer:void 0,parsePastedValue:!1});class hc{metaCtor=class{};meta;constructor(e){this.meta=this.metaCtor.prototype,tL(this.meta,hu()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){tL(this.meta,e),hl(this.meta,{...e,type:e.type??this.meta.type},e)}}class hg{meta;constructor(e){const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){tL(this.meta,e),hl(this.meta,e,e)}}class hp{valueFactory;data=[];index=[];holes=new Set;constructor(e){this.valueFactory=e}obtain(e){let t;hh(()=>om(e),"Expecting an unsigned number.");let r=this._getStorageIndexByKey(e);if(r>=0)void 0===(t=this.data[r])&&(t=this.valueFactory(e),this.data[r]=t);else if(t=this.valueFactory(e),this.holes.size>0){let r=this.holes.values().next().value;this.holes.delete(r),this.data[r]=t,this.index[e]=r}else this.data.push(t),this.index[e]=this.data.length-1;return t}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;hh(()=>om(e)||hd(e),"Expecting an unsigned number or null/undefined argument.");let r=[],n=this.data.length;for(let e=0;e<t;e++)r.push(n+e),this.data.push(void 0);let o=hd(e)?this.index.length:e;this.index=[...this.index.slice(0,o),...r,...this.index.slice(o)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;hh(()=>om(e)||hd(e),"Expecting an unsigned number or null/undefined argument.");let r=this.index.splice(hd(e)?this.index.length-t:e,t);for(let e=0;e<r.length;e++){let t=r[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(){let e=[];for(let t=0;t<this.data.length;t++){let r=this._getKeyByStorageIndex(t);-1!==r&&void 0!==this.data[t]&&e.push([r,this.data[t]])}let t=0;return{next:()=>{if(t<e.length){let r=e[t];return t+=1,{value:r,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()}}let hm=["data","width"];class hf{globalMeta;metas=new hp(()=>this._createMeta());constructor(e){this.globalMeta=e,this.metas=new hp(()=>this._createMeta())}updateMeta(e,t){let r=this.getMeta(e);tL(r,t),hl(r,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 r(){}tH(r,e);for(let e=0;e<t.length;e++)r.prototype[t[e]]=void 0;return r}(this.globalMeta.getMetaConstructor(),hm).prototype}}class hy{columnMeta;metas=new hp(()=>this._createRow());constructor(e){this.columnMeta=e}updateMeta(e,t,r){let n=this.getMeta(e,t);tL(n,r),hl(n,r)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let r=0;r<this.metas.size();r++)this.metas.obtain(r).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let r=0;r<this.metas.size();r++)this.metas.obtain(r).remove(e,t)}getMeta(e,t,r){let n=this.metas.obtain(e).obtain(t);return void 0===r?n:n[r]}setMeta(e,t,r,n){let o=this.metas.obtain(e).obtain(t);o._automaticallyAssignedMetaProps?.delete(r),o[r]=n}removeMeta(e,t,r){let n=this.metas.obtain(e).obtain(t);delete n[r]}getMetas(){let e=[],t=Array.from(this.metas.values());for(let r=0;r<t.length;r++)eq(t[r])&&e.push(...t[r].values());return e}getMetasAtRow(e){hh(()=>om(e),"Expecting an unsigned number.");let t=new Map(this.metas);return t.has(e)?Array.from(t.get(e)).sort((e,t)=>{let[r]=e,[n]=t;return r-n}).map(e=>{let[,t]=e;return t}):[]}clearCache(){this.metas.clear()}_createRow(){return new hp(e=>this._createMeta(e))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}class hb{constructor(e,t={},r=[]){this.hot=e,this.globalMeta=new hc(e),this.tableMeta=new hg(this.globalMeta),this.columnMeta=new hf(this.globalMeta),this.cellMeta=new hy(this.columnMeta),r.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,r){let n=this.cellMeta.getMeta(e,t);return n.visualRow=r.visualRow,n.visualCol=r.visualColumn,n.row=e,n.col=t,r.skipMetaExtension||this.runLocalHooks("afterGetCellMeta",n),n}getCellMetaKeyValue(e,t,r){return"string"!=typeof r&&t_("The passed cell meta object key is not a string"),this.cellMeta.getMeta(e,t,r)}setCellMeta(e,t,r,n){this.cellMeta.setMeta(e,t,r,n)}updateCellMeta(e,t,r){this.cellMeta.updateMeta(e,t,r)}removeCellMeta(e,t,r){this.cellMeta.removeMeta(e,t,r)}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()}}tB(hb,sy);class hC{metaManager;metaSyncMemo=new Map;constructor(e){var t=this;this.metaManager=e,e.addLocalHook("afterGetCellMeta",function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.extendCellMeta(...r)}),nG.getSingleton().add("beforeRender",e=>{e&&this.metaSyncMemo.clear()},this.metaManager.hot)}extendCellMeta(e){let{row:t,col:r}=e;if(this.metaSyncMemo.get(t)?.has(r))return;let{visualRow:n,visualCol:o}=e,i=this.metaManager.hot,s=i.colToProp(o);e.prop=s,i.runHooks("beforeGetCellMeta",n,o,e);let a=tq(e,"type")?e.type:null,l=ny(e.cells)?e.cells(t,r,s):null;a&&(l?l.type=l.type??a:l={type:a}),l&&this.metaManager.updateCellMeta(t,r,l),i.runHooks("afterGetCellMeta",n,o,e),this.metaSyncMemo.has(t)||this.metaSyncMemo.set(t,new Set),this.metaSyncMemo.get(t).add(r)}}let hw=new WeakSet,hS=new WeakSet;class hv{metaManager;usageTracker=new Set;propDescriptors=new Map([["ariaTags",{initOnly:!0}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e&&t_("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`."),this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart")&&t_("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["correctFormat",{onChange(){hw.has(this.metaManager.hot)||(hw.add(this.metaManager.hot),rp("The `correctFormat` option is deprecated and will be removed in the next major release.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/"))}}],["datePickerConfig",{onChange(){hS.has(this.metaManager.hot)||(hS.add(this.metaManager.hot),rp("The `datePickerConfig` option is deprecated and will be removed in the next major release.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/"))}}],["layoutDirection",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]]);constructor(e){this.metaManager=e,this.extendMetaProps()}#eX=(e,t,r)=>{r||t_(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)};extendMetaProps(){this.propDescriptors.forEach((e,t)=>{let{initOnly:r,target:n,onChange:o}=e,i="string"==typeof n,s=i?n:t,a=`_${s}`;this.metaManager.globalMeta.meta[a]=this.metaManager.globalMeta.meta[s],o?(this.installPropWatcher(t,a,o),i&&this.installPropWatcher(n,a,o)):r&&(this.installPropWatcher(t,a,this.#eX),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(t))})}installPropWatcher(e,t,r){let n=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(o){let i=!n.usageTracker.has(e);n.usageTracker.add(e),r.call(n,e,o,i),this[t]=o},enumerable:!0,configurable:!0})}}let hR=class{hot;data;dataType="array";colToProp=()=>{};propToCol=()=>{};constructor(e,t=[]){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){let t=[];return eH(this.data,(r,n)=>{let o=this.getAtCell(n,e);t.push(o)}),t}getAtRow(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=void 0===t&&void 0===r,{dataDotNotation:i}=this.hot.getSettings(),s=null,a=null;if(Array.isArray(s=this.modifyRowData(e)))a=[],o?s.forEach((t,r)=>{a[r]=this.getAtPhysicalCell(e,r,s)}):od(t,r,r=>{a[r-t]=this.getAtPhysicalCell(e,r,s)});else if(tU(s)||ny(s))if(a=n?[]:{},!o||n){let o=this.countFirstRowKeys()-1;od(0,o,l=>{let h=this.colToProp(l);if(l>=(t||0)&&l<=(r||o)&&!Number.isInteger(h)){let t=this.getAtPhysicalCell(e,h,s);n?a.push(t):i?t$(a,h,t):a[h]=t}})}else tW(s,(t,r)=>{let n=this.getAtPhysicalCell(e,r,s);i?t$(a,r,n):a[r]=n});return a}setAtCell(e,t,r){if(e>=this.countRows()||t>=this.countFirstRowKeys())return;if(this.hot.hasHook("modifySourceData")){let n=tj(r);this.hot.runHooks("modifySourceData",e,t,n,"set"),n.isTouched()&&(r=n.value)}if(["__proto__","constructor","prototype"].includes(e))return;let n=this.modifyRowData(e);Number.isInteger(t)?n[t]=r:t$(n,t,r)}getAtPhysicalCell(e,t,r){let n=null;if(r)if("string"==typeof t){let{dataDotNotation:e}=this.hot.getSettings();n=e?tG(r,t):r[t]}else n="function"==typeof t?t(r):r[t];if(this.hot.hasHook("modifySourceData")){let r=tj(n);this.hot.runHooks("modifySourceData",e,t,r,"get"),r.isTouched()&&(n=r.value)}return n}getAtCell(e,t){let r=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),r)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,o=null,i=null,s=null,a=null;null===e||null===t?(n=!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));let l=[];return od(o,s,e=>{l.push(n?this.getAtRow(e,void 0,void 0,r):this.getAtRow(e,i,a,r))}),l}getCopyable(e,t){let r=this.propToCol(t);return this.hot.getCellMeta(e,r).copyable?this.getAtCell(this.hot.toPhysicalRow(e),r):""}countRows(){if(this.hot.hasHook("modifySourceLength")){let e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return sp(this.data)}destroy(){this.data=null,this.hot=null}},hE=/^(\r\n|\n\r|\r|\n)/,hT=/^[^\t\r\n]+/,hA=/^\t/;function hM(e){let t,r,n,o,i,s="";for(t=0,r=e.length;t<r;t+=1){for(n=0,o=e[t].length;n<o;n+=1)n>0&&(s+=" "),"string"==typeof(i=e[t][n])?i.indexOf("\n")>-1?s+=`"${i.replace(/"/g,'""')}"`:s+=i:null==i?s+="":s+=i;t!==r-1&&(s+="\n")}return s}function hN(e,t){let{instance:r,visualRow:n,visualCol:o,valueSetter:i}=t;return ny(i)?i.call(r,e,n,o,t):e}function hI(e,t){let{instance:r,visualRow:n,visualCol:o,valueGetter:i}=t;return ny(i)?i.call(r,e,n,o,t):e}class hx{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}hot;metaManager;tableMeta;dataSource;duckSchema;colToPropCache;propToColCache;constructor(e,t,r){this.hot=e,this.metaManager=r,this.tableMeta=r.getTableMeta(),this.dataSource=t,this.refreshDuckSchema(),this.createMap()}createMap(){let e,t=this.getSchema();void 0===t&&t_("trying to create `columns` definition but you didn't provide `schema` nor `data`");let r=this.tableMeta.columns;if(this.colToPropCache=[],this.propToColCache=new Map,r){let n=0,o=0,i=!1;if("function"==typeof r){let e=tY(t);n=e>0?e:this.countFirstRowKeys(),i=!0}else n=Math.min(this.tableMeta.maxCols,r.length);for(e=0;e<n;e++){let t=i?r(e):r[e];if(tU(t)){if(void 0!==t.data){let r=i?o:e;this.colToPropCache[r]=t.data,this.propToColCache.set(t.data,r)}o+=1}}}else this.recursiveDuckColumns(t)}countFirstRowKeys(){return sp(this.dataSource)}recursiveDuckColumns(e,t,r){let n,o=t,i=r;return void 0===o&&(o=0,i=""),"object"!=typeof e||Array.isArray(e)||tW(e,(e,t)=>{null===e?(n=i+t,this.colToPropCache.push(n),this.propToColCache.set(n,o),o+=1):o=this.recursiveDuckColumns(e,o,`${t}.`)}),o}colToProp(e){if(!1===Number.isInteger(e))return e;let t=this.hot.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&eq(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){let t=this.propToColCache.get(e);if(eq(t))return this.hot.toVisualColumn(t);let r=this.hot.toVisualColumn(e);return null===r?e:r}getSchema(){let e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?tk(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:r,mode:n="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.hot.countSourceRows(),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,r)||null===i)return{delta:0};let l=this.tableMeta.maxRows,h=this.getSchema().length,d=[];for(;s<t&&o+s<l;){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=tD(this.getSchema()):(e=[],od(h-1,()=>e.push(null))):"function"===this.hot.dataType?e=this.tableMeta.dataSchema(a+s):tP(e={},this.getSchema()),d.push(e),s+=1}this.hot.rowIndexMapper.insertIndexes(a,s),"below"===n&&(i=Math.min(i+1,o)),this.spliceData(i,0,d);let u=this.hot.toVisualRow(i);return this.hot.countSourceRows()===d.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),s>0&&(null==e?this.metaManager.createRow(null,s):"auto"!==r&&this.metaManager.createRow(i,t)),this.hot.runHooks("afterCreateRow",u,s,r),{delta:s,startPhysicalIndex:i}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:r,mode:n="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.hot.isColumnModificationAllowed()||t_("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.");let o=this.dataSource,i=this.tableMeta.maxCols,s=this.hot.countSourceCols(),a=this.hot.countCols(),l=this.hot.countSourceRows(),h="number"==typeof e&&e<=s?e:a;if(!1===this.hot.runHooks("beforeCreateCol",h,t,r))return{delta:0};let d=h<a?this.hot.toPhysicalColumn(h):s,u="end"===n?Math.min(d+1,s):d,c=0;for(let e=u;c<t&&a+c<i;e++){if("number"!=typeof h||h>=a+c)if(l>0)for(let e=0;e<l;e+=1)void 0===o[e]&&(o[e]=[]),o[e].push(null);else o.push([null]);else for(let t=0;t<l;t++)o[t].splice(e,0,null);c+=1}return c>0&&(null==e?this.metaManager.createColumn(null,c):"auto"!==r&&this.metaManager.createColumn(u,t)),this.hot.columnIndexMapper.insertIndexes(h,c,n),this.hot.runHooks("afterCreateCol",this.hot.toVisualColumn(u),c,r),this.refreshDuckSchema(),{delta:c,startPhysicalIndex:u}}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0,n=Number.isInteger(e)?e:-t,o=this.visualRowsToPhysical(n,t),i=this.hot.countSourceRows();if(n=(i+n)%i,!1===this.hot.runHooks("beforeRemoveRow",n,o.length,o,r))return!1;let s=o.length;if(this.filterData(n,s,o),n<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(o);let e=eq(this.tableMeta.columns)||eq(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",n,s,o,r),!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;("object"===this.hot.dataType||this.tableMeta.columns)&&t_("cannot remove column with object data source or columns option specified");let n="number"!=typeof e?-t:e;n=(this.hot.countCols()+n)%this.hot.countCols();let o=this.visualColumnsToPhysical(n,t),i=o.slice(0).sort((e,t)=>t-e);if(!1===this.hot.runHooks("beforeRemoveCol",n,t,o,r))return!1;let s=!0,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,r=this.hot.countSourceRows();e<r;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 n<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(o),this.tableMeta.rowHeaders||0!==this.hot.columnIndexMapper.getNotTrimmedIndexesLength()||this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",n,t,o,r),this.refreshDuckSchema(),!0}spliceCol(e,t,r){for(var n=arguments.length,o=Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];let s=this.hot.getDataAtCol(e),a=s.slice(t,t+r);eI(o,s.slice(t+r));let l=0;for(;l<r;)o.push(null),l+=1;return eN(o),this.hot.populateFromArray(t,e,o,null,null,"spliceCol"),a}spliceRow(e,t,r){for(var n=arguments.length,o=Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];let s=this.hot.getSourceDataAtRow(e),a=s.slice(t,t+r);eI(o,s.slice(t+r));let l=0;for(;l<r;)o.push(null),l+=1;return this.hot.populateFromArray(e,t,[o],null,null,"spliceRow"),a}spliceData(e,t,r){if(!1!==this.hot.runHooks("beforeDataSplice",e,t,r)){let t=[...this.dataSource.slice(0,e),...r,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach(e=>this.dataSource.push(e))}}filterData(e,t,r){let n=this.hot.runHooks("filterData",e,t,r);!1===Array.isArray(n)&&(n=this.dataSource.filter((e,t)=>-1===r.indexOf(t))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,n)}get(e,t){let r=this.hot.toPhysicalRow(e),n=this.dataSource[r],o=this.hot.runHooks("modifyRowData",r);n=isNaN(o)?o:n;let{dataDotNotation:i}=this.hot.getSettings(),s=null;if(n&&n.hasOwnProperty&&tq(n,t))s=n[t];else if(i&&"string"==typeof t&&t.indexOf(".")>-1){let e=n;if(!e)return null;let r=t.split(".");for(let t=0,n=r.length;t<n;t++)if(void 0===(e=e[r[t]]))return null;s=e}else"function"==typeof t&&(s=t(this.dataSource.slice(r,r+1)[0]));let a=this.propToCol(t),l=this.hot.toPhysicalColumn(a);if(om(r)&&om(l)&&(s=hI(s,this.metaManager.getCellMeta(r,l,{visualRow:e,visualColumn:a,skipMetaExtension:!0}))),this.hot.hasHook("modifyData")){let t=tj(s);this.hot.runHooks("modifyData",e,a,t,"get"),t.isTouched()&&(s=t.value)}return s}getCopyable(e,t){return this.hot.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,r){let n=this.hot.toPhysicalRow(e),o=r,i=this.dataSource[n],s=this.hot.runHooks("modifyRowData",n);if(i=isNaN(s)?s:i,this.hot.hasHook("modifyData")){let r=tj(o);this.hot.runHooks("modifyData",e,this.propToCol(t),r,"set"),r.isTouched()&&(o=r.value)}let{dataDotNotation:a}=this.hot.getSettings();if(i&&i.hasOwnProperty&&tq(i,t))i[t]=o;else if(a&&"string"==typeof t&&t.indexOf(".")>-1){let e,r=i,n=0,s=t.split(".");for(n=0,e=s.length-1;n<e;n++){if("__proto__"===s[n]||"constructor"===s[n]||"prototype"===s[n])return;void 0===r[s[n]]&&(r[s[n]]={}),r=r[s[n]]}r[s[n]]=o}else if("function"==typeof t)t(this.dataSource.slice(n,n+1)[0],o);else{if("__proto__"===t||"constructor"===t||"prototype"===t)return;i[t]=o}}visualRowsToPhysical(e,t){let r=this.hot.countSourceRows(),n=[],o=(r+e)%r,i=t;for(;o<r&&i;)n.push(this.hot.toPhysicalRow(o)),i-=1,o+=1;return n}visualColumnsToPhysical(e,t){let r=this.hot.countCols(),n=[],o=(r+e)%r,i=t;for(;o<r&&i;){let e=this.hot.toPhysicalColumn(o);n.push(e),i-=1,o+=1}return n}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(){let e,t=this.tableMeta.maxRows;return e=t<0||0===t?0:t||1/0,Math.min(this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),e)}getAll(){let 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,hx.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,r){let n,o,i,s=[],a=this.tableMeta.maxRows,l=this.tableMeta.maxCols;if(0===a||0===l)return[];let h=r===hx.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,d=Math.min(Math.max(a-1,0),Math.max(e.row,t.row)),u=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(n=Math.min(e.row,t.row);n<=d;n++){i=[];let r=n>=0?this.hot.toPhysicalRow(n):n;for(o=Math.min(e.col,t.col);o<=u&&null!==r;o++)i.push(h.call(this,n,this.colToProp(o)));null!==r&&s.push(i)}return s}getText(e,t){return hM(this.getRange(e,t,hx.DESTINATION_RENDERER))}getCopyableText(e,t){return hM(this.getRange(e,t,hx.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}}function hO(e,t){let r=e.countSourceRows(),n=e.countSourceCols();if(0===r||0===n)return;let o=new Map;for(let i=0;i<r;i+=1)for(let r=0;r<n;r+=1){let n=e.toVisualRow(i),s=e.toVisualColumn(r);if(null===n||null===s)continue;let a=e.getCellMeta(n,s),{sourceDataWarningMessage:l,sourceDataValidator:h,allowInvalid:d}=a;if(!ny(h))continue;let u=e._getDataSource(),c=u.getAtCell(i,r,null);if(!0!==h(c,a,t)&&(!1===d&&u.setAtCell(i,r,null),l)){let e=o.get(l)??[];e.push({row:i,col:r,value:c,message:l}),o.set(l,e)}}o.forEach((e,t)=>{h_(t,e)})}function h_(e,t){!function(){let{logFunction:e=rc,message:t,items:r,maxSample:n=5,itemFormatter:o=e=>`${e}`}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Array.isArray(r)||0===r.length)return;let i=r.length,s=r.slice(0,n).map(e=>` - ${o(e)}`),a=i>n?` - ...and ${i-n} more`:"";e(tn(t,{itemsCount:`${i} cell${i>1?"s":""}`,affectedCells:["Affected cells:",...s,...a?[a]:[]].join("\n")}))}({logFunction:rg,message:e,items:t,itemFormatter:e=>{let{row:t,col:r,value:n}=e,o=ej(n),i=o.length>64?`${o.slice(0,64)}...`:o;return`row ${t}, col ${r}, value: "${i}"`}})}function hk(e,t,r,n){let{hotInstance:o,dataMap:i,dataSource:s,internalSource:a,source:l,metaManager:h,firstRun:d}=n,u=e7(a),c=o.getSettings();Array.isArray(c.dataSchema)?o.dataType="array":ny(c.dataSchema)?o.dataType="function":o.dataType="object",i&&i.destroy(),e=o.runHooks(`before${u}`,e,d,l);let g=new hx(o,e,h);if(t(g),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else if(null===e){let t,r=g.getSchema();e=[];let n=0,i=0;for(n=0,i=c.startRows;n<i;n++)if(("object"===o.dataType||"function"===o.dataType)&&c.dataSchema)t=tD(r),e.push(t);else if("array"===o.dataType)t=tD(r[0]),e.push(t);else{t=[];for(let e=0,r=c.startCols;e<r;e++)t.push(null);e.push(t)}}else t_(`${a} only accepts array of objects or array of arrays (${typeof e} given)`);Array.isArray(e[0])&&(o.dataType="array"),c.data=e,g.dataSource=e,s.data=e,s.dataType=o.dataType,s.colToProp=g.colToProp.bind(g),s.propToCol=g.propToCol.bind(g),s.countCachedColumns=g.countCachedColumns.bind(g),r(g),d||hO(o,a),o.runHooks(`after${u}`,e,d,l),d||(o.runHooks("afterChange",null,a),o.view.adjustElementsSize(),o.render()),o.getSettings().ariaTags&&rk(o.rootElement,[tv(-1),tR(o.countCols()+(o.view?o.countRowHeaders():0))])}class hH{#eQ;#eZ;constructor({rowIndexMapper:e,columnIndexMapper:t}){this.#eQ=e,this.#eZ=t}toRenderable(e){let t="N-S"===e.getVerticalDirection()?1:-1,r="W-E"===e.getHorizontalDirection()?1:-1,n=this.#eJ(e.from,t,r);if(null===n)return null;let o=this.#eJ(e.to,-t,-r);if(null===o)return null;let i=e.clone();return i.from=n,i.to=o,i.includes(e.highlight)||(i.highlight=n),i}#eJ(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=this.#e0(this.#eQ,e.row,t);if(null===n)return null;let o=this.#e0(this.#eZ,e.col,r);return null===o?null:e.clone().assign({row:n,col:o})}#e0(e,t,r){return t<0?t:e.getNearestNotHiddenIndex(t,r)}}function hL(e){nf(e)&&e.scrollIntoView({block:"nearest",inline:"nearest"})}function hP(e){let{selection:t,view:r}=e,n=e.getSelectedRangeActive(),o=t.getSelectionSource(),i=r.getFirstFullyVisibleColumn(),s=r.getLastFullyVisibleColumn(),a=n.getTopStartCorner().col,l=n.getBottomEndCorner().col,h=a<=i,d=l>=s,u=r.getFirstFullyVisibleRow(),c=r.getLastFullyVisibleRow(),g=n.getTopStartCorner().row,p=n.getBottomEndCorner().row,m=g<=u,f=p>=c;return{getComputedColumnTarget:e=>"mouse"===o||"keyboard"===o?e.col:h&&d?n.highlight.col:h?a:d?l:e.col,getComputedRowTarget:e=>"mouse"===o||"keyboard"===o?e.row:m&&f?n.highlight.row:m?g:f?p:e.row}}let hD=Object.freeze({CELL:"cell",MIXED:"mixed"});class hF{#e1;#e2;#e3=1;#e6=null;#e4=new Map;#e5=!1;constructor(e){this.#e1=e}init(){var e=this;let t=this.#e1.getSettings();this.#e2=t.imeFastEdit?hD.MIXED:hD.CELL,this.#e1.addHook("afterUpdateSettings",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#e9(...r)}),this.#e1.addHook("afterSelection",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#e7(...r)}),this.#e1.addHook("afterSelectionFocusSet",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#e7(...r)}),this.#e1.addHook("afterSelectionEnd",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#e8(...r)}),this.#e1.addHook("afterRender",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#te(...r)})}getFocusMode(){return this.#e2}setFocusMode(e){Object.values(hD).includes(e)?this.#e2=e:rg(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return this.#e3}setRefocusDelay(e){this.#e3=e}setRefocusElementGetter(e){this.#e6=e}getRefocusElement(){return"function"==typeof this.#e6?this.#e6():this.#e1.getActiveEditor()?.TEXTAREA}focusElement(e,t){return!!nf(e)&&!!e.isConnected&&(e.focus(t),!0)}focusOnHighlightedCell(e){let t=e=>{let t=this.#e1.getSelectedRangeActive()?.highlight;if(!t)return;let r=this.#e1.runHooks("modifyFocusedElement",t.row,t.col,e);nf(r)||(r=e),r&&!this.#e1.getActiveEditor()?.isOpened()&&this.focusElement(r,{preventScroll:!0})};e?t(e):this.#tt(e=>t(e))}refocusToEditorTextarea(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.#e3;this.#e1.getSettings().imeFastEdit&&!this.#e1.getActiveEditor()?.isOpened()&&(this.#e1.getActiveEditor()?.refreshValue?.(),this.#e4.has(e)||this.#e4.set(e,nw(()=>{this.#e1.isDestroyed||this.getRefocusElement()?.select()},e)),this.#e4.get(e)())}#tt(e){let t=this.#e1.getSelectedRangeActive()?.highlight;if(!t||!this.#e1.selection.isCellVisible(t))return void e(null);let r=this.#e1.getCell(t.row,t.col,!0);null===r?this.#e1.addHookOnce("afterScroll",()=>{e(this.#e1.getCell(t.row,t.col,!0))}):e(r)}#tr(){this.#tt(e=>{let{activeElement:t}=this.#e1.rootDocument;t&&nh(t)&&t.blur(),this.focusOnHighlightedCell(e)})}#e8(){this.#tt(e=>{this.getFocusMode()===hD.MIXED&&e?.nodeName==="TD"&&this.refocusToEditorTextarea()})}#e7(){this.#e5=!0}#te(){this.#e5&&(this.#e5=!1,this.#tr())}#e9(e){"boolean"==typeof e.imeFastEdit&&this.setFocusMode(e.imeFastEdit?hD.MIXED:hD.CELL)}}let hB=Object.freeze({INLINE:"inline",MODAL:"modal"}),hV=Object.freeze({UNKNOWN:"unknown",CLICK:"click",TAB_FROM_ABOVE:"tab_from_above",TAB_FROM_BELOW:"tab_from_below"});function hU(e,t){let r=e.rootDocument.createElement("div");return r.style.display="none",r.classList.add("htFocusCatcher"),r.dataset.htFocusSource=t,r}function hz(e){let{rowIndexMapper:t,columnIndexMapper:r}=e,{navigableHeaders:n}=e.getSettings(),o=n&&e.countColHeaders()>0?-e.countColHeaders():0,i=n&&e.countRowHeaders()>0?-e.countRowHeaders():0;return(0===o&&(o=t.getVisualFromRenderableIndex(o)),0===i&&(i=r.getVisualFromRenderableIndex(i)),null===o||null===i)?null:e._createCellCoords(o,i)}function hW(e){let{rowIndexMapper:t,columnIndexMapper:r}=e,{navigableHeaders:n}=e.getSettings(),o=t.getRenderableIndexesLength()-1,i=r.getRenderableIndexesLength()-1;if(o<0){if(!n||0===e.countColHeaders())return null;o=-1}if(i<0){if(!n||0===e.countColHeaders())return null;i=-1}return e._createCellCoords(t.getVisualFromRenderableIndex(o)??o,r.getVisualFromRenderableIndex(i)??i)}let hG="gridDefault",h$="grid.tabNavigation",hY="editorManager.handlingEditor";function hj(e){let t,r=t=>{if(!t)return null;let{rowIndexMapper:r,columnIndexMapper:n}=e;if(r.isHidden(t.row)||n.isHidden(t.col))return null;let o=hz(e),i=hW(e);return null===o||null===i?null:(t.row=og(t.row,o.row,i.row),t.col=og(t.col,o.col,i.col),t)},n={wrapped:!1,flipped:!1},o=!0,i=!1;e.addHook("afterSelection",()=>{o&&(t=e.getSelectedRangeActive()?.highlight)}),e.addHook("beforeRowWrap",(e,t,r)=>{n.wrapped=!0,n.flipped=r}),e.addHook("beforeEmptyDataStateShow",()=>{i=!0}),e.addHook("beforeEmptyDataStateHide",()=>{i=!1}),e.getShortcutManager().getContext("grid").addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:hG,group:h$,position:"before",callback(){let{tabNavigation:t}=e.getSettings();e.getSelectedRangeActive()&&!t&&(o=!1)}},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:hG,group:h$,callback(r){let{tabNavigation:i,autoWrapRow:s}=e.getSettings();o=!0,(!i||!e.selection.isSelected()||s&&n.wrapped&&n.flipped||!s&&n.wrapped)&&(s&&n.wrapped&&n.flipped&&(t=r.shiftKey?hz(e):hW(e)),n.wrapped=!1,n.flipped=!1)},position:"after"}]);let s=e.rootGridElement??e.rootElement;e.getFocusScopeManager().registerScope("grid",s,{contains:t=>!!(s===t||s.contains(t))||null===t.closest(".htMenu")&&e.rootPortalElement.contains(t),runOnlyIf:()=>{let{navigableHeaders:t}=e.getSettings();return!((i||!t)&&0===e.countRenderedRows()&&0===e.countRenderedCols()&&e.countRowHeaders()>0&&e.countColHeaders()>0)&&(!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0||t&&(e.countRowHeaders()>0||e.countColHeaders()>0))},onActivate:n=>{if("tab_from_above"===n){let n=r(t)??hz(e);n&&!1!==e.runHooks("modifyFocusOnTabNavigation","from_above",n)&&(e.selectCell(n.row,n.col),e.getFocusManager().focusOnHighlightedCell())}else if("tab_from_below"===n){let n=r(t)??hW(e);n&&!1!==e.runHooks("modifyFocusOnTabNavigation","from_below",n)&&e.selectCell(n.row,n.col)}}})}let hq=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"]]),hK=e=>e.map(e=>{let t=e.toLowerCase();return hq.has(t)?hq.get(t):t}).sort().join("+"),hX=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"]]),hQ=e=>{let{which:t,key:r}=e;if(hX.has(t))return hX.get(t);let n=String.fromCharCode(t).toLowerCase();return/^[a-z0-9]$/.test(n)?n:r.toLowerCase()},hZ=["meta","alt","shift","control"],hJ=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[];return e.altKey&&r.push("alt"),t&&(e.ctrlKey||e.metaKey)?r.push("control/meta"):(e.ctrlKey&&r.push("control"),e.metaKey&&r.push("meta")),e.shiftKey&&r.push("shift"),r},h0=Symbol("shortcut-context");function h1(e){return tU(e)&&e.__kindOf===h0}let h2=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"table",r=ow({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),n=function(){let{keys:e,callback:t,group:n,runOnlyIf:o=()=>!0,captureCtrl:i=!1,preventDefault:s=!0,stopPropagation:a=!1,relativeToGroup:l,position:h,forwardToContext:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};eK(n)&&t_("You need to define the shortcut's group."),!1===ny(t)&&t_("The shortcut's callback needs to be a function."),!1===Array.isArray(e)&&t_(e$`Pass the shortcut\'s keys as an array of arrays,\x20
|
|
64
64
|
using the KeyboardEvent.key properties:\x20
|
|
65
|
-
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);let u={callback:t,group:n,runOnlyIf:o,captureCtrl:i,preventDefault:s,stopPropagation:a};eq(l)&&(u.relativeToGroup=l,u.position=h),h1(d)&&(u.forwardToContext=d),e.forEach(e=>{let t=hK(e);if(r.hasItem(t)){let e=r.getItem(t),n=e.findIndex(e=>e.group===l);-1!==n?"before"===h?n-=1:n+=1:n=e.length,e.splice(n,0,u)}else r.addItem(t,[u])})},o=e=>{let t=hK(e);r.removeItem(t)};return{__kindOf:h0,scope:t,addShortcut:n,addShortcuts:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach(e=>{tW(t,(r,n)=>{!1===Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])}),n(e)})},getShortcuts:e=>{let t=hK(e),n=r.getItem(t);return eq(n)?n.slice():[]},hasShortcut:e=>{let t=hK(e);return r.hasItem(t)},removeShortcutsByKeys:o,removeShortcutsByGroup:e=>{r.getItems().forEach(t=>{let[r,n]=t,i=n.filter(t=>t.group!==e);0===i.length?o(r.split("+")):(n.length=0,n.push(...i))})}}},h3=(o=new Set,{press(e){o.add(e)},release(e){o.delete(e)},releaseAll(){o.clear()},isPressed:e=>o.has(e)}),h6=[],h4=0,h5={_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){eH(this._hooksStorage[e]||[],t=>{this.hot.removeHook(e,t)})},clearHooks(){tW(this._hooksStorage,(e,t)=>this.removeHooksByKey(t)),this._hooksStorage={}}};tz(h5,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});let h9=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class h7{static get EDITOR_TYPE(){return"base"}hot;state=h9.VIRGIN;_opened=!1;_fullEditMode=!1;_closeCallback=null;_closeAfterDataChange=!0;TD=null;row=null;col=null;prop=null;originalValue=null;cellProperties=null;constructor(e){this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){t_("Editor getValue() method unimplemented")}setValue(){t_("Editor setValue() method unimplemented")}open(){t_("Editor open() method unimplemented")}close(){t_("Editor close() method unimplemented")}prepare(e,t,r,n,o,i){this.TD=n,this.row=e,this.col=t,this.prop=r,this.originalValue=o,this.cellProperties=i,this.state=this.isOpened()?this.state:h9.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let r,n,o,i;if(t){let e=this.hot.getSelectedRangeActive(),t=e.getTopStartCorner(),s=e.getBottomEndCorner();r=t.row,n=t.col,o=s.row,i=s.col}else[r,n,o,i]=[this.row,this.col,null,null];let s=this.hot.runHooks("modifyGetCellCoords",r,n,!1,"meta");Array.isArray(s)&&([r,n]=s),this.hot.populateFromArray(r,n,e,o,i,"edit")}beginEditing(e,t){if(this.state!==h9.VIRGIN)return;let r=this.hot,n=r.rowIndexMapper.getRenderableFromVisualIndex(this.row),o=r.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(r.view.scrollViewport(r._createCellCoords(n,o)),this.state=h9.EDITING,this.isInFullEditMode()){let t=hI(this.originalValue,this.hot.getCellMeta(this.row,this.col)),r="string"==typeof e?e:ej(t);this.setValue(r)}this.open(t),this._opened=!0,this.focus(),r.view.render(),r.runHooks("afterBeginEditing",this.row,this.col),this.addHook("beforeDialogShow",()=>this.cancelChanges())}finishEditing(e,t,r){if(r){let e=this._closeCallback;this._closeCallback=t=>{e&&e(t),r(t),this.hot.view.render()}}if(!this.isWaiting()){if(this.state===h9.VIRGIN)return void this.hot._registerTimeout(()=>{this._fireCallbacks(!0)});if(this.state===h9.EDITING){if(e){this.cancelChanges(),this.hot.view.render();return}let r=this.getValue();this.cellProperties.trimWhitespace&&(r="string"==typeof r?String.prototype.trim.call(r||""):r),"function"==typeof this.cellProperties.valueParser&&(r=this.cellProperties.valueParser(r,this.cellProperties)),this.state=h9.WAITING,this.saveValue([[r]],t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",e=>{this.state=h9.FINISHED,this.discardEditor(e)}):(this.state=h9.FINISHED,this.discardEditor(!0))}}}cancelChanges(){this.state=h9.FINISHED,this.discardEditor()}discardEditor(e){this.state===h9.FINISHED&&(!1===e&&!0!==this.cellProperties.allowInvalid?(this.hot.selectCell(this.row,this.col),this.focus(),this.state=h9.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this._fullEditMode=!1,this.state=h9.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===h9.WAITING}getEditedCellRect(){let e=this.getEditedCell();if(!e)return;let{wtOverlays:t,wtViewport:r}=this.hot.view._wt,n=this.hot.rootWindow,o=rW(e),i=r0(e),s=rW(this.hot.rootElement),a=r0(this.hot.rootElement),l=t.topOverlay.holder,h=t.inlineStartOverlay.holder,d=l!==n?l.scrollTop:0,u=h!==n?h.scrollLeft:0,c=n.innerWidth-s.left-a,{wtTable:g}=t.getParentOverlay(e)??this.hot.view._wt,p=g.name,m=["master","inline_start"].includes(p)?d:0,f=["master","top","bottom"].includes(p)?u:0,y=+(o.top!==s.top),b=o.top-s.top-y-m,C=0;C=this.hot.isRtl()?n.innerWidth-o.left-i-c-1+f:o.left-s.left-1-f,["top","top_inline_start_corner"].includes(p)&&(b+=t.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(p)&&(C+=Math.abs(t.inlineStartOverlay.getOverlayOffset()));let w=this.hot.hasColHeaders(),S=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),R=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),E=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(w&&S<=0||S===E)&&(b+=1),R<=0&&(C+=1);let T=r.rowsRenderCalculator.startPosition,A=r.columnsRenderCalculator.startPosition,M=Math.abs(t.inlineStartOverlay.getScrollPosition()),N=t.topOverlay.getScrollPosition(),I=nr(this.hot.rootDocument),x=e.offsetTop;if(["inline_start","master"].includes(p)&&(x+=T-N),["bottom","bottom_inline_start_corner"].includes(p)){let{wtViewport:e,wtTable:r}=t.bottomOverlay.clone;x+=e.getWorkspaceHeight()-r.getHeight()-I}let O=e.offsetLeft;this.hot.isRtl()?O=(O>=0?g.getWidth()-e.offsetLeft:Math.abs(O))+(A-M-i):["top","master","bottom"].includes(p)&&(O+=A-M);let _=n.getComputedStyle(this.TD),k=parseInt(_[this.hot.isRtl()?"borderRightWidth":"borderLeftWidth"],10)>0?0:1,H=parseInt(_.borderTopWidth,10)>0?0:1,L=r0(e)+k,P=r1(e)+H,D=nn(l)?I:0,F=no(h)?I:0,B=this.hot.view.maximumVisibleElementWidth(O)-D+k;return{top:b,start:C,height:P,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(x)-F+H,this.hot.stylesHandler.getDefaultRowHeight()),width:L,maxWidth:B}}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(){let e=this.hot.countRows(),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}}tB(h7,h5);let h8=[{name:"editorCloseAndSave",callback(e){e._getEditorManager().closeEditorAndSaveChanges()}},{name:"editorCloseAndSaveByArrowKeys",callback(e,t,r){let n=e._getEditorManager(),o=n.getActiveEditor();o.isInFullEditMode()&&o.state===h9.EDITING||(n.closeEditorAndSaveChanges(),e.getSelected()&&(r.includes("arrowdown")?e.selection.transformStart(1,0):r.includes("arrowup")?e.selection.transformStart(-1,0):r.includes("arrowleft")?e.selection.transformStart(0,-1*e.getDirectionFactor()):r.includes("arrowright")&&e.selection.transformStart(0,e.getDirectionFactor())),t.preventDefault())}},{name:"editorCloseAndSaveByEnter",callback(e,t){let r=e._getEditorManager();r.closeEditorAndSaveChanges(t.ctrlKey||t.metaKey),r.moveSelectionAfterEnter(t)}},{name:"editorCloseWithoutSaving",callback(e){let t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor.focus()}},{name:"editorFastOpen",callback(e,t){let{highlight:r}=e.getSelectedRangeActive();r.isHeader()||e._getEditorManager().openEditor(null,t,!0)}},{name:"editorOpen",callback(e,t,r){let{selection:n}=e,o=e._getEditorManager(),i=e.getSelectedRange(),s=e.getSelectedRangeActive(),{highlight:a}=s;if((i.some(e=>n.isMultiple(e))||i.length>1)&&!s.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0){let o=e.getSettings(),i="function"==typeof o.enterMoves?o.enterMoves(t):o.enterMoves;r.includes("shift")?n.transformFocus(-i.row,-i.col):n.transformFocus(i.row,i.col);return}a.isHeader()||(e.getSettings().enterBeginsEditing?o.cellProperties.readOnly?o.moveSelectionAfterEnter(t):o.openEditor(null,t,!0):o.moveSelectionAfterEnter(t),nk(t))}},{name:"extendCellsSelectionDown",callback(e){let{selection:t}=e,{highlight:r}=e.getSelectedRangeActive();!t.isSelectedByColumnHeader()&&!t.isSelectedByCorner()&&(r.isCell()||r.isHeader()&&t.isSelectedByRowHeader())&&(t.markSource("keyboard"),t.transformEnd(1,0),t.markEndSource())}},{name:"extendCellsSelectionDownByViewportHeight",callback(e){let{selection:t,rowIndexMapper:r}=e,{to:n}=e.getSelectedRangeActive(),o=Math.min(n.row+e.countVisibleRows(),e.countRows()-1),i=r.getNearestNotHiddenIndex(o,-1);if(null!==i){let r=e._createCellCoords(i,n.col),o=n.row-e.getFirstFullyVisibleRow(),s=Math.min(r.row-o,e.countRows()-1);t.markSource("keyboard"),t.setRangeEnd(r,e.getActiveSelectionLayerIndex()),t.markEndSource(),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"extendCellsSelectionLeft",callback(e){let{selection:t}=e,{highlight:r}=e.getSelectedRangeActive();!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&(r.isCell()||r.isHeader()&&t.isSelectedByColumnHeader())&&(t.markSource("keyboard"),t.transformEnd(0,-1*e.getDirectionFactor()),t.markEndSource())}},{name:"extendCellsSelectionRight",callback(e){let{selection:t}=e,{highlight:r}=e.getSelectedRangeActive();!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&(r.isCell()||r.isHeader()&&t.isSelectedByColumnHeader())&&(t.markSource("keyboard"),t.transformEnd(0,e.getDirectionFactor()),t.markEndSource())}},{name:"extendCellsSelectionToColumns",callback(e){let{selection:t}=e,{highlight:r,from:n,to:o}=e.getSelectedRangeActive();t.markSource("keyboard"),t.isSelectedByRowHeader()?t.selectAll(!0,!0):e.selectColumns(n.col,o.col,r),t.markEndSource()}},{name:"extendCellsSelectionToMostBottom",callback(e){let{selection:t,rowIndexMapper:r}=e,{highlight:n,from:o,to:i}=e.getSelectedRangeActive(),s=n.isHeader()&&t.isSelectedByRowHeader();if(n.isCell()||s){let a=r.getNearestNotHiddenIndex(e.countRows()-1,-1),l=o.clone();l.row=n.row,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,n.clone()),s&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(a,i.col)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineEnd",callback(e){let{selection:t,columnIndexMapper:r}=e,{highlight:n,from:o,to:i}=e.getSelectedRangeActive();if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&n.isCell()){let s=r.getNearestNotHiddenIndex(e.countCols()-1,-1),a=o.clone();a.col=n.col,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,n.clone()),t.setRangeEnd(e._createCellCoords(i.row,s)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,{highlight:n,from:o,to:i}=e.getSelectedRangeActive();if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&n.isCell()){let s=parseInt(e.getSettings().fixedColumnsStart,10),a=r.getNearestNotHiddenIndex(s,1),l=o.clone();l.col=n.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,n.clone()),t.setRangeEnd(e._createCellCoords(i.row,a)),t.markEndSource()}}},{name:"extendCellsSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,{highlight:n,from:o,to:i}=e.getSelectedRangeActive(),s=n.isHeader()&&t.isSelectedByColumnHeader();if(n.isCell()||s){let a=r.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]),l=o.clone();l.col=n.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,n.clone()),s&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i.row,a)),t.markEndSource()}}},{name:"extendCellsSelectionToMostRight",callback(e){let{selection:t,columnIndexMapper:r}=e,{highlight:n,from:o,to:i}=e.getSelectedRangeActive(),s=n.isHeader()&&t.isSelectedByColumnHeader();if(n.isCell()||s){let a=r.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]),l=o.clone();l.col=n.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,n.clone()),s&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i.row,a)),t.markEndSource()}}},{name:"extendCellsSelectionToMostTop",callback(e){let{selection:t,rowIndexMapper:r}=e,{highlight:n,from:o,to:i}=e.getSelectedRangeActive(),s=n.isHeader()&&t.isSelectedByRowHeader();if(n.isCell()||s){let a=r.getNearestNotHiddenIndex(0,1),l=o.clone();l.row=n.row,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,n.clone()),s&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(a,i.col)),t.markEndSource()}}},{name:"extendCellsSelectionToRows",callback(e){let{selection:t}=e,{highlight:r,from:n,to:o}=e.getSelectedRangeActive();t.markSource("keyboard"),t.isSelectedByColumnHeader()?t.selectAll(!0,!0):e.selectRows(n.row,o.row,r),t.markEndSource()}},{name:"extendCellsSelectionUp",callback(e){let{selection:t}=e,{highlight:r}=e.getSelectedRangeActive();!t.isSelectedByColumnHeader()&&!t.isSelectedByCorner()&&(r.isCell()||r.isHeader()&&t.isSelectedByRowHeader())&&(t.markSource("keyboard"),t.transformEnd(-1,0),t.markEndSource())}},{name:"extendCellsSelectionUpByViewportHeight",callback(e){let{selection:t,rowIndexMapper:r}=e,{to:n}=e.getSelectedRangeActive(),o=Math.max(n.row-e.countVisibleRows(),0),i=r.getNearestNotHiddenIndex(o,1);if(null!==i){let r=e._createCellCoords(i,n.col),o=n.row-e.getFirstFullyVisibleRow(),s=Math.max(r.row-o,0);t.markSource("keyboard"),t.setRangeEnd(r,e.getActiveSelectionLayerIndex()),t.markEndSource(),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(1,0),t.markEndSource()}},{name:"moveCellSelectionDownByViewportHeight",callback(e){let{selection:t}=e,{navigableHeaders:r}=e.getSettings(),n=r?e.countColHeaders():0,{row:o}=e.getSelectedRangeActive().highlight,i=e.countVisibleRows()+n;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.getSelectedRangeActive().highlight.row<0&&e.scrollViewportTo({row:0})}},{name:"moveCellSelectionInlineEnd",callback(e,t){let{selection:r}=e,n=e.getSettings(),o=e.getSelectedRange(),i=e.getSelectedRangeActive(),s="function"==typeof n.tabMoves?n.tabMoves(t):n.tabMoves;r.markSource("keyboard"),(o.some(e=>r.isMultiple(e))||o.length>1)&&!i.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?r.transformFocus(-s.row,-s.col):r.transformStart(-s.row,-s.col),r.markEndSource()}},{name:"moveCellSelectionInlineStart",callback(e,t){let{selection:r}=e,n=e.getSettings(),o=e.getSelectedRange(),i=e.getSelectedRangeActive(),s="function"==typeof n.tabMoves?n.tabMoves(t):n.tabMoves;r.markSource("keyboard"),(o.some(e=>r.isMultiple(e))||o.length>1)&&!i.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?r.transformFocus(s.row,s.col):r.transformStart(s.row,s.col),r.markEndSource()}},{name:"moveCellSelectionLeft",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(0,-1*e.getDirectionFactor()),t.markEndSource()}},{name:"moveCellSelectionRight",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(0,e.getDirectionFactor()),t.markEndSource()}},{name:"moveCellSelectionToMostBottom",callback(e){let{selection:t}=e,{col:r}=e.getSelectedRangeActive().highlight,n=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===n&&(n=-1),t.setRangeStart(e._createCellCoords(n,r))}},{name:"moveCellSelectionToMostBottomInlineEnd",callback(e){let{selection:t,rowIndexMapper:r,columnIndexMapper:n}=e,o=parseInt(e.getSettings().fixedRowsBottom,10),i=r.getNearestNotHiddenIndex(e.countRows()-o-1,-1),s=n.getNearestNotHiddenIndex(e.countCols()-1,-1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(i,s)),t.markEndSource()}},{name:"moveCellSelectionToMostInlineEnd",callback(e){let{selection:t,columnIndexMapper:r}=e;t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(e.getSelectedRangeActive().highlight.row,r.getNearestNotHiddenIndex(e.countCols()-1,-1))),t.markEndSource()}},{name:"moveCellSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,n=parseInt(e.getSettings().fixedColumnsStart,10),o=e.getSelectedRangeActive().highlight.row,i=r.getNearestNotHiddenIndex(n,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(o,i)),t.markEndSource()}},{name:"moveCellSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive().highlight.row,o=r.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);null===o&&(o=e.isRtl()?-1:-e.countRowHeaders()),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n,o)),t.markEndSource()}},{name:"moveCellSelectionToMostRight",callback(e){let{selection:t,columnIndexMapper:r}=e,{row:n}=e.getSelectedRangeActive().highlight,o=r.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);null===o&&(o=e.isRtl()?-e.countRowHeaders():-1),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n,o)),t.markEndSource()}},{name:"moveCellSelectionToMostTop",callback(e){let{selection:t}=e,{col:r}=e.getSelectedRangeActive().highlight,n=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===n&&(n=-e.countColHeaders()),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n,r)),t.markEndSource()}},{name:"moveCellSelectionToMostTopInlineStart",callback(e){let{selection:t,rowIndexMapper:r,columnIndexMapper:n}=e,o=parseInt(e.getSettings().fixedRowsTop,10),i=parseInt(e.getSettings().fixedColumnsStart,10),s=r.getNearestNotHiddenIndex(o,1),a=n.getNearestNotHiddenIndex(i,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(s,a)),t.markEndSource()}},{name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(-1,0),t.markEndSource()}},{name:"moveCellSelectionUpByViewportHight",callback(e){let{selection:t}=e,{navigableHeaders:r}=e.getSettings(),n=r?e.countColHeaders():0,{row:o}=e.getSelectedRangeActive().highlight,i=e.countVisibleRows()+n;i=0===i?-1:-i,o===-n?i=-1:o+i<n&&(i=-(o+n)),t.markSource("keyboard"),t.transformStart(i,0),t.markEndSource(),e.getSelectedRangeActive().highlight.row<0&&e.scrollViewportTo({row:0})}},{name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}},{name:"scrollToFocusedCell",callback(e){let{highlight:t}=e.getSelectedRangeActive(),r=e.getFirstFullyVisibleRow()-1,n=e.getFirstFullyVisibleColumn()-1,o=e.getLastFullyVisibleRow()+1,i=e.getLastFullyVisibleColumn()+1,s=e._createCellCoords(r,n),a=e._createCellCoords(o,i);if(!e._createCellRange(s,s,a).includes(t)&&(t.row>=0||t.col>=0)){let r={};if(t.col>=0){let n=Math.floor(e.countVisibleCols()/2);r.col=Math.max(t.col-n,0)}if(t.row>=0){let n=Math.floor(e.countVisibleRows()/2);r.row=Math.max(t.row-n,0)}e.scrollViewportTo({...r,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"selectAllCells",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.selectAll(!0,!0,{disableHeadersHighlight:!0}),t.markEndSource()}},{name:"selectAllCellsAndHeaders",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.selectAll(!0,!0,{disableHeadersHighlight:!1}),t.markEndSource()}},{name:"populateSelectedCellsData",callback(e){let t=e.getSelectedRange(),{row:r,col:n}=t[t.length-1].highlight.normalize(),o=e.getDataAtCell(r,n),i=new Map;for(let s=0;s<t.length;s++)t[s].forAll((t,s)=>{if(t>=0&&s>=0&&(t!==r||s!==n)){let{readOnly:r}=e.getCellMeta(t,s);r||i.set(`${t}x${s}`,[t,s,o])}});e.setDataAtCell(Array.from(i.values()))}},{name:"tabNavigation",callback(e){let t={wrapped:!1,flipped:!1},r=!1,n=!1;return e.addHook("afterSelection",(e,o,i,s,a)=>{r&&(t.wrapped&&t.flipped||n)&&(n=!1,a.value=!0)}),e.addHook("beforeRowWrap",(e,r,n)=>{t.wrapped=!0,t.flipped=n}),{before(){let{tabNavigation:t}=e.getSettings();r=!0,t||(n=!0)},after(n){let{tabNavigation:o,autoWrapRow:i}=e.getSettings();if(r=!1,!o||!e.selection.isSelected()||i&&t.wrapped&&t.flipped||!i&&t.wrapped)return t.wrapped=!1,t.flipped=!1,e.deselectCell(),!1;n.preventDefault()}}}}];function de(e){let t={};return h8.forEach(r=>{let{name:n,callback:o}=r;t[n]=function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return o(e,...r)}}),t}function dt(e){let t=e.getShortcutManager().addContext("editor"),r=de(e);t.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>r.editorCloseAndSaveByEnter(e,t)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(e,t)=>r.editorCloseAndSaveByEnter(e,t)},{keys:[["Tab"],["Tab","Shift"],["PageDown"],["PageUp"]],forwardToContext:e.getShortcutManager().getContext("grid"),callback:(e,t)=>r.editorCloseAndSave(e,t)},{keys:[["ArrowDown"],["ArrowUp"],["ArrowLeft"],["ArrowRight"]],preventDefault:!1,callback:(e,t)=>r.editorCloseAndSaveByArrowKeys(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>r.editorCloseWithoutSaving()}],{group:hY})}function dr(e){let t=e.getShortcutManager().addContext("grid"),r=de(e);t.addShortcuts([{keys:[["F2"]],callback:e=>r.editorFastOpen(e)},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>r.editorOpen(e,t)},{keys:[["Backspace"],["Delete"]],callback:()=>r.emptySelectedCells()}],{group:hY,runOnlyIf:()=>eq(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>r.selectAllCells(),runOnlyIf:()=>eq(e.getSelected())&&!e.getSelectedRangeActive()?.highlight.isHeader()},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>eq(e.getSelected())&&e.getSelectedRangeActive()?.highlight.isHeader(),preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>r.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>r.populateSelectedCellsData(),runOnlyIf:()=>eq(e.getSelected())&&!e.getSelectedRangeActive().highlight.isHeader()&&e.getSelectedRangeActive().getCellsCount()>1},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>r.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>r.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>r.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostTop(),runOnlyIf:()=>eq(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>r.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>r.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostBottom(),runOnlyIf:()=>eq(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>r.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>r.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostLeft(),runOnlyIf:()=>eq(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>r.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>r.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostRight(),runOnlyIf:()=>eq(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>eq(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>eq(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>eq(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>eq(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>r.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>r.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>r.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>r.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:e=>r.moveCellSelectionInlineStart(e)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:e=>r.moveCellSelectionInlineEnd(e)},{keys:[["Control/Meta","Backspace"]],callback:()=>r.scrollToFocusedCell()}],{runOnlyIf:()=>{let{navigableHeaders:t}=e.getSettings();return eq(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:hG});let n=r.tabNavigation();t.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:hG,group:h$,position:"before",callback:e=>n.before(e)},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:hG,group:h$,callback:e=>n.after(e),position:"after"}])}function dn(e){let{classNames:t}=rR(e,/ht-theme-[a-zA-Z0-9_-]+/);return t.pop()}let di="handsontable-core-styles";class ds{#e1;#tn;#to;#ti;#ts;#ta={};#tl={};#th;constructor({hot:e,rootElement:t,rootDocument:r,onThemeChange:n=()=>{},injectCoreCss:o=!0}){this.#e1=e,this.#to=t,this.#ts=r,this.#th=n,o&&this.#td()}getCSSVariableValue(e){if(this.#ta[`--ht-${e}`])return this.#ta[`--ht-${e}`];let t=this.#tu(`--ht-${e}`)??this.#tc(`--ht-${e}`);if(null!==t)return this.#ta[`--ht-${e}`]=t,t}getStyleForTD(e){return this.#tl?.td?.[e]}getDefaultRowHeight(e){let t=this.#tg();return void 0!==e&&e===this.#e1.view.getFirstRenderedVisibleRow()?t+1:t}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(e){/ht-theme-.*/.test(e)?(this.#tp(),e&&e!==this.#tn&&(this.#tn=e),this.#th(this.#tn),this.#tm()):rg(`${e} isn't a valid theme name. Please ensure it follows the format ht-theme-<theme-name>.`)}getThemeName(){return this.#tn}#td(){if(!this.#e1||!this.#ts||!this.#ts.head)return;let e=this.#ts.getElementById(di);if(e&&e instanceof HTMLStyleElement)return;let t=this.#ts.createElement("style");t.id=di,t.textContent='/*!\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: 17.1.0-rc13\n * Release date: 19/05/2026 (built at 19/05/2026 06:38:14)\n */\n.ht-root-wrapper{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;flex-direction:column;height:100%;display:flex;position:relative}.htFocusCatcher{opacity:0;z-index:-1;border:0;outline:0;width:0;height:0;margin:0;padding:0;position:absolute;display:block!important}.ht-grid{flex:auto;min-height:0}.htScrollbarTest{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color)}.htScrollbarSafariTest::-webkit-scrollbar{width:9px;height:9px}.handsontable{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);letter-spacing:var(--ht-letter-spacing);color:var(--ht-foreground-color);touch-action:manipulation;position:relative}.handsontable .wtHolder{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color)}.handsontable .wtHolder::-webkit-scrollbar{width:9px;height:9px}.handsontable .wtHolder::-webkit-scrollbar-track{background:var(--ht-scrollbar-track-color);border-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder::-webkit-scrollbar-thumb{background-color:var(--ht-scrollbar-thumb-color);border-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder::-webkit-scrollbar-corner{background:var(--ht-scrollbar-track-color)}.handsontable .wtHolder:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))::-webkit-scrollbar-corner{border-bottom-right-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))::-webkit-scrollbar-corner{border-bottom-left-radius:var(--ht-scrollbar-border-radius)}.handsontable.ht-wrapper{border-radius:var(--ht-wrapper-border-radius,0);width:100%;height:100%}.handsontable.ht-wrapper:not(.htFirstDatasetColumnNotRendered) td:first-of-type{border-inline-start-width:1px}.handsontable.ht-wrapper:before{content:"";border:var(--ht-wrapper-border-width)solid var(--ht-wrapper-border-color);border-radius:var(--ht-wrapper-border-radius,0);z-index:999;pointer-events:none;display:block;position:absolute;inset:0;overflow:hidden}.handsontable.htGhostTable.htNestedHeaders table{border-spacing:0;border-collapse:collapse}.handsontable.htGhostTable table thead th{border-bottom-width:0}.handsontable.htGhostTable table tbody tr:first-of-type th:first-child,.handsontable.htGhostTable table tbody tr:first-of-type td:first-child{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px)}.handsontable.htGhostTable table tbody tr th,.handsontable.htGhostTable table tbody tr td{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px);border-top-width:0}.handsontable.htHasScrollX:not(.htHorizontallyScrollableByWindow):not(.htScrollbarHidden) .ht_master .wtHolder,.handsontable.htHasScrollY:not(.htVerticallyScrollableByWindow):not(.htScrollbarHidden) .ht_master .wtHolder{border-radius:var(--ht-wrapper-border-radius,0)}.handsontable:not(.htHorizontallyScrollableByWindow).htPagination .ht_master .wtHolder,.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollY .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htPagination .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollY .ht_master .wtHolder{background-color:var(--ht-background-color)}.handsontable tr.ht__row_even th{background-color:var(--ht-row-header-even-background-color)}.handsontable tr.ht__row_even td{background-color:var(--ht-row-cell-even-background-color)}.handsontable tr.ht__row_odd th{background-color:var(--ht-row-header-odd-background-color)}.handsontable tr.ht__row_odd td{background-color:var(--ht-row-cell-odd-background-color)}.handsontable th,.handsontable td{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px);padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);vertical-align:top;border-top-width:0;border-inline-width:0 1px;font-size:var(--ht-font-size);line-height:var(--ht-line-height);white-space:pre-wrap;empty-cells:show;box-sizing:border-box;color:var(--ht-foreground-color);border-style:solid;border-bottom-width:1px;border-top-color:var(--ht-cell-vertical-border-color);border-bottom-color:var(--ht-cell-vertical-border-color);border-inline-start-color:var(--ht-cell-horizontal-border-color);border-inline-end-color:var(--ht-cell-horizontal-border-color);outline:0;overflow:hidden}.handsontable th.invisibleSelection,.handsontable td.invisibleSelection{outline:none}.handsontable th.invisibleSelection::selection,.handsontable td.invisibleSelection::selection{background:0 0}.handsontable th{text-align:center;font-weight:var(--ht-header-font-weight);white-space:nowrap;color:var(--ht-header-foreground-color);background-color:var(--ht-header-background-color);position:relative;overflow:visible}.handsontable th:last-child{border-inline-width:0 1px;border-bottom-width:1px;border-inline-end-color:var(--ht-border-color)}.handsontable th:last-child.ht__active_highlight{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable th:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable th:first-child.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color)}.handsontable th:first-child,.handsontable th:nth-child(2){border-inline-start-width:1px}.handsontable th.current{box-shadow:inset 0 0 0 1px var(--ht-cell-selection-border-color)}.handsontable th.active{color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable th.ht__highlight{color:var(--ht-header-highlighted-foreground-color);background-color:var(--ht-header-highlighted-background-color)}.handsontable th.ht__active_highlight{border-color:var(--ht-header-active-border-color);color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable tbody tr.ht__row_odd th.ht__highlight,.handsontable tbody tr.ht__row_even th.ht__highlight{color:var(--ht-header-row-highlighted-foreground-color);background-color:var(--ht-header-row-highlighted-background-color)}.handsontable tbody tr.ht__row_odd th.ht__active_highlight,.handsontable tbody tr.ht__row_even th.ht__active_highlight{color:var(--ht-header-row-active-foreground-color);background-color:var(--ht-header-row-active-background-color)}.handsontable tbody tr:first-of-type th:first-child:empty:after,.handsontable tbody tr:first-of-type td:first-child:empty:after{content:"";min-height:var(--ht-line-height);display:block}.handsontable tbody tr th{color:var(--ht-header-row-foreground-color);background-color:var(--ht-header-row-background-color);padding:0}.handsontable tbody tr th.ht__active_highlight{box-shadow:0 -1px 0 0 var(--ht-header-active-border-color)}.handsontable tbody tr th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);min-height:100%}.handsontable tbody tr td:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable tbody tr td:last-child{border-inline-end-color:var(--ht-border-color)}.handsontable thead tr th{padding:0}.handsontable thead tr th.ht__active_highlight{box-shadow:-1px 0 0 0 var(--ht-header-active-border-color)}.handsontable thead tr th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);flex-direction:row;align-items:center;gap:2px;display:flex}.handsontable thead tr th .relative .colHeader{text-overflow:ellipsis;vertical-align:top;flex:auto;min-width:0;overflow:hidden}.handsontable tr:first-child th,.handsontable tr:first-child td{border-top-color:var(--ht-border-color);border-top-width:1px}.handsontable tr:first-child th.ht__active_highlight,.handsontable tr:first-child td.ht__active_highlight{border-top-color:var(--ht-header-active-border-color)}.handsontable tr:last-child th,.handsontable tr:last-child td{border-bottom-color:var(--ht-border-color)}.handsontable tr:last-child th.ht__active_highlight,.handsontable tr:last-child td.ht__active_highlight{border-bottom-color:var(--ht-header-active-border-color)}.handsontable div[class^=ht_clone] thead .ht__highlight .relative:after{content:"";height:var(--ht-header-highlighted-shadow-size);background-color:var(--ht-accent-color);display:block;position:absolute;bottom:-1px;left:-1px;right:-1px}.handsontable div[class^=ht_clone] thead tr:only-of-type .ht__highlight .relative:after{bottom:0}.handsontable div[class^=ht_clone] tbody .ht__highlight .relative:after{content:"";width:var(--ht-header-highlighted-shadow-size);background-color:var(--ht-accent-color);display:block;position:absolute;top:-1px;bottom:-1px;right:-1px}.handsontable div[class^=ht_clone] td:first-of-type{border-inline-start-width:1px}.handsontable thead tr:not(:last-child) th{overflow:hidden}.handsontable .hide{display:none}.handsontable .relative{box-sizing:border-box;position:relative}.handsontable .wtHider{width:0}.handsontable .wtSpreader{width:0;height:auto;position:relative}.handsontable .htAutoSize{visibility:hidden;position:absolute;top:-99000px;left:-99000px}.handsontable .htTextEllipsis{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.handsontable table,.handsontable tbody,.handsontable thead,.handsontable input,.handsontable textarea,.handsontable div{box-sizing:content-box}.handsontable input,.handsontable textarea{min-height:initial}.handsontable .htCore{border-spacing:0;border-collapse:separate;table-layout:fixed;cursor:default;background-color:var(--ht-background-color);border-width:0;outline-width:0;width:0;margin:0}.handsontable col,.handsontable col.rowHeader{width:64px}.handsontable col.hidden{width:0!important}.handsontable span.colHeader,.handsontable span.rowHeader{font-size:var(--ht-font-size);line-height:var(--ht-line-height);display:inline-block}.handsontable tr.hidden,.handsontable tr.hidden td,.handsontable tr.hidden th{display:none}.handsontable a{color:var(--ht-link-color)}.handsontable a:hover{color:var(--ht-link-hover-color)}.handsontable .ht_clone_top th:nth-child(2),.handsontable .ht_clone_top_inline_start_corner th:nth-child(2){border-inline-width:0 1px}.handsontable.htRowHeaders thead tr th:nth-child(2){border-inline-start-width:1px}.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) tbody tr th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) thead tr th:first-child,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.htGhostTable) tbody tr th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.ht_clone_top):not(.htGhostTable) thead tr th:first-child{border-inline-width:1px 0}.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr:last-child th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead tr:last-child th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr.lastChild th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead tr.lastChild th{border-bottom-width:0}.handsontable.htAutoRowSize .ht_master.innerBorderTop tbody tr:first-child th,.handsontable.htAutoRowSize .ht_master.innerBorderTop tbody tr:first-child td,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start tbody tr:first-child th,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start tbody tr:first-child td{border-top-width:0}.handsontable .ht_master table.htCore>thead,.handsontable .ht_master table.htCore>tbody>tr>th,.handsontable .ht_clone_inline_start table.htCore>thead{visibility:hidden}.ht_master,.ht_clone_inline_start,.ht_clone_top,.ht_clone_bottom,.ht_master .wtHolder,.ht_clone_inline_start .wtHolder,.ht_clone_top .wtHolder,.ht_clone_bottom .wtHolder{overflow:hidden}.ht_master .wtHolder{overflow:auto}[dir=rtl].handsontable td[dir=ltr]{border-inline-width:1px 0}[dir=rtl].handsontable tbody tr td[dir=ltr]:last-child{border-inline-start-color:var(--ht-border-color)}[dir=rtl].handsontable div[class^=ht_clone] tbody .ht__highlight .relative:after{left:-1px;right:auto}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_start_corner .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_start_corner .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore{border-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius);border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius);border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius);border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius);border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius);border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius);border-bottom-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper.htHasScrollX .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX .htCore thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX .htCore thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX .htCore thead tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX .htCore thead tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0;border-bottom-right-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:first-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:first-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:first-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:first-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:first-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:first-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}.handsontable.mobile,.handsontable.mobile .wtHolder{-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:#0000;-webkit-overflow-scrolling:touch}.handsontable.mobile .handsontableInput:focus{box-shadow:inset 0 0 0 2px var(--ht-accent-color);-webkit-appearance:none}.handsontable .topSelectionHandle,.handsontable .topSelectionHandle-HitArea,.handsontable .bottomSelectionHandle,.handsontable .bottomSelectionHandle-HitArea{inset-inline-start:-10000px;inset-inline-end:unset;z-index:9999;top:-10000px}.handsontable.hide-tween{animation:.2s forwards opacity-hide}.handsontable.show-tween{animation:.3s forwards opacity-show}.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}.ht_editor_hidden{z-index:-1}.ht_editor_visible{z-index:200}.handsontable td.area{position:relative}.handsontable td.area:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-1{position:relative}.handsontable td.area-1:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-2{position:relative}.handsontable td.area-2:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-3{position:relative}.handsontable td.area-3:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-4{position:relative}.handsontable td.area-4:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-5{position:relative}.handsontable td.area-5:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-6{position:relative}.handsontable td.area-6:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-7{position:relative}.handsontable td.area-7:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area:before{opacity:.14}.handsontable td.area-1:before{opacity:.21}.handsontable td.area-2:before{opacity:.28}.handsontable td.area-3:before{opacity:.35}.handsontable td.area-4:before{opacity:.42}.handsontable td.area-5:before{opacity:.49}.handsontable td.area-6:before{opacity:.56}.handsontable td.area-7:before{opacity:.63}.handsontable td.area{border-color:color-mix(in srgb,var(--ht-border-color),var(--ht-foreground-color)10%)}.handsontable .wtBorder{font-size:0;position:absolute}.handsontable .wtBorder:first-child,.handsontable .wtBorder:nth-child(3){z-index:2}.handsontable .wtBorder:nth-child(2),.handsontable .wtBorder:nth-child(4){z-index:1}.handsontable .wtBorder.hidden{display:none!important}.handsontable .wtBorder.current{z-index:10;background-color:var(--ht-cell-selection-border-color)!important}.handsontable .wtBorder.area{z-index:8;background-color:var(--ht-cell-selection-border-color)!important}.handsontable .wtBorder.fill{z-index:6;background-color:var(--ht-cell-autofill-fill-border-color,#68696c)!important}.handsontable .wtBorder.corner{cursor:crosshair;z-index:10;font-size:0;border-radius:var(--ht-cell-autofill-border-radius)!important;background-color:var(--ht-cell-autofill-background-color,#1a42e8)!important;border-color:var(--ht-cell-autofill-border-color)!important}.handsontable .wtBorder.corner:after{content:"";border-radius:var(--ht-cell-autofill-border-radius);inset:min(0px,(var(--ht-cell-autofill-size) - var(--ht-cell-autofill-hit-area-size))/2);background:0 0;position:absolute}.handsontable .wtBorder.corner.wtCornerInlineEndEdge:after{inset-inline-end:0}.handsontable .wtBorder.corner.wtCornerBlockEndEdge:after{inset-block-end:0}.hot-display-license-info{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;padding:var(--ht-license-vertical-padding,16px)var(--ht-license-horizontal-padding,16px);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);color:var(--ht-license-foreground-color);background-color:var(--ht-license-background-color,#f7f7f9);text-align:left;border:1px solid var(--ht-border-color,#f7f7f9);border-radius:var(--ht-wrapper-border-radius);margin-top:10px}.hot-display-license-info a{font-size:var(--ht-license-font-size);color:var(--ht-link-color)}.hot-display-license-info a:hover{color:var(--ht-link-hover-color)}.handsontable .htAutocompleteArrow{cursor:default;width:var(--ht-icon-size);height:var(--ht-icon-size);float:right;top:calc((var(--ht-line-height) - var(--ht-icon-size))/2);margin-inline-start:calc(var(--ht-gap-size)*2);margin-inline-end:1px;font-size:0;position:relative}.handsontable .htAutocompleteArrow:after{content:"";opacity:.6;display:block;position:absolute;top:0;left:0}[dir=rtl].handsontable .htAutocompleteArrow{float:left}.handsontable .htCheckboxRendererInput{width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);vertical-align:middle;cursor:pointer;margin:0;outline:none;margin-top:-2px;display:inline-block;position:relative}.handsontable .htCheckboxRendererInput:first-child{margin-inline-end:var(--ht-gap-size)}.handsontable .htCheckboxRendererInput:last-child{margin-inline-start:var(--ht-gap-size)}.handsontable .htCheckboxRendererInput:before{content:"";width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);border-radius:var(--ht-checkbox-border-radius);border:1px solid var(--ht-checkbox-border-color);background-color:var(--ht-checkbox-background-color);box-sizing:border-box;pointer-events:none;transition:all var(--ht-table-transition)ease-in-out;display:inline-block;position:absolute;top:0;left:0}.handsontable .htCheckboxRendererInput:after{content:"";color:var(--ht-checkbox-icon-color);pointer-events:none;display:block;position:absolute;top:0;left:0;width:var(--ht-checkbox-size)!important;height:var(--ht-checkbox-size)!important}.handsontable .htCheckboxRendererInput:checked:before{border-color:var(--ht-checkbox-checked-border-color);background-color:var(--ht-checkbox-checked-background-color)}.handsontable .htCheckboxRendererInput:checked:after{color:var(--ht-checkbox-checked-icon-color)}.handsontable .htCheckboxRendererInput:checked:disabled:before{border-color:var(--ht-checkbox-checked-disabled-border-color);background-color:var(--ht-checkbox-checked-disabled-background-color)}.handsontable .htCheckboxRendererInput:checked:disabled:after{color:var(--ht-checkbox-checked-disabled-icon-color)}.handsontable .htCheckboxRendererInput:checked:focus:before{border-color:var(--ht-checkbox-checked-focus-border-color);background-color:var(--ht-checkbox-checked-focus-background-color)}.handsontable .htCheckboxRendererInput:checked:focus:after{color:var(--ht-checkbox-checked-focus-icon-color)}.handsontable .htCheckboxRendererInput:focus:before{border-color:var(--ht-checkbox-focus-border-color);background-color:var(--ht-checkbox-focus-background-color);outline:1px solid var(--ht-checkbox-focus-ring-color)}.handsontable .htCheckboxRendererInput:focus:after{color:var(--ht-checkbox-focus-icon-color)}.handsontable .htCheckboxRendererInput:disabled{cursor:initial}.handsontable .htCheckboxRendererInput:disabled:before{border-color:var(--ht-checkbox-disabled-border-color);background-color:var(--ht-checkbox-disabled-background-color)}.handsontable .htCheckboxRendererInput:disabled:after{color:var(--ht-checkbox-disabled-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:before{border-color:var(--ht-checkbox-indeterminate-border-color);background-color:var(--ht-checkbox-indeterminate-background-color)}.handsontable .htCheckboxRendererInput:indeterminate:after{color:var(--ht-checkbox-indeterminate-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:disabled:before{border-color:var(--ht-checkbox-indeterminate-disabled-border-color);background-color:var(--ht-checkbox-indeterminate-disabled-background-color)}.handsontable .htCheckboxRendererInput:indeterminate:disabled:after{color:var(--ht-checkbox-indeterminate-disabled-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:focus:before{border-color:var(--ht-checkbox-indeterminate-focus-border-color);background-color:var(--ht-checkbox-indeterminate-focus-background-color)}.handsontable .htCheckboxRendererInput:indeterminate:focus:after{color:var(--ht-checkbox-indeterminate-focus-icon-color)}.handsontable .htCheckboxRendererInput.noValue{opacity:.5}.handsontable .htCheckboxRendererLabel{font-size:inherit;line-height:inherit;cursor:pointer;color:inherit;margin:0;display:inline-block;position:relative}.handsontable .htCheckboxRendererLabel.fullWidth{width:100%}.handsontable .htPlaceholder{color:var(--ht-placeholder-color)}.handsontable .htDimmed{color:var(--ht-read-only-color)!important;background-color:var(--ht-cell-read-only-background-color)!important}.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 .htInvalid{background-color:var(--ht-cell-error-background-color)!important}.handsontable .htNoWrap{white-space:nowrap}.handsontable .htSearchResult{background-color:var(--ht-cell-success-background-color)!important}.handsontable .ht-multi-select-renderer{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);overflow:hidden}.handsontable .ht-multi-select-chips-container{align-items:center;gap:var(--ht-gap-size);flex-wrap:nowrap;max-width:100%;display:flex;overflow:hidden}.handsontable .ht-multi-select-chip{align-items:center;gap:var(--ht-gap-size);padding:var(--ht-chip-vertical-padding)calc((var(--ht-line-height) - var(--ht-icon-size))/2)var(--ht-chip-vertical-padding)var(--ht-chip-horizontal-padding);border-radius:var(--ht-chip-border-radius);background:var(--ht-chip-background);white-space:nowrap;box-sizing:border-box;flex-shrink:0;max-width:100px;display:inline-flex}.handsontable .ht-multi-select-chip-label{text-overflow:ellipsis;color:var(--ht-foreground-color);font-style:normal;font-weight:var(--ht-font-weight);line-height:var(--ht-line-height,40px);letter-spacing:var(--ht-letter-spacing,0);padding:0 var(--ht-chip-gap);overflow:hidden}.handsontable .ht-multi-select-chip-remove{cursor:pointer;color:var(--ht-icon-button-icon-color);background-position:50%;background-repeat:no-repeat;background-size:contain;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:flex;position:relative;width:var(--ht-icon-size)!important;height:var(--ht-icon-size)!important}.handsontable .ht-multi-select-chip-remove:before{content:"";display:block;position:absolute;top:0;left:0}.handsontable .ht-multi-select-chip-remove:hover{background-color:var(--ht-icon-button-hover-background-color)}.handsontable .ht-multi-select-overflow{padding:var(--ht-chip-vertical-padding)var(--ht-chip-horizontal-padding);background:var(--ht-chip-background);border-radius:var(--ht-chip-border-radius);color:var(--ht-foreground-color);white-space:nowrap;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.handsontableInputHolder{position:absolute;top:0;left:0}.handsontableInputHolder .handsontableInput{padding:calc(var(--ht-cell-vertical-padding,4px) + 1px)calc(var(--ht-cell-horizontal-padding,8px) + 1px);color:var(--ht-cell-editor-foreground-color);background-color:var(--ht-cell-editor-background-color,#fff);box-shadow:inset 0 0 0 var(--ht-cell-editor-border-width,2px)var(--ht-cell-editor-border-color,#1a42e8),0 0 var(--ht-cell-editor-shadow-blur-radius,0)0 var(--ht-cell-editor-shadow-color,transparent);box-sizing:border-box;border:none;border-radius:0;outline-width:0;margin:0;display:block;font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;-webkit-appearance:none!important}.handsontableInputHolder .handsontableInput:focus{outline:none}.htSelectEditor{position:absolute}.htSelectEditor select{width:100%;height:100%;padding:calc(var(--ht-cell-vertical-padding,4px) + 1px)calc(var(--ht-cell-horizontal-padding,8px) + 1px);white-space:nowrap;text-overflow:ellipsis;color:var(--ht-cell-editor-foreground-color);background-color:var(--ht-cell-editor-background-color,#fff);box-shadow:inset 0 0 0 var(--ht-cell-editor-border-width,2px)var(--ht-cell-editor-border-color,#1a42e8),0 0 var(--ht-cell-editor-shadow-blur-radius,0)0 var(--ht-cell-editor-shadow-color,transparent);box-sizing:border-box;border:none;border-radius:0;margin:0;padding-inline-end:26px;position:absolute;inset:0;overflow:hidden;font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;-webkit-appearance:none!important}.htSelectEditor select:focus{outline:none}.htSelectEditor .htAutocompleteArrow{z-index:1;pointer-events:none;margin-inline-end:4px;top:50%;transform:translateY(-50%)}.handsontable.listbox{box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);border:var(--ht-menu-border-width,1px)solid var(--ht-menu-border-color,#e5e5e9);margin:0}.handsontable.listbox .ht_master{background-color:var(--ht-background-color);overflow:hidden}.handsontable.listbox .wtHolder{overflow:auto;border-radius:0!important}.handsontable.listbox .wtHider,.handsontable.listbox .htCore{border-radius:0!important}.handsontable.listbox table{overflow:hidden}.handsontable.listbox table th,.handsontable.listbox table tr:first-child th,.handsontable.listbox table tr:last-child th,.handsontable.listbox table tr:first-child td,.handsontable.listbox table td{border-color:#0000!important}.handsontable.listbox table th,.handsontable.listbox table td{white-space:nowrap;text-overflow:ellipsis;border-radius:0!important}.handsontable.listbox table .wtBorder{visibility:hidden}.handsontable.listbox table strong{color:inherit;font-weight:700}.handsontable.listbox table tr td:hover td{cursor:pointer;background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important;box-shadow:none!important}.handsontable.listbox table td{transition:var(--ht-table-transition)background ease-in-out}.handsontable.listbox table td:hover{cursor:pointer;background-color:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important}.handsontable.listbox table td.current:not([aria-expanded=true]){box-shadow:inset 0 0 0 1px var(--ht-accent-color)}.handsontable.listbox table td.htDimmed{cursor:default;font-style:inherit;color:inherit!important}.handsontable.listbox table td.htDimmed:not(.handsontable.listbox table td:hover){background-color:inherit!important}.handsontable.listbox table thead th{text-align:left;height:auto!important}.handsontable.listbox table thead th .relative{padding-top:calc(var(--ht-cell-vertical-padding) + var(--ht-gap-size));padding-bottom:calc(var(--ht-cell-vertical-padding) + var(--ht-gap-size))}.handsontable.listbox .ht_clone_top .wtHider{overflow:hidden}.handsontable.listbox .ht_clone_top table{border-radius:0}.handsontable.listbox .htBorders div{background:0 0!important}.handsontable.autocompleteEditor tr.ht__row_even th,.handsontable.autocompleteEditor tr.ht__row_even td,.handsontable.autocompleteEditor tr.ht__row_odd th,.handsontable.autocompleteEditor tr.ht__row_odd td{background-color:var(--ht-background-color,#fff)}[dir=rtl].handsontable.listbox table thead th{text-align:right}.pika-single{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);color:var(--ht-foreground-color);background:var(--ht-background-color,#fff);border:var(--ht-menu-border-width,1px)solid var(--ht-menu-border-color,#e5e5e9);border-radius:var(--ht-menu-border-radius);z-index:9999;padding:10px;display:block;position:relative}.pika-single.is-hidden{display:none}.pika-single .pika-row{background-color:#0000}.pika-single .pika-title{justify-content:center;align-items:center;display:flex}.pika-single .pika-label{color:var(--ht-accent-color);order:2;padding:5px;position:relative}.pika-single .pika-label .pika-select{opacity:0;cursor:pointer;position:absolute;inset:0}.pika-single .pika-prev,.pika-single .pika-next{white-space:nowrap;text-indent:-9999px;cursor:pointer;width:20px;height:20px;color:var(--ht-accent-color);background:0 0;border:none;padding:0}.pika-single .pika-prev{order:1;margin-right:auto}.pika-single .pika-next{order:3;margin-left:auto}.pika-single .pika-table thead{height:50px}.pika-single .pika-table th{vertical-align:middle;padding:1px}.pika-single .pika-table th abbr{cursor:initial;border:none;font-weight:400;text-decoration:none}.pika-single .pika-table td{vertical-align:middle;padding:1px}.pika-single .pika-table td.is-disabled .pika-button{pointer-events:none;opacity:.5}.pika-single .pika-table td.is-today .pika-button{background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}.pika-single .pika-table td.is-selected .pika-button{background:var(--ht-accent-color,#1a42e8);color:var(--ht-primary-button-foreground-color,#fff)}.pika-single .pika-table td.pika-week{text-align:center;width:12.5%}.pika-single .pika-table .pika-button{aspect-ratio:1;width:100%;color:var(--ht-foreground-color);border-radius:var(--ht-button-border-radius);cursor:pointer;font-size:inherit;background:0 0;border:none;margin:0;padding:10px}.pika-single .pika-table .pika-button:hover{background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}[dir=rtl].htDatepickerHolder .pika-single .pika-next{margin-left:0;margin-right:auto;transform:rotate(180deg)}[dir=rtl].htDatepickerHolder .pika-single .pika-prev{margin-left:auto;margin-right:0;transform:rotate(180deg)}.handsontableEditor{position:absolute}.handsontableEditor .ht-multi-select-editor{box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);border-radius:0 0 var(--ht-menu-border-radius)var(--ht-menu-border-radius);border:var(--ht-menu-border-width)solid var(--ht-menu-border-color);background:var(--ht-background-color);width:max-content;min-width:120px;padding:var(--ht-menu-vertical-padding)var(--ht-menu-horizontal-padding);overflow-y:auto}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-search-input-wrapper{padding:var(--ht-menu-item-vertical-padding)var(--ht-menu-item-horizontal-padding);align-items:center;gap:var(--ht-gap-size);align-self:stretch;display:flex;position:relative}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-search-icon{left:calc(var(--ht-menu-item-horizontal-padding) + 10px);opacity:.5;pointer-events:none;z-index:1;background-position:50%;background-repeat:no-repeat;background-size:contain;width:16px;height:16px;position:absolute;top:50%;transform:translateY(-50%)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input{box-sizing:border-box;border-radius:var(--ht-input-border-radius);width:100%;color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);border:1px solid var(--ht-input-border-color);transition:var(--ht-table-transition)all ease-in-out;line-height:var(--ht-line-height);font-size:var(--ht-font-size);padding:var(--ht-input-vertical-padding)var(--ht-menu-item-horizontal-padding)var(--ht-input-vertical-padding)32px}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color);outline-offset:0;box-shadow:none;outline:none}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input::placeholder{color:var(--ht-foreground-color);opacity:.6}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-separator{background-color:var(--ht-menu-border-color);width:100%;height:1px;margin:var(--ht-menu-vertical-padding)0 var(--ht-menu-vertical-padding)0;padding:0}.handsontableEditor .ht-multi-select-editor ul{width:100%;padding:var(--ht-gap-size)var(--ht-menu-horizontal-padding);flex-direction:column;align-items:flex-start;margin:0;list-style:none;display:flex}.handsontableEditor .ht-multi-select-editor ul li{background:var(--ht-background-color);padding:var(--ht-menu-item-vertical-padding)var(--ht-menu-item-horizontal-padding);-webkit-user-select:none;user-select:none;cursor:pointer;align-self:stretch;align-items:center;display:flex}.handsontableEditor .ht-multi-select-editor ul li *{cursor:pointer}.handsontableEditor .ht-multi-select-editor ul li.ht-multi-select-editor-item-selected{background:color-mix(in srgb,var(--ht-menu-item-active-color)var(--ht-menu-item-active-color-opacity,100%),transparent)}.handsontableEditor .ht-multi-select-editor ul li div{flex:1 0 0;align-items:center;display:flex}.handsontableEditor .ht-multi-select-editor ul li div input{-webkit-appearance:none;appearance:none;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);margin:0;padding:0;display:flex;position:relative}.handsontableEditor .ht-multi-select-editor ul li div input:after{content:"";display:block;position:absolute;top:0;left:0}.handsontableEditor .ht-multi-select-editor ul li div input:before{content:"";box-sizing:border-box;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);border-radius:var(--ht-checkbox-border-radius);border:1px solid var(--ht-checkbox-border-color);background:var(--ht-checkbox-background-color);background-position:50%;background-repeat:no-repeat;display:block;position:absolute;top:0;left:0}.handsontableEditor .ht-multi-select-editor ul li div input:checked:before{border-color:var(--ht-checkbox-checked-border-color);background:var(--ht-checkbox-checked-background-color)}.handsontableEditor .ht-multi-select-editor ul li div input:checked:after{color:var(--ht-checkbox-checked-icon-color);background-color:currentColor}.handsontableEditor .ht-multi-select-editor ul li div input:focus{outline:none}.handsontableEditor .ht-multi-select-editor ul li div label{color:var(--ht-foreground-color);text-overflow:ellipsis;font-size:var(--ht-font-size);font-style:normal;font-weight:400;line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);width:100%;padding:0 0 0 calc(var(--ht-gap-size)*2);overflow:hidden}.handsontableEditor .ht-multi-select-editor ul li:hover{background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}.handsontableEditor .ht-multi-select-editor ul li:has(input:focus){background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}.handsontable .htUISelectCaption{width:100%;padding:var(--ht-input-vertical-padding)var(--ht-input-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-input-border-radius);box-sizing:border-box;cursor:pointer;border:var(--ht-input-border-width)solid var(--ht-input-border-color);color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);text-overflow:ellipsis;white-space:nowrap;transition:var(--ht-table-transition)all ease-in-out;margin:0;padding-inline-end:calc(var(--ht-input-horizontal-padding) + var(--ht-icon-size));overflow:hidden;outline:none!important}.handsontable .htUISelectCaption:after{content:"";right:calc(var(--ht-input-horizontal-padding) - var(--ht-icon-size)/4);display:block;position:absolute;top:50%;transform:translateY(-50%)}.handsontable .htUISelectCaption:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontable .htUISelectCaption:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontable .htUISelectCaption:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}.handsontable .htUISelect{cursor:pointer;position:relative;outline:none!important}.handsontable .htUISelect:focus .htUISelectCaption{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}[dir=rtl].handsontable .htUISelectCaption:after{right:auto;left:calc(var(--ht-input-horizontal-padding) - var(--ht-icon-size)/4)}.handsontable .htFiltersMenuCondition .htUIInput input,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input{width:100%;padding:var(--ht-input-vertical-padding)var(--ht-input-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-input-border-radius);box-sizing:border-box;cursor:pointer;border:var(--ht-input-border-width)solid var(--ht-input-border-color);color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);transition:var(--ht-table-transition)all ease-in-out;outline:none!important}.handsontable .htFiltersMenuCondition .htUIInput input:hover,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontable .htFiltersMenuCondition .htUIInput input:disabled,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontable .htFiltersMenuCondition .htUIInput input:focus,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}.handsontable .htUIInput{text-align:center;padding:0;position:relative;outline:none!important}.handsontable .htUIInputIcon{position:absolute}.handsontable .htUIInput.htUIButton input,.handsontable .ht-button{min-width:64px;padding:var(--ht-button-vertical-padding)var(--ht-button-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-button-border-radius);box-sizing:border-box;cursor:pointer;transition:var(--ht-table-transition)all ease-in-out;border-style:solid;border-width:1px;outline:none!important}.handsontable .htUIInput.htUIButtonCancel input,.handsontable .ht-button--secondary{border-color:var(--ht-secondary-button-border-color);background-color:var(--ht-secondary-button-background-color);color:var(--ht-secondary-button-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:hover,.handsontable .ht-button--secondary:hover{border-color:var(--ht-secondary-button-hover-border-color);background-color:var(--ht-secondary-button-hover-background-color);color:var(--ht-secondary-button-hover-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:disabled,.handsontable .ht-button--secondary:disabled{border-color:var(--ht-secondary-button-disabled-border-color);background-color:var(--ht-secondary-button-disabled-background-color);color:var(--ht-secondary-button-disabled-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:focus,.handsontable .ht-button--secondary:focus{border-color:var(--ht-secondary-button-focus-border-color);background-color:var(--ht-secondary-button-focus-background-color);color:var(--ht-secondary-button-focus-foreground-color);box-shadow:0 0 0 1px var(--ht-accent-color)}.htUIInput.htUIButtonOK input,.ht-button--primary{border-color:var(--ht-primary-button-border-color);background-color:var(--ht-primary-button-background-color);color:var(--ht-primary-button-foreground-color)}.htUIInput.htUIButtonOK input:hover,.ht-button--primary:hover{border-color:var(--ht-primary-button-hover-border-color);background-color:var(--ht-primary-button-hover-background-color);color:var(--ht-primary-button-hover-foreground-color)}.htUIInput.htUIButtonOK input:disabled,.ht-button--primary:disabled{border-color:var(--ht-primary-button-disabled-border-color);background-color:var(--ht-primary-button-disabled-background-color);color:var(--ht-primary-button-disabled-foreground-color)}.htUIInput.htUIButtonOK input:focus,.ht-button--primary:focus{border-color:var(--ht-primary-button-focus-border-color);background-color:var(--ht-primary-button-focus-background-color);color:var(--ht-primary-button-focus-foreground-color);box-shadow:0 0 0 1px var(--ht-accent-color)}.handsontable .htUIRadio{padding:var(--ht-gap-size)calc(2*var(--ht-gap-size));align-items:center;gap:var(--ht-gap-size);cursor:pointer;margin:0;padding-bottom:0;display:inline-flex;position:relative}.handsontable .htUIRadio:first-child{padding-inline-start:0}.handsontable .htUIRadio>input[type=radio]{width:var(--ht-radio-size);height:var(--ht-radio-size);-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:calc(.5*var(--ht-radio-size));outline:none;margin:0;position:relative}.handsontable .htUIRadio>input[type=radio]:before{content:"";border-radius:calc(.5*var(--ht-radio-size));border:1px solid var(--ht-radio-border-color);background-color:var(--ht-radio-background-color);display:block;position:absolute;inset:0}.handsontable .htUIRadio>input[type=radio]:after{content:"";color:var(--ht-radio-icon-color);display:block;position:absolute}.handsontable .htUIRadio>input[type=radio]:checked:before{border-color:var(--ht-radio-checked-border-color);background-color:var(--ht-radio-checked-background-color)}.handsontable .htUIRadio>input[type=radio]:checked:after{color:var(--ht-radio-checked-icon-color)}.handsontable .htUIRadio>input[type=radio]:checked:disabled{cursor:initial}.handsontable .htUIRadio>input[type=radio]:checked:disabled:before{border-color:var(--ht-radio-checked-disabled-border-color);background-color:var(--ht-radio-checked-disabled-background-color)}.handsontable .htUIRadio>input[type=radio]:checked:disabled:after{color:var(--ht-radio-checked-disabled-icon-color)}.handsontable .htUIRadio>input[type=radio]:checked:focus:before{border-color:var(--ht-radio-checked-focus-border-color);background-color:var(--ht-radio-checked-focus-background-color)}.handsontable .htUIRadio>input[type=radio]:checked:focus:after{color:var(--ht-radio-checked-focus-icon-color)}.handsontable .htUIRadio>input[type=radio]:disabled{cursor:initial}.handsontable .htUIRadio>input[type=radio]:disabled:before{border-color:var(--ht-radio-disabled-border-color);background-color:var(--ht-radio-disabled-background-color)}.handsontable .htUIRadio>input[type=radio]:disabled:after{color:var(--ht-radio-disabled-icon-color)}.handsontable .htUIRadio>input[type=radio]:focus:before{border-color:var(--ht-radio-focus-border-color);background-color:var(--ht-radio-focus-background-color);outline:1px solid var(--ht-radio-focus-ring-color)}.handsontable .htUIRadio>input[type=radio]:focus:after{color:var(--ht-radio-focus-icon-color)}.handsontable .htUIRadio label{vertical-align:middle;cursor:pointer;color:inherit}.handsontable .htUIRadio label:before{content:"";display:block;position:absolute;inset:0}.handsontable .collapsibleIndicator,.handsontable .ht_nestingButton{width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);margin:calc(-1*(var(--ht-icon-button-hit-area-size) - var(--ht-icon-size))/2 + 1px);box-sizing:border-box;cursor:pointer;text-indent:-100px;flex-shrink:0;font-size:0;position:relative;overflow:visible}.handsontable .collapsibleIndicator:before,.handsontable .ht_nestingButton:before{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-collapse-button-border-radius);transition:var(--ht-table-transition)all ease-in-out;z-index:1;display:block;position:absolute;top:50%;left:50%}.handsontable .collapsibleIndicator:after,.handsontable .ht_nestingButton:after{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-collapse-button-border-radius);transition:var(--ht-table-transition)all ease-in-out;z-index:0;display:block;position:absolute;top:50%;left:50%}.handsontable .collapsibleIndicator.expanded:before,.handsontable .collapsibleIndicator.ht_nestingCollapse:before,.handsontable .ht_nestingButton.expanded:before,.handsontable .ht_nestingButton.ht_nestingCollapse:before{color:var(--ht-collapse-button-open-icon-color)}.handsontable .collapsibleIndicator.expanded:after,.handsontable .collapsibleIndicator.ht_nestingCollapse:after,.handsontable .ht_nestingButton.expanded:after,.handsontable .ht_nestingButton.ht_nestingCollapse:after{background-color:var(--ht-collapse-button-open-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-open-border-color)}.handsontable .collapsibleIndicator.expanded:hover:before,.handsontable .collapsibleIndicator.ht_nestingCollapse:hover:before,.handsontable .ht_nestingButton.expanded:hover:before,.handsontable .ht_nestingButton.ht_nestingCollapse:hover:before{color:var(--ht-collapse-button-open-hover-icon-color)}.handsontable .collapsibleIndicator.expanded:hover:after,.handsontable .collapsibleIndicator.ht_nestingCollapse:hover:after,.handsontable .ht_nestingButton.expanded:hover:after,.handsontable .ht_nestingButton.ht_nestingCollapse:hover:after{background-color:var(--ht-collapse-button-open-hover-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-open-hover-border-color)}.handsontable .collapsibleIndicator.collapsed:before,.handsontable .collapsibleIndicator.ht_nestingExpand:before,.handsontable .ht_nestingButton.collapsed:before,.handsontable .ht_nestingButton.ht_nestingExpand:before{color:var(--ht-collapse-button-close-icon-color)}.handsontable .collapsibleIndicator.collapsed:after,.handsontable .collapsibleIndicator.ht_nestingExpand:after,.handsontable .ht_nestingButton.collapsed:after,.handsontable .ht_nestingButton.ht_nestingExpand:after{background-color:var(--ht-collapse-button-close-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-close-border-color)}.handsontable .collapsibleIndicator.collapsed:hover:before,.handsontable .collapsibleIndicator.ht_nestingExpand:hover:before,.handsontable .ht_nestingButton.collapsed:hover:before,.handsontable .ht_nestingButton.ht_nestingExpand:hover:before{color:var(--ht-collapse-button-close-hover-icon-color)}.handsontable .collapsibleIndicator.collapsed:hover:after,.handsontable .collapsibleIndicator.ht_nestingExpand:hover:after,.handsontable .ht_nestingButton.collapsed:hover:after,.handsontable .ht_nestingButton.ht_nestingExpand:hover:after{background-color:var(--ht-collapse-button-close-hover-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-close-hover-border-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.collapsed:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand:before,.handsontable th.ht__active_highlight .ht_nestingButton.collapsed:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand:before{color:var(--ht-collapse-button-close-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.collapsed:hover:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.collapsed:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand:hover:before{color:var(--ht-collapse-button-close-hover-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.expanded:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse:before,.handsontable th.ht__active_highlight .ht_nestingButton.expanded:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse:before{color:var(--ht-collapse-button-open-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.expanded:hover:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.expanded:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse:hover:before{color:var(--ht-collapse-button-open-hover-icon-active-color)}.handsontable thead th.htRowspanHeader+th{border-inline-start-width:0}.handsontable thead th.htRowspanHeader{vertical-align:bottom;height:auto;overflow:visible}.handsontable thead th.htRowspanHeader.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color);z-index:1}.handsontable.htRowHeaders.htHasRowspanHeaders thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:0}.handsontable.htRowHeaders.htHasRowspanHeaders thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0}.handsontable.htHasRowspanHeaders .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0}.handsontable.htHasRowspanHeaders .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0}.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead th.htRowspanBottomLevel,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead th.htRowspanBottomLevel{border-bottom-width:0}.handsontable thead th.hiddenHeader:not(:first-of-type){display:none}.handsontable thead th.hiddenHeaderText .colHeader{opacity:0}.handsontable th.ht_nestingLevels>.relative{align-items:center;gap:5px;display:flex}.handsontable th.ht_nestingLevels span:last-child{padding-left:calc(var(--ht-icon-size) + 5px)}.handsontable th.ht_nestingLevels span.ht_nestingLevel{display:inline-block}.handsontable th.ht_nestingLevels span.ht_nestingLevel_empty{order:-2;width:5px;height:1px;display:inline-block;position:relative}.handsontable th.ht_nestingLevels .ht_nestingButton{cursor:pointer;order:-1;position:relative}.handsontable th.beforeHiddenColumn,.handsontable th.afterHiddenColumn{position:relative}.handsontable th.beforeHiddenColumn:before,.handsontable th.beforeHiddenColumn:after,.handsontable th.afterHiddenColumn:before,.handsontable th.afterHiddenColumn:after{color:var(--ht-hidden-indicator-color);position:absolute;top:50%;transform:translateY(-50%);width:10px!important;height:10px!important}.handsontable th.beforeHiddenColumn:after{content:"";display:block;right:-2px}.handsontable th.afterHiddenColumn:before{content:"";display:block;left:-2px}.handsontable th.ht__active_highlight.beforeHiddenColumn:before,.handsontable th.ht__active_highlight.beforeHiddenColumn:after,.handsontable th.ht__active_highlight.afterHiddenColumn:before,.handsontable th.ht__active_highlight.afterHiddenColumn:after{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}[dir=rtl].handsontable th.beforeHiddenColumn:after{right:initial;left:-2px;transform:translateY(-50%)rotate(180deg)}[dir=rtl].handsontable th.afterHiddenColumn:before{right:-2px;left:initial;transform:translateY(-50%)rotate(180deg)}.handsontable th.beforeHiddenRow,.handsontable th.afterHiddenRow{position:relative}.handsontable th.beforeHiddenRow:before,.handsontable th.beforeHiddenRow:after,.handsontable th.afterHiddenRow:before,.handsontable th.afterHiddenRow:after{color:var(--ht-hidden-indicator-color);position:absolute;left:50%;transform:translate(-50%);width:10px!important;height:10px!important}.handsontable th.beforeHiddenRow:after{content:"";display:block;bottom:-2px}.handsontable th.afterHiddenRow:before{content:"";display:block;top:-2px}.handsontable th.ht__active_highlight.beforeHiddenRow:before,.handsontable th.ht__active_highlight.beforeHiddenRow:after,.handsontable th.ht__active_highlight.afterHiddenRow:before,.handsontable th.ht__active_highlight.afterHiddenRow:after{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}.handsontable .changeType{box-sizing:border-box;width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);margin:calc(-1*(var(--ht-icon-button-hit-area-size) - var(--ht-icon-size))/2 + 1px);box-shadow:none;color:inherit;z-index:1;background:0 0;border:none;outline:none;flex-shrink:0;padding:0;position:relative;overflow:visible}.handsontable .changeType:before{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));color:var(--ht-icon-button-icon-color);z-index:1;display:block;position:absolute;top:50%;left:50%}.handsontable .changeType:after{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-icon-button-border-radius);box-shadow:0 0 0 1px var(--ht-icon-button-border-color);background-color:var(--ht-icon-button-background-color);z-index:0;display:block;position:absolute;top:50%;left:50%}.handsontable .changeType:hover{cursor:pointer}.handsontable .changeType:hover:before{color:var(--ht-icon-button-hover-icon-color)}.handsontable .changeType:hover:after{box-shadow:0 0 0 1px var(--ht-icon-button-hover-border-color);background-color:var(--ht-icon-button-hover-background-color)}.handsontable .ht__active_highlight .changeType:before{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}.handsontable .ht__active_highlight .changeType:after{box-shadow:0 0 0 1px var(--ht-icon-button-active-border-color,var(--ht-icon-active-button-border-color));background-color:var(--ht-icon-button-active-background-color,var(--ht-icon-active-button-background-color))}.handsontable .ht__active_highlight .changeType:hover:before{color:var(--ht-icon-button-active-hover-icon-color,var(--ht-icon-active-button-hover-icon-color))}.handsontable .ht__active_highlight .changeType:hover:after{box-shadow:0 0 0 1px var(--ht-icon-button-active-hover-border-color,var(--ht-icon-active-button-hover-border-color));background-color:var(--ht-icon-button-active-hover-background-color,var(--ht-icon-active-button-hover-background-color))}.handsontable th.htFiltersActive{background-color:var(--ht-header-filter-background-color)}.handsontable th.htFiltersActive.ht__active_highlight{background-color:color-mix(in srgb,var(--ht-header-active-background-color),var(--ht-header-filter-background-color)20%)}.handsontable.htDropdownMenu>.ht_master,.handsontable.htContextMenu>.ht_master,.handsontable.htFiltersConditionsMenu>.ht_master{box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);border:var(--ht-menu-border-width,1px)solid var(--ht-menu-border-color,#e5e5e9);border-radius:var(--ht-menu-border-radius);padding:var(--ht-menu-vertical-padding,8px)var(--ht-menu-horizontal-padding,0);background-color:var(--ht-background-color,#fff);overflow:hidden}.handsontable.htDropdownMenu:not(.htGhostTable),.handsontable.htContextMenu:not(.htGhostTable),.handsontable.htFiltersConditionsMenu:not(.htGhostTable){z-index:1060;display:none;position:absolute}.handsontable.htDropdownMenu .ht_clone_top,.handsontable.htDropdownMenu .ht_clone_bottom,.handsontable.htDropdownMenu .ht_clone_inline_start,.handsontable.htDropdownMenu .ht_clone_top_inline_start_corner,.handsontable.htDropdownMenu .ht_clone_bottom_inline_start_corner,.handsontable.htContextMenu .ht_clone_top,.handsontable.htContextMenu .ht_clone_bottom,.handsontable.htContextMenu .ht_clone_inline_start,.handsontable.htContextMenu .ht_clone_top_inline_start_corner,.handsontable.htContextMenu .ht_clone_bottom_inline_start_corner,.handsontable.htFiltersConditionsMenu .ht_clone_top,.handsontable.htFiltersConditionsMenu .ht_clone_bottom,.handsontable.htFiltersConditionsMenu .ht_clone_inline_start,.handsontable.htFiltersConditionsMenu .ht_clone_top_inline_start_corner,.handsontable.htFiltersConditionsMenu .ht_clone_bottom_inline_start_corner{display:none}.handsontable.htDropdownMenu table.htCore,.handsontable.htContextMenu table.htCore,.handsontable.htFiltersConditionsMenu table.htCore{overflow:hidden}.handsontable.htDropdownMenu .htCustomMenuRenderer .table.htCore,.handsontable.htContextMenu .htCustomMenuRenderer .table.htCore,.handsontable.htFiltersConditionsMenu .htCustomMenuRenderer .table.htCore{box-shadow:none}.handsontable.htDropdownMenu.handsontable:focus,.handsontable.htContextMenu.handsontable:focus,.handsontable.htFiltersConditionsMenu.handsontable:focus{outline:none}.handsontable.htDropdownMenu .wtBorder,.handsontable.htContextMenu .wtBorder,.handsontable.htFiltersConditionsMenu .wtBorder{visibility:hidden}.handsontable.htDropdownMenu tbody tr:first-of-type td:first-child,.handsontable.htDropdownMenu tbody tr:first-of-type th:first-child,.handsontable.htContextMenu tbody tr:first-of-type td:first-child,.handsontable.htContextMenu tbody tr:first-of-type th:first-child,.handsontable.htFiltersConditionsMenu tbody tr:first-of-type td:first-child,.handsontable.htFiltersConditionsMenu tbody tr:first-of-type th:first-child{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px)}.handsontable.htDropdownMenu table tbody tr td,.handsontable.htContextMenu table tbody tr td,.handsontable.htFiltersConditionsMenu table tbody tr td{padding:var(--ht-menu-item-vertical-padding,4px)var(--ht-menu-item-horizontal-padding,8px);white-space:nowrap;text-overflow:ellipsis;background:var(--ht-background-color,#fff);cursor:pointer;transition:var(--ht-table-transition)background ease-in-out;border-width:0;position:relative;overflow:hidden}.handsontable.htDropdownMenu table tbody tr td:first-child,.handsontable.htContextMenu table tbody tr td:first-child,.handsontable.htFiltersConditionsMenu table tbody tr td:first-child{border-top-width:0;border-inline-end-width:0;border-bottom-width:0;border-inline-start-width:0}.handsontable.htDropdownMenu table tbody tr td.htDimmed,.handsontable.htContextMenu table tbody tr td.htDimmed,.handsontable.htFiltersConditionsMenu table tbody tr td.htDimmed{font-style:normal;color:inherit!important;background-color:inherit!important}.handsontable.htDropdownMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled):hover,.handsontable.htContextMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled):hover,.handsontable.htFiltersConditionsMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled):hover{cursor:pointer;background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important}.handsontable.htDropdownMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]),.handsontable.htContextMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]),.handsontable.htFiltersConditionsMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]){box-shadow:inset 0 0 0 1px var(--ht-accent-color)}.handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper,.handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper,.handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper{margin-inline-end:calc(2*var(--ht-gap-size,4px) + var(--ht-icon-size))}.handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper:after,.handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper:after,.handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper:after{content:"";top:50%;right:calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size)*2);display:block;position:absolute;transform:translateY(-50%)}.handsontable.htDropdownMenu table tbody tr td.htSeparator,.handsontable.htContextMenu table tbody tr td.htSeparator,.handsontable.htFiltersConditionsMenu table tbody tr td.htSeparator{border-top:1px solid var(--ht-border-color);cursor:default;height:0;padding:0}.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled{color:var(--ht-disabled-color);cursor:default}.handsontable.htDropdownMenu table tbody tr td.htDisabled:hover,.handsontable.htContextMenu table tbody tr td.htDisabled:hover,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled:hover{background:var(--ht-background-color);color:var(--ht-disabled-color)}.handsontable.htDropdownMenu table tbody tr td.htHidden,.handsontable.htContextMenu table tbody tr td.htHidden,.handsontable.htFiltersConditionsMenu table tbody tr td.htHidden{display:none}:is(.handsontable.htDropdownMenu table tbody tr td:has(.htItemWrapper .selected),.handsontable.htContextMenu table tbody tr td:has(.htItemWrapper .selected),.handsontable.htFiltersConditionsMenu table tbody tr td:has(.htItemWrapper .selected)){background-color:color-mix(in srgb,var(--ht-menu-item-active-color)var(--ht-menu-item-active-color-opacity,100%),transparent)}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper,.handsontable.htContextMenu table tbody tr td .htItemWrapper,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper{margin-inline:calc(2*var(--ht-gap-size,4px))}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper:before,.handsontable.htContextMenu table tbody tr td .htItemWrapper:before,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper:before{vertical-align:text-bottom;margin-right:12px}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected{font-size:0;inset:0}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected:after,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected:after,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected:after{content:"";top:50%;right:calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size)*2);color:var(--ht-accent-color);display:block;position:absolute;transform:translateY(-50%)}.handsontable.htDropdownMenu table tbody tr td div span.selected,.handsontable.htContextMenu table tbody tr td div span.selected,.handsontable.htFiltersConditionsMenu table tbody tr td div span.selected{position:absolute;inset-inline-end:0}.handsontable.htDropdownMenu table tbody tr td .htUIButton,.handsontable.htContextMenu table tbody tr td .htUIButton,.handsontable.htFiltersConditionsMenu table tbody tr td .htUIButton{width:calc(50% - var(--ht-gap-size))}.handsontable.htDropdownMenu table tbody tr td .htUIButton input,.handsontable.htContextMenu table tbody tr td .htUIButton input,.handsontable.htFiltersConditionsMenu table tbody tr td .htUIButton input{width:100%}.handsontable .htUIClearAll a,.handsontable .htUISelectAll a{padding:var(--ht-gap-size);text-decoration:none;display:inline-block}.handsontable .htUIMultipleSelect .ht_master .wtHolder{background:0 0;border-radius:0!important;overflow-y:scroll!important}.handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore{box-shadow:none}[dir=rtl].handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper:after,[dir=rtl].handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper:after,[dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper:after{left:calc(4*var(--ht-gap-size));right:auto;transform:translateY(-50%)rotate(180deg)}[dir=rtl].handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected:after,[dir=rtl].handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected:after,[dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected:after{left:calc(4*var(--ht-gap-size));right:auto}.handsontable.htFiltersConditionsMenu:not(.htGhostTable){z-index:1070}.handsontable .ht_master table td.htCustomMenuRenderer{cursor:auto}.handsontable .ht_master table td.htCustomMenuRenderer.htFiltersMenuActionBar{padding-top:calc(var(--ht-menu-item-vertical-padding,4px)*2)}.handsontable .htFiltersMenuLabel{font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin-bottom:calc(var(--ht-gap-size,2px)*2)}.handsontable .htFiltersMenuLabel:empty{display:none}.handsontable .htFiltersMenuCondition{padding-top:calc(var(--ht-gap-size,2px)*3)!important;padding-bottom:0!important}.handsontable .htFiltersMenuCondition .border{border-bottom:1px solid var(--ht-border-color)!important}.handsontable .htFiltersMenuCondition .htUIInput{margin-top:calc(var(--ht-gap-size,2px)*2)}.handsontable .htFiltersMenuValue{padding-top:calc(var(--ht-gap-size,2px)*3)!important;border-bottom:1px solid var(--ht-border-color)!important;padding-bottom:0!important}.handsontable .htFiltersMenuOperators{padding-top:calc(var(--ht-gap-size,2px)*2)!important;padding-bottom:0!important}.handsontable .htUISelectionControls{margin:0 calc(var(--ht-gap-size,2px)*-1);padding-top:calc(var(--ht-gap-size,2px)*2)!important;padding-bottom:var(--ht-gap-size,2px)!important}.handsontable .htUIMultipleSelectHot{--ht-cell-horizontal-padding:calc(var(--ht-menu-item-horizontal-padding,2px) + var(--ht-gap-size,2px)*2);width:calc(100% + var(--ht-menu-item-horizontal-padding,2px)*2 + var(--ht-gap-size,2px)*4);margin:0 calc((var(--ht-menu-item-horizontal-padding,2px) + var(--ht-gap-size,2px)*2)*-1);overflow:initial!important}.handsontable .htUIMultipleSelectHot:before{content:"";background-color:var(--ht-border-color);width:100%;height:1px;display:block;position:absolute;top:-1px;left:0}.handsontable .htUIMultipleSelectHot .wtHolder{box-sizing:border-box;padding:0;overflow-x:hidden}.handsontable .htUIMultipleSelectHot .wtHolder .wtSpreader{padding:calc(var(--ht-gap-size)*2)0}.handsontable .htUIMultipleSelectHot .wtHolder td{padding:4px var(--ht-cell-horizontal-padding);height:auto!important}.handsontable .htUIClearAll,.handsontable .htUISelectAll{margin-right:var(--ht-gap-size,4px);margin-bottom:var(--ht-gap-size,4px);display:inline-block}.handsontable .htUIClearAll a,.handsontable .htUISelectAll a{font-size:var(--ht-font-size);line-height:var(--ht-line-height);color:var(--ht-link-color);border-radius:var(--ht-button-border-radius)}.handsontable .htUIClearAll a:hover,.handsontable .htUISelectAll a:hover{color:var(--ht-link-hover-color)}.handsontable .htUIClearAll a:focus,.handsontable .htUISelectAll a:focus{outline:1px solid var(--ht-link-hover-color)}.handsontable .htUIMultipleSelect .ht_master .wtHolder{overflow:auto}.handsontable .htUIMultipleSelect .ht_master .wtHolder .wtHider,.handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore,.handsontable .htUIMultipleSelect .ht_master .wtHolder tr,.handsontable .htUIMultipleSelect .ht_master .wtHolder td{background:0 0}.handsontable .htUIInput.htUIButton{cursor:pointer;display:inline-block}.handsontable .htUIInput.htUIButtonOK{margin-inline-start:0;margin-inline-end:calc(2*var(--ht-gap-size,2px))}.handsontable .htCommentCell{position:relative}.handsontable .htCommentCell:after{content:"";top:0;border-inline-start:var(--ht-comments-indicator-size,4px)solid #0000;border-inline-end:none;border-top:var(--ht-comments-indicator-size,4px)solid var(--ht-comments-indicator-color,#1a42e8);display:block;position:absolute;inset-inline-start:unset;inset-inline-end:0}.htCommentsContainer .htComments{z-index:1059;display:none;position:absolute}.htCommentsContainer .htCommentTextArea{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);width:240px;height:88px;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);padding:var(--ht-comments-textarea-vertical-padding)var(--ht-comments-textarea-horizontal-padding);border:var(--ht-comments-textarea-border-width,1px)solid var(--ht-comments-textarea-border-color,transparent);border-inline-start:var(--ht-comments-textarea-border-width,1px)solid var(--ht-comments-textarea-border-color,#1a42e8);color:var(--ht-comments-textarea-foreground-color);background-color:var(--ht-comments-textarea-background-color,#fff);box-sizing:border-box;-webkit-appearance:none;margin:0 -1px;outline:0!important}.htCommentsContainer .htCommentTextArea:focus{border:var(--ht-comments-textarea-focus-border-width,1px)solid var(--ht-comments-textarea-focus-border-color,#1a42e8);color:var(--ht-comments-textarea-focus-foreground-color);background-color:var(--ht-comments-textarea-focus-background-color,#fff)}.htBorders .wtBorder.ht-border-style-dashed-vertical{background-image:repeating-linear-gradient(to bottom,var(--ht-custom-border-color)0 5px,transparent 0 10px)}.htBorders .wtBorder.ht-border-style-dashed-horizontal{background-image:repeating-linear-gradient(to right,var(--ht-custom-border-color)0 5px,transparent 0 10px)}.htBorders .wtBorder.ht-border-style-dotted-horizontal{background-image:radial-gradient(circle,var(--ht-custom-border-color)calc(var(--ht-custom-border-size)/2),transparent 0);background-size:calc(var(--ht-custom-border-size)*2)var(--ht-custom-border-size);background-repeat:repeat-x}.htBorders .wtBorder.ht-border-style-dotted-vertical{background-image:radial-gradient(circle,var(--ht-custom-border-color)calc(var(--ht-custom-border-size)/2),transparent 0);background-size:var(--ht-custom-border-size)calc(var(--ht-custom-border-size)*2);background-repeat:repeat-y}.handsontable .columnSorting:not(.indicatorDisabled){position:relative}.handsontable .columnSorting:not(.indicatorDisabled).sortAction.ascending,.handsontable .columnSorting:not(.indicatorDisabled).sortAction.descending{padding-inline-end:calc(var(--ht-icon-size,16px) + 2px)}.handsontable .columnSorting:not(.indicatorDisabled).sortAction:hover{cursor:pointer;text-decoration:none}.handsontable .columnSorting:not(.indicatorDisabled).sortAction:before{content:"";width:var(--ht-icon-size,16px);text-align:right;display:block;position:absolute;top:50%;right:2px;transform:translateY(-50%)}.handsontable .htRight .columnSorting.sortAction.ascending,.handsontable .htRight .columnSorting.sortAction.descending{padding-inline-start:calc(var(--ht-icon-size,16px) + 2px);padding-inline-end:0}.handsontable .htRight .columnSorting.sortAction:before,[dir=rtl] .handsontable .columnSorting.sortAction:before{text-align:left;left:2px;right:auto}[dir=rtl] .handsontable .htRight .columnSorting.sortAction.ascending,[dir=rtl] .handsontable .htRight .columnSorting.sortAction.descending{padding-inline-start:0;padding-inline-end:calc(var(--ht-icon-size,16px) + 2px)}[dir=rtl] .handsontable .htLeft .columnSorting.sortAction.ascending,[dir=rtl] .handsontable .htLeft .columnSorting.sortAction.descending{padding-inline-start:calc(var(--ht-icon-size,16px) + 2px);padding-inline-end:0}[dir=rtl] .handsontable .htLeft .columnSorting.sortAction:before{text-align:right;left:auto;right:2px}.htGhostTable .htCore span.colHeader.columnSorting:not(.indicatorDisabled):before{content:"*";padding-inline-end:calc(var(--ht-icon-size,16px) + 2px);display:inline-block;position:relative}.handsontable .colHeader.columnSorting:after{content:"";text-align:right;width:8px;margin-top:4px;font-size:8px;display:block;position:absolute;top:50%;right:0;transform:translateY(-50%)}.handsontable .colHeader.columnSorting[class^=sort-]:after,.handsontable .colHeader.columnSorting[class*=\\ sort-]:after{content:"+"}.handsontable .colHeader.columnSorting.sort-1:after{content:"1"}.handsontable .colHeader.columnSorting.sort-2:after{content:"2"}.handsontable .colHeader.columnSorting.sort-3:after{content:"3"}.handsontable .colHeader.columnSorting.sort-4:after{content:"4"}.handsontable .colHeader.columnSorting.sort-5:after{content:"5"}.handsontable .colHeader.columnSorting.sort-6:after{content:"6"}.handsontable .colHeader.columnSorting.sort-7:after{content:"7"}.handsontable .htRight .colHeader.columnSorting:after,[dir=rtl] .handsontable .colHeader.columnSorting:after{text-align:left;left:0;right:auto}[dir=rtl] .handsontable .htLeft .colHeader.columnSorting:after{text-align:right;left:auto;right:0}.htGhostTable th div:has(.changeType) span.colHeader.columnSorting:not(.indicatorDisabled){padding-inline-end:var(--ht-gap-size)}.handsontable .htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_top_inline_start_corner th:nth-child(2),.handsontable .htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_inline_start td:first-of-type{border-left:0}.handsontable .ht_clone_top_inline_start_corner th.ht__active_highlight{box-shadow:none}.handsontable .manualColumnResizer{cursor:col-resize;opacity:0;z-index:210;background:0 0;width:10px;margin:0;position:absolute;top:0}.handsontable .manualColumnResizer:before,.handsontable .manualColumnResizer:after{content:"";background:var(--ht-resize-indicator-color);border-radius:2px;width:2px;height:calc(100% - 12px);max-height:16px;margin-top:.5px;display:block;position:absolute;top:50%;left:1px;transform:translateY(-50%)}.handsontable .manualColumnResizer:after{left:auto;right:0}.handsontable .manualColumnResizer:hover,.handsontable .manualColumnResizer.active{opacity:1}.handsontable .manualColumnResizerGuide{inset-inline-end:unset;width:0;border-inline-end:1px solid var(--ht-accent-color);border-inline-start:none;margin-inline-start:5px;margin-inline-end:unset;display:none;position:absolute;top:0}.handsontable .manualColumnResizerGuide.active{z-index:209;display:block}.handsontable .manualRowResizer{z-index:210;cursor:row-resize;opacity:0;background:0 0;height:10px;margin:0;position:absolute;left:0}.handsontable .manualRowResizer:before,.handsontable .manualRowResizer:after{content:"";background:var(--ht-resize-indicator-color);border-radius:2px;width:calc(100% - 12px);max-width:16px;height:2px;display:block;position:absolute;top:1px;left:50%;transform:translate(-50%)}.handsontable .manualRowResizer:after{top:auto;bottom:0}.handsontable .manualRowResizer:hover,.handsontable .manualRowResizer.active{opacity:1}.handsontable .manualRowResizerGuide{border-bottom:1px solid var(--ht-accent-color);border-top:none;height:0;margin-top:5px;display:none;position:absolute;bottom:0;left:0}.handsontable .manualRowResizerGuide.active{z-index:209;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-multiple]:before,.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-0]:before{opacity:.14}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-1]:before{opacity:.21}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-2]:before{opacity:.28}.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:.42}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-5]:before{opacity:.49}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-6]:before{opacity:.56}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-7]:before{opacity:.63}.handsontable .ht__manualColumnMove.after-selection--columns thead th.ht__highlight,.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,.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,.handsontable.ht__manualColumnMove.on-moving--columns .manualColumnResizer{display:none}.handsontable .ht__manualColumnMove--guideline,.handsontable .ht__manualColumnMove--backlight,.handsontable.ht__manualColumnMove--guideline,.handsontable.ht__manualColumnMove--backlight{height:100%;display:none;position:absolute}.handsontable .ht__manualColumnMove--guideline,.handsontable.ht__manualColumnMove--guideline{z-index:205;background:var(--ht-move-indicator-color,#1a42e8);width:1px;margin-inline:-.5px 0;top:0}.handsontable .ht__manualColumnMove--backlight,.handsontable.ht__manualColumnMove--backlight{z-index:205;pointer-events:none;background:color-mix(in srgb,var(--ht-move-backlight-color)var(--ht-move-backlight-opacity,100%),transparent);display:none}.handsontable .on-moving--columns.show-ui .ht__manualColumnMove--guideline,.handsontable .on-moving--columns .ht__manualColumnMove--backlight,.handsontable.on-moving--columns.show-ui .ht__manualColumnMove--guideline,.handsontable.on-moving--columns .ht__manualColumnMove--backlight{display:block}.handsontable .wtHider{position:relative}.handsontable .ht__manualRowMove.after-selection--rows tbody th.ht__highlight,.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,.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,.handsontable.ht__manualRowMove.on-moving--rows .manualRowResizer{display:none}.handsontable .ht__manualRowMove--guideline,.handsontable .ht__manualRowMove--backlight,.handsontable.ht__manualRowMove--guideline,.handsontable.ht__manualRowMove--backlight{width:100%;display:none;position:absolute}.handsontable .ht__manualRowMove--guideline,.handsontable.ht__manualRowMove--guideline{border-top:1px solid var(--ht-move-indicator-color);z-index:205;left:0}.handsontable .ht__manualRowMove--backlight,.handsontable.ht__manualRowMove--backlight{z-index:205;pointer-events:none;background:color-mix(in srgb,var(--ht-move-backlight-color)var(--ht-move-backlight-opacity,100%),transparent);display:none}.handsontable .on-moving--rows.show-ui .ht__manualRowMove--guideline,.handsontable .on-moving--rows .ht__manualRowMove--backlight,.handsontable.on-moving--rows.show-ui .ht__manualRowMove--guideline,.handsontable.on-moving--rows .ht__manualRowMove--backlight{display:block}.ht-dialog{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);font-size:var(--ht-font-size);line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);z-index:1060;opacity:0;border-radius:var(--ht-wrapper-border-radius);border:1px solid var(--ht-border-color);width:100%;height:100%;display:none;position:absolute;top:0;left:0;overflow-y:auto;box-sizing:border-box!important}.ht-dialog[dir=rtl]{left:auto;right:0}.ht-dialog:focus{border:1px solid var(--ht-accent-color);outline:none}.ht-dialog:has(.htFocusCatcher:focus){border:1px solid var(--ht-accent-color);outline:none}.ht-dialog *{box-sizing:border-box!important}.ht-dialog--background-solid{background-color:var(--ht-dialog-solid-background-color)}.ht-dialog--background-semi-transparent{background-color:color-mix(in srgb,var(--ht-dialog-semi-transparent-background-color)var(--ht-dialog-semi-transparent-background-opacity,100%),transparent)}.ht-dialog--animation{transition:opacity var(--ht-table-transition)ease-in-out}.ht-dialog--show{opacity:1}.ht-dialog__content-wrapper{width:100%;min-height:100%;padding:calc(var(--ht-gap-size)*4);border-radius:var(--ht-wrapper-border-radius);justify-content:center;align-items:center;display:flex}.ht-dialog__content{padding:var(--ht-dialog-content-padding-horizontal)var(--ht-dialog-content-padding-vertical);max-width:480px;color:var(--ht-foreground-color);position:relative}.ht-dialog__content--background{box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);border-radius:var(--ht-dialog-content-border-radius);background-color:var(--ht-dialog-content-background-color)}.ht-dialog--confirm .ht-dialog__content-wrapper{text-align:center;padding:calc(var(--ht-gap-size)*2)}.ht-dialog--confirm .ht-dialog__content-wrapper-inner{max-width:480px;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-wrapper-border-radius);flex-direction:column;justify-content:center;align-items:center;display:flex}.ht-dialog--confirm .ht-dialog__content-wrapper-inner--background{box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);border-radius:var(--ht-dialog-content-border-radius);background-color:var(--ht-dialog-content-background-color)}.ht-dialog--confirm .ht-dialog__content-wrapper-inner:focus{box-shadow:0 0 0 1px var(--ht-accent-color);outline:none}.ht-dialog--confirm .ht-dialog__content{justify-content:center;align-items:center;gap:var(--ht-gap-size);flex-direction:column;display:flex}.ht-dialog--confirm .ht-dialog__content:has(.ht-dialog__buttons){gap:calc(var(--ht-gap-size)*2)}.ht-dialog--confirm .ht-dialog__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-dialog--confirm .ht-dialog__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}.ht-dialog--confirm .ht-dialog__buttons{justify-content:center;gap:calc(var(--ht-gap-size)*2);flex-flow:wrap;display:flex}.ht-notification{z-index:1070;pointer-events:none;position:absolute;inset:0;overflow:visible}.ht-notification__stack{overscroll-behavior:contain;pointer-events:auto;-webkit-overflow-scrolling:touch;scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);flex-direction:column;gap:10px;max-width:min(420px,100% - 40px);min-height:0;padding:10px;display:flex;position:absolute;overflow:hidden auto}.ht-notification__stack--top-start{top:10px;align-items:flex-start;max-height:calc(100% - 40px);inset-inline-start:10px}.ht-notification__stack--top-end{top:10px;align-items:flex-end;max-height:calc(100% - 40px);inset-inline-end:10px}.ht-notification__stack--bottom-start{bottom:10px;align-items:flex-start;max-height:calc(100% - 40px);inset-inline-start:10px}.ht-notification__stack--bottom-end{bottom:10px;align-items:flex-end;max-height:calc(100% - 40px);inset-inline-end:10px}.ht-notification__toast{box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);pointer-events:auto;max-width:100%;color:var(--ht-notification-foreground-color,var(--ht-foreground-color));background-color:var(--ht-notification-background-color,var(--ht-background-color));border:1px solid var(--ht-notification-border-color,var(--ht-border-color));border-radius:var(--ht-wrapper-border-radius,4px);font-size:var(--ht-font-size);line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);outline:none;flex-shrink:0;display:flex;position:relative}.ht-notification__toast:focus-visible{box-shadow:0 0 0 1px var(--ht-accent-color)}.ht-notification__toast--animate{opacity:0;transition:opacity var(--ht-table-transition,.15s)ease-out,transform var(--ht-table-transition,.15s)ease-out}.ht-notification__toast--animate.ht-notification__toast--stack-top:not(.ht-notification__toast--visible){transform:translateY(-6px)}.ht-notification__toast--animate.ht-notification__toast--stack-bottom:not(.ht-notification__toast--visible){transform:translateY(6px)}.ht-notification__toast--visible{opacity:1;transform:translateY(0)}.ht-notification__toast--info .ht-notification__accent{display:none}.ht-notification__toast--success .ht-notification__accent{background-color:var(--ht-notification-success-accent,#37bc6c)}.ht-notification__toast--warning .ht-notification__accent{background-color:var(--ht-notification-warning-accent,#fbe952)}.ht-notification__toast--error .ht-notification__accent{background-color:var(--ht-notification-error-accent,#fa4d32)}.ht-notification__toast-inner{width:100%;min-width:0;direction:inherit;flex-direction:row;align-items:stretch;gap:0;padding:10px;display:flex}.ht-notification__accent{box-sizing:border-box;border-radius:4px;flex:0 0 4px;align-self:stretch;margin-inline-end:10px}.ht-notification__body{flex:auto;min-width:0}.ht-notification__title{margin:0 0 var(--ht-gap-size);font-size:var(--ht-font-size);font-weight:var(--ht-font-weight,600)}.ht-notification__message{font-size:var(--ht-font-size-small);word-break:break-word;margin:0}.ht-notification__actions{gap:var(--ht-gap-size);margin-top:var(--ht-gap-size);flex-wrap:wrap;display:flex}.ht-notification__close{box-sizing:border-box;width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);color:var(--ht-icon-button-icon-color,inherit);cursor:pointer;border-radius:var(--ht-icon-button-border-radius,var(--ht-wrapper-border-radius,4px));background:0 0;border:none;flex:none;align-self:flex-start;margin-inline-start:4px;padding:0;position:relative;overflow:visible}.ht-notification__close:before{content:"";top:50%;margin-top:calc(-.5*var(--ht-icon-size));margin-inline-start:calc(-.5*var(--ht-icon-size));display:block;position:absolute;inset-inline-start:50%}.ht-notification__close:hover{color:var(--ht-icon-button-hover-icon-color,inherit);background-color:var(--ht-icon-button-hover-background-color,color-mix(in srgb,var(--ht-foreground-color)8%,transparent))}.ht-notification__close:focus-visible{outline:2px solid var(--ht-accent-color);outline-offset:2px}.handsontable.ht-pagination{color:var(--ht-pagination-bar-foreground-color);background:var(--ht-pagination-bar-background-color);border:1px solid var(--ht-wrapper-border-color);border-radius:0 0 var(--ht-wrapper-border-radius)var(--ht-wrapper-border-radius);font-size:var(--ht-font-size);line-height:var(--ht-line-height);box-sizing:border-box;border-top-color:#0000;overflow-x:auto}.handsontable.ht-pagination--bordered{border-top-color:var(--ht-wrapper-border-color)}.handsontable.ht-pagination .ht-pagination__inner{justify-content:space-between;align-items:center;gap:calc(var(--ht-gap-size)*4);border-radius:0 0 var(--ht-wrapper-border-radius)var(--ht-wrapper-border-radius);padding-inline:var(--ht-pagination-bar-horizontal-padding);padding-block:var(--ht-pagination-bar-vertical-padding);flex-wrap:wrap;min-width:230px;display:flex}.handsontable.ht-pagination .ht-page-size-section{align-items:center;gap:calc(var(--ht-gap-size)*2);display:flex}.handsontable.ht-pagination .ht-page-size-section__label{white-space:nowrap}.handsontable.ht-pagination .ht-page-size-section__select-wrapper{border-radius:var(--ht-input-border-radius);position:relative}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select{padding-inline-start:var(--ht-gap-size);padding-inline-end:calc(var(--ht-gap-size) + var(--ht-icon-size));padding-top:var(--ht-gap-size);padding-bottom:var(--ht-gap-size);border-radius:var(--ht-input-border-radius);color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);border:1px solid var(--ht-input-border-color);line-height:calc(var(--ht-line-height) - 4px);-webkit-appearance:none;font-size:inherit;cursor:pointer}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:disabled{opacity:.4;cursor:default;color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color);border-color:var(--ht-input-disabled-border-color)}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:hover:not(:disabled){color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color);border-color:var(--ht-input-hover-border-color)}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:focus{color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color);border-color:var(--ht-input-focus-border-color);outline:none}.handsontable.ht-pagination .ht-page-size-section__select-wrapper:after{content:"";background-color:var(--ht-foreground-color);pointer-events:none;display:block;position:absolute;inset-block-end:50%;inset-inline-end:var(--ht-gap-size);transform:translateY(50%)}.handsontable.ht-pagination .ht-page-counter-section{margin-inline-end:auto}.handsontable.ht-pagination .ht-page-navigation-section{align-items:center;gap:1px;display:flex}.handsontable.ht-pagination .ht-page-navigation-section__button{font-size:inherit;border:1px solid var(--ht-pagination-button-border-color);color:var(--ht-pagination-button-foreground-color);background-color:var(--ht-pagination-button-background-color);border-radius:var(--ht-icon-button-large-border-radius);padding:var(--ht-icon-button-large-padding);cursor:pointer}.handsontable.ht-pagination .ht-page-navigation-section__button:before{content:"";display:block}.handsontable.ht-pagination .ht-page-navigation-section__button--disabled{cursor:default;pointer-events:none;color:var(--ht-pagination-button-disabled-foreground-color);background-color:var(--ht-pagination-button-disabled-background-color);border-color:var(--ht-pagination-button-disabled-border-color)}.handsontable.ht-pagination .ht-page-navigation-section__button:hover:not(:disabled){border-color:var(--ht-pagination-button-hover-border-color);color:var(--ht-pagination-button-hover-foreground-color);background-color:var(--ht-pagination-button-hover-background-color)}.handsontable.ht-pagination .ht-page-navigation-section__button:focus{border-color:var(--ht-pagination-button-focus-border-color);color:var(--ht-pagination-button-focus-foreground-color);background-color:var(--ht-pagination-button-focus-background-color);outline:none}.handsontable.ht-pagination .ht-page-navigation-section__label{white-space:nowrap;text-align:center;min-width:100px}.handsontable.ht-wrapper.htPagination:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.handsontable.ht-wrapper.htPagination .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htPagination .htCore thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htPagination .htCore thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htPagination .htCore thead tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htPagination .htCore thead tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}.ht-loading__icon-svg{width:var(--ht-icon-size);height:var(--ht-icon-size);color:var(--ht-accent-color);transform-origin:50%;animation:1s linear infinite ht-loading-spin;display:block}.ht-loading__content{align-items:center;gap:calc(var(--ht-gap-size)*2);display:flex}.ht-loading__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-loading__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}@keyframes ht-loading-spin{to{transform:rotate(360deg)}}.ht-empty-data-state{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);z-index:999;border:1px solid var(--ht-border-color);border-radius:var(--ht-wrapper-border-radius);box-sizing:border-box;background-color:var(--ht-background-color);width:100%;display:none;position:absolute;left:0;overflow-y:auto}.ht-empty-data-state *{box-sizing:border-box!important}.ht-empty-data-state__content-wrapper{text-align:center;width:100%;min-height:100%;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-wrapper-border-radius);justify-content:center;align-items:center;display:flex}.ht-empty-data-state__content-wrapper-inner{max-width:480px;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-wrapper-border-radius);flex-direction:column;justify-content:center;align-items:center;display:flex}.ht-empty-data-state__content-wrapper-inner:focus{box-shadow:0 0 0 1px var(--ht-accent-color);outline:none}.ht-empty-data-state__content{justify-content:center;align-items:center;gap:var(--ht-gap-size);flex-direction:column;display:flex}.ht-empty-data-state__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-empty-data-state__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}.ht-empty-data-state__buttons{justify-content:center;gap:calc(var(--ht-gap-size)*2);flex-flow:wrap;display:flex}.ht-empty-data-state__buttons--has-buttons{margin-top:calc(var(--ht-gap-size)*2)}.ht-empty-data-state__spinner{width:28px;height:28px;margin-bottom:calc(var(--ht-gap-size)*2);border:2px solid var(--ht-border-color);border-top-color:var(--ht-accent-color);border-radius:50%;flex-shrink:0;animation:.75s linear infinite ht-empty-data-state-spin}@media (prefers-reduced-motion:reduce){.ht-empty-data-state__spinner{border-top-color:var(--ht-border-color);animation:none}}.ht-empty-data-state--loading .ht-empty-data-state__content{gap:calc(var(--ht-gap-size)*.5)}.ht-empty-data-state--disable-top-border{border-top-width:0}.ht-empty-data-state--disable-top-border:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.ht-empty-data-state--disable-top-border:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-empty-data-state--disable-inline-border{border-inline-start-width:0}.ht-empty-data-state--disable-inline-border:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-bottom-left-radius:0}.ht-empty-data-state--disable-inline-border:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0;border-bottom-right-radius:0}:is(.ht-empty-data-state--disable-bottom-border,.ht-empty-data-state:has(~.ht-pagination)){border-bottom-width:0}:is(.ht-empty-data-state--disable-bottom-border,.ht-empty-data-state:has(~.ht-pagination)):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),:is(.ht-empty-data-state--disable-bottom-border,.ht-empty-data-state:has(~.ht-pagination)):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}@keyframes ht-empty-data-state-spin{to{transform:rotate(360deg)}}',this.#ts.head.appendChild(t)}#tg(){let e=this.getCSSVariableValue("line-height"),t=this.getCSSVariableValue("cell-vertical-padding"),r=Math.ceil(parseFloat(this.getStyleForTD("border-bottom-width")));return null===e||null===t||isNaN(r)?null:e+2*t+r}#tm(){this.#ti=getComputedStyle(this.#to);let e=this.#tf(["box-sizing","border-bottom-width"]);this.#tl.td={...this.#tl.td,...{"box-sizing":e["box-sizing"],"border-bottom-width":e["border-bottom-width"]}}}#tf(e){let t=this.#ts,r=this.#to,n=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),n.appendChild(o),r.appendChild(n);let l=getComputedStyle(a),h={};return e.forEach(e=>{h[e]=l.getPropertyValue(e)}),r.removeChild(n),h}#tu(e){let t=Math.ceil(parseFloat(this.#tc(e)));return Number.isNaN(t)?null:t}#tc(e){let t=this.#ti?.getPropertyValue(e);return""===t?null:t}#tp(){this.#tl={},this.#ta={}}clearCache(){this.#tp(),this.#tm()}}let da=null,dl=0,dh=(e,t)=>`width: var(--ht-icon-size);
|
|
65
|
+
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);let u={callback:t,group:n,runOnlyIf:o,captureCtrl:i,preventDefault:s,stopPropagation:a};eq(l)&&(u.relativeToGroup=l,u.position=h),h1(d)&&(u.forwardToContext=d),e.forEach(e=>{let t=hK(e);if(r.hasItem(t)){let e=r.getItem(t),n=e.findIndex(e=>e.group===l);-1!==n?"before"===h?n-=1:n+=1:n=e.length,e.splice(n,0,u)}else r.addItem(t,[u])})},o=e=>{let t=hK(e);r.removeItem(t)};return{__kindOf:h0,scope:t,addShortcut:n,addShortcuts:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach(e=>{tW(t,(r,n)=>{!1===Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])}),n(e)})},getShortcuts:e=>{let t=hK(e),n=r.getItem(t);return eq(n)?n.slice():[]},hasShortcut:e=>{let t=hK(e);return r.hasItem(t)},removeShortcutsByKeys:o,removeShortcutsByGroup:e=>{r.getItems().forEach(t=>{let[r,n]=t,i=n.filter(t=>t.group!==e);0===i.length?o(r.split("+")):(n.length=0,n.push(...i))})}}},h3=(o=new Set,{press(e){o.add(e)},release(e){o.delete(e)},releaseAll(){o.clear()},isPressed:e=>o.has(e)}),h6=[],h4=0,h5={_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){eH(this._hooksStorage[e]||[],t=>{this.hot.removeHook(e,t)})},clearHooks(){tW(this._hooksStorage,(e,t)=>this.removeHooksByKey(t)),this._hooksStorage={}}};tz(h5,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});let h9=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class h7{static get EDITOR_TYPE(){return"base"}hot;state=h9.VIRGIN;_opened=!1;_fullEditMode=!1;_closeCallback=null;_closeAfterDataChange=!0;TD=null;row=null;col=null;prop=null;originalValue=null;cellProperties=null;constructor(e){this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){t_("Editor getValue() method unimplemented")}setValue(){t_("Editor setValue() method unimplemented")}open(){t_("Editor open() method unimplemented")}close(){t_("Editor close() method unimplemented")}prepare(e,t,r,n,o,i){this.TD=n,this.row=e,this.col=t,this.prop=r,this.originalValue=o,this.cellProperties=i,this.state=this.isOpened()?this.state:h9.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let r,n,o,i;if(t){let e=this.hot.getSelectedRangeActive(),t=e.getTopStartCorner(),s=e.getBottomEndCorner();r=t.row,n=t.col,o=s.row,i=s.col}else[r,n,o,i]=[this.row,this.col,null,null];let s=this.hot.runHooks("modifyGetCellCoords",r,n,!1,"meta");Array.isArray(s)&&([r,n]=s),this.hot.populateFromArray(r,n,e,o,i,"edit")}beginEditing(e,t){if(this.state!==h9.VIRGIN)return;let r=this.hot,n=r.rowIndexMapper.getRenderableFromVisualIndex(this.row),o=r.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(r.view.scrollViewport(r._createCellCoords(n,o)),this.state=h9.EDITING,this.isInFullEditMode()){let t=hI(this.originalValue,this.hot.getCellMeta(this.row,this.col)),r="string"==typeof e?e:ej(t);this.setValue(r)}this.open(t),this._opened=!0,this.focus(),r.view.render(),r.runHooks("afterBeginEditing",this.row,this.col),this.addHook("beforeDialogShow",()=>this.cancelChanges())}finishEditing(e,t,r){if(r){let e=this._closeCallback;this._closeCallback=t=>{e&&e(t),r(t),this.hot.view.render()}}if(!this.isWaiting()){if(this.state===h9.VIRGIN)return void this.hot._registerTimeout(()=>{this._fireCallbacks(!0)});if(this.state===h9.EDITING){if(e){this.cancelChanges(),this.hot.view.render();return}let r=this.getValue();this.cellProperties.trimWhitespace&&(r="string"==typeof r?String.prototype.trim.call(r||""):r),"function"==typeof this.cellProperties.valueParser&&(r=this.cellProperties.valueParser(r,this.cellProperties)),this.state=h9.WAITING,this.saveValue([[r]],t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",e=>{this.state=h9.FINISHED,this.discardEditor(e)}):(this.state=h9.FINISHED,this.discardEditor(!0))}}}cancelChanges(){this.state=h9.FINISHED,this.discardEditor()}discardEditor(e){this.state===h9.FINISHED&&(!1===e&&!0!==this.cellProperties.allowInvalid?(this.hot.selectCell(this.row,this.col),this.focus(),this.state=h9.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this._fullEditMode=!1,this.state=h9.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===h9.WAITING}getEditedCellRect(){let e=this.getEditedCell();if(!e)return;let{wtOverlays:t,wtViewport:r}=this.hot.view._wt,n=this.hot.rootWindow,o=rW(e),i=r0(e),s=rW(this.hot.rootElement),a=r0(this.hot.rootElement),l=t.topOverlay.holder,h=t.inlineStartOverlay.holder,d=l!==n?l.scrollTop:0,u=h!==n?h.scrollLeft:0,c=n.innerWidth-s.left-a,{wtTable:g}=t.getParentOverlay(e)??this.hot.view._wt,p=g.name,m=["master","inline_start"].includes(p)?d:0,f=["master","top","bottom"].includes(p)?u:0,y=+(o.top!==s.top),b=o.top-s.top-y-m,C=0;C=this.hot.isRtl()?n.innerWidth-o.left-i-c-1+f:o.left-s.left-1-f,["top","top_inline_start_corner"].includes(p)&&(b+=t.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(p)&&(C+=Math.abs(t.inlineStartOverlay.getOverlayOffset()));let w=this.hot.hasColHeaders(),S=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),R=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),E=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(w&&S<=0||S===E)&&(b+=1),R<=0&&(C+=1);let T=r.rowsRenderCalculator.startPosition,A=r.columnsRenderCalculator.startPosition,M=Math.abs(t.inlineStartOverlay.getScrollPosition()),N=t.topOverlay.getScrollPosition(),I=nr(this.hot.rootDocument),x=e.offsetTop;if(["inline_start","master"].includes(p)&&(x+=T-N),["bottom","bottom_inline_start_corner"].includes(p)){let{wtViewport:e,wtTable:r}=t.bottomOverlay.clone;x+=e.getWorkspaceHeight()-r.getHeight()-I}let O=e.offsetLeft;this.hot.isRtl()?O=(O>=0?g.getWidth()-e.offsetLeft:Math.abs(O))+(A-M-i):["top","master","bottom"].includes(p)&&(O+=A-M);let _=n.getComputedStyle(this.TD),k=parseInt(_[this.hot.isRtl()?"borderRightWidth":"borderLeftWidth"],10)>0?0:1,H=parseInt(_.borderTopWidth,10)>0?0:1,L=r0(e)+k,P=r1(e)+H,D=nn(l)?I:0,F=no(h)?I:0,B=this.hot.view.maximumVisibleElementWidth(O)-D+k;return{top:b,start:C,height:P,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(x)-F+H,this.hot.stylesHandler.getDefaultRowHeight()),width:L,maxWidth:B}}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(){let e=this.hot.countRows(),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}}tB(h7,h5);let h8=[{name:"editorCloseAndSave",callback(e){e._getEditorManager().closeEditorAndSaveChanges()}},{name:"editorCloseAndSaveByArrowKeys",callback(e,t,r){let n=e._getEditorManager(),o=n.getActiveEditor();o.isInFullEditMode()&&o.state===h9.EDITING||(n.closeEditorAndSaveChanges(),e.getSelected()&&(r.includes("arrowdown")?e.selection.transformStart(1,0):r.includes("arrowup")?e.selection.transformStart(-1,0):r.includes("arrowleft")?e.selection.transformStart(0,-1*e.getDirectionFactor()):r.includes("arrowright")&&e.selection.transformStart(0,e.getDirectionFactor())),t.preventDefault())}},{name:"editorCloseAndSaveByEnter",callback(e,t){let r=e._getEditorManager();r.closeEditorAndSaveChanges(t.ctrlKey||t.metaKey),r.moveSelectionAfterEnter(t)}},{name:"editorCloseWithoutSaving",callback(e){let t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor.focus()}},{name:"editorFastOpen",callback(e,t){let{highlight:r}=e.getSelectedRangeActive();r.isHeader()||e._getEditorManager().openEditor(null,t,!0)}},{name:"editorOpen",callback(e,t,r){let{selection:n}=e,o=e._getEditorManager(),i=e.getSelectedRange(),s=e.getSelectedRangeActive(),{highlight:a}=s;if((i.some(e=>n.isMultiple(e))||i.length>1)&&!s.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0){let o=e.getSettings(),i="function"==typeof o.enterMoves?o.enterMoves(t):o.enterMoves;r.includes("shift")?n.transformFocus(-i.row,-i.col):n.transformFocus(i.row,i.col);return}a.isHeader()||(e.getSettings().enterBeginsEditing?o.cellProperties.readOnly?o.moveSelectionAfterEnter(t):o.openEditor(null,t,!0):o.moveSelectionAfterEnter(t),nk(t))}},{name:"extendCellsSelectionDown",callback(e){let{selection:t}=e,{highlight:r}=e.getSelectedRangeActive();!t.isSelectedByColumnHeader()&&!t.isSelectedByCorner()&&(r.isCell()||r.isHeader()&&t.isSelectedByRowHeader())&&(t.markSource("keyboard"),t.transformEnd(1,0),t.markEndSource())}},{name:"extendCellsSelectionDownByViewportHeight",callback(e){let{selection:t,rowIndexMapper:r}=e,{to:n}=e.getSelectedRangeActive(),o=Math.min(n.row+e.countVisibleRows(),e.countRows()-1),i=r.getNearestNotHiddenIndex(o,-1);if(null!==i){let r=e._createCellCoords(i,n.col),o=n.row-e.getFirstFullyVisibleRow(),s=Math.min(r.row-o,e.countRows()-1);t.markSource("keyboard"),t.setRangeEnd(r,e.getActiveSelectionLayerIndex()),t.markEndSource(),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"extendCellsSelectionLeft",callback(e){let{selection:t}=e,{highlight:r}=e.getSelectedRangeActive();!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&(r.isCell()||r.isHeader()&&t.isSelectedByColumnHeader())&&(t.markSource("keyboard"),t.transformEnd(0,-1*e.getDirectionFactor()),t.markEndSource())}},{name:"extendCellsSelectionRight",callback(e){let{selection:t}=e,{highlight:r}=e.getSelectedRangeActive();!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&(r.isCell()||r.isHeader()&&t.isSelectedByColumnHeader())&&(t.markSource("keyboard"),t.transformEnd(0,e.getDirectionFactor()),t.markEndSource())}},{name:"extendCellsSelectionToColumns",callback(e){let{selection:t}=e,{highlight:r,from:n,to:o}=e.getSelectedRangeActive();t.markSource("keyboard"),t.isSelectedByRowHeader()?t.selectAll(!0,!0):e.selectColumns(n.col,o.col,r),t.markEndSource()}},{name:"extendCellsSelectionToMostBottom",callback(e){let{selection:t,rowIndexMapper:r}=e,{highlight:n,from:o,to:i}=e.getSelectedRangeActive(),s=n.isHeader()&&t.isSelectedByRowHeader();if(n.isCell()||s){let a=r.getNearestNotHiddenIndex(e.countRows()-1,-1),l=o.clone();l.row=n.row,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,n.clone()),s&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(a,i.col)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineEnd",callback(e){let{selection:t,columnIndexMapper:r}=e,{highlight:n,from:o,to:i}=e.getSelectedRangeActive();if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&n.isCell()){let s=r.getNearestNotHiddenIndex(e.countCols()-1,-1),a=o.clone();a.col=n.col,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,n.clone()),t.setRangeEnd(e._createCellCoords(i.row,s)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,{highlight:n,from:o,to:i}=e.getSelectedRangeActive();if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&n.isCell()){let s=parseInt(e.getSettings().fixedColumnsStart,10),a=r.getNearestNotHiddenIndex(s,1),l=o.clone();l.col=n.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,n.clone()),t.setRangeEnd(e._createCellCoords(i.row,a)),t.markEndSource()}}},{name:"extendCellsSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,{highlight:n,from:o,to:i}=e.getSelectedRangeActive(),s=n.isHeader()&&t.isSelectedByColumnHeader();if(n.isCell()||s){let a=r.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]),l=o.clone();l.col=n.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,n.clone()),s&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i.row,a)),t.markEndSource()}}},{name:"extendCellsSelectionToMostRight",callback(e){let{selection:t,columnIndexMapper:r}=e,{highlight:n,from:o,to:i}=e.getSelectedRangeActive(),s=n.isHeader()&&t.isSelectedByColumnHeader();if(n.isCell()||s){let a=r.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]),l=o.clone();l.col=n.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,n.clone()),s&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i.row,a)),t.markEndSource()}}},{name:"extendCellsSelectionToMostTop",callback(e){let{selection:t,rowIndexMapper:r}=e,{highlight:n,from:o,to:i}=e.getSelectedRangeActive(),s=n.isHeader()&&t.isSelectedByRowHeader();if(n.isCell()||s){let a=r.getNearestNotHiddenIndex(0,1),l=o.clone();l.row=n.row,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,n.clone()),s&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(a,i.col)),t.markEndSource()}}},{name:"extendCellsSelectionToRows",callback(e){let{selection:t}=e,{highlight:r,from:n,to:o}=e.getSelectedRangeActive();t.markSource("keyboard"),t.isSelectedByColumnHeader()?t.selectAll(!0,!0):e.selectRows(n.row,o.row,r),t.markEndSource()}},{name:"extendCellsSelectionUp",callback(e){let{selection:t}=e,{highlight:r}=e.getSelectedRangeActive();!t.isSelectedByColumnHeader()&&!t.isSelectedByCorner()&&(r.isCell()||r.isHeader()&&t.isSelectedByRowHeader())&&(t.markSource("keyboard"),t.transformEnd(-1,0),t.markEndSource())}},{name:"extendCellsSelectionUpByViewportHeight",callback(e){let{selection:t,rowIndexMapper:r}=e,{to:n}=e.getSelectedRangeActive(),o=Math.max(n.row-e.countVisibleRows(),0),i=r.getNearestNotHiddenIndex(o,1);if(null!==i){let r=e._createCellCoords(i,n.col),o=n.row-e.getFirstFullyVisibleRow(),s=Math.max(r.row-o,0);t.markSource("keyboard"),t.setRangeEnd(r,e.getActiveSelectionLayerIndex()),t.markEndSource(),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(1,0),t.markEndSource()}},{name:"moveCellSelectionDownByViewportHeight",callback(e){let{selection:t}=e,{navigableHeaders:r}=e.getSettings(),n=r?e.countColHeaders():0,{row:o}=e.getSelectedRangeActive().highlight,i=e.countVisibleRows()+n;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.getSelectedRangeActive().highlight.row<0&&e.scrollViewportTo({row:0})}},{name:"moveCellSelectionInlineEnd",callback(e,t){let{selection:r}=e,n=e.getSettings(),o=e.getSelectedRange(),i=e.getSelectedRangeActive(),s="function"==typeof n.tabMoves?n.tabMoves(t):n.tabMoves;r.markSource("keyboard"),(o.some(e=>r.isMultiple(e))||o.length>1)&&!i.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?r.transformFocus(-s.row,-s.col):r.transformStart(-s.row,-s.col),r.markEndSource()}},{name:"moveCellSelectionInlineStart",callback(e,t){let{selection:r}=e,n=e.getSettings(),o=e.getSelectedRange(),i=e.getSelectedRangeActive(),s="function"==typeof n.tabMoves?n.tabMoves(t):n.tabMoves;r.markSource("keyboard"),(o.some(e=>r.isMultiple(e))||o.length>1)&&!i.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?r.transformFocus(s.row,s.col):r.transformStart(s.row,s.col),r.markEndSource()}},{name:"moveCellSelectionLeft",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(0,-1*e.getDirectionFactor()),t.markEndSource()}},{name:"moveCellSelectionRight",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(0,e.getDirectionFactor()),t.markEndSource()}},{name:"moveCellSelectionToMostBottom",callback(e){let{selection:t}=e,{col:r}=e.getSelectedRangeActive().highlight,n=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===n&&(n=-1),t.setRangeStart(e._createCellCoords(n,r))}},{name:"moveCellSelectionToMostBottomInlineEnd",callback(e){let{selection:t,rowIndexMapper:r,columnIndexMapper:n}=e,o=parseInt(e.getSettings().fixedRowsBottom,10),i=r.getNearestNotHiddenIndex(e.countRows()-o-1,-1),s=n.getNearestNotHiddenIndex(e.countCols()-1,-1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(i,s)),t.markEndSource()}},{name:"moveCellSelectionToMostInlineEnd",callback(e){let{selection:t,columnIndexMapper:r}=e;t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(e.getSelectedRangeActive().highlight.row,r.getNearestNotHiddenIndex(e.countCols()-1,-1))),t.markEndSource()}},{name:"moveCellSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,n=parseInt(e.getSettings().fixedColumnsStart,10),o=e.getSelectedRangeActive().highlight.row,i=r.getNearestNotHiddenIndex(n,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(o,i)),t.markEndSource()}},{name:"moveCellSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive().highlight.row,o=r.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);null===o&&(o=e.isRtl()?-1:-e.countRowHeaders()),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n,o)),t.markEndSource()}},{name:"moveCellSelectionToMostRight",callback(e){let{selection:t,columnIndexMapper:r}=e,{row:n}=e.getSelectedRangeActive().highlight,o=r.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);null===o&&(o=e.isRtl()?-e.countRowHeaders():-1),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n,o)),t.markEndSource()}},{name:"moveCellSelectionToMostTop",callback(e){let{selection:t}=e,{col:r}=e.getSelectedRangeActive().highlight,n=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===n&&(n=-e.countColHeaders()),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(n,r)),t.markEndSource()}},{name:"moveCellSelectionToMostTopInlineStart",callback(e){let{selection:t,rowIndexMapper:r,columnIndexMapper:n}=e,o=parseInt(e.getSettings().fixedRowsTop,10),i=parseInt(e.getSettings().fixedColumnsStart,10),s=r.getNearestNotHiddenIndex(o,1),a=n.getNearestNotHiddenIndex(i,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(s,a)),t.markEndSource()}},{name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(-1,0),t.markEndSource()}},{name:"moveCellSelectionUpByViewportHight",callback(e){let{selection:t}=e,{navigableHeaders:r}=e.getSettings(),n=r?e.countColHeaders():0,{row:o}=e.getSelectedRangeActive().highlight,i=e.countVisibleRows()+n;i=0===i?-1:-i,o===-n?i=-1:o+i<n&&(i=-(o+n)),t.markSource("keyboard"),t.transformStart(i,0),t.markEndSource(),e.getSelectedRangeActive().highlight.row<0&&e.scrollViewportTo({row:0})}},{name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}},{name:"scrollToFocusedCell",callback(e){let{highlight:t}=e.getSelectedRangeActive(),r=e.getFirstFullyVisibleRow()-1,n=e.getFirstFullyVisibleColumn()-1,o=e.getLastFullyVisibleRow()+1,i=e.getLastFullyVisibleColumn()+1,s=e._createCellCoords(r,n),a=e._createCellCoords(o,i);if(!e._createCellRange(s,s,a).includes(t)&&(t.row>=0||t.col>=0)){let r={};if(t.col>=0){let n=Math.floor(e.countVisibleCols()/2);r.col=Math.max(t.col-n,0)}if(t.row>=0){let n=Math.floor(e.countVisibleRows()/2);r.row=Math.max(t.row-n,0)}e.scrollViewportTo({...r,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"selectAllCells",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.selectAll(!0,!0,{disableHeadersHighlight:!0}),t.markEndSource()}},{name:"selectAllCellsAndHeaders",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.selectAll(!0,!0,{disableHeadersHighlight:!1}),t.markEndSource()}},{name:"populateSelectedCellsData",callback(e){let t=e.getSelectedRange(),{row:r,col:n}=t[t.length-1].highlight.normalize(),o=e.getDataAtCell(r,n),i=new Map;for(let s=0;s<t.length;s++)t[s].forAll((t,s)=>{if(t>=0&&s>=0&&(t!==r||s!==n)){let{readOnly:r}=e.getCellMeta(t,s);r||i.set(`${t}x${s}`,[t,s,o])}});e.setDataAtCell(Array.from(i.values()))}},{name:"tabNavigation",callback(e){let t={wrapped:!1,flipped:!1},r=!1,n=!1;return e.addHook("afterSelection",(e,o,i,s,a)=>{r&&(t.wrapped&&t.flipped||n)&&(n=!1,a.value=!0)}),e.addHook("beforeRowWrap",(e,r,n)=>{t.wrapped=!0,t.flipped=n}),{before(){let{tabNavigation:t}=e.getSettings();r=!0,t||(n=!0)},after(n){let{tabNavigation:o,autoWrapRow:i}=e.getSettings();if(r=!1,!o||!e.selection.isSelected()||i&&t.wrapped&&t.flipped||!i&&t.wrapped)return t.wrapped=!1,t.flipped=!1,e.deselectCell(),!1;n.preventDefault()}}}}];function de(e){let t={};return h8.forEach(r=>{let{name:n,callback:o}=r;t[n]=function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return o(e,...r)}}),t}function dt(e){let t=e.getShortcutManager().addContext("editor"),r=de(e);t.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>r.editorCloseAndSaveByEnter(e,t)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(e,t)=>r.editorCloseAndSaveByEnter(e,t)},{keys:[["Tab"],["Tab","Shift"],["PageDown"],["PageUp"]],forwardToContext:e.getShortcutManager().getContext("grid"),callback:(e,t)=>r.editorCloseAndSave(e,t)},{keys:[["ArrowDown"],["ArrowUp"],["ArrowLeft"],["ArrowRight"]],preventDefault:!1,callback:(e,t)=>r.editorCloseAndSaveByArrowKeys(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>r.editorCloseWithoutSaving()}],{group:hY})}function dr(e){let t=e.getShortcutManager().addContext("grid"),r=de(e);t.addShortcuts([{keys:[["F2"]],callback:e=>r.editorFastOpen(e)},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>r.editorOpen(e,t)},{keys:[["Backspace"],["Delete"]],callback:()=>r.emptySelectedCells()}],{group:hY,runOnlyIf:()=>eq(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>r.selectAllCells(),runOnlyIf:()=>eq(e.getSelected())&&!e.getSelectedRangeActive()?.highlight.isHeader()},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>eq(e.getSelected())&&e.getSelectedRangeActive()?.highlight.isHeader(),preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>r.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>r.populateSelectedCellsData(),runOnlyIf:()=>eq(e.getSelected())&&!e.getSelectedRangeActive().highlight.isHeader()&&e.getSelectedRangeActive().getCellsCount()>1},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>r.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>r.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>r.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostTop(),runOnlyIf:()=>eq(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>r.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>r.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostBottom(),runOnlyIf:()=>eq(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>r.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>r.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostLeft(),runOnlyIf:()=>eq(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>r.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>r.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostRight(),runOnlyIf:()=>eq(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>eq(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>eq(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>eq(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>eq(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>r.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>r.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>r.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>r.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:e=>r.moveCellSelectionInlineStart(e)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:e=>r.moveCellSelectionInlineEnd(e)},{keys:[["Control/Meta","Backspace"]],callback:()=>r.scrollToFocusedCell()}],{runOnlyIf:()=>{let{navigableHeaders:t}=e.getSettings();return eq(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:hG});let n=r.tabNavigation();t.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:hG,group:h$,position:"before",callback:e=>n.before(e)},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:hG,group:h$,callback:e=>n.after(e),position:"after"}])}function dn(e){let{classNames:t}=rR(e,/ht-theme-[a-zA-Z0-9_-]+/);return t.pop()}let di="handsontable-core-styles";class ds{#e1;#tn;#to;#ti;#ts;#ta={};#tl={};#th;constructor({hot:e,rootElement:t,rootDocument:r,onThemeChange:n=()=>{},injectCoreCss:o=!0}){this.#e1=e,this.#to=t,this.#ts=r,this.#th=n,o&&this.#td()}getCSSVariableValue(e){if(this.#ta[`--ht-${e}`])return this.#ta[`--ht-${e}`];let t=this.#tu(`--ht-${e}`)??this.#tc(`--ht-${e}`);if(null!==t)return this.#ta[`--ht-${e}`]=t,t}getStyleForTD(e){return this.#tl?.td?.[e]}getDefaultRowHeight(e){let t=this.#tg();return void 0!==e&&e===this.#e1.view.getFirstRenderedVisibleRow()?t+1:t}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(e){/ht-theme-.*/.test(e)?(this.#tp(),e&&e!==this.#tn&&(this.#tn=e),this.#th(this.#tn),this.#tm()):rg(`${e} isn't a valid theme name. Please ensure it follows the format ht-theme-<theme-name>.`)}getThemeName(){return this.#tn}#td(){if(!this.#e1||!this.#ts||!this.#ts.head)return;let e=this.#ts.getElementById(di);if(e&&e instanceof HTMLStyleElement)return;let t=this.#ts.createElement("style");t.id=di,t.textContent='/*!\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: 17.1.0-rc15\n * Release date: 19/05/2026 (built at 19/05/2026 08:00:11)\n */\n.ht-root-wrapper{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;flex-direction:column;height:100%;display:flex;position:relative}.htFocusCatcher{opacity:0;z-index:-1;border:0;outline:0;width:0;height:0;margin:0;padding:0;position:absolute;display:block!important}.ht-grid{flex:auto;min-height:0}.htScrollbarTest{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color)}.htScrollbarSafariTest::-webkit-scrollbar{width:9px;height:9px}.handsontable{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);letter-spacing:var(--ht-letter-spacing);color:var(--ht-foreground-color);touch-action:manipulation;position:relative}.handsontable .wtHolder{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color)}.handsontable .wtHolder::-webkit-scrollbar{width:9px;height:9px}.handsontable .wtHolder::-webkit-scrollbar-track{background:var(--ht-scrollbar-track-color);border-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder::-webkit-scrollbar-thumb{background-color:var(--ht-scrollbar-thumb-color);border-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder::-webkit-scrollbar-corner{background:var(--ht-scrollbar-track-color)}.handsontable .wtHolder:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))::-webkit-scrollbar-corner{border-bottom-right-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))::-webkit-scrollbar-corner{border-bottom-left-radius:var(--ht-scrollbar-border-radius)}.handsontable.ht-wrapper{border-radius:var(--ht-wrapper-border-radius,0);width:100%;height:100%}.handsontable.ht-wrapper:not(.htFirstDatasetColumnNotRendered) td:first-of-type{border-inline-start-width:1px}.handsontable.ht-wrapper:before{content:"";border:var(--ht-wrapper-border-width)solid var(--ht-wrapper-border-color);border-radius:var(--ht-wrapper-border-radius,0);z-index:999;pointer-events:none;display:block;position:absolute;inset:0;overflow:hidden}.handsontable.htGhostTable.htNestedHeaders table{border-spacing:0;border-collapse:collapse}.handsontable.htGhostTable table thead th{border-bottom-width:0}.handsontable.htGhostTable table tbody tr:first-of-type th:first-child,.handsontable.htGhostTable table tbody tr:first-of-type td:first-child{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px)}.handsontable.htGhostTable table tbody tr th,.handsontable.htGhostTable table tbody tr td{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px);border-top-width:0}.handsontable.htHasScrollX:not(.htHorizontallyScrollableByWindow):not(.htScrollbarHidden) .ht_master .wtHolder,.handsontable.htHasScrollY:not(.htVerticallyScrollableByWindow):not(.htScrollbarHidden) .ht_master .wtHolder{border-radius:var(--ht-wrapper-border-radius,0)}.handsontable:not(.htHorizontallyScrollableByWindow).htPagination .ht_master .wtHolder,.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollY .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htPagination .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollY .ht_master .wtHolder{background-color:var(--ht-background-color)}.handsontable tr.ht__row_even th{background-color:var(--ht-row-header-even-background-color)}.handsontable tr.ht__row_even td{background-color:var(--ht-row-cell-even-background-color)}.handsontable tr.ht__row_odd th{background-color:var(--ht-row-header-odd-background-color)}.handsontable tr.ht__row_odd td{background-color:var(--ht-row-cell-odd-background-color)}.handsontable th,.handsontable td{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px);padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);vertical-align:top;border-top-width:0;border-inline-width:0 1px;font-size:var(--ht-font-size);line-height:var(--ht-line-height);white-space:pre-wrap;empty-cells:show;box-sizing:border-box;color:var(--ht-foreground-color);border-style:solid;border-bottom-width:1px;border-top-color:var(--ht-cell-vertical-border-color);border-bottom-color:var(--ht-cell-vertical-border-color);border-inline-start-color:var(--ht-cell-horizontal-border-color);border-inline-end-color:var(--ht-cell-horizontal-border-color);outline:0;overflow:hidden}.handsontable th.invisibleSelection,.handsontable td.invisibleSelection{outline:none}.handsontable th.invisibleSelection::selection,.handsontable td.invisibleSelection::selection{background:0 0}.handsontable th{text-align:center;font-weight:var(--ht-header-font-weight);white-space:nowrap;color:var(--ht-header-foreground-color);background-color:var(--ht-header-background-color);position:relative;overflow:visible}.handsontable th:last-child{border-inline-width:0 1px;border-bottom-width:1px;border-inline-end-color:var(--ht-border-color)}.handsontable th:last-child.ht__active_highlight{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable th:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable th:first-child.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color)}.handsontable th:first-child,.handsontable th:nth-child(2){border-inline-start-width:1px}.handsontable th.current{box-shadow:inset 0 0 0 1px var(--ht-cell-selection-border-color)}.handsontable th.active{color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable th.ht__highlight{color:var(--ht-header-highlighted-foreground-color);background-color:var(--ht-header-highlighted-background-color)}.handsontable th.ht__active_highlight{border-color:var(--ht-header-active-border-color);color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable tbody tr.ht__row_odd th.ht__highlight,.handsontable tbody tr.ht__row_even th.ht__highlight{color:var(--ht-header-row-highlighted-foreground-color);background-color:var(--ht-header-row-highlighted-background-color)}.handsontable tbody tr.ht__row_odd th.ht__active_highlight,.handsontable tbody tr.ht__row_even th.ht__active_highlight{color:var(--ht-header-row-active-foreground-color);background-color:var(--ht-header-row-active-background-color)}.handsontable tbody tr:first-of-type th:first-child:empty:after,.handsontable tbody tr:first-of-type td:first-child:empty:after{content:"";min-height:var(--ht-line-height);display:block}.handsontable tbody tr th{color:var(--ht-header-row-foreground-color);background-color:var(--ht-header-row-background-color);padding:0}.handsontable tbody tr th.ht__active_highlight{box-shadow:0 -1px 0 0 var(--ht-header-active-border-color)}.handsontable tbody tr th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);min-height:100%}.handsontable tbody tr td:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable tbody tr td:last-child{border-inline-end-color:var(--ht-border-color)}.handsontable thead tr th{padding:0}.handsontable thead tr th.ht__active_highlight{box-shadow:-1px 0 0 0 var(--ht-header-active-border-color)}.handsontable thead tr th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);flex-direction:row;align-items:center;gap:2px;display:flex}.handsontable thead tr th .relative .colHeader{text-overflow:ellipsis;vertical-align:top;flex:auto;min-width:0;overflow:hidden}.handsontable tr:first-child th,.handsontable tr:first-child td{border-top-color:var(--ht-border-color);border-top-width:1px}.handsontable tr:first-child th.ht__active_highlight,.handsontable tr:first-child td.ht__active_highlight{border-top-color:var(--ht-header-active-border-color)}.handsontable tr:last-child th,.handsontable tr:last-child td{border-bottom-color:var(--ht-border-color)}.handsontable tr:last-child th.ht__active_highlight,.handsontable tr:last-child td.ht__active_highlight{border-bottom-color:var(--ht-header-active-border-color)}.handsontable div[class^=ht_clone] thead .ht__highlight .relative:after{content:"";height:var(--ht-header-highlighted-shadow-size);background-color:var(--ht-accent-color);display:block;position:absolute;bottom:-1px;left:-1px;right:-1px}.handsontable div[class^=ht_clone] thead tr:only-of-type .ht__highlight .relative:after{bottom:0}.handsontable div[class^=ht_clone] tbody .ht__highlight .relative:after{content:"";width:var(--ht-header-highlighted-shadow-size);background-color:var(--ht-accent-color);display:block;position:absolute;top:-1px;bottom:-1px;right:-1px}.handsontable div[class^=ht_clone] td:first-of-type{border-inline-start-width:1px}.handsontable thead tr:not(:last-child) th{overflow:hidden}.handsontable .hide{display:none}.handsontable .relative{box-sizing:border-box;position:relative}.handsontable .wtHider{width:0}.handsontable .wtSpreader{width:0;height:auto;position:relative}.handsontable .htAutoSize{visibility:hidden;position:absolute;top:-99000px;left:-99000px}.handsontable .htTextEllipsis{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.handsontable table,.handsontable tbody,.handsontable thead,.handsontable input,.handsontable textarea,.handsontable div{box-sizing:content-box}.handsontable input,.handsontable textarea{min-height:initial}.handsontable .htCore{border-spacing:0;border-collapse:separate;table-layout:fixed;cursor:default;background-color:var(--ht-background-color);border-width:0;outline-width:0;width:0;margin:0}.handsontable col,.handsontable col.rowHeader{width:64px}.handsontable col.hidden{width:0!important}.handsontable span.colHeader,.handsontable span.rowHeader{font-size:var(--ht-font-size);line-height:var(--ht-line-height);display:inline-block}.handsontable tr.hidden,.handsontable tr.hidden td,.handsontable tr.hidden th{display:none}.handsontable a{color:var(--ht-link-color)}.handsontable a:hover{color:var(--ht-link-hover-color)}.handsontable .ht_clone_top th:nth-child(2),.handsontable .ht_clone_top_inline_start_corner th:nth-child(2){border-inline-width:0 1px}.handsontable.htRowHeaders thead tr th:nth-child(2){border-inline-start-width:1px}.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) tbody tr th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) thead tr th:first-child,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.htGhostTable) tbody tr th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.ht_clone_top):not(.htGhostTable) thead tr th:first-child{border-inline-width:1px 0}.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr:last-child th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead tr:last-child th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr.lastChild th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead tr.lastChild th{border-bottom-width:0}.handsontable.htAutoRowSize .ht_master.innerBorderTop tbody tr:first-child th,.handsontable.htAutoRowSize .ht_master.innerBorderTop tbody tr:first-child td,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start tbody tr:first-child th,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start tbody tr:first-child td{border-top-width:0}.handsontable .ht_master table.htCore>thead,.handsontable .ht_master table.htCore>tbody>tr>th,.handsontable .ht_clone_inline_start table.htCore>thead{visibility:hidden}.ht_master,.ht_clone_inline_start,.ht_clone_top,.ht_clone_bottom,.ht_master .wtHolder,.ht_clone_inline_start .wtHolder,.ht_clone_top .wtHolder,.ht_clone_bottom .wtHolder{overflow:hidden}.ht_master .wtHolder{overflow:auto}[dir=rtl].handsontable td[dir=ltr]{border-inline-width:1px 0}[dir=rtl].handsontable tbody tr td[dir=ltr]:last-child{border-inline-start-color:var(--ht-border-color)}[dir=rtl].handsontable div[class^=ht_clone] tbody .ht__highlight .relative:after{left:-1px;right:auto}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_start_corner .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_start_corner .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore{border-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius);border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius);border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius);border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius);border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius);border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius);border-bottom-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper.htHasScrollX .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX .htCore thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX .htCore thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX .htCore thead tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX .htCore thead tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0;border-bottom-right-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:first-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:first-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:first-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:first-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:first-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:first-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}.handsontable.mobile,.handsontable.mobile .wtHolder{-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:#0000;-webkit-overflow-scrolling:touch}.handsontable.mobile .handsontableInput:focus{box-shadow:inset 0 0 0 2px var(--ht-accent-color);-webkit-appearance:none}.handsontable .topSelectionHandle,.handsontable .topSelectionHandle-HitArea,.handsontable .bottomSelectionHandle,.handsontable .bottomSelectionHandle-HitArea{inset-inline-start:-10000px;inset-inline-end:unset;z-index:9999;top:-10000px}.handsontable.hide-tween{animation:.2s forwards opacity-hide}.handsontable.show-tween{animation:.3s forwards opacity-show}.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}.ht_editor_hidden{z-index:-1}.ht_editor_visible{z-index:200}.handsontable td.area{position:relative}.handsontable td.area:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-1{position:relative}.handsontable td.area-1:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-2{position:relative}.handsontable td.area-2:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-3{position:relative}.handsontable td.area-3:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-4{position:relative}.handsontable td.area-4:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-5{position:relative}.handsontable td.area-5:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-6{position:relative}.handsontable td.area-6:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-7{position:relative}.handsontable td.area-7:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area:before{opacity:.14}.handsontable td.area-1:before{opacity:.21}.handsontable td.area-2:before{opacity:.28}.handsontable td.area-3:before{opacity:.35}.handsontable td.area-4:before{opacity:.42}.handsontable td.area-5:before{opacity:.49}.handsontable td.area-6:before{opacity:.56}.handsontable td.area-7:before{opacity:.63}.handsontable td.area{border-color:color-mix(in srgb,var(--ht-border-color),var(--ht-foreground-color)10%)}.handsontable .wtBorder{font-size:0;position:absolute}.handsontable .wtBorder:first-child,.handsontable .wtBorder:nth-child(3){z-index:2}.handsontable .wtBorder:nth-child(2),.handsontable .wtBorder:nth-child(4){z-index:1}.handsontable .wtBorder.hidden{display:none!important}.handsontable .wtBorder.current{z-index:10;background-color:var(--ht-cell-selection-border-color)!important}.handsontable .wtBorder.area{z-index:8;background-color:var(--ht-cell-selection-border-color)!important}.handsontable .wtBorder.fill{z-index:6;background-color:var(--ht-cell-autofill-fill-border-color,#68696c)!important}.handsontable .wtBorder.corner{cursor:crosshair;z-index:10;font-size:0;border-radius:var(--ht-cell-autofill-border-radius)!important;background-color:var(--ht-cell-autofill-background-color,#1a42e8)!important;border-color:var(--ht-cell-autofill-border-color)!important}.handsontable .wtBorder.corner:after{content:"";border-radius:var(--ht-cell-autofill-border-radius);inset:min(0px,(var(--ht-cell-autofill-size) - var(--ht-cell-autofill-hit-area-size))/2);background:0 0;position:absolute}.handsontable .wtBorder.corner.wtCornerInlineEndEdge:after{inset-inline-end:0}.handsontable .wtBorder.corner.wtCornerBlockEndEdge:after{inset-block-end:0}.hot-display-license-info{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;padding:var(--ht-license-vertical-padding,16px)var(--ht-license-horizontal-padding,16px);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);color:var(--ht-license-foreground-color);background-color:var(--ht-license-background-color,#f7f7f9);text-align:left;border:1px solid var(--ht-border-color,#f7f7f9);border-radius:var(--ht-wrapper-border-radius);margin-top:10px}.hot-display-license-info a{font-size:var(--ht-license-font-size);color:var(--ht-link-color)}.hot-display-license-info a:hover{color:var(--ht-link-hover-color)}.handsontable .htAutocompleteArrow{cursor:default;width:var(--ht-icon-size);height:var(--ht-icon-size);float:right;top:calc((var(--ht-line-height) - var(--ht-icon-size))/2);margin-inline-start:calc(var(--ht-gap-size)*2);margin-inline-end:1px;font-size:0;position:relative}.handsontable .htAutocompleteArrow:after{content:"";opacity:.6;display:block;position:absolute;top:0;left:0}[dir=rtl].handsontable .htAutocompleteArrow{float:left}.handsontable .htCheckboxRendererInput{width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);vertical-align:middle;cursor:pointer;margin:0;outline:none;margin-top:-2px;display:inline-block;position:relative}.handsontable .htCheckboxRendererInput:first-child{margin-inline-end:var(--ht-gap-size)}.handsontable .htCheckboxRendererInput:last-child{margin-inline-start:var(--ht-gap-size)}.handsontable .htCheckboxRendererInput:before{content:"";width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);border-radius:var(--ht-checkbox-border-radius);border:1px solid var(--ht-checkbox-border-color);background-color:var(--ht-checkbox-background-color);box-sizing:border-box;pointer-events:none;transition:all var(--ht-table-transition)ease-in-out;display:inline-block;position:absolute;top:0;left:0}.handsontable .htCheckboxRendererInput:after{content:"";color:var(--ht-checkbox-icon-color);pointer-events:none;display:block;position:absolute;top:0;left:0;width:var(--ht-checkbox-size)!important;height:var(--ht-checkbox-size)!important}.handsontable .htCheckboxRendererInput:checked:before{border-color:var(--ht-checkbox-checked-border-color);background-color:var(--ht-checkbox-checked-background-color)}.handsontable .htCheckboxRendererInput:checked:after{color:var(--ht-checkbox-checked-icon-color)}.handsontable .htCheckboxRendererInput:checked:disabled:before{border-color:var(--ht-checkbox-checked-disabled-border-color);background-color:var(--ht-checkbox-checked-disabled-background-color)}.handsontable .htCheckboxRendererInput:checked:disabled:after{color:var(--ht-checkbox-checked-disabled-icon-color)}.handsontable .htCheckboxRendererInput:checked:focus:before{border-color:var(--ht-checkbox-checked-focus-border-color);background-color:var(--ht-checkbox-checked-focus-background-color)}.handsontable .htCheckboxRendererInput:checked:focus:after{color:var(--ht-checkbox-checked-focus-icon-color)}.handsontable .htCheckboxRendererInput:focus:before{border-color:var(--ht-checkbox-focus-border-color);background-color:var(--ht-checkbox-focus-background-color);outline:1px solid var(--ht-checkbox-focus-ring-color)}.handsontable .htCheckboxRendererInput:focus:after{color:var(--ht-checkbox-focus-icon-color)}.handsontable .htCheckboxRendererInput:disabled{cursor:initial}.handsontable .htCheckboxRendererInput:disabled:before{border-color:var(--ht-checkbox-disabled-border-color);background-color:var(--ht-checkbox-disabled-background-color)}.handsontable .htCheckboxRendererInput:disabled:after{color:var(--ht-checkbox-disabled-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:before{border-color:var(--ht-checkbox-indeterminate-border-color);background-color:var(--ht-checkbox-indeterminate-background-color)}.handsontable .htCheckboxRendererInput:indeterminate:after{color:var(--ht-checkbox-indeterminate-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:disabled:before{border-color:var(--ht-checkbox-indeterminate-disabled-border-color);background-color:var(--ht-checkbox-indeterminate-disabled-background-color)}.handsontable .htCheckboxRendererInput:indeterminate:disabled:after{color:var(--ht-checkbox-indeterminate-disabled-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:focus:before{border-color:var(--ht-checkbox-indeterminate-focus-border-color);background-color:var(--ht-checkbox-indeterminate-focus-background-color)}.handsontable .htCheckboxRendererInput:indeterminate:focus:after{color:var(--ht-checkbox-indeterminate-focus-icon-color)}.handsontable .htCheckboxRendererInput.noValue{opacity:.5}.handsontable .htCheckboxRendererLabel{font-size:inherit;line-height:inherit;cursor:pointer;color:inherit;margin:0;display:inline-block;position:relative}.handsontable .htCheckboxRendererLabel.fullWidth{width:100%}.handsontable .htPlaceholder{color:var(--ht-placeholder-color)}.handsontable .htDimmed{color:var(--ht-read-only-color)!important;background-color:var(--ht-cell-read-only-background-color)!important}.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 .htInvalid{background-color:var(--ht-cell-error-background-color)!important}.handsontable .htNoWrap{white-space:nowrap}.handsontable .htSearchResult{background-color:var(--ht-cell-success-background-color)!important}.handsontable .ht-multi-select-renderer{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);overflow:hidden}.handsontable .ht-multi-select-chips-container{align-items:center;gap:var(--ht-gap-size);flex-wrap:nowrap;max-width:100%;display:flex;overflow:hidden}.handsontable .ht-multi-select-chip{align-items:center;gap:var(--ht-gap-size);padding:var(--ht-chip-vertical-padding)calc((var(--ht-line-height) - var(--ht-icon-size))/2)var(--ht-chip-vertical-padding)var(--ht-chip-horizontal-padding);border-radius:var(--ht-chip-border-radius);background:var(--ht-chip-background);white-space:nowrap;box-sizing:border-box;flex-shrink:0;max-width:100px;display:inline-flex}.handsontable .ht-multi-select-chip-label{text-overflow:ellipsis;color:var(--ht-foreground-color);font-style:normal;font-weight:var(--ht-font-weight);line-height:var(--ht-line-height,40px);letter-spacing:var(--ht-letter-spacing,0);padding:0 var(--ht-chip-gap);overflow:hidden}.handsontable .ht-multi-select-chip-remove{cursor:pointer;color:var(--ht-icon-button-icon-color);background-position:50%;background-repeat:no-repeat;background-size:contain;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:flex;position:relative;width:var(--ht-icon-size)!important;height:var(--ht-icon-size)!important}.handsontable .ht-multi-select-chip-remove:before{content:"";display:block;position:absolute;top:0;left:0}.handsontable .ht-multi-select-chip-remove:hover{background-color:var(--ht-icon-button-hover-background-color)}.handsontable .ht-multi-select-overflow{padding:var(--ht-chip-vertical-padding)var(--ht-chip-horizontal-padding);background:var(--ht-chip-background);border-radius:var(--ht-chip-border-radius);color:var(--ht-foreground-color);white-space:nowrap;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.handsontableInputHolder{position:absolute;top:0;left:0}.handsontableInputHolder .handsontableInput{padding:calc(var(--ht-cell-vertical-padding,4px) + 1px)calc(var(--ht-cell-horizontal-padding,8px) + 1px);color:var(--ht-cell-editor-foreground-color);background-color:var(--ht-cell-editor-background-color,#fff);box-shadow:inset 0 0 0 var(--ht-cell-editor-border-width,2px)var(--ht-cell-editor-border-color,#1a42e8),0 0 var(--ht-cell-editor-shadow-blur-radius,0)0 var(--ht-cell-editor-shadow-color,transparent);box-sizing:border-box;border:none;border-radius:0;outline-width:0;margin:0;display:block;font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;-webkit-appearance:none!important}.handsontableInputHolder .handsontableInput:focus{outline:none}.htSelectEditor{position:absolute}.htSelectEditor select{width:100%;height:100%;padding:calc(var(--ht-cell-vertical-padding,4px) + 1px)calc(var(--ht-cell-horizontal-padding,8px) + 1px);white-space:nowrap;text-overflow:ellipsis;color:var(--ht-cell-editor-foreground-color);background-color:var(--ht-cell-editor-background-color,#fff);box-shadow:inset 0 0 0 var(--ht-cell-editor-border-width,2px)var(--ht-cell-editor-border-color,#1a42e8),0 0 var(--ht-cell-editor-shadow-blur-radius,0)0 var(--ht-cell-editor-shadow-color,transparent);box-sizing:border-box;border:none;border-radius:0;margin:0;padding-inline-end:26px;position:absolute;inset:0;overflow:hidden;font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;-webkit-appearance:none!important}.htSelectEditor select:focus{outline:none}.htSelectEditor .htAutocompleteArrow{z-index:1;pointer-events:none;margin-inline-end:4px;top:50%;transform:translateY(-50%)}.handsontable.listbox{box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);border:var(--ht-menu-border-width,1px)solid var(--ht-menu-border-color,#e5e5e9);margin:0}.handsontable.listbox .ht_master{background-color:var(--ht-background-color);overflow:hidden}.handsontable.listbox .wtHolder{overflow:auto;border-radius:0!important}.handsontable.listbox .wtHider,.handsontable.listbox .htCore{border-radius:0!important}.handsontable.listbox table{overflow:hidden}.handsontable.listbox table th,.handsontable.listbox table tr:first-child th,.handsontable.listbox table tr:last-child th,.handsontable.listbox table tr:first-child td,.handsontable.listbox table td{border-color:#0000!important}.handsontable.listbox table th,.handsontable.listbox table td{white-space:nowrap;text-overflow:ellipsis;border-radius:0!important}.handsontable.listbox table .wtBorder{visibility:hidden}.handsontable.listbox table strong{color:inherit;font-weight:700}.handsontable.listbox table tr td:hover td{cursor:pointer;background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important;box-shadow:none!important}.handsontable.listbox table td{transition:var(--ht-table-transition)background ease-in-out}.handsontable.listbox table td:hover{cursor:pointer;background-color:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important}.handsontable.listbox table td.current:not([aria-expanded=true]){box-shadow:inset 0 0 0 1px var(--ht-accent-color)}.handsontable.listbox table td.htDimmed{cursor:default;font-style:inherit;color:inherit!important}.handsontable.listbox table td.htDimmed:not(.handsontable.listbox table td:hover){background-color:inherit!important}.handsontable.listbox table thead th{text-align:left;height:auto!important}.handsontable.listbox table thead th .relative{padding-top:calc(var(--ht-cell-vertical-padding) + var(--ht-gap-size));padding-bottom:calc(var(--ht-cell-vertical-padding) + var(--ht-gap-size))}.handsontable.listbox .ht_clone_top .wtHider{overflow:hidden}.handsontable.listbox .ht_clone_top table{border-radius:0}.handsontable.listbox .htBorders div{background:0 0!important}.handsontable.autocompleteEditor tr.ht__row_even th,.handsontable.autocompleteEditor tr.ht__row_even td,.handsontable.autocompleteEditor tr.ht__row_odd th,.handsontable.autocompleteEditor tr.ht__row_odd td{background-color:var(--ht-background-color,#fff)}[dir=rtl].handsontable.listbox table thead th{text-align:right}.pika-single{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);color:var(--ht-foreground-color);background:var(--ht-background-color,#fff);border:var(--ht-menu-border-width,1px)solid var(--ht-menu-border-color,#e5e5e9);border-radius:var(--ht-menu-border-radius);z-index:9999;padding:10px;display:block;position:relative}.pika-single.is-hidden{display:none}.pika-single .pika-row{background-color:#0000}.pika-single .pika-title{justify-content:center;align-items:center;display:flex}.pika-single .pika-label{color:var(--ht-accent-color);order:2;padding:5px;position:relative}.pika-single .pika-label .pika-select{opacity:0;cursor:pointer;position:absolute;inset:0}.pika-single .pika-prev,.pika-single .pika-next{white-space:nowrap;text-indent:-9999px;cursor:pointer;width:20px;height:20px;color:var(--ht-accent-color);background:0 0;border:none;padding:0}.pika-single .pika-prev{order:1;margin-right:auto}.pika-single .pika-next{order:3;margin-left:auto}.pika-single .pika-table thead{height:50px}.pika-single .pika-table th{vertical-align:middle;padding:1px}.pika-single .pika-table th abbr{cursor:initial;border:none;font-weight:400;text-decoration:none}.pika-single .pika-table td{vertical-align:middle;padding:1px}.pika-single .pika-table td.is-disabled .pika-button{pointer-events:none;opacity:.5}.pika-single .pika-table td.is-today .pika-button{background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}.pika-single .pika-table td.is-selected .pika-button{background:var(--ht-accent-color,#1a42e8);color:var(--ht-primary-button-foreground-color,#fff)}.pika-single .pika-table td.pika-week{text-align:center;width:12.5%}.pika-single .pika-table .pika-button{aspect-ratio:1;width:100%;color:var(--ht-foreground-color);border-radius:var(--ht-button-border-radius);cursor:pointer;font-size:inherit;background:0 0;border:none;margin:0;padding:10px}.pika-single .pika-table .pika-button:hover{background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}[dir=rtl].htDatepickerHolder .pika-single .pika-next{margin-left:0;margin-right:auto;transform:rotate(180deg)}[dir=rtl].htDatepickerHolder .pika-single .pika-prev{margin-left:auto;margin-right:0;transform:rotate(180deg)}.handsontableEditor{position:absolute}.handsontableEditor .ht-multi-select-editor{box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);border-radius:0 0 var(--ht-menu-border-radius)var(--ht-menu-border-radius);border:var(--ht-menu-border-width)solid var(--ht-menu-border-color);background:var(--ht-background-color);width:max-content;min-width:120px;padding:var(--ht-menu-vertical-padding)var(--ht-menu-horizontal-padding);overflow-y:auto}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-search-input-wrapper{padding:var(--ht-menu-item-vertical-padding)var(--ht-menu-item-horizontal-padding);align-items:center;gap:var(--ht-gap-size);align-self:stretch;display:flex;position:relative}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-search-icon{left:calc(var(--ht-menu-item-horizontal-padding) + 10px);opacity:.5;pointer-events:none;z-index:1;background-position:50%;background-repeat:no-repeat;background-size:contain;width:16px;height:16px;position:absolute;top:50%;transform:translateY(-50%)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input{box-sizing:border-box;border-radius:var(--ht-input-border-radius);width:100%;color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);border:1px solid var(--ht-input-border-color);transition:var(--ht-table-transition)all ease-in-out;line-height:var(--ht-line-height);font-size:var(--ht-font-size);padding:var(--ht-input-vertical-padding)var(--ht-menu-item-horizontal-padding)var(--ht-input-vertical-padding)32px}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color);outline-offset:0;box-shadow:none;outline:none}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input::placeholder{color:var(--ht-foreground-color);opacity:.6}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-separator{background-color:var(--ht-menu-border-color);width:100%;height:1px;margin:var(--ht-menu-vertical-padding)0 var(--ht-menu-vertical-padding)0;padding:0}.handsontableEditor .ht-multi-select-editor ul{width:100%;padding:var(--ht-gap-size)var(--ht-menu-horizontal-padding);flex-direction:column;align-items:flex-start;margin:0;list-style:none;display:flex}.handsontableEditor .ht-multi-select-editor ul li{background:var(--ht-background-color);padding:var(--ht-menu-item-vertical-padding)var(--ht-menu-item-horizontal-padding);-webkit-user-select:none;user-select:none;cursor:pointer;align-self:stretch;align-items:center;display:flex}.handsontableEditor .ht-multi-select-editor ul li *{cursor:pointer}.handsontableEditor .ht-multi-select-editor ul li.ht-multi-select-editor-item-selected{background:color-mix(in srgb,var(--ht-menu-item-active-color)var(--ht-menu-item-active-color-opacity,100%),transparent)}.handsontableEditor .ht-multi-select-editor ul li div{flex:1 0 0;align-items:center;display:flex}.handsontableEditor .ht-multi-select-editor ul li div input{-webkit-appearance:none;appearance:none;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);margin:0;padding:0;display:flex;position:relative}.handsontableEditor .ht-multi-select-editor ul li div input:after{content:"";display:block;position:absolute;top:0;left:0}.handsontableEditor .ht-multi-select-editor ul li div input:before{content:"";box-sizing:border-box;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);border-radius:var(--ht-checkbox-border-radius);border:1px solid var(--ht-checkbox-border-color);background:var(--ht-checkbox-background-color);background-position:50%;background-repeat:no-repeat;display:block;position:absolute;top:0;left:0}.handsontableEditor .ht-multi-select-editor ul li div input:checked:before{border-color:var(--ht-checkbox-checked-border-color);background:var(--ht-checkbox-checked-background-color)}.handsontableEditor .ht-multi-select-editor ul li div input:checked:after{color:var(--ht-checkbox-checked-icon-color);background-color:currentColor}.handsontableEditor .ht-multi-select-editor ul li div input:focus{outline:none}.handsontableEditor .ht-multi-select-editor ul li div label{color:var(--ht-foreground-color);text-overflow:ellipsis;font-size:var(--ht-font-size);font-style:normal;font-weight:400;line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);width:100%;padding:0 0 0 calc(var(--ht-gap-size)*2);overflow:hidden}.handsontableEditor .ht-multi-select-editor ul li:hover{background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}.handsontableEditor .ht-multi-select-editor ul li:has(input:focus){background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}.handsontable .htUISelectCaption{width:100%;padding:var(--ht-input-vertical-padding)var(--ht-input-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-input-border-radius);box-sizing:border-box;cursor:pointer;border:var(--ht-input-border-width)solid var(--ht-input-border-color);color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);text-overflow:ellipsis;white-space:nowrap;transition:var(--ht-table-transition)all ease-in-out;margin:0;padding-inline-end:calc(var(--ht-input-horizontal-padding) + var(--ht-icon-size));overflow:hidden;outline:none!important}.handsontable .htUISelectCaption:after{content:"";right:calc(var(--ht-input-horizontal-padding) - var(--ht-icon-size)/4);display:block;position:absolute;top:50%;transform:translateY(-50%)}.handsontable .htUISelectCaption:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontable .htUISelectCaption:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontable .htUISelectCaption:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}.handsontable .htUISelect{cursor:pointer;position:relative;outline:none!important}.handsontable .htUISelect:focus .htUISelectCaption{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}[dir=rtl].handsontable .htUISelectCaption:after{right:auto;left:calc(var(--ht-input-horizontal-padding) - var(--ht-icon-size)/4)}.handsontable .htFiltersMenuCondition .htUIInput input,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input{width:100%;padding:var(--ht-input-vertical-padding)var(--ht-input-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-input-border-radius);box-sizing:border-box;cursor:pointer;border:var(--ht-input-border-width)solid var(--ht-input-border-color);color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);transition:var(--ht-table-transition)all ease-in-out;outline:none!important}.handsontable .htFiltersMenuCondition .htUIInput input:hover,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontable .htFiltersMenuCondition .htUIInput input:disabled,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontable .htFiltersMenuCondition .htUIInput input:focus,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}.handsontable .htUIInput{text-align:center;padding:0;position:relative;outline:none!important}.handsontable .htUIInputIcon{position:absolute}.handsontable .htUIInput.htUIButton input,.handsontable .ht-button{min-width:64px;padding:var(--ht-button-vertical-padding)var(--ht-button-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-button-border-radius);box-sizing:border-box;cursor:pointer;transition:var(--ht-table-transition)all ease-in-out;border-style:solid;border-width:1px;outline:none!important}.handsontable .htUIInput.htUIButtonCancel input,.handsontable .ht-button--secondary{border-color:var(--ht-secondary-button-border-color);background-color:var(--ht-secondary-button-background-color);color:var(--ht-secondary-button-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:hover,.handsontable .ht-button--secondary:hover{border-color:var(--ht-secondary-button-hover-border-color);background-color:var(--ht-secondary-button-hover-background-color);color:var(--ht-secondary-button-hover-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:disabled,.handsontable .ht-button--secondary:disabled{border-color:var(--ht-secondary-button-disabled-border-color);background-color:var(--ht-secondary-button-disabled-background-color);color:var(--ht-secondary-button-disabled-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:focus,.handsontable .ht-button--secondary:focus{border-color:var(--ht-secondary-button-focus-border-color);background-color:var(--ht-secondary-button-focus-background-color);color:var(--ht-secondary-button-focus-foreground-color);box-shadow:0 0 0 1px var(--ht-accent-color)}.htUIInput.htUIButtonOK input,.ht-button--primary{border-color:var(--ht-primary-button-border-color);background-color:var(--ht-primary-button-background-color);color:var(--ht-primary-button-foreground-color)}.htUIInput.htUIButtonOK input:hover,.ht-button--primary:hover{border-color:var(--ht-primary-button-hover-border-color);background-color:var(--ht-primary-button-hover-background-color);color:var(--ht-primary-button-hover-foreground-color)}.htUIInput.htUIButtonOK input:disabled,.ht-button--primary:disabled{border-color:var(--ht-primary-button-disabled-border-color);background-color:var(--ht-primary-button-disabled-background-color);color:var(--ht-primary-button-disabled-foreground-color)}.htUIInput.htUIButtonOK input:focus,.ht-button--primary:focus{border-color:var(--ht-primary-button-focus-border-color);background-color:var(--ht-primary-button-focus-background-color);color:var(--ht-primary-button-focus-foreground-color);box-shadow:0 0 0 1px var(--ht-accent-color)}.handsontable .htUIRadio{padding:var(--ht-gap-size)calc(2*var(--ht-gap-size));align-items:center;gap:var(--ht-gap-size);cursor:pointer;margin:0;padding-bottom:0;display:inline-flex;position:relative}.handsontable .htUIRadio:first-child{padding-inline-start:0}.handsontable .htUIRadio>input[type=radio]{width:var(--ht-radio-size);height:var(--ht-radio-size);-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:calc(.5*var(--ht-radio-size));outline:none;margin:0;position:relative}.handsontable .htUIRadio>input[type=radio]:before{content:"";border-radius:calc(.5*var(--ht-radio-size));border:1px solid var(--ht-radio-border-color);background-color:var(--ht-radio-background-color);display:block;position:absolute;inset:0}.handsontable .htUIRadio>input[type=radio]:after{content:"";color:var(--ht-radio-icon-color);display:block;position:absolute}.handsontable .htUIRadio>input[type=radio]:checked:before{border-color:var(--ht-radio-checked-border-color);background-color:var(--ht-radio-checked-background-color)}.handsontable .htUIRadio>input[type=radio]:checked:after{color:var(--ht-radio-checked-icon-color)}.handsontable .htUIRadio>input[type=radio]:checked:disabled{cursor:initial}.handsontable .htUIRadio>input[type=radio]:checked:disabled:before{border-color:var(--ht-radio-checked-disabled-border-color);background-color:var(--ht-radio-checked-disabled-background-color)}.handsontable .htUIRadio>input[type=radio]:checked:disabled:after{color:var(--ht-radio-checked-disabled-icon-color)}.handsontable .htUIRadio>input[type=radio]:checked:focus:before{border-color:var(--ht-radio-checked-focus-border-color);background-color:var(--ht-radio-checked-focus-background-color)}.handsontable .htUIRadio>input[type=radio]:checked:focus:after{color:var(--ht-radio-checked-focus-icon-color)}.handsontable .htUIRadio>input[type=radio]:disabled{cursor:initial}.handsontable .htUIRadio>input[type=radio]:disabled:before{border-color:var(--ht-radio-disabled-border-color);background-color:var(--ht-radio-disabled-background-color)}.handsontable .htUIRadio>input[type=radio]:disabled:after{color:var(--ht-radio-disabled-icon-color)}.handsontable .htUIRadio>input[type=radio]:focus:before{border-color:var(--ht-radio-focus-border-color);background-color:var(--ht-radio-focus-background-color);outline:1px solid var(--ht-radio-focus-ring-color)}.handsontable .htUIRadio>input[type=radio]:focus:after{color:var(--ht-radio-focus-icon-color)}.handsontable .htUIRadio label{vertical-align:middle;cursor:pointer;color:inherit}.handsontable .htUIRadio label:before{content:"";display:block;position:absolute;inset:0}.handsontable .collapsibleIndicator,.handsontable .ht_nestingButton{width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);margin:calc(-1*(var(--ht-icon-button-hit-area-size) - var(--ht-icon-size))/2 + 1px);box-sizing:border-box;cursor:pointer;text-indent:-100px;flex-shrink:0;font-size:0;position:relative;overflow:visible}.handsontable .collapsibleIndicator:before,.handsontable .ht_nestingButton:before{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-collapse-button-border-radius);transition:var(--ht-table-transition)all ease-in-out;z-index:1;display:block;position:absolute;top:50%;left:50%}.handsontable .collapsibleIndicator:after,.handsontable .ht_nestingButton:after{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-collapse-button-border-radius);transition:var(--ht-table-transition)all ease-in-out;z-index:0;display:block;position:absolute;top:50%;left:50%}.handsontable .collapsibleIndicator.expanded:before,.handsontable .collapsibleIndicator.ht_nestingCollapse:before,.handsontable .ht_nestingButton.expanded:before,.handsontable .ht_nestingButton.ht_nestingCollapse:before{color:var(--ht-collapse-button-open-icon-color)}.handsontable .collapsibleIndicator.expanded:after,.handsontable .collapsibleIndicator.ht_nestingCollapse:after,.handsontable .ht_nestingButton.expanded:after,.handsontable .ht_nestingButton.ht_nestingCollapse:after{background-color:var(--ht-collapse-button-open-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-open-border-color)}.handsontable .collapsibleIndicator.expanded:hover:before,.handsontable .collapsibleIndicator.ht_nestingCollapse:hover:before,.handsontable .ht_nestingButton.expanded:hover:before,.handsontable .ht_nestingButton.ht_nestingCollapse:hover:before{color:var(--ht-collapse-button-open-hover-icon-color)}.handsontable .collapsibleIndicator.expanded:hover:after,.handsontable .collapsibleIndicator.ht_nestingCollapse:hover:after,.handsontable .ht_nestingButton.expanded:hover:after,.handsontable .ht_nestingButton.ht_nestingCollapse:hover:after{background-color:var(--ht-collapse-button-open-hover-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-open-hover-border-color)}.handsontable .collapsibleIndicator.collapsed:before,.handsontable .collapsibleIndicator.ht_nestingExpand:before,.handsontable .ht_nestingButton.collapsed:before,.handsontable .ht_nestingButton.ht_nestingExpand:before{color:var(--ht-collapse-button-close-icon-color)}.handsontable .collapsibleIndicator.collapsed:after,.handsontable .collapsibleIndicator.ht_nestingExpand:after,.handsontable .ht_nestingButton.collapsed:after,.handsontable .ht_nestingButton.ht_nestingExpand:after{background-color:var(--ht-collapse-button-close-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-close-border-color)}.handsontable .collapsibleIndicator.collapsed:hover:before,.handsontable .collapsibleIndicator.ht_nestingExpand:hover:before,.handsontable .ht_nestingButton.collapsed:hover:before,.handsontable .ht_nestingButton.ht_nestingExpand:hover:before{color:var(--ht-collapse-button-close-hover-icon-color)}.handsontable .collapsibleIndicator.collapsed:hover:after,.handsontable .collapsibleIndicator.ht_nestingExpand:hover:after,.handsontable .ht_nestingButton.collapsed:hover:after,.handsontable .ht_nestingButton.ht_nestingExpand:hover:after{background-color:var(--ht-collapse-button-close-hover-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-close-hover-border-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.collapsed:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand:before,.handsontable th.ht__active_highlight .ht_nestingButton.collapsed:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand:before{color:var(--ht-collapse-button-close-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.collapsed:hover:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.collapsed:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand:hover:before{color:var(--ht-collapse-button-close-hover-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.expanded:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse:before,.handsontable th.ht__active_highlight .ht_nestingButton.expanded:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse:before{color:var(--ht-collapse-button-open-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.expanded:hover:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.expanded:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse:hover:before{color:var(--ht-collapse-button-open-hover-icon-active-color)}.handsontable thead th.htRowspanHeader+th{border-inline-start-width:0}.handsontable thead th.htRowspanHeader{vertical-align:bottom;height:auto;overflow:visible}.handsontable thead th.htRowspanHeader.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color);z-index:1}.handsontable.htRowHeaders.htHasRowspanHeaders thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:0}.handsontable.htRowHeaders.htHasRowspanHeaders thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0}.handsontable.htHasRowspanHeaders .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0}.handsontable.htHasRowspanHeaders .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0}.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead th.htRowspanBottomLevel,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead th.htRowspanBottomLevel{border-bottom-width:0}.handsontable thead th.hiddenHeader:not(:first-of-type){display:none}.handsontable thead th.hiddenHeaderText .colHeader{opacity:0}.handsontable th.ht_nestingLevels>.relative{align-items:center;gap:5px;display:flex}.handsontable th.ht_nestingLevels span:last-child{padding-left:calc(var(--ht-icon-size) + 5px)}.handsontable th.ht_nestingLevels span.ht_nestingLevel{display:inline-block}.handsontable th.ht_nestingLevels span.ht_nestingLevel_empty{order:-2;width:5px;height:1px;display:inline-block;position:relative}.handsontable th.ht_nestingLevels .ht_nestingButton{cursor:pointer;order:-1;position:relative}.handsontable th.beforeHiddenColumn,.handsontable th.afterHiddenColumn{position:relative}.handsontable th.beforeHiddenColumn:before,.handsontable th.beforeHiddenColumn:after,.handsontable th.afterHiddenColumn:before,.handsontable th.afterHiddenColumn:after{color:var(--ht-hidden-indicator-color);position:absolute;top:50%;transform:translateY(-50%);width:10px!important;height:10px!important}.handsontable th.beforeHiddenColumn:after{content:"";display:block;right:-2px}.handsontable th.afterHiddenColumn:before{content:"";display:block;left:-2px}.handsontable th.ht__active_highlight.beforeHiddenColumn:before,.handsontable th.ht__active_highlight.beforeHiddenColumn:after,.handsontable th.ht__active_highlight.afterHiddenColumn:before,.handsontable th.ht__active_highlight.afterHiddenColumn:after{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}[dir=rtl].handsontable th.beforeHiddenColumn:after{right:initial;left:-2px;transform:translateY(-50%)rotate(180deg)}[dir=rtl].handsontable th.afterHiddenColumn:before{right:-2px;left:initial;transform:translateY(-50%)rotate(180deg)}.handsontable th.beforeHiddenRow,.handsontable th.afterHiddenRow{position:relative}.handsontable th.beforeHiddenRow:before,.handsontable th.beforeHiddenRow:after,.handsontable th.afterHiddenRow:before,.handsontable th.afterHiddenRow:after{color:var(--ht-hidden-indicator-color);position:absolute;left:50%;transform:translate(-50%);width:10px!important;height:10px!important}.handsontable th.beforeHiddenRow:after{content:"";display:block;bottom:-2px}.handsontable th.afterHiddenRow:before{content:"";display:block;top:-2px}.handsontable th.ht__active_highlight.beforeHiddenRow:before,.handsontable th.ht__active_highlight.beforeHiddenRow:after,.handsontable th.ht__active_highlight.afterHiddenRow:before,.handsontable th.ht__active_highlight.afterHiddenRow:after{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}.handsontable .changeType{box-sizing:border-box;width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);margin:calc(-1*(var(--ht-icon-button-hit-area-size) - var(--ht-icon-size))/2 + 1px);box-shadow:none;color:inherit;z-index:1;background:0 0;border:none;outline:none;flex-shrink:0;padding:0;position:relative;overflow:visible}.handsontable .changeType:before{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));color:var(--ht-icon-button-icon-color);z-index:1;display:block;position:absolute;top:50%;left:50%}.handsontable .changeType:after{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-icon-button-border-radius);box-shadow:0 0 0 1px var(--ht-icon-button-border-color);background-color:var(--ht-icon-button-background-color);z-index:0;display:block;position:absolute;top:50%;left:50%}.handsontable .changeType:hover{cursor:pointer}.handsontable .changeType:hover:before{color:var(--ht-icon-button-hover-icon-color)}.handsontable .changeType:hover:after{box-shadow:0 0 0 1px var(--ht-icon-button-hover-border-color);background-color:var(--ht-icon-button-hover-background-color)}.handsontable .ht__active_highlight .changeType:before{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}.handsontable .ht__active_highlight .changeType:after{box-shadow:0 0 0 1px var(--ht-icon-button-active-border-color,var(--ht-icon-active-button-border-color));background-color:var(--ht-icon-button-active-background-color,var(--ht-icon-active-button-background-color))}.handsontable .ht__active_highlight .changeType:hover:before{color:var(--ht-icon-button-active-hover-icon-color,var(--ht-icon-active-button-hover-icon-color))}.handsontable .ht__active_highlight .changeType:hover:after{box-shadow:0 0 0 1px var(--ht-icon-button-active-hover-border-color,var(--ht-icon-active-button-hover-border-color));background-color:var(--ht-icon-button-active-hover-background-color,var(--ht-icon-active-button-hover-background-color))}.handsontable th.htFiltersActive{background-color:var(--ht-header-filter-background-color)}.handsontable th.htFiltersActive.ht__active_highlight{background-color:color-mix(in srgb,var(--ht-header-active-background-color),var(--ht-header-filter-background-color)20%)}.handsontable.htDropdownMenu>.ht_master,.handsontable.htContextMenu>.ht_master,.handsontable.htFiltersConditionsMenu>.ht_master{box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);border:var(--ht-menu-border-width,1px)solid var(--ht-menu-border-color,#e5e5e9);border-radius:var(--ht-menu-border-radius);padding:var(--ht-menu-vertical-padding,8px)var(--ht-menu-horizontal-padding,0);background-color:var(--ht-background-color,#fff);overflow:hidden}.handsontable.htDropdownMenu:not(.htGhostTable),.handsontable.htContextMenu:not(.htGhostTable),.handsontable.htFiltersConditionsMenu:not(.htGhostTable){z-index:1060;display:none;position:absolute}.handsontable.htDropdownMenu .ht_clone_top,.handsontable.htDropdownMenu .ht_clone_bottom,.handsontable.htDropdownMenu .ht_clone_inline_start,.handsontable.htDropdownMenu .ht_clone_top_inline_start_corner,.handsontable.htDropdownMenu .ht_clone_bottom_inline_start_corner,.handsontable.htContextMenu .ht_clone_top,.handsontable.htContextMenu .ht_clone_bottom,.handsontable.htContextMenu .ht_clone_inline_start,.handsontable.htContextMenu .ht_clone_top_inline_start_corner,.handsontable.htContextMenu .ht_clone_bottom_inline_start_corner,.handsontable.htFiltersConditionsMenu .ht_clone_top,.handsontable.htFiltersConditionsMenu .ht_clone_bottom,.handsontable.htFiltersConditionsMenu .ht_clone_inline_start,.handsontable.htFiltersConditionsMenu .ht_clone_top_inline_start_corner,.handsontable.htFiltersConditionsMenu .ht_clone_bottom_inline_start_corner{display:none}.handsontable.htDropdownMenu table.htCore,.handsontable.htContextMenu table.htCore,.handsontable.htFiltersConditionsMenu table.htCore{overflow:hidden}.handsontable.htDropdownMenu .htCustomMenuRenderer .table.htCore,.handsontable.htContextMenu .htCustomMenuRenderer .table.htCore,.handsontable.htFiltersConditionsMenu .htCustomMenuRenderer .table.htCore{box-shadow:none}.handsontable.htDropdownMenu.handsontable:focus,.handsontable.htContextMenu.handsontable:focus,.handsontable.htFiltersConditionsMenu.handsontable:focus{outline:none}.handsontable.htDropdownMenu .wtBorder,.handsontable.htContextMenu .wtBorder,.handsontable.htFiltersConditionsMenu .wtBorder{visibility:hidden}.handsontable.htDropdownMenu tbody tr:first-of-type td:first-child,.handsontable.htDropdownMenu tbody tr:first-of-type th:first-child,.handsontable.htContextMenu tbody tr:first-of-type td:first-child,.handsontable.htContextMenu tbody tr:first-of-type th:first-child,.handsontable.htFiltersConditionsMenu tbody tr:first-of-type td:first-child,.handsontable.htFiltersConditionsMenu tbody tr:first-of-type th:first-child{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px)}.handsontable.htDropdownMenu table tbody tr td,.handsontable.htContextMenu table tbody tr td,.handsontable.htFiltersConditionsMenu table tbody tr td{padding:var(--ht-menu-item-vertical-padding,4px)var(--ht-menu-item-horizontal-padding,8px);white-space:nowrap;text-overflow:ellipsis;background:var(--ht-background-color,#fff);cursor:pointer;transition:var(--ht-table-transition)background ease-in-out;border-width:0;position:relative;overflow:hidden}.handsontable.htDropdownMenu table tbody tr td:first-child,.handsontable.htContextMenu table tbody tr td:first-child,.handsontable.htFiltersConditionsMenu table tbody tr td:first-child{border-top-width:0;border-inline-end-width:0;border-bottom-width:0;border-inline-start-width:0}.handsontable.htDropdownMenu table tbody tr td.htDimmed,.handsontable.htContextMenu table tbody tr td.htDimmed,.handsontable.htFiltersConditionsMenu table tbody tr td.htDimmed{font-style:normal;color:inherit!important;background-color:inherit!important}.handsontable.htDropdownMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled):hover,.handsontable.htContextMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled):hover,.handsontable.htFiltersConditionsMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled):hover{cursor:pointer;background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important}.handsontable.htDropdownMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]),.handsontable.htContextMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]),.handsontable.htFiltersConditionsMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]){box-shadow:inset 0 0 0 1px var(--ht-accent-color)}.handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper,.handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper,.handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper{margin-inline-end:calc(2*var(--ht-gap-size,4px) + var(--ht-icon-size))}.handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper:after,.handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper:after,.handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper:after{content:"";top:50%;right:calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size)*2);display:block;position:absolute;transform:translateY(-50%)}.handsontable.htDropdownMenu table tbody tr td.htSeparator,.handsontable.htContextMenu table tbody tr td.htSeparator,.handsontable.htFiltersConditionsMenu table tbody tr td.htSeparator{border-top:1px solid var(--ht-border-color);cursor:default;height:0;padding:0}.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled{color:var(--ht-disabled-color);cursor:default}.handsontable.htDropdownMenu table tbody tr td.htDisabled:hover,.handsontable.htContextMenu table tbody tr td.htDisabled:hover,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled:hover{background:var(--ht-background-color);color:var(--ht-disabled-color)}.handsontable.htDropdownMenu table tbody tr td.htHidden,.handsontable.htContextMenu table tbody tr td.htHidden,.handsontable.htFiltersConditionsMenu table tbody tr td.htHidden{display:none}:is(.handsontable.htDropdownMenu table tbody tr td:has(.htItemWrapper .selected),.handsontable.htContextMenu table tbody tr td:has(.htItemWrapper .selected),.handsontable.htFiltersConditionsMenu table tbody tr td:has(.htItemWrapper .selected)){background-color:color-mix(in srgb,var(--ht-menu-item-active-color)var(--ht-menu-item-active-color-opacity,100%),transparent)}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper,.handsontable.htContextMenu table tbody tr td .htItemWrapper,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper{margin-inline:calc(2*var(--ht-gap-size,4px))}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper:before,.handsontable.htContextMenu table tbody tr td .htItemWrapper:before,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper:before{vertical-align:text-bottom;margin-right:12px}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected{font-size:0;inset:0}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected:after,.handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected:after,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected:after{content:"";top:50%;right:calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size)*2);color:var(--ht-accent-color);display:block;position:absolute;transform:translateY(-50%)}.handsontable.htDropdownMenu table tbody tr td div span.selected,.handsontable.htContextMenu table tbody tr td div span.selected,.handsontable.htFiltersConditionsMenu table tbody tr td div span.selected{position:absolute;inset-inline-end:0}.handsontable.htDropdownMenu table tbody tr td .htUIButton,.handsontable.htContextMenu table tbody tr td .htUIButton,.handsontable.htFiltersConditionsMenu table tbody tr td .htUIButton{width:calc(50% - var(--ht-gap-size))}.handsontable.htDropdownMenu table tbody tr td .htUIButton input,.handsontable.htContextMenu table tbody tr td .htUIButton input,.handsontable.htFiltersConditionsMenu table tbody tr td .htUIButton input{width:100%}.handsontable .htUIClearAll a,.handsontable .htUISelectAll a{padding:var(--ht-gap-size);text-decoration:none;display:inline-block}.handsontable .htUIMultipleSelect .ht_master .wtHolder{background:0 0;border-radius:0!important;overflow-y:scroll!important}.handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore{box-shadow:none}[dir=rtl].handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper:after,[dir=rtl].handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper:after,[dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper:after{left:calc(4*var(--ht-gap-size));right:auto;transform:translateY(-50%)rotate(180deg)}[dir=rtl].handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected:after,[dir=rtl].handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected:after,[dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected:after{left:calc(4*var(--ht-gap-size));right:auto}.handsontable.htFiltersConditionsMenu:not(.htGhostTable){z-index:1070}.handsontable .ht_master table td.htCustomMenuRenderer{cursor:auto}.handsontable .ht_master table td.htCustomMenuRenderer.htFiltersMenuActionBar{padding-top:calc(var(--ht-menu-item-vertical-padding,4px)*2)}.handsontable .htFiltersMenuLabel{font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin-bottom:calc(var(--ht-gap-size,2px)*2)}.handsontable .htFiltersMenuLabel:empty{display:none}.handsontable .htFiltersMenuCondition{padding-top:calc(var(--ht-gap-size,2px)*3)!important;padding-bottom:0!important}.handsontable .htFiltersMenuCondition .border{border-bottom:1px solid var(--ht-border-color)!important}.handsontable .htFiltersMenuCondition .htUIInput{margin-top:calc(var(--ht-gap-size,2px)*2)}.handsontable .htFiltersMenuValue{padding-top:calc(var(--ht-gap-size,2px)*3)!important;border-bottom:1px solid var(--ht-border-color)!important;padding-bottom:0!important}.handsontable .htFiltersMenuOperators{padding-top:calc(var(--ht-gap-size,2px)*2)!important;padding-bottom:0!important}.handsontable .htUISelectionControls{margin:0 calc(var(--ht-gap-size,2px)*-1);padding-top:calc(var(--ht-gap-size,2px)*2)!important;padding-bottom:var(--ht-gap-size,2px)!important}.handsontable .htUIMultipleSelectHot{--ht-cell-horizontal-padding:calc(var(--ht-menu-item-horizontal-padding,2px) + var(--ht-gap-size,2px)*2);width:calc(100% + var(--ht-menu-item-horizontal-padding,2px)*2 + var(--ht-gap-size,2px)*4);margin:0 calc((var(--ht-menu-item-horizontal-padding,2px) + var(--ht-gap-size,2px)*2)*-1);overflow:initial!important}.handsontable .htUIMultipleSelectHot:before{content:"";background-color:var(--ht-border-color);width:100%;height:1px;display:block;position:absolute;top:-1px;left:0}.handsontable .htUIMultipleSelectHot .wtHolder{box-sizing:border-box;padding:0;overflow-x:hidden}.handsontable .htUIMultipleSelectHot .wtHolder .wtSpreader{padding:calc(var(--ht-gap-size)*2)0}.handsontable .htUIMultipleSelectHot .wtHolder td{padding:4px var(--ht-cell-horizontal-padding);height:auto!important}.handsontable .htUIClearAll,.handsontable .htUISelectAll{margin-right:var(--ht-gap-size,4px);margin-bottom:var(--ht-gap-size,4px);display:inline-block}.handsontable .htUIClearAll a,.handsontable .htUISelectAll a{font-size:var(--ht-font-size);line-height:var(--ht-line-height);color:var(--ht-link-color);border-radius:var(--ht-button-border-radius)}.handsontable .htUIClearAll a:hover,.handsontable .htUISelectAll a:hover{color:var(--ht-link-hover-color)}.handsontable .htUIClearAll a:focus,.handsontable .htUISelectAll a:focus{outline:1px solid var(--ht-link-hover-color)}.handsontable .htUIMultipleSelect .ht_master .wtHolder{overflow:auto}.handsontable .htUIMultipleSelect .ht_master .wtHolder .wtHider,.handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore,.handsontable .htUIMultipleSelect .ht_master .wtHolder tr,.handsontable .htUIMultipleSelect .ht_master .wtHolder td{background:0 0}.handsontable .htUIInput.htUIButton{cursor:pointer;display:inline-block}.handsontable .htUIInput.htUIButtonOK{margin-inline-start:0;margin-inline-end:calc(2*var(--ht-gap-size,2px))}.handsontable .htCommentCell{position:relative}.handsontable .htCommentCell:after{content:"";top:0;border-inline-start:var(--ht-comments-indicator-size,4px)solid #0000;border-inline-end:none;border-top:var(--ht-comments-indicator-size,4px)solid var(--ht-comments-indicator-color,#1a42e8);display:block;position:absolute;inset-inline-start:unset;inset-inline-end:0}.htCommentsContainer .htComments{z-index:1059;display:none;position:absolute}.htCommentsContainer .htCommentTextArea{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:var(--ht-menu-shadow-x,0)var(--ht-menu-shadow-y,0)var(--ht-menu-shadow-blur,8px)color-mix(in srgb,var(--ht-menu-shadow-color,#000)var(--ht-menu-shadow-opacity,100%),transparent);width:240px;height:88px;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);padding:var(--ht-comments-textarea-vertical-padding)var(--ht-comments-textarea-horizontal-padding);border:var(--ht-comments-textarea-border-width,1px)solid var(--ht-comments-textarea-border-color,transparent);border-inline-start:var(--ht-comments-textarea-border-width,1px)solid var(--ht-comments-textarea-border-color,#1a42e8);color:var(--ht-comments-textarea-foreground-color);background-color:var(--ht-comments-textarea-background-color,#fff);box-sizing:border-box;-webkit-appearance:none;margin:0 -1px;outline:0!important}.htCommentsContainer .htCommentTextArea:focus{border:var(--ht-comments-textarea-focus-border-width,1px)solid var(--ht-comments-textarea-focus-border-color,#1a42e8);color:var(--ht-comments-textarea-focus-foreground-color);background-color:var(--ht-comments-textarea-focus-background-color,#fff)}.htBorders .wtBorder.ht-border-style-dashed-vertical{background-image:repeating-linear-gradient(to bottom,var(--ht-custom-border-color)0 5px,transparent 0 10px)}.htBorders .wtBorder.ht-border-style-dashed-horizontal{background-image:repeating-linear-gradient(to right,var(--ht-custom-border-color)0 5px,transparent 0 10px)}.htBorders .wtBorder.ht-border-style-dotted-horizontal{background-image:radial-gradient(circle,var(--ht-custom-border-color)calc(var(--ht-custom-border-size)/2),transparent 0);background-size:calc(var(--ht-custom-border-size)*2)var(--ht-custom-border-size);background-repeat:repeat-x}.htBorders .wtBorder.ht-border-style-dotted-vertical{background-image:radial-gradient(circle,var(--ht-custom-border-color)calc(var(--ht-custom-border-size)/2),transparent 0);background-size:var(--ht-custom-border-size)calc(var(--ht-custom-border-size)*2);background-repeat:repeat-y}.handsontable .columnSorting:not(.indicatorDisabled){position:relative}.handsontable .columnSorting:not(.indicatorDisabled).sortAction.ascending,.handsontable .columnSorting:not(.indicatorDisabled).sortAction.descending{padding-inline-end:calc(var(--ht-icon-size,16px) + 2px)}.handsontable .columnSorting:not(.indicatorDisabled).sortAction:hover{cursor:pointer;text-decoration:none}.handsontable .columnSorting:not(.indicatorDisabled).sortAction:before{content:"";width:var(--ht-icon-size,16px);text-align:right;display:block;position:absolute;top:50%;right:2px;transform:translateY(-50%)}.handsontable .htRight .columnSorting.sortAction.ascending,.handsontable .htRight .columnSorting.sortAction.descending{padding-inline-start:calc(var(--ht-icon-size,16px) + 2px);padding-inline-end:0}.handsontable .htRight .columnSorting.sortAction:before,[dir=rtl] .handsontable .columnSorting.sortAction:before{text-align:left;left:2px;right:auto}[dir=rtl] .handsontable .htRight .columnSorting.sortAction.ascending,[dir=rtl] .handsontable .htRight .columnSorting.sortAction.descending{padding-inline-start:0;padding-inline-end:calc(var(--ht-icon-size,16px) + 2px)}[dir=rtl] .handsontable .htLeft .columnSorting.sortAction.ascending,[dir=rtl] .handsontable .htLeft .columnSorting.sortAction.descending{padding-inline-start:calc(var(--ht-icon-size,16px) + 2px);padding-inline-end:0}[dir=rtl] .handsontable .htLeft .columnSorting.sortAction:before{text-align:right;left:auto;right:2px}.htGhostTable .htCore span.colHeader.columnSorting:not(.indicatorDisabled):before{content:"*";padding-inline-end:calc(var(--ht-icon-size,16px) + 2px);display:inline-block;position:relative}.handsontable .colHeader.columnSorting:after{content:"";text-align:right;width:8px;margin-top:4px;font-size:8px;display:block;position:absolute;top:50%;right:0;transform:translateY(-50%)}.handsontable .colHeader.columnSorting[class^=sort-]:after,.handsontable .colHeader.columnSorting[class*=\\ sort-]:after{content:"+"}.handsontable .colHeader.columnSorting.sort-1:after{content:"1"}.handsontable .colHeader.columnSorting.sort-2:after{content:"2"}.handsontable .colHeader.columnSorting.sort-3:after{content:"3"}.handsontable .colHeader.columnSorting.sort-4:after{content:"4"}.handsontable .colHeader.columnSorting.sort-5:after{content:"5"}.handsontable .colHeader.columnSorting.sort-6:after{content:"6"}.handsontable .colHeader.columnSorting.sort-7:after{content:"7"}.handsontable .htRight .colHeader.columnSorting:after,[dir=rtl] .handsontable .colHeader.columnSorting:after{text-align:left;left:0;right:auto}[dir=rtl] .handsontable .htLeft .colHeader.columnSorting:after{text-align:right;left:auto;right:0}.htGhostTable th div:has(.changeType) span.colHeader.columnSorting:not(.indicatorDisabled){padding-inline-end:var(--ht-gap-size)}.handsontable .htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_top_inline_start_corner th:nth-child(2),.handsontable .htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_inline_start td:first-of-type{border-left:0}.handsontable .ht_clone_top_inline_start_corner th.ht__active_highlight{box-shadow:none}.handsontable .manualColumnResizer{cursor:col-resize;opacity:0;z-index:210;background:0 0;width:10px;margin:0;position:absolute;top:0}.handsontable .manualColumnResizer:before,.handsontable .manualColumnResizer:after{content:"";background:var(--ht-resize-indicator-color);border-radius:2px;width:2px;height:calc(100% - 12px);max-height:16px;margin-top:.5px;display:block;position:absolute;top:50%;left:1px;transform:translateY(-50%)}.handsontable .manualColumnResizer:after{left:auto;right:0}.handsontable .manualColumnResizer:hover,.handsontable .manualColumnResizer.active{opacity:1}.handsontable .manualColumnResizerGuide{inset-inline-end:unset;width:0;border-inline-end:1px solid var(--ht-accent-color);border-inline-start:none;margin-inline-start:5px;margin-inline-end:unset;display:none;position:absolute;top:0}.handsontable .manualColumnResizerGuide.active{z-index:209;display:block}.handsontable .manualRowResizer{z-index:210;cursor:row-resize;opacity:0;background:0 0;height:10px;margin:0;position:absolute;left:0}.handsontable .manualRowResizer:before,.handsontable .manualRowResizer:after{content:"";background:var(--ht-resize-indicator-color);border-radius:2px;width:calc(100% - 12px);max-width:16px;height:2px;display:block;position:absolute;top:1px;left:50%;transform:translate(-50%)}.handsontable .manualRowResizer:after{top:auto;bottom:0}.handsontable .manualRowResizer:hover,.handsontable .manualRowResizer.active{opacity:1}.handsontable .manualRowResizerGuide{border-bottom:1px solid var(--ht-accent-color);border-top:none;height:0;margin-top:5px;display:none;position:absolute;bottom:0;left:0}.handsontable .manualRowResizerGuide.active{z-index:209;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-multiple]:before,.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-0]:before{opacity:.14}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-1]:before{opacity:.21}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-2]:before{opacity:.28}.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:.42}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-5]:before{opacity:.49}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-6]:before{opacity:.56}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-7]:before{opacity:.63}.handsontable .ht__manualColumnMove.after-selection--columns thead th.ht__highlight,.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,.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,.handsontable.ht__manualColumnMove.on-moving--columns .manualColumnResizer{display:none}.handsontable .ht__manualColumnMove--guideline,.handsontable .ht__manualColumnMove--backlight,.handsontable.ht__manualColumnMove--guideline,.handsontable.ht__manualColumnMove--backlight{height:100%;display:none;position:absolute}.handsontable .ht__manualColumnMove--guideline,.handsontable.ht__manualColumnMove--guideline{z-index:205;background:var(--ht-move-indicator-color,#1a42e8);width:1px;margin-inline:-.5px 0;top:0}.handsontable .ht__manualColumnMove--backlight,.handsontable.ht__manualColumnMove--backlight{z-index:205;pointer-events:none;background:color-mix(in srgb,var(--ht-move-backlight-color)var(--ht-move-backlight-opacity,100%),transparent);display:none}.handsontable .on-moving--columns.show-ui .ht__manualColumnMove--guideline,.handsontable .on-moving--columns .ht__manualColumnMove--backlight,.handsontable.on-moving--columns.show-ui .ht__manualColumnMove--guideline,.handsontable.on-moving--columns .ht__manualColumnMove--backlight{display:block}.handsontable .wtHider{position:relative}.handsontable .ht__manualRowMove.after-selection--rows tbody th.ht__highlight,.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,.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,.handsontable.ht__manualRowMove.on-moving--rows .manualRowResizer{display:none}.handsontable .ht__manualRowMove--guideline,.handsontable .ht__manualRowMove--backlight,.handsontable.ht__manualRowMove--guideline,.handsontable.ht__manualRowMove--backlight{width:100%;display:none;position:absolute}.handsontable .ht__manualRowMove--guideline,.handsontable.ht__manualRowMove--guideline{border-top:1px solid var(--ht-move-indicator-color);z-index:205;left:0}.handsontable .ht__manualRowMove--backlight,.handsontable.ht__manualRowMove--backlight{z-index:205;pointer-events:none;background:color-mix(in srgb,var(--ht-move-backlight-color)var(--ht-move-backlight-opacity,100%),transparent);display:none}.handsontable .on-moving--rows.show-ui .ht__manualRowMove--guideline,.handsontable .on-moving--rows .ht__manualRowMove--backlight,.handsontable.on-moving--rows.show-ui .ht__manualRowMove--guideline,.handsontable.on-moving--rows .ht__manualRowMove--backlight{display:block}.ht-dialog{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);font-size:var(--ht-font-size);line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);z-index:1060;opacity:0;border-radius:var(--ht-wrapper-border-radius);border:1px solid var(--ht-border-color);width:100%;height:100%;display:none;position:absolute;top:0;left:0;overflow-y:auto;box-sizing:border-box!important}.ht-dialog[dir=rtl]{left:auto;right:0}.ht-dialog:focus{border:1px solid var(--ht-accent-color);outline:none}.ht-dialog:has(.htFocusCatcher:focus){border:1px solid var(--ht-accent-color);outline:none}.ht-dialog *{box-sizing:border-box!important}.ht-dialog--background-solid{background-color:var(--ht-dialog-solid-background-color)}.ht-dialog--background-semi-transparent{background-color:color-mix(in srgb,var(--ht-dialog-semi-transparent-background-color)var(--ht-dialog-semi-transparent-background-opacity,100%),transparent)}.ht-dialog--animation{transition:opacity var(--ht-table-transition)ease-in-out}.ht-dialog--show{opacity:1}.ht-dialog__content-wrapper{width:100%;min-height:100%;padding:calc(var(--ht-gap-size)*4);border-radius:var(--ht-wrapper-border-radius);justify-content:center;align-items:center;display:flex}.ht-dialog__content{padding:var(--ht-dialog-content-padding-horizontal)var(--ht-dialog-content-padding-vertical);max-width:480px;color:var(--ht-foreground-color);position:relative}.ht-dialog__content--background{box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);border-radius:var(--ht-dialog-content-border-radius);background-color:var(--ht-dialog-content-background-color)}.ht-dialog--confirm .ht-dialog__content-wrapper{text-align:center;padding:calc(var(--ht-gap-size)*2)}.ht-dialog--confirm .ht-dialog__content-wrapper-inner{max-width:480px;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-wrapper-border-radius);flex-direction:column;justify-content:center;align-items:center;display:flex}.ht-dialog--confirm .ht-dialog__content-wrapper-inner--background{box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);border-radius:var(--ht-dialog-content-border-radius);background-color:var(--ht-dialog-content-background-color)}.ht-dialog--confirm .ht-dialog__content-wrapper-inner:focus{box-shadow:0 0 0 1px var(--ht-accent-color);outline:none}.ht-dialog--confirm .ht-dialog__content{justify-content:center;align-items:center;gap:var(--ht-gap-size);flex-direction:column;display:flex}.ht-dialog--confirm .ht-dialog__content:has(.ht-dialog__buttons){gap:calc(var(--ht-gap-size)*2)}.ht-dialog--confirm .ht-dialog__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-dialog--confirm .ht-dialog__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}.ht-dialog--confirm .ht-dialog__buttons{justify-content:center;gap:calc(var(--ht-gap-size)*2);flex-flow:wrap;display:flex}.ht-notification{z-index:1070;pointer-events:none;position:absolute;inset:0;overflow:visible}.ht-notification__stack{overscroll-behavior:contain;pointer-events:auto;-webkit-overflow-scrolling:touch;scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);flex-direction:column;gap:10px;max-width:min(420px,100% - 40px);min-height:0;padding:10px;display:flex;position:absolute;overflow:hidden auto}.ht-notification__stack--top-start{top:10px;align-items:flex-start;max-height:calc(100% - 40px);inset-inline-start:10px}.ht-notification__stack--top-end{top:10px;align-items:flex-end;max-height:calc(100% - 40px);inset-inline-end:10px}.ht-notification__stack--bottom-start{bottom:10px;align-items:flex-start;max-height:calc(100% - 40px);inset-inline-start:10px}.ht-notification__stack--bottom-end{bottom:10px;align-items:flex-end;max-height:calc(100% - 40px);inset-inline-end:10px}.ht-notification__toast{box-shadow:var(--ht-shadow-x,0)var(--ht-shadow-y,0)var(--ht-shadow-blur,8px)color-mix(in srgb,var(--ht-shadow-color,#000)var(--ht-shadow-opacity,100%),transparent);pointer-events:auto;max-width:100%;color:var(--ht-notification-foreground-color,var(--ht-foreground-color));background-color:var(--ht-notification-background-color,var(--ht-background-color));border:1px solid var(--ht-notification-border-color,var(--ht-border-color));border-radius:var(--ht-wrapper-border-radius,4px);font-size:var(--ht-font-size);line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);outline:none;flex-shrink:0;display:flex;position:relative}.ht-notification__toast:focus-visible{box-shadow:0 0 0 1px var(--ht-accent-color)}.ht-notification__toast--animate{opacity:0;transition:opacity var(--ht-table-transition,.15s)ease-out,transform var(--ht-table-transition,.15s)ease-out}.ht-notification__toast--animate.ht-notification__toast--stack-top:not(.ht-notification__toast--visible){transform:translateY(-6px)}.ht-notification__toast--animate.ht-notification__toast--stack-bottom:not(.ht-notification__toast--visible){transform:translateY(6px)}.ht-notification__toast--visible{opacity:1;transform:translateY(0)}.ht-notification__toast--info .ht-notification__accent{display:none}.ht-notification__toast--success .ht-notification__accent{background-color:var(--ht-notification-success-accent,#37bc6c)}.ht-notification__toast--warning .ht-notification__accent{background-color:var(--ht-notification-warning-accent,#fbe952)}.ht-notification__toast--error .ht-notification__accent{background-color:var(--ht-notification-error-accent,#fa4d32)}.ht-notification__toast-inner{width:100%;min-width:0;direction:inherit;flex-direction:row;align-items:stretch;gap:0;padding:10px;display:flex}.ht-notification__accent{box-sizing:border-box;border-radius:4px;flex:0 0 4px;align-self:stretch;margin-inline-end:10px}.ht-notification__body{flex:auto;min-width:0}.ht-notification__title{margin:0 0 var(--ht-gap-size);font-size:var(--ht-font-size);font-weight:var(--ht-font-weight,600)}.ht-notification__message{font-size:var(--ht-font-size-small);word-break:break-word;margin:0}.ht-notification__actions{gap:var(--ht-gap-size);margin-top:var(--ht-gap-size);flex-wrap:wrap;display:flex}.ht-notification__close{box-sizing:border-box;width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);color:var(--ht-icon-button-icon-color,inherit);cursor:pointer;border-radius:var(--ht-icon-button-border-radius,var(--ht-wrapper-border-radius,4px));background:0 0;border:none;flex:none;align-self:flex-start;margin-inline-start:4px;padding:0;position:relative;overflow:visible}.ht-notification__close:before{content:"";top:50%;margin-top:calc(-.5*var(--ht-icon-size));margin-inline-start:calc(-.5*var(--ht-icon-size));display:block;position:absolute;inset-inline-start:50%}.ht-notification__close:hover{color:var(--ht-icon-button-hover-icon-color,inherit);background-color:var(--ht-icon-button-hover-background-color,color-mix(in srgb,var(--ht-foreground-color)8%,transparent))}.ht-notification__close:focus-visible{outline:2px solid var(--ht-accent-color);outline-offset:2px}.handsontable.ht-pagination{color:var(--ht-pagination-bar-foreground-color);background:var(--ht-pagination-bar-background-color);border:1px solid var(--ht-wrapper-border-color);border-radius:0 0 var(--ht-wrapper-border-radius)var(--ht-wrapper-border-radius);font-size:var(--ht-font-size);line-height:var(--ht-line-height);box-sizing:border-box;border-top-color:#0000;overflow-x:auto}.handsontable.ht-pagination--bordered{border-top-color:var(--ht-wrapper-border-color)}.handsontable.ht-pagination .ht-pagination__inner{justify-content:space-between;align-items:center;gap:calc(var(--ht-gap-size)*4);border-radius:0 0 var(--ht-wrapper-border-radius)var(--ht-wrapper-border-radius);padding-inline:var(--ht-pagination-bar-horizontal-padding);padding-block:var(--ht-pagination-bar-vertical-padding);flex-wrap:wrap;min-width:230px;display:flex}.handsontable.ht-pagination .ht-page-size-section{align-items:center;gap:calc(var(--ht-gap-size)*2);display:flex}.handsontable.ht-pagination .ht-page-size-section__label{white-space:nowrap}.handsontable.ht-pagination .ht-page-size-section__select-wrapper{border-radius:var(--ht-input-border-radius);position:relative}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select{padding-inline-start:var(--ht-gap-size);padding-inline-end:calc(var(--ht-gap-size) + var(--ht-icon-size));padding-top:var(--ht-gap-size);padding-bottom:var(--ht-gap-size);border-radius:var(--ht-input-border-radius);color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);border:1px solid var(--ht-input-border-color);line-height:calc(var(--ht-line-height) - 4px);-webkit-appearance:none;font-size:inherit;cursor:pointer}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:disabled{opacity:.4;cursor:default;color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color);border-color:var(--ht-input-disabled-border-color)}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:hover:not(:disabled){color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color);border-color:var(--ht-input-hover-border-color)}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:focus{color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color);border-color:var(--ht-input-focus-border-color);outline:none}.handsontable.ht-pagination .ht-page-size-section__select-wrapper:after{content:"";background-color:var(--ht-foreground-color);pointer-events:none;display:block;position:absolute;inset-block-end:50%;inset-inline-end:var(--ht-gap-size);transform:translateY(50%)}.handsontable.ht-pagination .ht-page-counter-section{margin-inline-end:auto}.handsontable.ht-pagination .ht-page-navigation-section{align-items:center;gap:1px;display:flex}.handsontable.ht-pagination .ht-page-navigation-section__button{font-size:inherit;border:1px solid var(--ht-pagination-button-border-color);color:var(--ht-pagination-button-foreground-color);background-color:var(--ht-pagination-button-background-color);border-radius:var(--ht-icon-button-large-border-radius);padding:var(--ht-icon-button-large-padding);cursor:pointer}.handsontable.ht-pagination .ht-page-navigation-section__button:before{content:"";display:block}.handsontable.ht-pagination .ht-page-navigation-section__button--disabled{cursor:default;pointer-events:none;color:var(--ht-pagination-button-disabled-foreground-color);background-color:var(--ht-pagination-button-disabled-background-color);border-color:var(--ht-pagination-button-disabled-border-color)}.handsontable.ht-pagination .ht-page-navigation-section__button:hover:not(:disabled){border-color:var(--ht-pagination-button-hover-border-color);color:var(--ht-pagination-button-hover-foreground-color);background-color:var(--ht-pagination-button-hover-background-color)}.handsontable.ht-pagination .ht-page-navigation-section__button:focus{border-color:var(--ht-pagination-button-focus-border-color);color:var(--ht-pagination-button-focus-foreground-color);background-color:var(--ht-pagination-button-focus-background-color);outline:none}.handsontable.ht-pagination .ht-page-navigation-section__label{white-space:nowrap;text-align:center;min-width:100px}.handsontable.ht-wrapper.htPagination:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.handsontable.ht-wrapper.htPagination .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htPagination .htCore thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htPagination .htCore thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htPagination .htCore thead tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htPagination .htCore thead tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}.ht-loading__icon-svg{width:var(--ht-icon-size);height:var(--ht-icon-size);color:var(--ht-accent-color);transform-origin:50%;animation:1s linear infinite ht-loading-spin;display:block}.ht-loading__content{align-items:center;gap:calc(var(--ht-gap-size)*2);display:flex}.ht-loading__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-loading__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}@keyframes ht-loading-spin{to{transform:rotate(360deg)}}.ht-empty-data-state{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);z-index:999;border:1px solid var(--ht-border-color);border-radius:var(--ht-wrapper-border-radius);box-sizing:border-box;background-color:var(--ht-background-color);width:100%;display:none;position:absolute;left:0;overflow-y:auto}.ht-empty-data-state *{box-sizing:border-box!important}.ht-empty-data-state__content-wrapper{text-align:center;width:100%;min-height:100%;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-wrapper-border-radius);justify-content:center;align-items:center;display:flex}.ht-empty-data-state__content-wrapper-inner{max-width:480px;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-wrapper-border-radius);flex-direction:column;justify-content:center;align-items:center;display:flex}.ht-empty-data-state__content-wrapper-inner:focus{box-shadow:0 0 0 1px var(--ht-accent-color);outline:none}.ht-empty-data-state__content{justify-content:center;align-items:center;gap:var(--ht-gap-size);flex-direction:column;display:flex}.ht-empty-data-state__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-empty-data-state__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}.ht-empty-data-state__buttons{justify-content:center;gap:calc(var(--ht-gap-size)*2);flex-flow:wrap;display:flex}.ht-empty-data-state__buttons--has-buttons{margin-top:calc(var(--ht-gap-size)*2)}.ht-empty-data-state__spinner{width:28px;height:28px;margin-bottom:calc(var(--ht-gap-size)*2);border:2px solid var(--ht-border-color);border-top-color:var(--ht-accent-color);border-radius:50%;flex-shrink:0;animation:.75s linear infinite ht-empty-data-state-spin}@media (prefers-reduced-motion:reduce){.ht-empty-data-state__spinner{border-top-color:var(--ht-border-color);animation:none}}.ht-empty-data-state--loading .ht-empty-data-state__content{gap:calc(var(--ht-gap-size)*.5)}.ht-empty-data-state--disable-top-border{border-top-width:0}.ht-empty-data-state--disable-top-border:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.ht-empty-data-state--disable-top-border:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-empty-data-state--disable-inline-border{border-inline-start-width:0}.ht-empty-data-state--disable-inline-border:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-bottom-left-radius:0}.ht-empty-data-state--disable-inline-border:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0;border-bottom-right-radius:0}:is(.ht-empty-data-state--disable-bottom-border,.ht-empty-data-state:has(~.ht-pagination)){border-bottom-width:0}:is(.ht-empty-data-state--disable-bottom-border,.ht-empty-data-state:has(~.ht-pagination)):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),:is(.ht-empty-data-state--disable-bottom-border,.ht-empty-data-state:has(~.ht-pagination)):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}@keyframes ht-empty-data-state-spin{to{transform:rotate(360deg)}}',this.#ts.head.appendChild(t)}#tg(){let e=this.getCSSVariableValue("line-height"),t=this.getCSSVariableValue("cell-vertical-padding"),r=Math.ceil(parseFloat(this.getStyleForTD("border-bottom-width")));return null===e||null===t||isNaN(r)?null:e+2*t+r}#tm(){this.#ti=getComputedStyle(this.#to);let e=this.#tf(["box-sizing","border-bottom-width"]);this.#tl.td={...this.#tl.td,...{"box-sizing":e["box-sizing"],"border-bottom-width":e["border-bottom-width"]}}}#tf(e){let t=this.#ts,r=this.#to,n=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),n.appendChild(o),r.appendChild(n);let l=getComputedStyle(a),h={};return e.forEach(e=>{h[e]=l.getPropertyValue(e)}),r.removeChild(n),h}#tu(e){let t=Math.ceil(parseFloat(this.#tc(e)));return Number.isNaN(t)?null:t}#tc(e){let t=this.#ti?.getPropertyValue(e);return""===t?null:t}#tp(){this.#tl={},this.#ta={}}clearCache(){this.#tp(),this.#tm()}}let da=null,dl=0,dh=(e,t)=>`width: var(--ht-icon-size);
|
|
66
66
|
height: var(--ht-icon-size);
|
|
67
67
|
-webkit-mask-size: contain;
|
|
68
68
|
-webkit-mask-image: url("${e[t]}");
|
|
@@ -193,7 +193,7 @@ ${r}.ht-multi-select-editor-item-selected input::after {
|
|
|
193
193
|
}`)),this.themeStyles.textContent+="}\n",this.themeStyles.textContent+=`.${this.themeClassName} {
|
|
194
194
|
color-scheme: ${n};
|
|
195
195
|
}`,this.hot.rootWrapperElement&&this.hot.rootWrapperElement.querySelector("style")?this.hot.rootWrapperElement.querySelector("style").textContent=this.themeStyles.textContent:this.hot.rootWrapperElement.prepend(this.themeStyles)}getClassName(){return this.themeClassName}update(e){this.hot&&(void 0===e.getThemeConfig&&t_('[ThemeManager] The "theme" option must be an instance of ThemeBuilder.'),this.themeConfig=e.getThemeConfig(),this.themeClassName=`ht-theme-${this.themeConfig.name}`,"function"==typeof e.subscribe&&(this.#ty?.(),this.#ty=e.subscribe(e=>{this.hot?.stylesHandler&&(this.themeConfig=e,this.#tb(),this.hot.stylesHandler.clearCache(),this.hot.render(),this.hot.runHooks("afterSetTheme",this.themeClassName,!1))})),this.mount(),this.hot.runHooks("afterSetTheme",this.themeClassName,!0))}mount(){this.#tb()}unmount(){this.themeStyles&&this.themeStyles.remove()}destroy(){this.#ty?.(),this.unmount(),this.hot.themeManager=null}}let dm={size_0:"0px",size_0_5:"2px",size_1:"4px",size_2:"8px",size_1_5:"6px",size_3:"12px",size_4:"16px",size_5:"20px",size_6:"24px",size_7:"28px",size_8:"32px",size_9:"36px",size_10:"40px",size_0_25:"1px"},df={default:{cellVertical:"sizing.size_1",cellHorizontal:"sizing.size_2",barsHorizontal:"sizing.size_4",barsVertical:"sizing.size_2",gap:"sizing.size_1",buttonHorizontal:"sizing.size_3",buttonVertical:"sizing.size_1_5",dialogHorizontal:"sizing.size_2",dialogVertical:"sizing.size_2",inputHorizontal:"sizing.size_3",inputVertical:"sizing.size_1_5",menuVertical:"sizing.size_2",menuHorizontal:"sizing.size_0",menuItemVertical:"sizing.size_1",menuItemHorizontal:"sizing.size_3"},compact:{cellVertical:"sizing.size_0_5",cellHorizontal:"sizing.size_1_5",barsHorizontal:"sizing.size_2",barsVertical:"sizing.size_1",gap:"sizing.size_0_5",buttonHorizontal:"sizing.size_2",buttonVertical:"sizing.size_0_5",dialogHorizontal:"sizing.size_1_5",dialogVertical:"sizing.size_1_5",inputHorizontal:"sizing.size_2",inputVertical:"sizing.size_0_5",menuVertical:"sizing.size_2",menuHorizontal:"sizing.size_0",menuItemVertical:"sizing.size_0_5",menuItemHorizontal:"sizing.size_2"},comfortable:{cellVertical:"sizing.size_2",cellHorizontal:"sizing.size_3",barsHorizontal:"sizing.size_4",barsVertical:"sizing.size_2",gap:"sizing.size_1_5",buttonHorizontal:"sizing.size_4",buttonVertical:"sizing.size_2",dialogHorizontal:"sizing.size_3",dialogVertical:"sizing.size_3",inputHorizontal:"sizing.size_4",inputVertical:"sizing.size_2",menuVertical:"sizing.size_3",menuHorizontal:"sizing.size_0",menuItemVertical:"sizing.size_2",menuItemHorizontal:"sizing.size_2"}},dy=new Set(["name","sizing","density","icons","colors","tokens","colorScheme"]),db=new Set(["light","dark","auto"]),dC=new Set(["default","compact","comfortable"]),dw=new Set(["arrowRight","arrowRightWithBar","arrowLeft","arrowLeftWithBar","arrowDown","menu","selectArrow","arrowNarrowUp","arrowNarrowDown","check","checkbox","caretHiddenLeft","caretHiddenRight","caretHiddenUp","caretHiddenDown","collapseOff","collapseOn","radio","chipClose","search"]),dS=new Set(["fontFamily","fontSize","fontSizeSmall","lineHeight","lineHeightSmall","fontWeight","letterSpacing","gapSize","iconSize","tableTransition","borderColor","accentColor","foregroundColor","foregroundSecondaryColor","backgroundColor","backgroundSecondaryColor","placeholderColor","readOnlyColor","disabledColor","shadowColor","shadowX","shadowY","shadowBlur","shadowOpacity","barForegroundColor","barBackgroundColor","barHorizontalPadding","barVerticalPadding","cellHorizontalBorderColor","cellVerticalBorderColor","cellHorizontalPadding","cellVerticalPadding","wrapperBorderWidth","wrapperBorderRadius","wrapperBorderColor","rowHeaderOddBackgroundColor","rowHeaderEvenBackgroundColor","rowCellOddBackgroundColor","rowCellEvenBackgroundColor","cellEditorBorderWidth","cellEditorBorderColor","cellEditorForegroundColor","cellEditorBackgroundColor","cellEditorShadowBlurRadius","cellEditorShadowColor","cellSuccessBackgroundColor","cellErrorBackgroundColor","cellReadOnlyBackgroundColor","cellSelectionBorderColor","cellSelectionBackgroundColor","cellAutofillSize","cellAutofillHitAreaSize","cellAutofillBorderWidth","cellAutofillBorderRadius","cellAutofillBorderColor","cellAutofillBackgroundColor","cellAutofillFillBorderColor","cellMobileHandleSize","cellMobileHandleBorderWidth","cellMobileHandleBorderRadius","cellMobileHandleBorderColor","cellMobileHandleBackgroundColor","cellMobileHandleBackgroundOpacity","resizeIndicatorColor","moveBacklightColor","moveBacklightOpacity","moveIndicatorColor","hiddenIndicatorColor","scrollbarBorderRadius","scrollbarTrackColor","scrollbarThumbColor","headerFontWeight","headerForegroundColor","headerBackgroundColor","headerHighlightedShadowSize","headerHighlightedForegroundColor","headerHighlightedBackgroundColor","headerActiveBorderColor","headerActiveForegroundColor","headerActiveBackgroundColor","headerFilterBackgroundColor","headerRowForegroundColor","headerRowBackgroundColor","headerRowHighlightedForegroundColor","headerRowHighlightedBackgroundColor","headerRowActiveForegroundColor","headerRowActiveBackgroundColor","checkboxSize","checkboxBorderRadius","checkboxBorderColor","checkboxBackgroundColor","checkboxIconColor","checkboxFocusBorderColor","checkboxFocusBackgroundColor","checkboxFocusIconColor","checkboxFocusRingColor","checkboxDisabledBorderColor","checkboxDisabledBackgroundColor","checkboxDisabledIconColor","checkboxCheckedBorderColor","checkboxCheckedBackgroundColor","checkboxCheckedIconColor","checkboxCheckedFocusBorderColor","checkboxCheckedFocusBackgroundColor","checkboxCheckedFocusIconColor","checkboxCheckedDisabledBorderColor","checkboxCheckedDisabledBackgroundColor","checkboxCheckedDisabledIconColor","checkboxIndeterminateBorderColor","checkboxIndeterminateBackgroundColor","checkboxIndeterminateIconColor","checkboxIndeterminateFocusBorderColor","checkboxIndeterminateFocusBackgroundColor","checkboxIndeterminateFocusIconColor","checkboxIndeterminateDisabledBorderColor","checkboxIndeterminateDisabledBackgroundColor","checkboxIndeterminateDisabledIconColor","radioSize","radioBorderColor","radioBackgroundColor","radioIconColor","radioFocusBorderColor","radioFocusBackgroundColor","radioFocusIconColor","radioFocusRingColor","radioDisabledBorderColor","radioDisabledBackgroundColor","radioDisabledIconColor","radioCheckedBorderColor","radioCheckedBackgroundColor","radioCheckedIconColor","radioCheckedFocusBorderColor","radioCheckedFocusBackgroundColor","radioCheckedFocusIconColor","radioCheckedDisabledBorderColor","radioCheckedDisabledBackgroundColor","radioCheckedDisabledIconColor","iconButtonBorderRadius","iconButtonLargeBorderRadius","iconButtonLargePadding","iconButtonBorderColor","iconButtonBackgroundColor","iconButtonIconColor","iconButtonHitAreaSize","iconButtonHoverBorderColor","iconButtonHoverBackgroundColor","iconButtonHoverIconColor","iconButtonActiveBorderColor","iconButtonActiveBackgroundColor","iconButtonActiveIconColor","iconButtonActiveHoverBorderColor","iconButtonActiveHoverBackgroundColor","iconButtonActiveHoverIconColor","collapseButtonBorderRadius","collapseButtonOpenBorderColor","collapseButtonOpenBackgroundColor","collapseButtonOpenIconColor","collapseButtonOpenIconActiveColor","collapseButtonOpenHoverBorderColor","collapseButtonOpenHoverBackgroundColor","collapseButtonOpenHoverIconColor","collapseButtonOpenHoverIconActiveColor","collapseButtonCloseBorderColor","collapseButtonCloseBackgroundColor","collapseButtonCloseIconColor","collapseButtonCloseIconActiveColor","collapseButtonCloseHoverBorderColor","collapseButtonCloseHoverBackgroundColor","collapseButtonCloseHoverIconColor","collapseButtonCloseHoverIconActiveColor","buttonBorderRadius","buttonHorizontalPadding","buttonVerticalPadding","primaryButtonBorderColor","primaryButtonForegroundColor","primaryButtonBackgroundColor","primaryButtonDisabledBorderColor","primaryButtonDisabledForegroundColor","primaryButtonDisabledBackgroundColor","primaryButtonHoverBorderColor","primaryButtonHoverForegroundColor","primaryButtonHoverBackgroundColor","primaryButtonFocusBorderColor","primaryButtonFocusForegroundColor","primaryButtonFocusBackgroundColor","secondaryButtonBorderColor","secondaryButtonForegroundColor","secondaryButtonBackgroundColor","secondaryButtonDisabledBorderColor","secondaryButtonDisabledForegroundColor","secondaryButtonDisabledBackgroundColor","secondaryButtonHoverBorderColor","secondaryButtonHoverForegroundColor","secondaryButtonHoverBackgroundColor","secondaryButtonFocusBorderColor","secondaryButtonFocusForegroundColor","secondaryButtonFocusBackgroundColor","commentsTextareaHorizontalPadding","commentsTextareaVerticalPadding","commentsTextareaBorderWidth","commentsTextareaBorderColor","commentsTextareaForegroundColor","commentsTextareaBackgroundColor","commentsTextareaFocusBorderWidth","commentsTextareaFocusBorderColor","commentsTextareaFocusForegroundColor","commentsTextareaFocusBackgroundColor","commentsIndicatorSize","commentsIndicatorColor","licenseHorizontalPadding","licenseVerticalPadding","licenseForegroundColor","licenseBackgroundColor","linkColor","linkHoverColor","inputBorderWidth","inputBorderRadius","inputHorizontalPadding","inputVerticalPadding","inputBorderColor","inputForegroundColor","inputBackgroundColor","inputHoverBorderColor","inputHoverForegroundColor","inputHoverBackgroundColor","inputDisabledBorderColor","inputDisabledForegroundColor","inputDisabledBackgroundColor","inputFocusBorderColor","inputFocusForegroundColor","inputFocusBackgroundColor","menuBorderWidth","menuBorderRadius","menuHorizontalPadding","menuVerticalPadding","menuItemHorizontalPadding","menuItemVerticalPadding","menuBorderColor","menuShadowX","menuShadowY","menuShadowBlur","menuShadowColor","menuShadowOpacity","menuItemHoverColor","menuItemHoverColorOpacity","menuItemActiveColor","menuItemActiveColorOpacity","dialogSemiTransparentBackgroundColor","dialogSemiTransparentBackgroundOpacity","dialogSolidBackgroundColor","dialogContentPaddingHorizontal","dialogContentPaddingVertical","dialogContentBorderRadius","dialogContentBackgroundColor","notificationForegroundColor","notificationBackgroundColor","notificationBorderColor","notificationSuccessAccent","notificationWarningAccent","notificationErrorAccent","paginationBarForegroundColor","paginationBarBackgroundColor","paginationBarHorizontalPadding","paginationBarVerticalPadding","paginationButtonBorderColor","paginationButtonForegroundColor","paginationButtonBackgroundColor","paginationButtonHoverBorderColor","paginationButtonHoverForegroundColor","paginationButtonHoverBackgroundColor","paginationButtonDisabledForegroundColor","paginationButtonDisabledBackgroundColor","paginationButtonDisabledBorderColor","paginationButtonFocusBorderColor","paginationButtonFocusForegroundColor","paginationButtonFocusBackgroundColor","chipBackground","chipBorderRadius","chipVerticalPadding","chipHorizontalPadding","chipGap"]);function dv(e){if(!db.has(e)){let t=[...db].join(", ");t_(`[ThemeBuilder] Invalid color scheme: "${e}". Must be one of: ${t}.`)}return e}function dR(e){if(!dC.has(e)){let t=[...dC].join(", ");t_(`[ThemeBuilder] Invalid density: "${e}". Must be one of: ${t}.`)}return e}function dE(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{type:o="key",warnMissing:i=!1}=n;if(!e){i&&rg(`[ThemeBuilder] No ${o}s provided in ${r}. All ${o}s are missing.`);return}if(Object.keys(e).forEach(e=>{t.has(e)||rg(`[ThemeBuilder] Unknown ${o} key: "${e}" in ${r}. This may be a custom ${o} or a typo.`)}),i){let n=[];t.forEach(t=>{t in e||n.push(t)}),n.length>0&&rg(`[ThemeBuilder] Missing ${o}(s) in ${r}: ${n.join(", ")}`)}}function dT(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{requiredFields:n=[]}=r;("object"!=typeof e||null===e)&&t_(`[ThemeBuilder] ${t} must be an object.`);let{name:o,sizing:i,density:s,icons:a,colors:l,tokens:h,colorScheme:d}=e;if(dE(e,dy,t,{type:"param"}),n.forEach(r=>{void 0===e[r]&&t_(`[ThemeBuilder] ${t}.${r} is required.`)}),void 0!==o&&("string"!=typeof o||""===o.trim())&&t_(`[ThemeBuilder] ${t}.name must be a non-empty string.`),void 0===i||tU(i)||t_(`[ThemeBuilder] ${t}.sizing must be an object.`),void 0!==s){tU(s)||"string"==typeof s||t_(`[ThemeBuilder] ${t}.density must be a string or an object.`);var u,c,g=`${t}.density`;tU(s)?(s.type&&s.sizes||t_(`[ThemeBuilder] ${g} must be a string or an object with a 'type' and 'sizes' property.`),dR(s.type),u=s.sizes,c=`${g}.sizes`,tU(u)||t_(`[ThemeBuilder] ${c}.sizes must be an object.`),Object.keys(u).forEach(e=>{dC.has(e)||rg(`[ThemeBuilder] Unknown density size key: "${e}" in ${c}.sizes. This may be a custom density size or a typo.`)})):"string"==typeof s&&dR(s)}void 0!==a&&(tU(a)||t_(`[ThemeBuilder] ${t}.icons must be an object.`),dE(a,dw,`${t}.icons`,{type:"icon",warnMissing:n.includes("icons")})),void 0!==l&&(tU(l)||t_(`[ThemeBuilder] ${t}.colors must be an object.`),function e(t,r){Object.entries(t).forEach(t=>{let[n,o]=t,i=`${r}.${n}`;"string"!=typeof o&&(tU(o)?e(o,i):t_(`[ThemeBuilder] ${i} must be a string or an object.`))})}(l,`${t}.colors`)),void 0!==h&&(tU(h)||t_(`[ThemeBuilder] ${t}.tokens must be an object.`),dE(h,dS,`${t}.tokens`,{type:"token",warnMissing:n.includes("tokens")})),void 0!==d&&dv(d)}let dA=["sizing","icons","colors","tokens"],dM=["name","icons","colors","tokens"];class dN{#tC;#tw;#tS=new Set;#tv="auto";#tR="default";constructor(e){dT(e,"themeConfig",{requiredFields:dM}),this.#tC={name:void 0,sizing:dm,density:{type:this.#tR,sizes:df},icons:{},colors:{},tokens:{},colorScheme:this.#tv},this.#tE(e),this.#tC=this.#tw}#tT(){let e=this.getThemeConfig();this.#tS.forEach(t=>t(e))}#tA(e,t){tU(t)?(e.density=tX(e.density,t),this.#tR=t.type,this.#tC?.density&&(this.#tC.density.type=t.type)):"string"==typeof t&&(e.density.type=t,this.#tR=t,this.#tC?.density&&(this.#tC.density.type=t))}#tE(e){let t=tD(this.#tC);void 0!==e.name&&(void 0!==this.#tC.name?rg('[ThemeBuilder] The "name" property can only be set during `registerTheme()` and cannot be updated via `params()`.'):t.name=e.name),dA.forEach(r=>{void 0!==e[r]&&tU(e[r])&&(t[r]=tX(t[r],e[r]))}),void 0!==e.density&&this.#tA(t,e.density),void 0!==e.colorScheme&&(t.colorScheme=e.colorScheme,this.#tv=e.colorScheme,this.#tC?.colorScheme&&(this.#tC.colorScheme=e.colorScheme)),this.#tw=t}subscribe(e){return"function"!=typeof e&&t_("[ThemeBuilder] listener must be a function."),this.#tS.add(e),()=>this.#tS.delete(e)}params(e){return dT(e,"params"),this.#tE(e),this.#tT(),this}setColorScheme(e){return this.#tv=dv(e),this.#tw.colorScheme=this.#tv,this.#tC.colorScheme=this.#tv,this.#tT(),this}setDensityType(e){return this.#tR=dR(e),this.#tw.density.type=this.#tR,this.#tC.density.type=this.#tR,this.#tT(),this}getThemeConfig(){return this.#tw}}let{hasItem:dI,getItem:dx,getNames:dO,getValues:d_,register:dk}=nj("themes");function dH(e){return dI(e)}function dL(e){return dI(e)?dx(e):void rg(`Theme "${e}" is not registered. Please ensure it is registered before using it.`)}function dP(){return dO()}function dD(){return d_()}function dF(e,t){let r=e,n=tD(t);return"string"==typeof e&&tU(t)?n.name=e:tU(e)&&(r=(n=tD(e)).name),{themeName:r,themeConfigObject:n}}function dB(e,t){let{themeName:r,themeConfigObject:n}=dF(e,t),o=new dN(n);return dI(r)?(rg(`Theme "${r}" is already registered. Registration skipped.`),dL(r)):(dk(r,o),o)}let dV={name:"main",density:"default",icons:{arrowRight:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.64648 10.9393L9.93938 7.64644L6.64648 4.35354' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",arrowRightWithBar:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.9292 4.64188L8.27934 7.99203L4.9292 11.3422M11.0711 4.08353V11.3422' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E",arrowLeft:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.49268 11.2929L6.19978 8.00001L9.49268 4.70712' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",arrowLeftWithBar:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.0713 4.64188L7.72115 7.99203L11.0713 11.3422M4.92936 4.08353L4.92936 11.3422' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E",arrowDown:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg opacity='0.6'%3E%3Cpath d='M11.5859 6L8.29304 9.29289L5.00015 6' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E",menu:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.0002 6.66663C11.4262 6.66663 11.6487 7.15963 11.3917 7.47813L11.3537 7.52013L8.35372 10.5201C8.26762 10.6062 8.15307 10.6579 8.03156 10.6656C7.91005 10.6732 7.78992 10.6363 7.69372 10.5616L7.64672 10.5201L4.64672 7.52013L4.60522 7.47313L4.57822 7.43463L4.55122 7.38663L4.54272 7.36863L4.52922 7.33513L4.51322 7.28113L4.50822 7.25463L4.50322 7.22463L4.50122 7.19613V7.13713L4.50372 7.10813L4.50822 7.07813L4.51322 7.05213L4.52922 6.99813L4.54272 6.96463L4.57772 6.89863L4.61022 6.85363L4.64672 6.81313L4.69372 6.77163L4.73222 6.74463L4.78022 6.71763L4.79822 6.70913L4.83172 6.69563L4.88572 6.67963L4.91222 6.67463L4.94222 6.66963L4.97072 6.66763L11.0002 6.66663Z' fill='currentColor'/%3E%3C/svg%3E%0A",selectArrow:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.0002 6.66663C11.4262 6.66663 11.6487 7.15963 11.3917 7.47813L11.3537 7.52013L8.35372 10.5201C8.26762 10.6062 8.15307 10.6579 8.03156 10.6656C7.91005 10.6732 7.78992 10.6363 7.69372 10.5616L7.64672 10.5201L4.64672 7.52013L4.60522 7.47313L4.57822 7.43463L4.55122 7.38663L4.54272 7.36863L4.52922 7.33513L4.51322 7.28113L4.50822 7.25463L4.50322 7.22463L4.50122 7.19613V7.13713L4.50372 7.10813L4.50822 7.07813L4.51322 7.05213L4.52922 6.99813L4.54272 6.96463L4.57772 6.89863L4.61022 6.85363L4.64672 6.81313L4.69372 6.77163L4.73222 6.74463L4.78022 6.71763L4.79822 6.70913L4.83172 6.69563L4.88572 6.67963L4.91222 6.67463L4.94222 6.66963L4.97072 6.66763L11.0002 6.66663Z' fill='currentColor'/%3E%3C/svg%3E%0A",arrowNarrowUp:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.00008 12.6667L8.00008 3.33335M8.00008 3.33335L5.33342 6.00002M8.00008 3.33335L10.6667 6.00002' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",arrowNarrowDown:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.00004 3.33331V12.6666M8.00004 12.6666L10.6667 9.99998M8.00004 12.6666L5.33337 9.99998' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",check:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.33337 8.00002L6.66671 11.3334L13.3334 4.66669' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",checkbox:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 8L7 10L11 6' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",caretHiddenLeft:"data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.08482 1.35771L6.11503 1.3551H6.17649L6.2067 1.35771L6.23795 1.36239L6.26503 1.3676L6.32128 1.38427L6.35618 1.39833L6.42493 1.43479L6.4718 1.46864L6.51399 1.50667L6.55722 1.55562L6.58534 1.59573L6.61347 1.64573L6.62232 1.66448L6.63639 1.69937L6.65305 1.75562L6.65826 1.78323L6.66347 1.81448L6.66555 1.84417L6.66659 1.87489V8.12489C6.66659 8.56864 6.15305 8.80042 5.82128 8.53271L5.77753 8.49312L2.65253 5.36812C2.56286 5.27844 2.50899 5.15912 2.50103 5.03254C2.49307 4.90596 2.53157 4.78083 2.6093 4.68062L2.65253 4.63167L5.77753 1.50667L5.82649 1.46344L5.86659 1.43531L5.91659 1.40719L5.93534 1.39833L5.97024 1.38427L6.02649 1.3676L6.05409 1.36239L6.08482 1.35771Z' fill='currentColor'/%3E%3C/svg%3E",caretHiddenRight:"data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.33337 1.87499C3.33337 1.43124 3.84692 1.19947 4.17869 1.46718L4.22244 1.50676L7.34744 4.63176C7.43711 4.72145 7.49098 4.84077 7.49894 4.96735C7.5069 5.09392 7.4684 5.21905 7.39067 5.31926L7.34744 5.36822L4.22244 8.49322L4.17348 8.53645L4.13337 8.56457L4.08337 8.5927L4.06462 8.60155L4.02973 8.61562L3.97348 8.63228L3.94587 8.63749L3.91462 8.6427L3.88494 8.64478L3.85421 8.64582L3.82348 8.64478L3.79327 8.64218L3.76202 8.63749L3.73494 8.63228L3.67869 8.61562L3.64379 8.60155L3.57504 8.5651L3.52817 8.53124L3.48598 8.49322L3.44275 8.44426L3.41462 8.40416L3.3865 8.35416L3.37764 8.33541L3.36358 8.30051L3.34692 8.24426L3.34171 8.21666L3.3365 8.18541L3.33442 8.15572L3.33337 1.87499Z' fill='currentColor'/%3E%3C/svg%3E",caretHiddenUp:"data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.76425 2.43099C3.82165 2.3736 3.89801 2.33913 3.97902 2.33403C4.06003 2.32894 4.14012 2.35358 4.20425 2.40333L4.23558 2.43099L6.23558 4.43099L6.26325 4.46233L6.28125 4.48799L6.29925 4.51999L6.30492 4.53199L6.31392 4.55433L6.32458 4.59033L6.32792 4.60799L6.33125 4.62799L6.33258 4.64699L6.33325 4.66666L6.33258 4.68633L6.33092 4.70566L6.32792 4.72566L6.32458 4.74299L6.31392 4.77899L6.30492 4.80133L6.28158 4.84533L6.25992 4.87533L6.23558 4.90233L6.20425 4.92999L6.17858 4.94799L6.14658 4.96599L6.13458 4.97166L6.11225 4.98066L6.07625 4.99133L6.05858 4.99466L6.03858 4.99799L6.01958 4.99933L5.99992 4.99999H1.99992C1.71592 4.99999 1.56758 4.67133 1.73892 4.45899L1.76425 4.43099L3.76425 2.43099Z' fill='currentColor'/%3E%3C/svg%3E%0A",caretHiddenDown:"data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.9999 3C6.2839 3 6.43224 3.32867 6.2609 3.541L6.23557 3.569L4.23557 5.569C4.17817 5.62639 4.10181 5.66087 4.0208 5.66596C3.93979 5.67106 3.8597 5.64642 3.79557 5.59667L3.76424 5.569L1.76424 3.569L1.73657 3.53767L1.71857 3.512L1.70057 3.48L1.6949 3.468L1.6859 3.44567L1.67524 3.40967L1.6719 3.392L1.66857 3.372L1.66724 3.353V3.31367L1.6689 3.29433L1.6719 3.27433L1.67524 3.257L1.6859 3.221L1.6949 3.19867L1.71824 3.15467L1.7399 3.12467L1.76424 3.09767L1.79557 3.07L1.82124 3.052L1.85324 3.034L1.86524 3.02833L1.88757 3.01933L1.92357 3.00867L1.94124 3.00533L1.96124 3.002L1.98024 3.00067L5.9999 3Z' fill='currentColor'/%3E%3C/svg%3E%0A",collapseOff:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.33325 8H11.6666' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",collapseOn:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.49988 11.6667C7.49988 11.9428 7.72374 12.1667 7.99988 12.1667C8.27602 12.1667 8.49988 11.9428 8.49988 11.6667V8.50002H11.6666C11.9427 8.50002 12.1666 8.27616 12.1666 8.00002C12.1666 7.72388 11.9427 7.50002 11.6666 7.50002H8.49988V4.33337C8.49988 4.05723 8.27602 3.83337 7.99988 3.83337C7.72374 3.83337 7.49988 4.05723 7.49988 4.33337V7.50002H4.33325C4.05711 7.50002 3.83325 7.72388 3.83325 8.00002C3.83325 8.27616 4.05711 8.50002 4.33325 8.50002H7.49988V11.6667Z' fill='currentColor'/%3E%3C/svg%3E%0A",radio:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='4' fill='currentColor'/%3E%3C/svg%3E%0A",chipClose:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4L4 12M4 4L12 12' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",search:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' fill='none'%3E%3Cg opacity='0.5'%3E%3Cpath d='M28 28L20 20M4 13.3333C4 14.559 4.24141 15.7727 4.71046 16.905C5.1795 18.0374 5.86699 19.0663 6.73367 19.933C7.60035 20.7997 8.62925 21.4872 9.76162 21.9562C10.894 22.4253 12.1077 22.6667 13.3333 22.6667C14.559 22.6667 15.7727 22.4253 16.905 21.9562C18.0374 21.4872 19.0663 20.7997 19.933 19.933C20.7997 19.0663 21.4872 18.0374 21.9562 16.905C22.4253 15.7727 22.6667 14.559 22.6667 13.3333C22.6667 12.1077 22.4253 10.894 21.9562 9.76162C21.4872 8.62925 20.7997 7.60035 19.933 6.73367C19.0663 5.86699 18.0374 5.1795 16.905 4.71046C15.7727 4.24141 14.559 4 13.3333 4C12.1077 4 10.894 4.24141 9.76162 4.71046C8.62925 5.1795 7.60035 5.86699 6.73367 6.73367C5.86699 7.60035 5.1795 8.62925 4.71046 9.76162C4.24141 10.894 4 12.1077 4 13.3333Z' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E"},colors:{white:"#ffffffff",black:"#000000ff",primary:{100:"#6180ffff",200:"#5573f0ff",300:"#4669f6ff",400:"#2e56fcff",500:"#1a42e8ff",600:"#1535bcff"},palette:{50:"#f7f7f9ff",100:"#e7e7e9ff",200:"#b9b9bbff",300:"#a3a3a3ff",400:"#68696cff",500:"#404144ff",600:"#313132ff",700:"#282829ff",800:"#222222ff",900:"#1e1e1fff",950:"#050506ff"},transparent:"#ffffff00"},tokens:{fontFamily:"Inter",fontSize:"14px",fontSizeSmall:"12px",lineHeight:"20px",lineHeightSmall:"18px",fontWeight:"400",letterSpacing:"0px",borderColor:["colors.palette.100","colors.palette.700"],accentColor:["colors.primary.500","colors.primary.300"],foregroundColor:["colors.palette.800","colors.palette.200"],foregroundSecondaryColor:["colors.palette.400","colors.palette.300"],backgroundColor:["colors.white","colors.palette.950"],backgroundSecondaryColor:["colors.palette.50","colors.palette.900"],placeholderColor:["colors.palette.300","colors.palette.400"],readOnlyColor:["colors.palette.400","colors.palette.300"],disabledColor:["colors.palette.300","colors.palette.400"],gapSize:"density.gap",iconSize:"sizing.size_4",tableTransition:"0.15s",wrapperBorderWidth:"0px",wrapperBorderRadius:"sizing.size_1",wrapperBorderColor:"tokens.borderColor",barForegroundColor:"tokens.foregroundColor",barBackgroundColor:"tokens.backgroundSecondaryColor",barHorizontalPadding:"density.barsHorizontal",barVerticalPadding:"density.barsVertical",shadowColor:["colors.palette.800","colors.palette.200"],shadowX:"sizing.size_0",shadowY:"sizing.size_2",shadowBlur:"sizing.size_4",shadowOpacity:"8%",cellHorizontalPadding:"density.cellHorizontal",cellVerticalPadding:"density.cellVertical",cellHorizontalBorderColor:"tokens.borderColor",cellVerticalBorderColor:"tokens.borderColor",cellSelectionBorderColor:"tokens.accentColor",cellSelectionBackgroundColor:["colors.primary.400","colors.primary.200"],cellSuccessBackgroundColor:"#37bc6c33",cellErrorBackgroundColor:"#fa4d3233",cellReadOnlyBackgroundColor:"tokens.backgroundSecondaryColor",cellAutofillSize:"sizing.size_1_5",cellAutofillHitAreaSize:"sizing.size_3",cellAutofillBorderWidth:"sizing.size_0_25",cellAutofillBorderRadius:"sizing.size_1",cellAutofillBorderColor:"tokens.backgroundColor",cellAutofillBackgroundColor:"tokens.accentColor",cellAutofillFillBorderColor:"tokens.foregroundColor",cellEditorBorderWidth:"2px",cellEditorBorderColor:"tokens.accentColor",cellEditorForegroundColor:["colors.palette.950","colors.white"],cellEditorBackgroundColor:"tokens.backgroundColor",cellEditorShadowBlurRadius:"0px",cellEditorShadowColor:"tokens.accentColor",cellMobileHandleSize:"sizing.size_3",cellMobileHandleBorderWidth:"sizing.size_0_25",cellMobileHandleBorderRadius:"sizing.size_3",cellMobileHandleBorderColor:"tokens.accentColor",cellMobileHandleBackgroundColor:"tokens.accentColor",cellMobileHandleBackgroundOpacity:"40%",headerFontWeight:"tokens.fontWeight",headerForegroundColor:"tokens.foregroundColor",headerBackgroundColor:"tokens.backgroundSecondaryColor",headerHighlightedShadowSize:"0px",headerHighlightedForegroundColor:["colors.palette.950","colors.white"],headerHighlightedBackgroundColor:["colors.palette.100","colors.palette.700"],headerActiveBorderColor:["colors.primary.400","colors.primary.200"],headerActiveForegroundColor:"colors.white",headerActiveBackgroundColor:"tokens.accentColor",headerFilterBackgroundColor:"tokens.cellSuccessBackgroundColor",headerRowForegroundColor:"tokens.foregroundColor",headerRowBackgroundColor:"tokens.backgroundSecondaryColor",headerRowHighlightedForegroundColor:["colors.palette.950","colors.white"],headerRowHighlightedBackgroundColor:["colors.palette.100","colors.palette.700"],headerRowActiveForegroundColor:"colors.white",headerRowActiveBackgroundColor:"tokens.accentColor",rowHeaderOddBackgroundColor:"tokens.headerRowBackgroundColor",rowHeaderEvenBackgroundColor:"tokens.headerRowBackgroundColor",rowCellOddBackgroundColor:"tokens.backgroundColor",rowCellEvenBackgroundColor:"tokens.backgroundColor",buttonBorderRadius:"sizing.size_1",buttonHorizontalPadding:"density.buttonHorizontal",buttonVerticalPadding:"density.buttonVertical",primaryButtonBorderColor:"colors.transparent",primaryButtonForegroundColor:"colors.white",primaryButtonBackgroundColor:"tokens.accentColor",primaryButtonDisabledBorderColor:"colors.transparent",primaryButtonDisabledForegroundColor:"tokens.disabledColor",primaryButtonDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],primaryButtonHoverBorderColor:"colors.transparent",primaryButtonHoverForegroundColor:"tokens.backgroundColor",primaryButtonHoverBackgroundColor:["colors.primary.600","colors.primary.100"],primaryButtonFocusBorderColor:"tokens.backgroundColor",primaryButtonFocusForegroundColor:"tokens.backgroundColor",primaryButtonFocusBackgroundColor:"tokens.accentColor",secondaryButtonBorderColor:"tokens.borderColor",secondaryButtonForegroundColor:"tokens.foregroundColor",secondaryButtonBackgroundColor:"tokens.backgroundColor",secondaryButtonDisabledBorderColor:"tokens.borderColor",secondaryButtonDisabledForegroundColor:"tokens.disabledColor",secondaryButtonDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],secondaryButtonHoverBorderColor:"tokens.borderColor",secondaryButtonHoverForegroundColor:"tokens.foregroundColor",secondaryButtonHoverBackgroundColor:["colors.palette.100","colors.palette.700"],secondaryButtonFocusBorderColor:"tokens.borderColor",secondaryButtonFocusForegroundColor:"tokens.foregroundColor",secondaryButtonFocusBackgroundColor:"tokens.backgroundColor",iconButtonBorderRadius:"sizing.size_0_5",iconButtonLargeBorderRadius:"sizing.size_1",iconButtonLargePadding:"sizing.size_1",iconButtonBorderColor:["colors.palette.50","colors.palette.900"],iconButtonBackgroundColor:"tokens.backgroundSecondaryColor",iconButtonIconColor:["colors.palette.300","colors.palette.400"],iconButtonHitAreaSize:"sizing.size_6",iconButtonHoverBorderColor:["colors.palette.100","colors.palette.700"],iconButtonHoverBackgroundColor:["colors.palette.100","colors.palette.700"],iconButtonHoverIconColor:["colors.palette.300","colors.palette.400"],iconButtonActiveBorderColor:["colors.primary.400","colors.primary.200"],iconButtonActiveBackgroundColor:"tokens.accentColor",iconButtonActiveIconColor:"colors.white",iconButtonActiveHoverBorderColor:["colors.primary.400","colors.primary.200"],iconButtonActiveHoverBackgroundColor:["colors.primary.400","colors.primary.200"],iconButtonActiveHoverIconColor:"colors.white",collapseButtonBorderRadius:"sizing.size_1",collapseButtonOpenBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonOpenBackgroundColor:["colors.white","colors.palette.950"],collapseButtonOpenIconColor:["colors.palette.400","colors.palette.300"],collapseButtonOpenIconActiveColor:["colors.palette.400","colors.palette.300"],collapseButtonOpenHoverBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonOpenHoverBackgroundColor:["colors.palette.50","colors.palette.900"],collapseButtonOpenHoverIconColor:["colors.palette.400","colors.palette.300"],collapseButtonOpenHoverIconActiveColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonCloseBackgroundColor:["colors.palette.100","colors.palette.700"],collapseButtonCloseIconColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseIconActiveColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseHoverBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonCloseHoverBackgroundColor:["colors.palette.100","colors.palette.700"],collapseButtonCloseHoverIconColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseHoverIconActiveColor:["colors.palette.400","colors.palette.300"],linkColor:["colors.primary.600","colors.primary.100"],linkHoverColor:"tokens.accentColor",inputBorderWidth:"1px",inputBorderRadius:"sizing.size_1",inputHorizontalPadding:"density.inputHorizontal",inputVerticalPadding:"density.inputVertical",inputBorderColor:"tokens.borderColor",inputForegroundColor:"tokens.foregroundColor",inputBackgroundColor:"tokens.backgroundSecondaryColor",inputHoverBorderColor:"tokens.borderColor",inputHoverForegroundColor:"tokens.foregroundColor",inputHoverBackgroundColor:"tokens.backgroundColor",inputDisabledBorderColor:"tokens.borderColor",inputDisabledForegroundColor:"tokens.disabledColor",inputDisabledBackgroundColor:["colors.palette.200","colors.palette.500"],inputFocusBorderColor:"tokens.accentColor",inputFocusForegroundColor:"tokens.foregroundColor",inputFocusBackgroundColor:"tokens.backgroundColor",checkboxSize:"tokens.iconSize",checkboxBorderRadius:"sizing.size_1",checkboxBorderColor:["colors.palette.200","colors.palette.500"],checkboxBackgroundColor:"tokens.backgroundColor",checkboxIconColor:"colors.transparent",checkboxFocusBorderColor:["colors.palette.200","colors.palette.500"],checkboxFocusBackgroundColor:"tokens.backgroundColor",checkboxFocusIconColor:"colors.transparent",checkboxFocusRingColor:"tokens.accentColor",checkboxDisabledBorderColor:["colors.palette.200","colors.palette.500"],checkboxDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],checkboxDisabledIconColor:"colors.transparent",checkboxCheckedBorderColor:["colors.primary.400","colors.primary.200"],checkboxCheckedBackgroundColor:"tokens.accentColor",checkboxCheckedIconColor:"colors.white",checkboxCheckedFocusBorderColor:"tokens.backgroundColor",checkboxCheckedFocusBackgroundColor:"tokens.accentColor",checkboxCheckedFocusIconColor:"colors.white",checkboxCheckedDisabledBorderColor:["colors.palette.200","colors.palette.500"],checkboxCheckedDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],checkboxCheckedDisabledIconColor:"tokens.disabledColor",checkboxIndeterminateBorderColor:["colors.primary.400","colors.primary.200"],checkboxIndeterminateBackgroundColor:"tokens.accentColor",checkboxIndeterminateIconColor:"colors.white",checkboxIndeterminateFocusBorderColor:"tokens.backgroundColor",checkboxIndeterminateFocusBackgroundColor:"tokens.accentColor",checkboxIndeterminateFocusIconColor:"colors.white",checkboxIndeterminateDisabledBorderColor:["colors.palette.200","colors.palette.600"],checkboxIndeterminateDisabledBackgroundColor:["colors.palette.200","colors.palette.500"],checkboxIndeterminateDisabledIconColor:"tokens.disabledColor",radioSize:"tokens.iconSize",radioBorderColor:["colors.palette.200","colors.palette.500"],radioBackgroundColor:"tokens.backgroundColor",radioIconColor:"colors.transparent",radioFocusBorderColor:"tokens.borderColor",radioFocusBackgroundColor:"tokens.backgroundColor",radioFocusIconColor:"colors.transparent",radioFocusRingColor:"tokens.accentColor",radioDisabledBorderColor:["colors.palette.200","colors.palette.500"],radioDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],radioDisabledIconColor:"colors.transparent",radioCheckedBorderColor:"tokens.accentColor",radioCheckedBackgroundColor:"tokens.backgroundColor",radioCheckedIconColor:"tokens.accentColor",radioCheckedFocusBorderColor:["colors.primary.400","colors.primary.200"],radioCheckedFocusBackgroundColor:"tokens.backgroundColor",radioCheckedFocusIconColor:["colors.primary.400","colors.primary.200"],radioCheckedDisabledBorderColor:["colors.palette.200","colors.palette.500"],radioCheckedDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],radioCheckedDisabledIconColor:"tokens.disabledColor",moveBacklightColor:["colors.palette.800","colors.palette.200"],moveBacklightOpacity:"8%",moveIndicatorColor:"tokens.accentColor",resizeIndicatorColor:["colors.palette.300","colors.palette.400"],hiddenIndicatorColor:["colors.palette.300","colors.palette.400"],menuBorderWidth:"1px",menuBorderRadius:"sizing.size_1",menuHorizontalPadding:"density.menuHorizontal",menuVerticalPadding:"density.menuVertical",menuItemHorizontalPadding:"density.menuItemHorizontal",menuItemVerticalPadding:"density.menuItemVertical",menuBorderColor:"tokens.borderColor",menuShadowX:"tokens.shadowX",menuShadowY:"tokens.shadowY",menuShadowBlur:"tokens.shadowBlur",menuShadowColor:["colors.palette.950","colors.white"],menuShadowOpacity:"8%",menuItemHoverColor:["colors.palette.800","colors.palette.200"],menuItemHoverColorOpacity:"4%",menuItemActiveColor:"tokens.accentColor",menuItemActiveColorOpacity:"8%",commentsTextareaHorizontalPadding:"density.cellHorizontal",commentsTextareaVerticalPadding:"density.cellVertical",commentsTextareaBorderWidth:"1px",commentsTextareaBorderColor:"colors.transparent",commentsTextareaForegroundColor:"tokens.foregroundColor",commentsTextareaBackgroundColor:"tokens.backgroundSecondaryColor",commentsTextareaFocusBorderWidth:"1px",commentsTextareaFocusBorderColor:"tokens.accentColor",commentsTextareaFocusForegroundColor:"tokens.foregroundColor",commentsTextareaFocusBackgroundColor:"tokens.backgroundColor",commentsIndicatorSize:"sizing.size_1_5",commentsIndicatorColor:"tokens.accentColor",licenseHorizontalPadding:"tokens.barHorizontalPadding",licenseVerticalPadding:"tokens.barVerticalPadding",licenseForegroundColor:"tokens.barForegroundColor",licenseBackgroundColor:"tokens.barBackgroundColor",paginationBarForegroundColor:"tokens.barForegroundColor",paginationBarBackgroundColor:"tokens.barBackgroundColor",paginationBarHorizontalPadding:"tokens.barHorizontalPadding",paginationBarVerticalPadding:"tokens.barVerticalPadding",paginationButtonBorderColor:"tokens.paginationBarBackgroundColor",paginationButtonForegroundColor:"tokens.foregroundSecondaryColor",paginationButtonBackgroundColor:"tokens.paginationBarBackgroundColor",paginationButtonHoverBorderColor:["colors.palette.100","colors.palette.700"],paginationButtonHoverForegroundColor:"tokens.foregroundColor",paginationButtonHoverBackgroundColor:["colors.palette.100","colors.palette.700"],paginationButtonDisabledBorderColor:"tokens.paginationBarBackgroundColor",paginationButtonDisabledForegroundColor:"tokens.disabledColor",paginationButtonDisabledBackgroundColor:"tokens.paginationBarBackgroundColor",paginationButtonFocusBorderColor:"tokens.accentColor",paginationButtonFocusForegroundColor:"tokens.foregroundColor",paginationButtonFocusBackgroundColor:"tokens.paginationBarBackgroundColor",dialogSemiTransparentBackgroundColor:["colors.white","colors.palette.950"],dialogSemiTransparentBackgroundOpacity:"80%",dialogSolidBackgroundColor:["colors.white","colors.palette.950"],dialogContentPaddingHorizontal:"density.dialogHorizontal",dialogContentPaddingVertical:"density.dialogVertical",dialogContentBorderRadius:"sizing.size_2",dialogContentBackgroundColor:"tokens.backgroundSecondaryColor",notificationForegroundColor:"tokens.foregroundColor",notificationBackgroundColor:"tokens.backgroundColor",notificationBorderColor:"tokens.backgroundColor",notificationSuccessAccent:"#37bc6cff",notificationWarningAccent:"#fbe952ff",notificationErrorAccent:"#fa4d32ff",chipBackground:"tokens.backgroundSecondaryColor",chipBorderRadius:"sizing.size_0_5",chipVerticalPadding:"sizing.size_0",chipHorizontalPadding:"sizing.size_0_5",chipGap:"sizing.size_1",scrollbarBorderRadius:"sizing.size_2",scrollbarTrackColor:"tokens.backgroundSecondaryColor",scrollbarThumbColor:["colors.palette.300","colors.palette.400"]}},dU=null,dz=new Map;function dW(e,t){let r,n,o,i,s,a,l,h=arguments.length>2&&void 0!==arguments[2]&&arguments[2];var d,u,c,g=this;let p=this,m=new n4(p),f=!0,y={...t.initialState,...t};h===sr&&st.set(this,!0),this.rootContainer=e,this.rootWrapperElement=void 0,this.rootGridElement=void 0,this.rootPortalElement=void 0,this.rootElement=sn(this)?e.ownerDocument.createElement("div"):e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,sn(this)&&(this.rootWrapperElement=this.rootDocument.createElement("div"),this.rootGridElement=this.rootDocument.createElement("div"),this.rootPortalElement=this.rootDocument.createElement("div"),rO(this.rootElement,["ht-wrapper","handsontable"]),rO(this.rootWrapperElement,"ht-root-wrapper"),rO(this.rootGridElement,"ht-grid"),this.rootGridElement.appendChild(this.rootElement),this.rootWrapperElement.appendChild(this.rootGridElement),this.rootContainer.appendChild(this.rootWrapperElement),this.rootWrapperElement.__hotInstance=this,rO(this.rootPortalElement,"ht-portal"),this.rootDocument.body.appendChild(this.rootPortalElement)),this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;let b=y?.layoutDirection??"inherit",C=["rtl","ltr"].includes(b)?b:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",C),this.rootWrapperElement?.setAttribute("dir",C),this.isRtl=function(){return"rtl"===C},this.isLtr=function(){return!p.isRtl()},this.getDirectionFactor=function(){return p.isLtr()?1:-1},this.stylesHandler=new ds({hot:p,rootElement:p.rootElement,rootDocument:p.rootDocument,onThemeChange:e=>{sn(this)&&(r_(this.rootWrapperElement,/ht-theme-.*/g),r_(this.rootPortalElement,/ht-theme-.*/g),e&&(rO(this.rootWrapperElement,e),rO(this.rootPortalElement,e),getComputedStyle(this.rootWrapperElement).getPropertyValue("--ht-line-height")||rg(`The "${e}" theme is enabled, but its stylesheets are missing or not imported correctly. Import the correct CSS files in order to use that theme.`)),this.view?._wt?.selectionManager?.refreshAllBorderHandleStyles())},injectCoreCss:"boolean"!=typeof t?.injectCoreCss||t.injectCoreCss}),this.themeManager=null,lF(r=sF(d=y.language))||(r=lL,sB(d)),y.language=r;let w=Object.fromEntries(Object.entries(y).filter(e=>{let[t]=e;return!(nG.getSingleton().isRegistered(t)||nG.getSingleton().isDeprecated(t))})),S=new hb(p,w,[hC,hv]),R=S.getTableMeta(),E=S.getGlobalMeta(),T=ow();this.container=this.rootDocument.createElement("div"),this.rootElement.insertBefore(this.container,this.rootElement.firstChild),this.guid=`ht_${te()}`,dz.set(this.guid,this),this.columnIndexMapper=new sD,this.rowIndexMapper=new sD,this.columnIndexMapper.addLocalHook("indexesSequenceChange",e=>{p.runHooks("afterColumnSequenceChange",e)}),this.rowIndexMapper.addLocalHook("indexesSequenceChange",e=>{p.runHooks("afterRowSequenceChange",e)}),m.addEventListener(this.rootDocument.documentElement,"compositionstart",e=>{p.runHooks("beforeCompositionStart",e)}),o=new hR(p);let A=nj(this.guid);A.register("cellRangeMapper",new hH({rowIndexMapper:this.rowIndexMapper,columnIndexMapper:this.columnIndexMapper})),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let M=new he(R,{rowIndexMapper:p.rowIndexMapper,columnIndexMapper:p.columnIndexMapper,countCols:()=>p.countCols(),countRows:()=>p.countRows(),propToCol:e=>n.propToCol(e),isEditorOpened:()=>!!p.getActiveEditor()&&p.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),countRenderableRowsInRange:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.view.countRenderableRowsInRange(...t)},countRenderableColumnsInRange:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.view.countRenderableColumnsInRange(...t)},getShortcutManager:()=>p.getShortcutManager(),createCellCoords:(e,t)=>p._createCellCoords(e,t),createCellRange:(e,t,r)=>p._createCellRange(e,t,r),visualToRenderableCoords:e=>{let{row:t,col:r}=e;return p._createCellCoords(t>=0?p.rowIndexMapper.getRenderableFromVisualIndex(t):t,r>=0?p.columnIndexMapper.getRenderableFromVisualIndex(r):r)},renderableToVisualCoords:e=>{let{row:t,col:r}=e;return p._createCellCoords(t>=0?p.rowIndexMapper.getVisualFromRenderableIndex(t):t,r>=0?p.columnIndexMapper.getVisualFromRenderableIndex(r):r)},findFirstNonHiddenRenderableRow:(e,t)=>{let r=t>e?1:-1,n=Math.min(e,t),o=Math.max(e,t),i=p.rowIndexMapper.getNearestNotHiddenIndex(e,r);return null===i||1===r&&i>o||-1===r&&i<n?null:i>=0?p.rowIndexMapper.getRenderableFromVisualIndex(i):i},findFirstNonHiddenRenderableColumn:(e,t)=>{let r=t>e?1:-1,n=Math.min(e,t),o=Math.max(e,t),i=p.columnIndexMapper.getNearestNotHiddenIndex(e,r);return null===i||1===r&&i>o||-1===r&&i<n?null:i>=0?p.columnIndexMapper.getRenderableFromVisualIndex(i):i},isDisabledCellSelection:(e,t)=>e<0||t<0?p.getSettings().disableVisualSelection:p.getCellMeta(e,t).disableVisualSelection});this.selection=M;let N=e=>{let{hiddenIndexesChanged:t}=e;this.forceFullRender=!0,t&&this.selection.commit()};function I(e,t){let r="className"===e?p.rootElement:p.table;if(f)rO(r,t);else{let n=[],o=[];E[e]&&(n=Array.isArray(E[e])?E[e]:eW(E[e])),t&&(o=Array.isArray(t)?t:eW(t));let i=eV(n,o),s=eV(o,n);i.length&&r_(r,i),s.length&&rO(r,s)}E[e]=t}function x(e){let t;void 0===e?(t=dI("main")?dL("main"):dB(dV),t=dL("main")):t="function"!=typeof e.getThemeConfig?dB(e):e,p.themeManager=function(e){let{hot:t,themeObject:r}=e;return new dp({hot:t,themeObject:r})}({hot:p,themeObject:t})}function O(){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 _(e,t){return!!t?.isOpened()&&sg(e,t.row,t.prop)}function k(e,t,r){if(!e.length)return void r();let o=p.getActiveEditor(),i=new O,s=!0;i.onQueueEmpty=()=>{o&&s&&o._closeAfterDataChange&&_(e,o)&&o.cancelChanges(),r()};for(let r=e.length-1;r>=0;r--){let o,[a,l,,h]=e[r],d=n.propToCol(l);o=Number.isInteger(d)?p.getCellMeta(a,d):{...Object.getPrototypeOf(R),...R},p.getCellValidator(o)&&(i.addValidatorToQueue(),p.validateCell(h,o,function(t,r){return function(n){"boolean"!=typeof n&&t_("Validation error: result is not boolean"),!1===n&&!1===r.allowInvalid&&(s=!1,e.splice(t,1),r.valid=!0),i.removeValidatorFormQueue()}}(r,o),t))}i.checkIfQueueIsEmpty()}function H(e,t){for(let t=e.length-1;t>=0;t--){let r=!1;if(null===e[t]){e.splice(t,1);continue}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]>p.countRows()-1;){let{delta:e}=n.createRow(void 0,void 0,{source:"auto"});if(0===e){r=!0;break}}if("array"===p.dataType&&(!R.columns||0===R.columns.length)&&R.allowInsertColumn)for(;n.propToCol(e[t][1])>p.countCols()-1;){let{delta:e}=n.createCol(void 0,void 0,{source:"auto"});if(0===e){r=!0;break}}r||n.set(e[t][0],e[t][1],e[t][3])}}let r=e.length>0,o=s.getActiveEditor(),a=o?._closeAfterDataChange,l=_(e,o);r?(i.adjustRowsAndCols(),p.runHooks("beforeChangeRender",e,t),o?.isOpened()&&a&&l&&s.closeEditor(),p.view.adjustElementsSize(),p.render(),(o?.isOpened()&&a&&l||!o?.isOpened())&&s.prepareEditor(),p.runHooks("afterChange",e,t||"edit"),o&&eq(o.refreshValue)&&(!o.isOpened()||l)&&o.refreshValue()):p.render()}function L(e,t,r){return Array.isArray(e)?e:[[e,t,r]]}function P(e,t){let r=p.runHooks("beforeChange",e,t||"edit"),o=e.filter(e=>null!==e);if(!1===r||0===o.length)return p.getActiveEditor()?.cancelChanges(),[];for(let e=o.length-1;e>=0;e--){let t,[r,i,,s]=o[e],a=n.propToCol(i);t=Number.isInteger(a)?p.getCellMeta(r,a):{...Object.getPrototypeOf(R),...R},o[e][3]=hN(s,t)}return o}this.columnIndexMapper.addLocalHook("cacheUpdated",e=>{N(e),this.runHooks("afterColumnSequenceCacheUpdate",e)}),this.rowIndexMapper.addLocalHook("cacheUpdated",e=>{N(e),this.runHooks("afterRowSequenceCacheUpdate",e)}),this.selection.addLocalHook("afterSetRangeEnd",(e,t)=>{let r=tj(!1),n=this.selection.getSelectedRange(),{from:o,to:i}=n.current(),a=n.size()-1;this.runHooks("afterSelection",o.row,o.col,i.row,i.col,r,a),this.runHooks("afterSelectionByProp",o.row,p.colToProp(o.col),i.row,p.colToProp(i.col),r,a);let h=M.getSelectionSource();t&&!["loadData","updateData","deselect"].includes(h)&&(!r.isTouched()||r.isTouched()&&!r.value)&&l.scrollTo(e);let d=M.isSelectedByRowHeader(),u=M.isSelectedByColumnHeader();d&&u?rO(this.rootElement,["ht__selection--rows","ht__selection--columns"]):d?(r_(this.rootElement,"ht__selection--columns"),rO(this.rootElement,"ht__selection--rows")):u?(r_(this.rootElement,"ht__selection--rows"),rO(this.rootElement,"ht__selection--columns")):r_(this.rootElement,["ht__selection--rows","ht__selection--columns"]),["shift","refresh","loadData","updateData","deselect"].includes(h)||s.closeEditor(null),["refresh","loadData","updateData","deselect"].includes(h)||(p.view.render(),s.prepareEditor())}),this.selection.addLocalHook("beforeSetFocus",e=>{this.runHooks("beforeSelectionFocusSet",e.row,e.col)}),this.selection.addLocalHook("afterSetFocus",e=>{let t=tj(!1);this.runHooks("afterSelectionFocusSet",e.row,e.col,t),(!t.isTouched()||t.isTouched()&&!t.value)&&l.scrollTo(e),s.closeEditor(),p.view.render(),s.prepareEditor()}),this.selection.addLocalHook("afterSelectionFinished",e=>{let t=e.length-1,{from:r,to:n}=e[t];this.runHooks("afterSelectionEnd",r.row,r.col,n.row,n.col,t),this.runHooks("afterSelectionEndByProp",r.row,p.colToProp(r.col),n.row,p.colToProp(n.col),t),["refresh","deselect"].includes(M.getSelectionSource())&&(p.view.render(),s.prepareEditor())}),this.selection.addLocalHook("afterIsMultipleSelection",e=>{let t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)}),this.selection.addLocalHook("afterDeselect",()=>{s.closeEditor(),p.view.render(),r_(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=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSetRangeStart",...t)}).addLocalHook("beforeSetRangeStartOnly",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSetRangeStartOnly",...t)}).addLocalHook("beforeSetRangeEnd",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSetRangeEnd",...t)}).addLocalHook("beforeSelectColumns",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSelectColumns",...t)}).addLocalHook("afterSelectColumns",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterSelectColumns",...t)}).addLocalHook("beforeSelectRows",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSelectRows",...t)}).addLocalHook("afterSelectRows",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterSelectRows",...t)}).addLocalHook("beforeSelectAll",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeSelectAll",...t)}).addLocalHook("afterSelectAll",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterSelectAll",...t)}).addLocalHook("beforeModifyTransformStart",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("modifyTransformStart",...t)}).addLocalHook("afterModifyTransformStart",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterModifyTransformStart",...t)}).addLocalHook("beforeModifyTransformFocus",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("modifyTransformFocus",...t)}).addLocalHook("afterModifyTransformFocus",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterModifyTransformFocus",...t)}).addLocalHook("beforeModifyTransformEnd",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("modifyTransformEnd",...t)}).addLocalHook("afterModifyTransformEnd",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("afterModifyTransformEnd",...t)}).addLocalHook("beforeRowWrap",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.runHooks("beforeRowWrap",...t)}).addLocalHook("beforeColumnWrap",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.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")),i={alter(e,t){var r,o;let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,l=arguments.length>3?arguments[3]:void 0,h=arguments.length>4?arguments[4]:void 0;if(!1===p.runHooks("beforeAlter",e,t,a,l,h))return;let d=e=>{if(0===e.length)return[];let t=[...e];return t.sort((e,t)=>{let[r]=e,[n]=t;return r===n?0:r>n?1:-1}),eO(t,(e,t)=>{let[r,n]=t,o=e[e.length-1],[i,s]=o,a=i+s;if(r<=a){let e=Math.max(n-(a-r),0);o[1]+=e}else e.push([r,n]);return e},[t[0]])};switch(e){case"insert_row_below":case"insert_row_above":let u=p.countSourceRows();if(R.maxRows===u)return;let c="insert_row_below"===e?"below":"above";t=t??("below"===c?u:0);let{delta:g,startPhysicalIndex:m}=n.createRow(t,a,{source:l,mode:c});M.shiftRows(p.toVisualRow(m),g);break;case"insert_col_start":case"insert_col_end":let f="insert_col_end"===e?"end":"start";t=t??("end"===f?p.countSourceCols():0);let{delta:y,startPhysicalIndex:b}=n.createCol(t,a,{source:l,mode:f});if(y){if(Array.isArray(R.colHeaders)){let e=[p.toVisualColumn(b),0];e.length+=y,Array.prototype.splice.apply(R.colHeaders,e)}M.shiftColumns(p.toVisualColumn(b),y)}break;case"remove_row":let C;r=Array.isArray(t)?d(t):[[t,a]],C=0,eH(r,e=>{let[t,r]=e,o=eX(t)?p.countRows()-1:Math.max(t-C,0);if(Number.isInteger(t)&&(t=Math.max(t-C,0)),!n.removeRow(t,r,l))return;if(M.isSelected()){let{row:e}=p.getSelectedRangeActive().highlight;e>=t&&e<=t+r-1&&s.closeEditor(!0)}let i=p.countRows(),a=R.fixedRowsTop;a>=o+1&&(R.fixedRowsTop-=Math.min(r,a-o));let h=R.fixedRowsBottom;if(h&&o>=i-h&&(R.fixedRowsBottom-=Math.min(r,h)),0===i)M.deselect();else if("ContextMenu.removeRow"===l){let e=M.getSelectedRange(),t=e.pop();e.clear().set(t.from).current().setTo(t.to),M.refresh()}else M.shiftRows(t,-r);C+=r});break;case"remove_col":let w;o=Array.isArray(t)?d(t):[[t,a]],w=0,eH(o,e=>{let[t,r]=e,o=eX(t)?p.countCols()-1:Math.max(t-w,0),i=p.toPhysicalColumn(o);if(Number.isInteger(t)&&(t=Math.max(t-w,0)),!n.removeCol(t,r,l))return;if(M.isSelected()){let{col:e}=p.getSelectedRangeActive().highlight;e>=t&&e<=t+r-1&&s.closeEditor(!0)}if(0===p.countCols())M.deselect();else if("ContextMenu.removeColumn"===l){let e=M.getSelectedRange(),t=e.pop();e.clear().set(t.from).current().setTo(t.to),M.refresh()}else M.shiftColumns(t,-r);let a=R.fixedColumnsStart;a>=o+1&&(R.fixedColumnsStart-=Math.min(r,a-o)),Array.isArray(R.colHeaders)&&(void 0===i&&(i=-1),R.colHeaders.splice(i,r)),w+=r});break;default:t_(`There is no such action "${e}"`)}h||i.adjustRowsAndCols(),p.view.adjustElementsSize(),p.view.render()},adjustRowsAndCols(){let e=R.minRows,t=R.minSpareRows,r=R.minCols,o=R.minSpareCols;if(e){let t=p.countRows();t<e&&n.createRow(t,e-t,{source:"auto"})}if(t){let e=p.countEmptyRows(!0);if(e<t){let r=Math.min(t-e,R.maxRows-p.countSourceRows());n.createRow(p.countRows(),r,{source:"auto"})}}{let e;(r||o)&&(e=p.countEmptyCols(!0));let t=p.countCols();if(r&&!R.columns&&t<r){let o=r-t;e+=o,n.createCol(t,o,{source:"auto"})}if(o&&!R.columns&&"array"===p.dataType&&e<o){t=p.countCols();let r=Math.min(o-e,R.maxCols-t);n.createCol(t,r,{source:"auto"})}}},populateFromArray(e,t,r,n,o){let i,s,a,l,h,d=[],u={},c=[],g=e.row,m=e.col;if(0===(s=t.length))return!1;let f=0,y=0;switch(tU(r)&&(f=r.col-m+1,y=r.row-g+1),o){case"shift_down":let b=ex(t),C=b.length,w=Math.max(C,f),S=p.getData().slice(g),E=ex(S).slice(m,m+w);for(a=0;a<w;a+=1)if(a<C){for(i=0,s=b[a].length;i<y-s;i+=1)b[a].push(b[a][i%s]);a<E.length?c.push(b[a].concat(E[a])):c.push(b[a].concat(Array(S.length).fill(null)))}else c.push(b[a%C].concat(E[a]));p.populateFromArray(g,m,ex(c));break;case"shift_right":let T=t.length,A=Math.max(T,y),M=p.getData().slice(g).map(e=>e.slice(m));for(i=0;i<A;i+=1)if(i<T){for(a=0,l=t[i].length;a<f-l;a+=1)t[i].push(t[i][a%l]);if(i<M.length)for(let e=0;e<M[i].length;e+=1)t[i].push(M[i][e]);else t[i].push(...Array(M[0].length).fill(null))}else t.push(t[i%s].slice(0,A).concat(M[i]));p.populateFromArray(g,m,t);break;default:u.row=e.row,u.col=e.col;let N=0,I=0,x=!0,O="Autofill.fill"===n||"autofill.fill"===n,_=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t[e%t.length];return null!==r?n[r%n.length]:n},k=t.length,H=r?r.row-e.row+1:0;for(i=0,s=r?H:Math.max(k,H);i<s&&!(r&&u.row>r.row&&H>k||!R.allowInsertRow&&u.row>p.countRows()-1)&&!(u.row>=R.maxRows);i++){let t=i-N,o=O?i:t,c=_(o).length,g=r?r.col-e.col+1:0;if(l=r?g:Math.max(c,g),u.col=e.col,h=p.getCellMeta(u.row,u.col),("CopyPaste.paste"===n||"Autofill.fill"===n||"autofill.fill"===n)&&h.skipRowOnPaste){N+=1,u.row+=1,"CopyPaste.paste"===n&&(s+=1);continue}for(a=0,I=0;a<l&&!(r&&u.col>r.col&&g>c||!R.allowInsertColumn&&u.col>p.countCols()-1)&&!(u.col>=R.maxCols);a++){if(h=p.getCellMeta(u.row,u.col),("CopyPaste.paste"===n||"Autofill.fill"===n||"autofill.fill"===n)&&h.skipColumnOnPaste){I+=1,u.col+=1,"CopyPaste.paste"===n&&(l+=1);continue}if(h.readOnly&&"UndoRedo.undo"!==n){u.col+=1;continue}let e=a-I,t=O?a:e,r=!!h.valueSetter,i=_(o,t),s=p.getSourceDataAtCell(u.row,u.col)??null;if(null!==i&&"object"==typeof i)if(Array.isArray(i)&&null===s&&(s=[]),r||"object"==typeof s&&null!==s){if(null!==s){let e=tk(Array.isArray(s)?s:s[0]||s),t=tk(Array.isArray(i)?i:i[0]||i);r||tV(e,t)||Array.isArray(e)&&Array.isArray(t)?i=tD(i):x=!1}}else x=!1,h.parsePastedValue&&"CopyPaste.paste"===n&&(x=!0);else r||null===s||"object"!=typeof s||(x=!1);x&&d.push([u.row,u.col,i]),x=!0,u.col+=1}u.row+=1}p.setDataAtCell(d,null,null,n||"populateFromArray")}}},this.init=function(){if(o.setData(R.data),p.runHooks("beforeInit"),(rs()||rl())&&rO(p.rootElement,"mobile"),this.updateSettings(y,!0),this.view=new so(this),s=n5.getInstance(p,R,M),l=function(e){let{selection:t}=e,r=!1,n=!1;return{resume(){n=!1},suspend(){n=!0},skipNextScrollCycle(){r=!0},scrollTo(o){let i;if(r||n){r=!1;return}t.isFocusSelectionChanged()?i=t=>{e.scrollViewportTo(t.toObject(),()=>{let t=e.getSelectedRangeActive();if(!t)return;let{row:r,col:n}=t.highlight;hL(e.getCell(r,n,!0))})}:t.isSelectedByCorner()?i=()=>{}:t.isSelectedByRowHeader()?i=t=>{let r=hP(e).getComputedRowTarget(t);e.scrollViewportTo({row:r},()=>{let t=!!e.getSettings().rowHeaders;hL(e.getCell(r,t?-1:0,!0))})}:t.isSelectedByColumnHeader()?i=t=>{let r=hP(e).getComputedColumnTarget(t);e.scrollViewportTo({col:r},()=>{let t=!!e.getSettings().colHeaders;hL(e.getCell(t?-1:0,r,!0))})}:1===t.getSelectedRange().size()&&t.isMultiple()?i=t=>{let r=hP(e),n={row:r.getComputedRowTarget(t),col:r.getComputedColumnTarget(t)};e.scrollViewportTo(n,()=>{let{row:t,col:r}=n;hL(e.getCell(t,r,!0))})}:1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(i=t=>{let r=hP(e),n={row:r.getComputedRowTarget(t),col:r.getComputedColumnTarget(t)};e.scrollViewportTo(n,()=>{let{row:t,col:r}=n;hL(e.getCell(t,r,!0))})}):i=t=>{let r=e.selection.getSelectionSource(),{row:n,col:o}=t,i=()=>{hL(e.getCell(n,o,!0))};if(n<0&&o>=0)e.scrollViewportTo({col:o},i);else if(o<0&&n>=0)e.scrollViewportTo({row:n},i);else{if("mouse"===r&&(o===e.view.getLastPartiallyVisibleColumn()||n===e.view.getLastPartiallyVisibleRow()))return;e.scrollViewportTo({row:n,col:o},i)}},i?.(o)}}}(p),a.init(),sn(this)){var e=p.rootPortalElement;let t=e.ownerDocument;if(!da){(da=t.createElement("div")).setAttribute("role","status"),da.setAttribute("aria-live","assertive"),da.setAttribute("aria-atomic","true");let r=da.style;r.position="absolute",r.width="1px",r.height="1px",r.margin="-1px",r.overflow="hidden",r.clipPath="rect(0 0 0 0)",r.whiteSpace="nowrap",e.appendChild(da)}dl+=1,e9(y.licenseKey,this.rootWrapperElement,"19/05/2026")}p.runHooks("init"),this.render(),f&&null===p.rootElement.offsetParent&&nc(p.rootElement,()=>{p.view._wt.wtOverlays.updateLastSpreaderSize(),p.view.adjustElementsSize(),p.render()}),"object"==typeof f&&(p.runHooks("afterChange",f[0],f[1]),f=!1),p.runHooks("afterInit")},this._createCellCoords=function(e,t){return p.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,r){return p.view._wt.createCellRange(e,t,r)},this.validateCell=function(e,t,r,n){var o;let i=p.getCellValidator(t);function s(e){let n=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!n||!0===t.hidden)return void r(e);let o=t.visualCol,i=t.visualRow,s=p.getCell(i,o,!0);if(s&&"TH"!==s.nodeName){let e=p.rowIndexMapper.getRenderableFromVisualIndex(i),t=p.columnIndexMapper.getRenderableFromVisualIndex(o);p.view._wt.getSetting("cellRenderer",e,t,s)}r(e)}eQ(i)&&(o=i,i=function(e,t){t(o.test(e))}),ny(i)?(e=p.runHooks("beforeValidate",e,t.visualRow,t.prop,n),p._registerMicrotask(()=>{i.call(t,e,r=>{p&&(r=p.runHooks("afterValidate",r,e,t.visualRow,t.prop,n),t.valid=r,s(r),p.runHooks("postAfterValidate",r,e,t.visualRow,t.prop,n))})})):p._registerMicrotask(()=>{t.valid=!0,s(t.valid,!1)})},this.setDataAtCell=function(e,t,r,i){let s,a,l,h=L(e,t,r),d=[],u=i;for(s=0,a=h.length;s<a;s++){let[e,t,r]=h[s];"object"!=typeof h[s]&&t_("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter"),"number"!=typeof h[s][1]&&t_("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`"),l=t>=this.countCols()?t:n.colToProp(t),d.push([e,l,o.getAtCell(this.toPhysicalRow(e),t),r])}u||"object"!=typeof e||(u=t);let c=P(d,u);p.runHooks("afterSetDataAtCell",c,u),k(c,u,()=>{H(c,u)})},this.setDataAtRowProp=function(e,t,r,n){let i,s,a=L(e,t,r),l=[],h=n;for(i=0,s=a.length;i<s;i++){let[e,t,r]=a[i];l.push([e,t,o.getAtCell(this.toPhysicalRow(e),t),r])}h||"object"!=typeof e||(h=t);let d=P(l,h);p.runHooks("afterSetDataAtRowProp",d,h),k(d,h,()=>{H(d,h)})},this.listen=function(){p&&!p.isListening()&&(dz.forEach(e=>{p!==e&&e.unlisten()}),dU=p.guid,p.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(dU=null,p.runHooks("afterUnlisten"))},this.isListening=function(){return dU===p.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];s.closeEditor(e),p.view.render(),t&&M.isSelected()&&s.prepareEditor()},this.populateFromArray=function(e,t,r,n,o,s,a){("object"!=typeof r||"object"!=typeof r[0])&&t_("populateFromArray parameter `input` must be an array of arrays");let l="number"==typeof n?p._createCellCoords(n,o):null;return i.populateFromArray(p._createCellCoords(e,t),r,l,s,a)},this.spliceCol=function(e,t,r){for(var o=arguments.length,i=Array(o>3?o-3:0),s=3;s<o;s++)i[s-3]=arguments[s];return n.spliceCol(e,t,r,...i)},this.spliceRow=function(e,t,r){for(var o=arguments.length,i=Array(o>3?o-3:0),s=3;s<o;s++)i[s-3]=arguments[s];return n.spliceRow(e,t,r,...i)},this.getSelected=function(){if(M.isSelected())return ek(M.getSelectedRange(),e=>{let{from:t,to:r}=e;return[t.row,t.col,r.row,r.col]})},this.getSelectedLast=function(){let e,t=this.getSelected();return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedActive=function(){let e=this.getSelectedRangeActive();if(!e)return;let{from:t,to:r}=e;return[t.row,t.col,r.row,r.col]},this.getSelectedRange=function(){if(M.isSelected())return Array.from(M.getSelectedRange())},this.getSelectedRangeLast=function(){let e,t=this.getSelectedRange();return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedRangeActive=function(){return M.getActiveSelectedRange()},this.getActiveSelectionLayerIndex=function(){return M.getActiveSelectionLayerIndex()},this.emptySelectedCells=function(e){if(!M.isSelected()||0===this.countRows()||0===this.countCols())return;let t=[];eH(M.getSelectedRange(),e=>{if(e.isSingleHeader())return;let r=e.getTopStartCorner(),n=e.getBottomEndCorner(),o=Math.max(r.row,0),i=Math.min(n.row,this.countRows()-1),s=Math.max(r.col,0),a=Math.min(n.col,this.countCols()-1);o>i||s>a||od(o,i,e=>{od(s,a,r=>{this.getCellMeta(e,r).readOnly||t.push([e,r,null])})})}),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){let e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||p.view.render()},this.render=function(){this.view&&(this.forceFullRender=!0,this.isRenderSuspended()||p.view.render())},this.batchRender=function(e){this.suspendRender();let 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],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();let r=e();return this.resumeExecution(t),r},this.batch=function(e){this.suspendRender(),this.suspendExecution();let t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!p.view)return;let e=p.view,{width:t,height:r}=e.getLastSize(),{width:n,height:o}=p.rootElement.getBoundingClientRect(),i=n!==t||o!==r;!1!==p.runHooks("beforeRefreshDimensions",{width:t,height:r},{width:n,height:o},i)&&((i||e._wt.wtOverlays.scrollableElement===p.rootWindow)&&(e.setLastSize(n,o),e.adjustElementsSize(),p.render()),p.runHooks("afterRefreshDimensions",{width:t,height:r},{width:n,height:o},i))},this.updateData=function(e,t){hk(e,e=>{n=e},e=>{n=e,p.columnIndexMapper.fitToLength(this.getInitialColumnCount()),p.rowIndexMapper.fitToLength(this.countSourceRows()),i.adjustRowsAndCols(),M.markSource("updateData"),M.refresh(),M.markEndSource()},{hotInstance:p,dataMap:n,dataSource:o,internalSource:"updateData",source:t,metaManager:S,firstRun:f})},this.loadData=function(e,t){hk(e,e=>{n=e},()=>{S.clearCellsCache(),p.initIndexMappers(),i.adjustRowsAndCols(),M.markSource("loadData"),M.refresh(),M.markEndSource(),f&&(f=[null,"loadData"])},{hotInstance:p,dataMap:n,dataSource:o,internalSource:"loadData",source:t,metaManager:S,firstRun:f})},this.getInitialColumnCount=function(){let e=R.columns,t=0;if(Array.isArray(e))t=e.length;else if(ny(e))if("array"===p.dataType){let r=this.countSourceCols();for(let n=0;n<r;n+=1)e(n)&&(t+=1)}else("object"===p.dataType||"function"===p.dataType)&&(t=n.colToPropCache.length);else if(eq(R.dataSchema)){let e=n.getSchema();t=Array.isArray(e)?e.length:tY(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,r,o){return eK(e)?n.getAll():n.getRange(p._createCellCoords(e,t),p._createCellCoords(r,o),n.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,r,o){return n.getCopyableText(p._createCellCoords(e,t),p._createCellCoords(r,o))},this.getCopyableData=function(e,t){return n.getCopyable(e,n.colToProp(t))},this.getCopyableSourceData=function(e,t){return o.getCopyable(e,n.colToProp(t))},this.getSchema=function(){return n.getSchema()},this.updateSettings=function(e){var t;let r,o,s,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=(f?p.loadData:p.updateData).bind(this),h=!1;for(o in eq(e.rows)&&t_('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?'),eq(e.cols)&&t_('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?'),eq(e.ganttChart)&&t_('Since 8.0.0 the "ganttChart" setting is no longer supported.'),eq(e.rowHeights)&&eq(e.minRowHeights)&&rg("Both `rowHeights` and `minRowHeights` are defined in your configuration. As one is the alias of the other, only one of them can be used at a time. `rowHeights` will be used as the row height configuration."),e)if("data"===o||"language"===o);else if("className"===o)I("className",e.className);else if("tableClassName"===o&&p.table)I("tableClassName",e.tableClassName),p.view._wt.wtOverlays.syncOverlayTableClassNames();else if(nG.getSingleton().isRegistered(o)||nG.getSingleton().isDeprecated(o)){let t=e[o];ny(t)?(nG.getSingleton().addAsFixed(o,t,p),R[o]=t):Array.isArray(t)&&(nG.getSingleton().add(o,t,p),R[o]=t)}else!a&&tq(e,o)&&(E[o]=e[o]);let d=dn(p.rootContainer),u=tq(e,"themeName"),c=tq(e,"theme");if(u&&c&&rg("Both `theme` and `themeName` are defined in your configuration. These options are aliases and cannot be used together. The `themeName` option will be ignored."),a){let t;c&&"string"==typeof e.theme?t=e.theme:u&&"string"==typeof e.themeName&&e.themeName&&!c?(t=e.themeName,R.theme=e.themeName,R.themeName=void 0):d?t=d:p.themeManager&&(t=p.themeManager.getClassName()),p.useTheme(t)}else{let t=p.getCurrentThemeName();if(c&&"string"==typeof e.theme&&t!==e.theme)p.useTheme(e.theme),p.themeManager?.unmount();else if(u&&!c&&t!==e.themeName)R.theme=e.themeName,R.themeName=void 0,p.useTheme(e.themeName),p.themeManager?.unmount();else if(sn(p)&&!d&&tU(e.theme))if(null===p.themeManager)x(e.theme),p.useTheme(p.themeManager.getClassName());else{let t;t="function"!=typeof e.theme.getThemeConfig?dB(e.theme):e.theme,p.themeManager.update(t),p.useTheme(p.themeManager.getClassName())}}!0===p.runHooks("hasExternalDataSource")?(e.data&&rg('The "data" setting is ignored when "hasExternalDataSource" returns `true`.'),a||tq(e,"data")||tq(e,"dataProvider")?l([],"updateSettings"):void 0!==e.columns&&(n.createMap(),p.initIndexMappers())):void 0===e.data&&void 0===R.data?l(null,"updateSettings"):void 0!==e.data?l(e.data,"updateSettings"):void 0!==e.columns&&(n.createMap(),p.initIndexMappers()),!f&&e.language&&(lF(r=sF(t=e.language))?(p.runHooks("beforeLanguageChange",r),E.language=r,p.runHooks("afterLanguageChange",r)):sB(t));let g=p.countCols(),m=R.columns;if(m&&ny(m)&&(h=!0),(void 0!==e.cell||void 0!==e.cells||void 0!==e.columns)&&S.clearCache(),g>0)for(o=0,s=0;o<g;o++){if(m){let e=h?m(o):m[s];e&&S.updateColumnMeta(s,e)}s+=1}eq(e.cell)&&tW(e.cell,e=>{p.setCellMetaObject(e.row,e.col,e)}),p.runHooks("afterCellMetaReset"),f&&hO(p,"init");let y=p.rootElement.style.height;""!==y&&(y=parseInt(p.rootElement.style.height,10)),a&&p.rootElement.getAttribute("style")&&p.rootElement.setAttribute("data-initialstyle",p.rootElement.getAttribute("style"));let b=e.height;if(void 0!==e.height)if(ny(b)&&(b=b()),null===(b=p.runHooks("beforeHeightChange",b))){let e=p.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?p.rootElement.setAttribute("style",e):(p.rootElement.style.height="",p.rootElement.style.overflow="")}else void 0!==b&&(p.rootElement.style.height=isNaN(b)?`${b}`:`${b}px`,p.rootElement.style.overflow="clip");if(void 0!==e.width){let t=e.width;ny(t)&&(t=t()),t=p.runHooks("beforeWidthChange",t),p.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}a||(p.view&&(p.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),p.view._wt.exportSettingsAsClassNames(),p.view.invalidateIndexSizesCache()),M.updateHighlightClassNames(),p.runHooks("afterUpdateSettings",e)),i.adjustRowsAndCols(),p.view&&!f&&(p.render(),p.view._wt.wtOverlays.adjustElementsSize()),!a&&p.view&&(""===y||""===b||void 0===b)&&y!==b&&p.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){let e=p.getSelectedRangeActive();if(R.getValue){if(ny(R.getValue))return R.getValue.call(p);else if(e)return p.getData()[e.highlight.row][R.getValue]}else if(e)return p.getDataAtCell(e.highlight.row,e.highlight.col);return null},this.getSettings=function(){return R},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,r,n,o){i.alter(e,t,r,n,o)},this.getCell=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t,o=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;n=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===n||void 0===o||void 0===n?null:p.view.getCellAtCoords(p._createCellCoords(o,n),r)},this.getCoords=function(e){let t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;let{row:r,col:n}=t,o=r,i=n;return r>=0&&(o=this.rowIndexMapper.getVisualFromRenderableIndex(r)),n>=0&&(i=this.columnIndexMapper.getVisualFromRenderableIndex(n)),p._createCellCoords(o,i)},this.colToProp=function(e){return n.colToProp(e)},this.propToCol=function(e){return n.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 n.get(e,n.colToProp(t))},this.getDataAtRowProp=function(e,t){return n.get(e,t)},this.getDataAtCol=function(e){let t=[],r=n.getRange(p._createCellCoords(0,e),p._createCellCoords(R.data.length-1,e),n.DESTINATION_RENDERER);for(let e=0;e<r.length;e+=1)for(let n=0;n<r[e].length;n+=1)t.push(r[e][n]);return t},this.getDataAtProp=function(e){let t=[],r=n.getRange(p._createCellCoords(0,n.propToCol(e)),p._createCellCoords(R.data.length-1,n.propToCol(e)),n.DESTINATION_RENDERER);for(let e=0;e<r.length;e+=1)for(let n=0;n<r[e].length;n+=1)t.push(r[e][n]);return t},this.getSourceData=function(e,t,r,n){return void 0===e?o.getData():o.getByRange(p._createCellCoords(e,t),p._createCellCoords(r,n))},this.getSourceDataArray=function(e,t,r,n){return void 0===e?o.getData(!0):o.getByRange(p._createCellCoords(e,t),p._createCellCoords(r,n),!0)},this.getSourceDataAtCol=function(e){return o.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,r,n){let i=L(e,t,r),s=this.hasHook("afterSetSourceDataAtCell"),a=[],l=(e,t)=>{let r=this.toVisualRow(e),n=this.toVisualColumn(t);return Number.isInteger(n)?this.getCellMeta(r,n):{...Object.getPrototypeOf(R),...R}};s&&eH(i,e=>{let[t,r,n]=e,i=hN(n,l(t,r));a.push([t,r,o.getAtCell(t,r),i])}),eH(i,e=>{let[t,r,i]=e,s=l(t,r),a=hN(i,s);(function(e,t,r){let n=t.sourceDataValidator;if(!ny(n)||!0===n(e,t,r))return!0;let{row:o,col:i,sourceDataWarningMessage:s,allowInvalid:a}=t;return s&&h_(s,[{row:o,col:i,value:e}]),!0===a})(a,s,n??"setSourceDataAtCell")&&o.setAtCell(t,r,a)}),s&&this.runHooks("afterSetSourceDataAtCell",a,n),this.render();let h=p.getActiveEditor();h&&eq(h.refreshValue)&&h.refreshValue()},this.getSourceDataAtRow=function(e){return o.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return o.getAtCell(e,t)},this.getDataAtRow=function(e){return n.getRange(p._createCellCoords(e,0),p._createCellCoords(e,this.countCols()-1),n.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,r,n){let o=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,r,n],[i,s]=o,[,,a,l]=o,h=null,d=null;void 0===a&&(a=i),void 0===l&&(l=s);let u="mixed";return od(Math.max(Math.min(i,a),0),Math.max(i,a),e=>{let t=!0;return od(Math.max(Math.min(s,l),0),Math.max(s,l),r=>(d=this.getCellMeta(e,r).type,h?t=h===d:h=d,t)),u=t?d:"mixed",t}),u},this.removeCellMeta=function(e,t,r){let[n,o]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)],i=S.getCellMetaKeyValue(n,o,r);!1!==p.runHooks("beforeRemoveCellMeta",e,t,r,i)&&(S.removeCellMeta(n,o,r),p.runHooks("afterRemoveCellMeta",e,t,r,i))},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var r=arguments.length,n=Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];n.length>0&&!Array.isArray(n[0])&&t_("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array."),t>0&&S.removeRow(this.toPhysicalRow(e),t),n.length>0&&eH(n.reverse(),t=>{S.createRow(this.toPhysicalRow(e)),eH(t,(t,r)=>this.setCellMetaObject(e,r,t))}),p.render()},this.setCellMetaObject=function(e,t,r){"object"==typeof r&&tW(r,(r,n)=>{this.setCellMeta(e,t,n,r)})},this.setCellMeta=function(e,t,r,n){if(!1===p.runHooks("beforeSetCellMeta",e,t,r,n))return;let o=e,i=t;e<this.countRows()&&(o=this.toPhysicalRow(e)),t<this.countCols()&&(i=this.toPhysicalColumn(t)),S.setCellMeta(o,i,r,n),p.runHooks("afterSetCellMeta",e,t,r,n)},this.getCellsMeta=function(){return S.getCellsMeta()},this.getCellMeta=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{skipMetaExtension:!1},n=this.toPhysicalRow(e),o=this.toPhysicalColumn(t);return null===n&&(n=e),null===o&&(o=t),S.getCellMeta(n,o,{visualRow:e,visualColumn:t,...r})},this.getColumnMeta=function(e){return S.getColumnMeta(this.toPhysicalColumn(e))},this.getCellMetaAtRow=function(e){return S.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===p.dataType||R.columns)},this.getCellRenderer=function(e,t){let r="number"==typeof e?p.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof r?oH(r):eK(r)?oH("text"):r},this.getCellEditor=function(e,t){let r="number"==typeof e?p.getCellMeta(e,t).editor:e.editor;return"string"==typeof r?n2(r):eK(r)?n2("text"):r},this.getCellValidator=function(e,t){let r="number"==typeof e?p.getCellMeta(e,t).validator:e.validator;return"string"==typeof r?oU(r):r},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){Array.isArray(e)||t_("validateRows parameter `rows` must be an array"),this._validateCells(t,e)},this.validateColumns=function(e,t){Array.isArray(e)||t_("validateColumns parameter `columns` must be an array"),this._validateCells(t,void 0,e)},this._validateCells=function(e,t,r){let n=new O;e&&(n.onQueueEmpty=e);let o=p.countRows()-1;for(;o>=0;){if(void 0!==t&&-1===t.indexOf(o)){o-=1;continue}let e=p.countCols()-1;for(;e>=0;){if(void 0!==r&&-1===r.indexOf(e)){e-=1;continue}n.addValidatorToQueue(),p.validateCell(p.getDataAtCell(o,e),p.getCellMeta(o,e),e=>{"boolean"!=typeof e&&t_("Validation error: result is not boolean"),!1===e&&(n.valid=!1),n.removeValidatorFormQueue()},"validateCells"),e-=1}o-=1}n.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=R.rowHeaders,r=e;return void 0!==r&&(r=p.runHooks("modifyRowHeader",r)),void 0===r?(t=[],od(p.countRows()-1,e=>{t.push(p.getRowHeader(e))})):Array.isArray(t)&&void 0!==t[r]?t=t[r]:ny(t)?t=t(r):t&&"string"!=typeof t&&"number"!=typeof t&&(t=r+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=p.countCols();e<t;e++)if(p.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,r=p.runHooks("modifyColHeader",e);if(void 0===r){let e=[],t=p.countCols();for(let r=0;r<t;r++)e.push(p.getColHeader(r));return e}let n=R.colHeaders,o=p.toPhysicalColumn(r),i=function(e){let t=[],r=p.countCols(),n=0;for(;n<r;n++)ny(R.columns)&&R.columns(n)&&t.push(n);return t[e]}(o);return!1===R.colHeaders?n=null:R.columns&&ny(R.columns)&&R.columns(i)&&R.columns(i).title?n=R.columns(i).title:R.columns&&R.columns[o]&&R.columns[o].title?n=R.columns[o].title:Array.isArray(R.colHeaders)&&void 0!==R.colHeaders[o]?n=R.colHeaders[o]:ny(R.colHeaders)?n=R.colHeaders(o):R.colHeaders&&"string"!=typeof R.colHeaders&&"number"!=typeof R.colHeaders&&(n=sa(r)),n=p.runHooks("modifyColumnHeaderValue",n,e,t)},this._getColWidthFromSettings=function(e){let t;if(e>=0&&(t=p.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=Number.parseInt(t,10))}return t},this.getColWidth=function(e,t){let r=p._getColWidthFromSettings(e);return void 0===(r=p.runHooks("modifyColWidth",r,e,t))&&(r=50),r},this._getRowHeightFromSettings=function(e){let t=p.stylesHandler.getDefaultRowHeight(e),r=R.rowHeights??R.minRowHeights;if(null!=r){switch(typeof r){case"object":r=r[e];break;case"function":r=r(e)}"string"==typeof r&&(r=Number.parseInt(r,10))}return null!=r&&r<t?t:r},this.getRowHeight=function(e,t){let r=p._getRowHeightFromSettings(e);return p.runHooks("modifyRowHeight",r,e,t)},this.countSourceRows=function(){return o.countRows()},this.countSourceCols=function(){return o.countFirstRowKeys()},this.countRows=function(){return n.getLength()},this.countCols=function(){return Math.min(R.maxCols,this.columnIndexMapper.getNotTrimmedIndexesLength())},this.countRenderedRows=function(){return p.view._wt.drawn?p.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return p.view._wt.drawn?p.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return p.view._wt.drawn?p.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return p.view._wt.drawn?p.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 ou(p.countRows()-1,r=>{if(p.isEmptyRow(r))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 ou(p.countCols()-1,r=>{if(p.isEmptyCol(r))t+=1;else if(!0===e)return!1}),t},this.isEmptyRow=function(e){return R.isEmptyRow.call(p,e)},this.isEmptyCol=function(e){return R.isEmptyCol.call(p,e)},this.selectCell=function(e,t,r,n){let o=!(arguments.length>4)||void 0===arguments[4]||arguments[4],i=!(arguments.length>5)||void 0===arguments[5]||arguments[5];return!(eK(e)||eK(t))&&this.selectCells([[e,t,r,n]],o,i)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];!1===t&&l.suspend();let n=M.selectCells(e);return n&&r&&p.listen(),l.resume(),n},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;return M.selectColumns(e,t,r)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;return M.selectRows(e,t,r)},this.deselectCell=function(){M.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,r=arguments.length>2?arguments[2]:void 0;l.skipNextScrollCycle(),M.selectAll(e,t,r)};let D=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e,t){"number"==typeof e&&(e={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:arguments[4]??!0});let{row:r,col:n,considerHiddenIndexes:o}=e??{},i=r,s=n;if(ny(t)&&this.addHookOnce("afterScroll",t),void 0===o||o){let e=Number.isInteger(r)&&r>=0,t=Number.isInteger(n)&&n>=0,o=e?D(this.rowIndexMapper,r):void 0,a=t?D(this.columnIndexMapper,n):void 0;if(null===o||null===a)return!1;i=e?p.rowIndexMapper.getRenderableFromVisualIndex(o):r,s=t?p.columnIndexMapper.getRenderableFromVisualIndex(a):n}let a=Number.isInteger(i),l=Number.isInteger(s),h=!1;return a&&i>=0&&l&&s>=0?h=p.view.scrollViewport(p._createCellCoords(i,s),e.horizontalSnap,e.verticalSnap):a&&i>=0&&(l&&s<0||!l)?h=p.view.scrollViewportVertically(i,e.verticalSnap):l&&s>=0&&(a&&i<0||!a)&&(h=p.view.scrollViewportHorizontally(s,e.horizontalSnap)),ny(t)&&(h?this.view.render():(this.removeHook("afterScroll",t),this._registerMicrotask(()=>t()))),h},this.scrollToFocusedCell=function(e){if(!this.selection.isSelected())return!1;ny(e)&&this.addHookOnce("afterScroll",e);let{highlight:t}=this.getSelectedRangeActive(),r=this.scrollViewportTo(t.toObject());return r?this.view.render():ny(e)&&(this.removeHook("afterScroll",e),this._registerMicrotask(()=>e())),r},this.destroy=function(){p._clearTimeouts(),p._clearMicrotasks(),p.view&&p.view.destroy(),o&&o.destroy(),o=null,sn(this)&&(0!==dl&&(1===dl&&(da.remove(),da=null),dl-=1),this.getFocusScopeManager().destroy(),p.themeManager?.destroy()),this.getShortcutManager().destroy(),A.clear(),S.clearCache(),dz.delete(this.guid),m.destroy(),s&&s.destroy(),p.rootContainer&&rP(p.rootContainer),p.rootPortalElement&&p.rootPortalElement.remove(),p.batchExecution(()=>{p.rowIndexMapper.destroy(),p.columnIndexMapper.destroy(),T.getItems().forEach(e=>{let[,t]=e;t.destroy()}),T.clear(),p.runHooks("afterDestroy")},!0),nG.getSingleton().destroy(p),tW(p,(e,t,r)=>{var n;ny(e)?r[t]=(n=t,()=>{t_(`The "${n}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(r[t]=null)}),p.isDestroyed=!0,n&&n.destroy(),n=null,i=null,M=null,s=null,p=null},this.getActiveEditor=function(){return s.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return p.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return p.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return p.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return p.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return p.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return p.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return p.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return p.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return p.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return p.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return p.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return p.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(e){return T.getItem(e7(e))},this.getPluginName=function(e){return T.getId(e)},this.getInstance=function(){return p},this.addHook=function(e,t,r){nG.getSingleton().add(e,t,p,r)},this.hasHook=function(e){return nG.getSingleton().has(e,p)||nG.getSingleton().has(e)},this.addHookOnce=function(e,t,r){nG.getSingleton().once(e,t,p,r)},this.removeHook=function(e,t){nG.getSingleton().remove(e,t,p)},this.runHooks=function(e,t,r,n,o,i,s){return nG.getSingleton().run(p,e,t,r,n,o,i,s)},this.getTranslatedPhrase=function(e,t){return lz(R.language,e,t)},this.toHTML=()=>oe(this),this.toTableElement=()=>{let e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",oe(this)),e.firstElementChild},this.timeouts=[],this.useTheme=e=>{let t=!!f;this.stylesHandler.useTheme(e);let r=this.stylesHandler.getThemeName();!t&&r&&(dn(this.rootContainer)&&(r_(this.rootContainer,/ht-theme-.*/g),rO(this.rootContainer,r)),p.render(),p.scrollViewportTo(0,0)),this.runHooks("afterSetTheme",r,t)},this.getCurrentThemeName=()=>this.stylesHandler.getThemeName(),this.getTableHeight=()=>this.rootElement.offsetHeight,this.getTableWidth=()=>this.rootElement.offsetWidth,this._registerTimeout=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e;return"function"==typeof r&&(r=setTimeout(r,t)),this.timeouts.push(r),r},this._clearTimeouts=function(){eH(this.timeouts,e=>{clearTimeout(e)})},this.microtasks=[],this._registerMicrotask=function(e){let t={cancelled:!1};this.microtasks.push(t),this.rootWindow.queueMicrotask(()=>{t.cancelled||e()})},this._clearMicrotasks=function(){eH(this.microtasks,e=>{e.cancelled=!0}),this.microtasks.length=0},this._getEditorManager=function(){return s},this._getDataSource=function(){return o},this._getMetaManager=function(){return S};let F=(e=>{let{ownerWindow:t,handleEvent:r,beforeKeyDown:n,afterKeyDown:o}=e,i=ow({errorIdExists:e=>`The "${e}" context name is already registered.`}),s="grid",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"table",r=h2(e,t);return i.addItem(e,r),r},l=()=>s,h=e=>i.getItem(e),d=!1,u=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l(),n=h1(r)?r:h(r),o=!1;if(!n.hasShortcut(t))return o;let i=n.getShortcuts(t);for(let r=0;r<i.length;r++){let{callback:n,runOnlyIf:s,preventDefault:a,stopPropagation:l,captureCtrl:h,forwardToContext:c}=i[r];if(!0===s(e)){if(d=h,o=!1===n(e,t),d=!1,a&&e.preventDefault(),l&&(nk(e),e.stopPropagation()),o)break;c&&u(e,t,c)}}return o},c=function(e,t,r,n,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=e=>{if(!1!==t(e)){if(!1===r(e)||229===e.keyCode||"string"!=typeof e.key||nH(e))return;let t=hQ(e),i=[];hZ.includes(t)||(i=hJ(e));let s=o(e,[t].concat(i));!s&&(rd()&&i.includes("meta")||!rd()&&i.includes("control"))&&(s=o(e,[t].concat(hJ(e,!0)))),n(e);return}if(!1===ny(i)||229===e.keyCode||"string"!=typeof e.key||nH(e))return;let s=hQ(e),a=[];hZ.includes(s)||(a=hJ(e));let l=i(e,[s].concat(a));!l&&(rd()&&a.includes("meta")||!rd()&&a.includes("control"))&&(l=i(e,[s].concat(hJ(e,!0)))),n(e)},a=e=>{if("string"==typeof e.key){let t=hQ(e);hZ.includes(t)&&h3.press(t)}},l=e=>{if("string"==typeof e.key){let t=hQ(e);hZ.includes(t)&&h3.release(t)}},h=()=>{h3.releaseAll()};return{mount:()=>{let t=e;for(h4+=1;t;)1===h4&&(t.document.documentElement.addEventListener("keydown",a),h6.push({event:"keydown",listener:a}),t.document.documentElement.addEventListener("keyup",l),h6.push({event:"keyup",listener:l})),t.document.documentElement.addEventListener("keydown",s),t.document.documentElement.addEventListener("blur",h),t=rC(t)},unmount:()=>{let t=e;for(h4-=1;t;){if(0===h4){for(let e=0;e<h6.length;e++){let{event:r,listener:n}=h6[e];t.document.documentElement.removeEventListener(r,n)}h6.length=0}t.document.documentElement.removeEventListener("keydown",s),t.document.documentElement.removeEventListener("blur",h),t=rC(t)}},isPressed:e=>h3.isPressed(e),releasePressedKeys:()=>h3.releaseAll()}}(t,e=>{let t=h(l());return r(e,t?.scope??"table")},n,o,u,(e,t)=>{let r=i.getItems();for(let n=0;n<r.length;n+=1){let[,o]=r[n];if("global"===o.scope&&u(e,t,o))return!0}return!1});return c.mount(),{addContext:a,getActiveContextName:l,getContext:h,getOrCreateContext:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"table";return h(e)??a(e,t)},setActiveContextName:e=>{i.hasItem(e)||t_(e$`You've tried to activate the "${e}" shortcut context\x20
|
|
196
|
-
that does not exist. Before activation, register the context using the "addContext" method.`),s=e},hasEventShortcut:(e,t)=>{let r=h(e);return!!r&&((e,t)=>{if("string"!=typeof e.key)return[];let r=hQ(e),n=hZ.includes(r),o=n?[]:hJ(e),i=[[r].concat(o)];return!n&&("function"==typeof t&&t()?o.includes("meta"):o.includes("control"))&&i.push([r].concat(hJ(e,!0))),i})(t,rd).some(e=>r.hasShortcut(e))},isCtrlPressed:()=>!d&&(c.isPressed("control")||c.isPressed("meta")),releasePressedKeys:()=>c.releasePressedKeys(),destroy:()=>c.unmount()}})({handleEvent:(e,t)=>"global"===t||p.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||p.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",e=>{!1===e.ctrlKey&&!1===e.metaKey&&F.releasePressedKeys()}),this.getShortcutManager=function(){return F},a=new hF(p);let B=sn(this)?function(e){let t=ow({errorIdExists:e=>`The "${e}" focus scope is already registered.`}),r=e.getShortcutManager(),n=null;function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hV.UNKNOWN;n!==e&&(null!==n&&i(n),(n=e).activate(t),r.setActiveContextName(e.getShortcutsContextName()))}function i(e){s(),n===e&&(n=null,e.deactivate())}function s(){let r=t.getValues(),o=r.filter(e=>e.runOnlyIf()&&"modal"===e.getType());r.forEach(t=>{o.length>0&&o.includes(t)||0===o.length||t.hasContainerDetached()?t.enable():t.disable(),t===n?t.contains(e.rootDocument.activeElement)?t.deactivateFocusCatchers():t.activateFocusCatchers():t.runOnlyIf()?t.activateFocusCatchers():t.deactivateFocusCatchers()})}function a(r,s){if(!r.isConnected||!rU(r))return;let a=t.getValues().filter(e=>e.runOnlyIf()),l=!1;a.forEach(t=>{!l&&t.contains(r)&&(l=!0,s!==hV.UNKNOWN&&e.listen(),o(t,s))}),!l&&n&&(i(n),e.unlisten())}let l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!1;function n(e){r||t.onFocus?.(e)}function o(e){t.onClick?.(e)}function i(e){"Tab"===e.key&&t.onTabKeyDown?.(e)}function s(){r=!0}function a(){r=!1}return{mount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document;e.addEventListener("focusin",n),e.addEventListener("click",o),e.addEventListener("keydown",i),e.addEventListener("mousedown",s),e.addEventListener("mouseup",a),t=rC(t)}},unmount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document;e.removeEventListener("focusin",n),e.removeEventListener("click",o),e.removeEventListener("keydown",i),e.removeEventListener("mousedown",s),e.removeEventListener("mouseup",a),t=rC(t)}}}}(e.rootWindow,{onFocus:e=>{a(e.target,e.target.dataset.htFocusSource??hV.UNKNOWN)},onClick:e=>{a(e.target,hV.CLICK)},onTabKeyDown:()=>{s()}});return l.mount(),{getActiveScopeId:function(){return n?t.getId(n):null},registerScope:function(n,o){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.hasItem(n)&&t_(`Scope with id "${n}" already registered`);let s=function(e,t){let r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={shortcutsContextName:"grid",type:hB.INLINE,contains:e=>e===t||t.contains(e),runOnlyIf:()=>!0,enableFocusCatchers:!0,...o},s=!1===i.enableFocusCatchers?null:(r=hU(e,hV.TAB_FROM_ABOVE),n=hU(e,hV.TAB_FROM_BELOW),t.prepend(r),t.append(n),{activate(){r.tabIndex=0,n.tabIndex=0},deactivate(){r.tabIndex=-1,n.tabIndex=-1},destroy(){r.remove(),n.remove()}});return{getType:()=>i.type,hasContainerDetached:()=>!e.rootWrapperElement.contains(t),getShortcutsContextName:()=>i.shortcutsContextName,runOnlyIf:()=>i.runOnlyIf(),contains:e=>i.contains(e),activate:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hV.UNKNOWN;i.onActivate?.(e)},deactivate:()=>{i.onDeactivate?.()},activateFocusCatchers:()=>{s?.activate()},deactivateFocusCatchers:()=>{s?.deactivate()},enable:()=>{t.removeAttribute("inert")},disable:()=>{t.setAttribute("inert","true")},destroy:()=>{s?.destroy()}}}(e,o,i);t.addItem(n,s),r.getOrCreateContext(s.getShortcutsContextName())},unregisterScope:function(e){t.hasItem(e)||t_(`Scope with id "${e}" not found`),t.getItem(e).destroy(),t.removeItem(e)},activateScope:(e,r)=>(function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hV.UNKNOWN;t.hasItem(e)||t_(`Scope with id "${e}" not found`);let n=r??hV.UNKNOWN;o(t.getItem(e),n)})(e,r),deactivateScope:e=>{!t.hasItem(e)&&t_(`Scope with id "${e}" not found`),i(t.getItem(e))},destroy:()=>l.unmount()}}(p):null;this.getFocusManager=function(){return a},this.getFocusScopeManager=function(){return sn(p)||t_("The FocusScopeManager is only available for the main Handsontable instance."),B};let V=y.theme,U=y.themeName,z=dn(p.rootContainer);sn(p)&&!z&&(tU(V)||!V&&!U)&&x(V),oA().forEach(e=>{let t=oM(e);T.addItem(e,new t(this))}),u=p,[dr,dt].forEach(e=>e(u)),sn(this)&&(c=p,[hj].forEach(e=>e(c))),F.setActiveContextName("grid"),nG.getSingleton().run(p,"construct")}function dG(e,t,r,n,o,i,s){let a=s.ariaTags,l=[],h=[],d=[],u=[];s._isBaseRendererCalled=!0,s.className&&rO(t,s.className),s.readOnly?(l.push(s.readOnlyCellClassName),a&&u.push(tM())):a&&d.push(tM()[0]),!1===s.valid&&s.invalidCellClassName?(l.push(s.invalidCellClassName),a&&u.push(tN())):(h.push(s.invalidCellClassName),a&&d.push(tN()[0])),!1===s.wordWrap&&s.noWordWrapClassName&&l.push(s.noWordWrapClassName),!i&&s.placeholder&&l.push(s.placeholderCellClassName),s.textEllipsis&&l.push("htTextEllipsis"),r_(t,h),rO(t,l),rH(t,d),rk(t,u)}function d$(e,t,r){e.addEventListener(t,r,!1)}function dY(e,t,r){e.removeEventListener(t,r,!1)}function dj(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function dq(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300,textContent:e=>e.value,...r},o=e.body,i=e.createTextNode(""),s=e.createElement("span");function a(){i.textContent=n.textContent(t),s.style.position="absolute",s.style.fontSize=dj(t).fontSize,s.style.fontFamily=dj(t).fontFamily,s.style.whiteSpace="pre",o.appendChild(s);let e=parseInt(dj(t)?.paddingInlineStart||0,10),r=parseInt(dj(t)?.paddingInlineEnd||0,10),a=s.clientWidth+e+r+1;o.removeChild(s);let l=t.style;l.height=`${n.minHeight}px`,n.minWidth>a?l.width=`${n.minWidth}px`:a>n.maxWidth?l.width=`${n.maxWidth}px`:l.width=`${a}px`;let h=t.scrollHeight?t.scrollHeight-1:0;n.minHeight>h?l.height=`${n.minHeight}px`:n.maxHeight<h?(l.height=`${n.maxHeight}px`,l.overflowY="visible"):l.height=`${h}px`}function l(){e.defaultView.setTimeout(a,0)}return{init:function(e,r){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=e;if(r&&r.minHeight)if("inherit"===r.minHeight)n.minHeight=t.clientHeight;else{let e=parseInt(r.minHeight,10);isNaN(e)||(n.minHeight=e)}if(r&&r.maxHeight)if("inherit"===r.maxHeight)n.maxHeight=t.clientHeight;else{let e=parseInt(r.maxHeight,10);isNaN(e)||(n.maxHeight=e)}if(r&&r.minWidth)if("inherit"===r.minWidth)n.minWidth=t.clientWidth;else{let e=parseInt(r.minWidth,10);isNaN(e)||(n.minWidth=e)}if(r&&r.maxWidth)if("inherit"===r.maxWidth)n.maxWidth=t.clientWidth;else{let e=parseInt(r.maxWidth,10);isNaN(e)||(n.maxWidth=e)}s.firstChild||(s.className="autoResize",s.style.display="inline-block",s.appendChild(i)),"TEXTAREA"===t.nodeName&&(t.style.resize="none",t.style.height=`${n.minHeight}px`,t.style.minWidth=`${n.minWidth}px`,t.style.maxWidth=`${n.maxWidth}px`,t.style.overflowY="hidden"),o&&(d$(t,"input",a),d$(t,"keydown",l)),a()},resize:a,unObserve(){dY(t,"input",a),dY(t,"keydown",l)}}}function dK(e,t){let r=r5(t),n=t.value.split("\n"),o=r,i=0;for(let t=0;t<n.length;t++){let s=n[t];0!==t&&(i+=n[t-1].length+1);let a=i+s.length;if("home"===e?o=i:"end"===e&&(o=a),r<=a)break}ne(t,o)}dG.RENDERER_TYPE="base";let dX="ht_editor_hidden",dQ="textEditor";class dZ extends h7{static get EDITOR_TYPE(){return"text"}eventManager=new n4(this);autoResize=dq(this.hot.rootDocument);TEXTAREA;textareaStyle;TEXTAREA_PARENT;textareaParentStyle;layerClass;constructor(e){super(e),this.eventManager=new n4(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this._opened=!0,this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.autoResize.unObserve(),ry(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,r,n,o,i){let s=this.state;if(super.prepare(e,t,r,n,o,i),!i.readOnly){this.refreshDimensions(!0);let{allowInvalid:e}=i;e&&!this.isOpened()&&(this.TEXTAREA.value=""),s===h9.FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(e,t){this.state===h9.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),ne(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"textarea",{rootDocument:t}=this.hot;this.TEXTAREA=t.createElement(e),rk(this.TEXTAREA,[["data-hot-input",""],ta(-1)]),rO(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=t.createElement("DIV"),rO(this.TEXTAREA_PARENT,"handsontableInputHolder"),rx(this.TEXTAREA_PARENT,this.layerClass)&&r_(this.TEXTAREA_PARENT,this.layerClass),rO(this.TEXTAREA_PARENT,dX),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){ro()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",r_(this.TEXTAREA_PARENT,this.layerClass),rO(this.TEXTAREA_PARENT,dX)}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="";let e=this.TEXTAREA_PARENT.childNodes,t=!1;od(e.length-1,r=>{if(rx(e[r],"handsontableEditor"))return t=!0,!1}),rx(this.TEXTAREA_PARENT,dX)&&r_(this.TEXTAREA_PARENT,dX),t?this.layerClass="ht_editor_visible":this.layerClass=this.getEditedCellsLayerClass(),rO(this.TEXTAREA_PARENT,this.layerClass)}refreshValue(){let 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!==h9.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD){e||this.close();return}let{top:t,start:r,width:n,maxWidth:o,height:i,maxHeight:s}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${r}px`,this.showEditableElement();let a=this.hot.rootWindow.getComputedStyle(this.TD);this.TEXTAREA.style.fontSize=a.fontSize,this.TEXTAREA.style.fontFamily=a.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor,this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(n,o),minHeight:Math.min(i,s),maxWidth:o,maxHeight:s},!0)}bindEvents(){ra()&&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===h9.EDITING&&this.focus()}),this.addHook("afterRowResize",()=>{this.refreshDimensions(),this.state===h9.EDITING&&this.focus()})}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){let e=this.hot.getShortcutManager().getContext("editor"),t=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};e.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(t(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(t(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(t(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[r]=t;dK(r,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[r]=t;dK(r,this.TEXTAREA)}}],{runOnlyIf:()=>eq(this.hot.getSelected()),group:dQ})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(dQ)}}function dJ(e,t,r,n,o,i,s){let a=i;!a&&s.placeholder&&(a=s.placeholder),a=ej(a),s.trimWhitespace&&(a=a.trim()),rV(t,a)}dJ.RENDERER_TYPE="text";let d0={CELL_TYPE:"text",editor:dZ,renderer:dJ};function d1(e,t){let r=new dW(e,t||{},sr);return r.init(),r}ha(d0),oL(dG),d1.editors={BaseEditor:h7},d1.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new dW(e,t,sr)},d1.DefaultSettings=hu(),d1.hooks=nG.getSingleton(),d1.CellCoords=iC,d1.CellRange=iw,d1.packageName="handsontable",d1.buildDate="19/05/2026 06:38:15",d1.version="17.1.0-rc13",d1.languages={dictionaryKeys:S,getLanguageDictionary:lU,getLanguagesDictionaries:function(){return lB()},registerLanguageDictionary:lV,getTranslatedPhrase:lz},d1.themes={hasTheme:dH,getTheme:dL,getThemeNames:dP,getThemes:dD,registerTheme:dB};let d2="handsontableEditor";class d3 extends dZ{static get EDITOR_TYPE(){return"handsontable"}isFlippedVertically=!1;isFlippedHorizontally=!1;open(){super.open();let 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(),ne(this.TEXTAREA,0,this.TEXTAREA.value.length),this.htEditor.updateSettings({width:this.getTargetDropdownWidth(),height:this.getTargetDropdownHeight()}),this.refreshDimensions(),this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i);let s=this,a={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){let r=this.getSourceData(t.row,t.col);void 0!==r&&s.setValue(r),s.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&tL(a,i.handsontable),this.htOptions=a}beginEditing(e,t){let r=this.hot.getSettings().onBeginEditing;r&&!1===r()||super.beginEditing(e,t)}createElements(){super.createElements();let e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,r){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedActive()){let e=this.htEditor.getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,r)}flipDropdownVerticallyIfNeeded(){let{view:e}=this.hot,t=this.getEditedCellRect(),r=t.top;e.isVerticallyScrollableByWindow()&&(r=Math.max(r+(e.getTableOffset().top-this.hot.rootWindow.scrollY),0));let n=this.getDropdownHeight(),o=e.getWorkspaceHeight()-r-t.height,i=n>o&&r>o+t.height;return i?this.flipDropdownVertically():this.unflipDropdownVertically(),{isFlipped:i,spaceAbove:r,spaceBelow:o}}flipDropdownVertically(){let e=this.htEditor.rootElement.style;e.position="absolute",e.top=`${-this.getDropdownHeight()}px`,this.isFlippedVertically=!0}unflipDropdownVertically(){let e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.isFlippedVertically=!1}flipDropdownHorizontallyIfNeeded(){let{view:e}=this.hot,t=this.getEditedCellRect(),r=t.start+t.width;e.isHorizontallyScrollableByWindow()&&(r=Math.max(r+(e.getTableOffset().left-this.hot.rootWindow.scrollX),0));let n=this.getDropdownWidth(),o=e.getWorkspaceWidth()-r+t.width,i=n>o&&r>o;return i?this.flipDropdownHorizontally():this.unflipDropdownHorizontally(),{isFlipped:i,spaceInlineStart:r,spaceInlineEnd:o}}flipDropdownHorizontally(){let e=this.htEditor.rootElement.style,{width:t}=this.getEditedCellRect();e.position="absolute",e[this.hot.isRtl()?"right":"left"]=`${-(this.getDropdownWidth()-t)}px`,this.isFlippedHorizontally=!0}unflipDropdownHorizontally(){let e=this.htEditor.rootElement.style;e.position="absolute",e[this.hot.isRtl()?"right":"left"]="",this.isFlippedHorizontally=!1}getDropdownHeight(){return this.htEditor.getTableHeight()}getDropdownWidth(){return this.htEditor.getTableWidth()}getTargetDropdownWidth(){return this.htEditor.view.getTableWidth()}getTargetDropdownHeight(){return this.htEditor.view.getTableHeight()+1}assignHooks(){this.hot.addHook("afterDestroy",()=>{this.htEditor?.destroy()}),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}registerShortcuts(){let e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();let t=(e,t)=>{let r=this.htEditor;if(void 0!==e&&(e<0||this.isFlippedVertically&&e>r.countRows()-1?r.deselectCell():r.selectCell(e,0),r.getData().length))return t.preventDefault(),nk(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{let r,n=this.htEditor;return!n.getSelectedActive()&&this.isFlippedVertically?r=n.countRows()-1:n.getSelectedActive()&&(r=this.isFlippedVertically?Math.max(0,n.getSelectedActive()[0]-1):n.getSelectedActive()[0]-1),t(r,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{let r,n=this.htEditor;return n.getSelectedActive()||this.isFlippedVertically?n.getSelectedActive()&&(this.isFlippedVertically?r=n.getSelectedActive()[0]+1:this.isFlippedVertically||(r=Math.min(n.countRows()-1,n.getSelectedActive()[0]+1))):r=0,t(r,e)},preventDefault:!1}],{group:d2,relativeToGroup:hY,position:"before"})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(d2)}}class d6 extends d3{static get EDITOR_TYPE(){return"autocomplete"}query=null;strippedChoices=[];rawChoices=[];#tM=this.hot.guid.slice(0,9);getValue(){let e=this.rawChoices.find(e=>{let t=this.stripValueIfNeeded(e);return(tQ(t)?t.value:t)===this.TEXTAREA.value});return eq(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),rO(this.htContainer,"autocompleteEditor"),rO(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&rk(this.TEXTAREA,[["type","text"],["role","combobox"],tS("listbox"),["aria-autocomplete","list"]])}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i),this.hot.getSettings().ariaTags&&rk(this.TEXTAREA,[tA("false"),["aria-controls",`${this.#tM}-listbox-${e}-${t}`]]),this.htOptions={...this.htOptions,valueGetter:e=>tQ(e)?e.value:e}}open(){super.open();let e=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,r=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,n=r?.length,{row:o,col:i}=this;this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",e=>this.onBeforeKeyDown(e)),this.htEditor.addHook("afterScroll",this.#tN),this.htEditor.updateSettings({colWidths:e?[r0(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,renderer:(e,o,i,s,a,l,h)=>{let d,u;dJ(e,o,i,s,a,l,h);let{filteringCaseSensitive:c,allowHtml:g,locale:p}=this.cellProperties,m=this.query,f=ej(l);f&&!g&&-1!==(d=!0===c?f.indexOf(m):f.toLocaleLowerCase(p).indexOf(m.toLocaleLowerCase(p)))&&(u=f.substr(d,m.length),f=f.replace(u,`<strong>${u}</strong>`)),t&&rk(o,[["role","option"],...r?[["aria-setsize",n]]:[],...r?[["aria-posinset",r.indexOf(l)+1]]:[],["id",`${this.htEditor.rootElement.id}_${i}-${s}`]]),o.innerHTML=f},afterSelectionEnd:(e,r)=>{if(t){let t=e=>{rk(e,[tx()]),rk(this.TEXTAREA,"aria-activedescendant",e.id)},n=this.htEditor.getCell(e,r,!0);null!==n?t(n):this.htEditor.addHookOnce("afterScrollVertically",()=>{t(this.htEditor.getCell(e,r,!0))})}}}),t&&(rk(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...tl()),rk(this.htEditor.rootElement,[tm(),["aria-live","polite"],["aria-relevant","text"],["id",`${this.#tM}-listbox-${o}-${i}`]]),rk(this.TEXTAREA,...tA("true"))),this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)})}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&rk(this.TEXTAREA,[tA("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){let 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){let t=r5(this.TEXTAREA),r=r9(this.TEXTAREA),n=this.cellProperties.sortByRelevance,o=this.cellProperties.filter,i=this.stripValueIfNeeded(this.getValue()),s=tQ(i)?i.value:i,a=null,l=e;n||(l=l.toSorted());let h=[],d=this.cellProperties.locale,u=this.cellProperties.filteringCaseSensitive,c=u?s:s.toLocaleLowerCase(d);for(let e=0;e<l.length;e++){let t=tQ(l[e])?to(ej(l[e].value)):to(ej(l[e]));if(-1!==(u?t:t.toLocaleLowerCase(d)).indexOf(c)&&(h.push(e),!1===o))break}!1===o?i.length>0&&(a=h[0]):a=(l=h.map(e=>l[e])).indexOf(c)>-1?l.indexOf(c):0,this.strippedChoices=l,0===l.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData(ex([l])),l.length>0&&(this.updateDropdownDimensions(),this.flipDropdownVerticallyIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a)),this.hot.listen(),ne(this.TEXTAREA,t,t===r?void 0:r)}flipDropdownVerticallyIfNeeded(){let e=super.flipDropdownVerticallyIfNeeded(),{isFlipped:t,spaceAbove:r,spaceBelow:n}=e;return this.limitDropdownIfNeeded(t?r:n),e}limitDropdownIfNeeded(e){let t=this.getDropdownHeight();if(t>e){let r=0,n=0,o=null;do r+=n=this.htEditor.stylesHandler.getDefaultRowHeight();while(r<e);o=r-n,this.isFlippedVertically&&(this.htEditor.rootElement.style.top=`${parseInt(this.htEditor.rootElement.style.top,10)+t-o}px`),this.setDropdownHeight(r-n)}}updateDropdownDimensions(){let e=nt(),t=this.getTargetEditorWidth()+e,r=this.getTargetEditorHeight()+e;this.htEditor.updateSettings({width:t,height:r}),this.#tI(),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e}),this.#tI(),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()}getTargetEditorHeight(){let e=0;if(!this.hot.getCurrentThemeName()){let t=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore"));e=parseInt(t.borderTopWidth,10)+parseInt(t.borderBottomWidth,10)}return Array.from({length:Math.min(this.cellProperties.visibleRows,this.strippedChoices.length)},(e,t)=>t).reduce((e,t)=>e+(this.hot.stylesHandler.getDefaultRowHeight()+ +(0===t)),0)+e}getTargetEditorWidth(){let e=0;if(!this.hot.getCurrentThemeName()){let t=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore"));e=parseInt(t.borderInlineStartWidth,10)+parseInt(t.borderInlineEndWidth,10)}return this.htEditor.getColWidth(0)+e}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){let{allowHtml:t}=this.cellProperties,r=e=>ej(t?e:to(e));return e.every(e=>tQ(e))?e.map(e=>({key:r(e.key),value:r(e.value)})):e.map(e=>r(e))}#tN=nw(()=>{this.focus()},100);#tI(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getTargetEditorWidth()+nr(this.hot.rootDocument)})}onBeforeKeyDown(e){if(nN(e.keyCode)||e.keyCode===nA.BACKSPACE||e.keyCode===nA.DELETE||e.keyCode===nA.INSERT){let t=10;e.keyCode===nA.C&&(e.ctrlKey||e.metaKey)||(this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)},t))}}}class d4 extends h7{static get EDITOR_TYPE(){return"checkbox"}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===t.target.nodeName){let e=this.TD.querySelector('input[type="checkbox"]');rx(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}var d5=r(7539),d9=r.n(d5);let d7=()=>window.document,d8=function(e,t,r,n){e.addEventListener(t,r,!!n)},ue=function(e,t,r,n){e.removeEventListener(t,r,!!n)},ut=function(e,t){return -1!==(" "+e.className+" ").indexOf(" "+t+" ")},ur=function(e,t){ut(e,t)||(e.className=""===e.className?t:e.className+" "+t)},un=function(e,t){var r;e.className=(r=(" "+e.className+" ").replace(" "+t+" "," ")).trim?r.trim():r.replace(/^\s+|\s+$/g,"")},uo=function(e){return/Array/.test(Object.prototype.toString.call(e))},ui=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},us=function(e){let t=e.getDay();return 0===t||6===t},ua=function(e,t){return[31,e%4==0&&e%100!=0||e%400==0?29:28,31,30,31,30,31,31,30,31,30,31][t]},ul=function(e){ui(e)&&e.setHours(0,0,0,0)},uh=function(e,t){return e.getTime()===t.getTime()},ud=function(e,t,r){let n,o;for(n in t)(o=void 0!==e[n])&&"object"==typeof t[n]&&null!==t[n]&&void 0===t[n].nodeName?ui(t[n])?r&&(e[n]=new Date(t[n].getTime())):uo(t[n])?r&&(e[n]=t[n].slice(0)):e[n]=ud({},t[n],r):(r||!o)&&(e[n]=t[n]);return e},uu=function(e,t,r){let n=d7().createEvent("HTMLEvents");n.initEvent(t,!0,!1),n=ud(n,r),e.dispatchEvent(n)},uc=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},ug={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},up=function(e,t,r){for(t+=e.firstDay;t>=7;)t-=7;return r?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},um=function(e){let t=[],r="false";if(e.isEmpty)if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';else 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"),r="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="'+r+'"><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>"},uf=function(e,t){e.setHours(0,0,0,0);let r=e.getDate(),n=e.getDay(),o=t-1,i=function(e){return(e+7-1)%7};e.setDate(r+o-i(n));let s=new Date(e.getFullYear(),0,t);return 1+Math.round(((e.getTime()-s.getTime())/864e5-o+i(s.getDay()))/7)},uy=function(e,t,r,n,o){let i=new Date(n,r,t);return'<td class="pika-week">'+(e.hasMoment?e.moment(i).isoWeek():uf(i,o))+"</td>"},ub=function(e){let t,r=[];for(e.showWeekNumber&&r.push("<th></th>"),t=0;t<7;t++)r.push('<th scope="col"><abbr title="'+up(e,t)+'">'+up(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?r.reverse():r).join("")+"</tr></thead>"},uC=function(e,t,r,n,o,i){let s,a,l,h=e._o,d=r===h.minYear,u=r===h.maxYear,c='<div id="'+i+'" class="pika-title" role="heading" aria-live="polite">',g,p,m=!0,f=!0;for(l=[],s=0;s<12;s++)l.push('<option value="'+(r===o?s-t:12+s-t)+'"'+(s===n?' selected="selected"':"")+(d&&s<h.minMonth||u&&s>h.maxMonth?' disabled="disabled"':"")+">"+h.i18n.months[s]+"</option>");for(g='<div class="pika-label">'+h.i18n.months[n]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",uo(h.yearRange)?(s=h.yearRange[0],a=h.yearRange[1]+1):(s=r-h.yearRange,a=1+r+h.yearRange),l=[];s<a&&s<=h.maxYear;s++)s>=h.minYear&&l.push('<option value="'+s+'"'+(s===r?' selected="selected"':"")+">"+s+"</option>");return p='<div class="pika-label">'+r+h.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",h.showMonthAfterYear?c+=p+g:c+=g+p,d&&(0===n||h.minMonth>=n)&&(m=!1),u&&(11===n||h.maxMonth<=n)&&(f=!1),0===t&&(c+='<button class="pika-prev'+(m?"":" is-disabled")+'" type="button">'+h.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(c+='<button class="pika-next'+(f?"":" is-disabled")+'" type="button">'+h.i18n.nextMonth+"</button>"),c+"</div>"};function uw(e){let t=this,r=t.config(e);t._onMouseDown=function(e){if(!t._v)return;let n=(e=e||window.event).target||e.srcElement;if(n){if(!ut(n,"is-disabled"))if(!ut(n,"pika-button")||ut(n,"is-empty")||ut(n.parentNode,"is-disabled"))ut(n,"pika-prev")?t.prevMonth():ut(n,"pika-next")&&t.nextMonth();else t.setDate(new Date(n.getAttribute("data-pika-year"),n.getAttribute("data-pika-month"),n.getAttribute("data-pika-day"))),r.bound&&window.setTimeout(function(){t.hide(),r.blurFieldOnSelect&&r.field&&r.field.blur()},100);if(ut(n,"pika-select"))t._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},t._onChange=function(e){let r=(e=e||window.event).target||e.srcElement;r&&(ut(r,"pika-select-month")?t.gotoMonth(r.value):ut(r,"pika-select-year")&&t.gotoYear(r.value))},t._onKeyChange=function(e){if(e=e||window.event,t.isVisible())switch(e.keyCode){case 13:case 27:r.field&&r.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(r.parse)return r.parse(r.field.value,r.format);if(!this.hasMoment)return new Date(Date.parse(r.field.value));{let e=this.moment(r.field.value,r.format,r.formatStrict);return e&&e.isValid()?e.toDate():null}},t._onInputChange=function(e){let r;e.firedBy!==t&&(ui(r=t._parseFieldValue())&&t.setDate(r),t._v||t.show())},t._onInputFocus=function(){t.show()},t._onInputClick=function(){t.show()},t._onInputBlur=function(){let e=d7().activeElement;do if(ut(e,"pika-single"))return;while(e=e.parentNode);t._c||(t._b=window.setTimeout(function(){t.hide()},50)),t._c=!1},t._onClick=function(e){let n=(e=e||window.event).target||e.srcElement,o=n;if(n){!hasEventListeners&&ut(n,"pika-select")&&!n.onchange&&(n.setAttribute("onchange","return;"),d8(n,"change",t._onChange));do if(ut(o,"pika-single")||o===r.trigger)return;while(o=o.parentNode);t._v&&n!==r.trigger&&o!==r.trigger&&t.hide()}},t.el=d7().createElement("div"),t.el.className="pika-single"+(r.isRTL?" is-rtl":"")+(r.theme?" "+r.theme:""),d8(t.el,"mousedown",t._onMouseDown,!0),d8(t.el,"touchend",t._onMouseDown,!0),d8(t.el,"change",t._onChange),r.keyboardInput&&d8(d7(),"keydown",t._onKeyChange),r.field&&(r.container?r.container.appendChild(t.el):r.bound?d7().body.appendChild(t.el):r.field.parentNode.insertBefore(t.el,r.field.nextSibling),d8(r.field,"change",t._onInputChange),r.defaultDate||(r.defaultDate=t._parseFieldValue(),r.setDefaultDate=!0));let n=r.defaultDate;ui(n)?r.setDefaultDate?t.setDate(n,!0):t.gotoDate(n):t.gotoDate(new Date),r.bound?(this.hide(),t.el.className+=" is-bound",d8(r.trigger,"click",t._onInputClick),d8(r.trigger,"focus",t._onInputFocus),d8(r.trigger,"blur",t._onInputBlur)):this.show()}uw.prototype={config:function(e){this._o||(this._o=ud({},ug,!0));let t=ud(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 r=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=r>4?4:r,ui(t.minDate)||(t.minDate=!1),ui(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),uo(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))||ug.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(e){return(e=e||this._o.format,ui(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 ui(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="",uu(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),!ui(e))return;let r=this._o.minDate,n=this._o.maxDate;ui(r)&&e<r?e=r:ui(n)&&e>n&&(e=n),this._d=new Date(e.getTime()),ul(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),uu(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(ui(e)){if(this.calendars){let r=new Date(this.calendars[0].year,this.calendars[0].month,1),n=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),o=e.getTime();n.setMonth(n.getMonth()+1),n.setDate(n.getDate()-1),t=o<r.getTime()||n.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 r,n=this.getDate()||new Date,o=24*parseInt(t)*36e5;"add"===e?r=new Date(n.valueOf()+o):"subtract"===e&&(r=new Date(n.valueOf()-o)),this.setDate(r)},adjustCalendars:function(){this.calendars[0]=uc(this.calendars[0]);for(let e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=uc({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?(ul(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=ug.minDate,this._o.minYear=ug.minYear,this._o.minMonth=ug.minMonth,this._o.startRange=ug.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(ul(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=ug.maxDate,this._o.maxYear=ug.maxYear,this._o.maxMonth=ug.maxMonth,this._o.endRange=ug.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=this._o,r=t.minYear,n=t.maxYear,o=t.minMonth,i=t.maxMonth,s="",a;this._y<=r&&(this._y=r,!isNaN(o)&&this._m<o&&(this._m=o)),this._y>=n&&(this._y=n,!isNaN(i)&&this._m>i&&(this._m=i));for(let e=0;e<t.numberOfMonths;e++)a="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),s+='<div class="pika-lendar">'+uC(this,e,this.calendars[e].year,this.calendars[e].month,this.calendars[0].year,a)+this.render(this.calendars[e].year,this.calendars[e].month,a)+"</div>";this.el.innerHTML=s,t.bound&&"hidden"!==t.field.type&&window.setTimeout(function(){t.trigger.focus()},1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),t.bound&&t.field.setAttribute("aria-label",t.ariaLabel)},adjustPosition:function(){let e,t,r,n,o,i,s,a,l,h,d;this._o.container||(this.el.style.position="absolute",e=this._o.trigger,t=this.el.offsetWidth,r=this.el.offsetHeight,n=window.innerWidth||d7().documentElement.clientWidth,o=window.innerHeight||d7().documentElement.clientHeight,i=d7().body.scrollTop||d7().documentElement.scrollTop,h=!0,d=!0,s=(l=e.getBoundingClientRect()).left+window.pageXOffset,a=l.bottom+window.pageYOffset,(this._o.reposition&&s+t>n||this._o.position.indexOf("right")>-1&&s-t+e.offsetWidth>0)&&(s=s-t+e.offsetWidth,h=!1),(this._o.reposition&&a+r>o+i||this._o.position.indexOf("top")>-1&&a-r-e.offsetHeight>0)&&(a=a-r-e.offsetHeight,d=!1),s<0&&(s=0),a<0&&(a=0),this.el.style.left=s+"px",this.el.style.top=a+"px",ur(this.el,h?"left-aligned":"right-aligned"),ur(this.el,d?"bottom-aligned":"top-aligned"),un(this.el,h?"right-aligned":"left-aligned"),un(this.el,d?"top-aligned":"bottom-aligned"))},render:function(e,t,r){var n,o,i,s;let a=this._o,l=new Date,h=ua(e,t),d=new Date(e,t,1).getDay(),u=[],c=[];ul(l),a.firstDay>0&&(d-=a.firstDay)<0&&(d+=7);let g=0===t?11:t-1,p=11===t?0:t+1,m=0===t?e-1:e,f=11===t?e+1:e,y=ua(m,g),b=h+d,C=b;for(;C>7;)C-=7;b+=7-C;let w=!1;for(let r=0,i=0;r<b;r++){let s=new Date(e,t,1+(r-d)),b=!!ui(this._d)&&uh(s,this._d),C=uh(s,l),S=-1!==a.events.indexOf(s.toDateString()),R=r<d||r>=h+d,E=1+(r-d),T=t,A=e,M=a.startRange&&uh(a.startRange,s),N=a.endRange&&uh(a.endRange,s),I=a.startRange&&a.endRange&&a.startRange<s&&s<a.endRange,x=a.minDate&&s<a.minDate||a.maxDate&&s>a.maxDate||a.disableWeekends&&us(s)||a.disableDayFn&&a.disableDayFn(s);R&&(r<d?(E=y+E,T=g,A=m):(E-=h,T=p,A=f));let O={day:E,month:T,year:A,hasEvent:S,isSelected:b,isToday:C,isDisabled:x,isEmpty:R,isStartRange:M,isEndRange:N,isInRange:I,showDaysInNextAndPreviousMonths:a.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:a.enableSelectionDaysInNextAndPreviousMonths};if(a.pickWholeWeek&&b&&(w=!0),c.push(um(O)),7==++i){a.showWeekNumber&&c.unshift(uy(this,r-d,t,e,a.firstWeekOfYearMinDays)),u.push((n=c,o=a.isRTL,'<tr class="pika-row'+(a.pickWholeWeek?" pick-whole-week":"")+(w?" is-selected":"")+'">'+(o?n.reverse():n).join("")+"</tr>")),c=[],i=0,w=!1}}return i=a,s=u,'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+r+'">'+ub(i)+"<tbody>"+s.join("")+"</tbody></table>"},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),un(this.el,"is-hidden"),this._o.bound&&(d8(d7(),"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&&ue(d7(),"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),ur(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(),ue(this.el,"mousedown",this._onMouseDown,!0),ue(this.el,"touchend",this._onMouseDown,!0),ue(this.el,"change",this._onChange),e.keyboardInput&&ue(d7(),"keydown",this._onKeyChange),e.field&&(ue(e.field,"change",this._onInputChange),e.bound&&(ue(e.trigger,"click",this._onInputClick),ue(e.trigger,"focus",this._onInputFocus),ue(e.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}};let uS="date",uv="dateEditor",uR=new WeakSet;class uE extends dZ{static get EDITOR_TYPE(){return uS}parentDestroyed=!1;$datePicker=null;init(){"function"!=typeof d9()&&t_("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||this.close()})}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"),rO(this.datePicker,"htDatepickerHolder"),this.hot.rootPortalElement.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",e=>{rx(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()})}destroyElements(){let e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;uR.has(this.cellProperties.instance)||(uR.add(this.cellProperties.instance),rp("The Pikaday-based `date` editor is deprecated and will be removed in the next major release, replaced by the native HTML date input.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`date` cell type documentation: https://handsontable.com/docs/date-cell-type/"));let 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:uv})}close(){this.$datePicker?.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout(()=>{let e=this.hot._getEditorManager();e.closeEditor(),this.hot.view.render(),e.prepareEditor()}),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(uv),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){let t,r=this.#tx(),n=this.hot.view.isMouseDown(),o=!!e&&nI(e.keyCode);this.datePicker.style.display="block",this.$datePicker=new uw(this.getDatePickerConfig()),"function"==typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(d9()),this.$datePicker._onInputFocus=function(){},this.originalValue?(t=this.originalValue,d9()(t,r,!0).isValid()&&this.$datePicker.setMoment(d9()(t,r),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),o||n||this.setValue("")):this.cellProperties.defaultDate?(t=this.cellProperties.defaultDate,d9()(t,r,!0).isValid()&&this.$datePicker.setMoment(d9()(t,r),!0),o||n||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){let e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&tP(t,this.cellProperties.datePickerConfig);let r=t.onSelect,n=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.keyboardInput=!1,t.format=t.format??this.#tx(),t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=d9()(t).format(this.#tx())),this.setValue(t),r&&r(),rs()&&this.hideDatepicker()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),n&&n()},t}refreshDimensions(e){if(super.refreshDimensions(e),this.state!==h9.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.hideDatepicker();let{rowIndexMapper:t,columnIndexMapper:r}=this.hot,{wtOverlays:n}=this.hot.view._wt,{wtTable:o}=n.getParentOverlay(this.TD)??this.hot.view._wt,i=t.getVisualFromRenderableIndex(o.getFirstPartiallyVisibleRow()),s=t.getVisualFromRenderableIndex(o.getLastPartiallyVisibleRow()),a=r.getVisualFromRenderableIndex(o.getFirstPartiallyVisibleColumn()),l=r.getVisualFromRenderableIndex(o.getLastPartiallyVisibleColumn());if(this.row>=i&&this.row<=s&&this.col>=a&&this.col<=l){let e,t=this.TD.getBoundingClientRect(),r=r0(this.datePicker),n=r1(this.datePicker),o=r1(this.TD),i=this.hot.rootWindow,s=this.hot.rootDocument.documentElement,a=i.pageYOffset,l=i.pageYOffset+s.clientHeight,h=i.pageXOffset,d=i.pageXOffset+s.clientWidth,u=a+t.top+o;if(u+n>l){let e=a+t.top-n;u=e>=a?Math.max(a,e-1):l-n}this.datePickerStyle.top=`${u}px`;let c=h+t.left,g=h+t.right;this.hot.isRtl()?(e=g-r)<h&&(e=Math.min(c,d-r)):(e=c)+r>d&&(e=Math.max(g-r,h)),e=og(e,h,d-r),this.datePickerStyle.left=`${e}px`}else this.hideDatepicker()}#tx(){return this.cellProperties.dateFormat??"DD/MM/YYYY"}}class uT extends d6{static get EDITOR_TYPE(){return"dropdown"}prepare(e,t,r,n,o,i){i.filter=!1,i.strict=!0,super.prepare(e,t,r,n,o,i)}finishEditing(e,t,r){if(this.isOpened()){let t=this.hot.getSelectedRangeActive();(eK(t)||eq(t)&&!t.includes(this.hot._createCellCoords(this.row,this.col)))&&(e=!0)}super.finishEditing(e,t,r)}}let uA=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;function uM(e){let t=new Date(e);return isNaN(new Date(`${e}T00:00`).getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}function uN(e){if(eX(e))return null;if("string"==typeof e&&uA.test(e)){let[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)}return null}function uI(e){if("string"!=typeof e||!uA.test(e))return!1;let t=new Date(e);return!Number.isNaN(t.getTime())&&e===t.toISOString().slice(0,10)}let ux=/^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?$/;function uO(e){if(eX(e)||"string"!=typeof e)return null;let t=ux.exec(e);if(!t)return null;let r=Number(t[1]),n=Number(t[2]),o=void 0!==t[3]?Number(t[3]):0,i=t[4];return new Date(1970,0,1,r,n,o,void 0!==i?Number(i.padEnd(3,"0").slice(0,3)):0)}function u_(e){return"string"==typeof e&&ux.test(e)}class uk extends dZ{static get EDITOR_TYPE(){return"intl-date"}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}createElements(){super.createElements("input"),this.TEXTAREA.setAttribute("type","date")}setValue(e){(eX(e)&&(e=this.cellProperties.defaultDate),uI(e))?super.setValue(e):rg(e$`IntlDateEditor: value must be in ISO date format ("YYYY-MM-DD")\x20
|
|
196
|
+
that does not exist. Before activation, register the context using the "addContext" method.`),s=e},hasEventShortcut:(e,t)=>{let r=h(e);return!!r&&((e,t)=>{if("string"!=typeof e.key)return[];let r=hQ(e),n=hZ.includes(r),o=n?[]:hJ(e),i=[[r].concat(o)];return!n&&("function"==typeof t&&t()?o.includes("meta"):o.includes("control"))&&i.push([r].concat(hJ(e,!0))),i})(t,rd).some(e=>r.hasShortcut(e))},isCtrlPressed:()=>!d&&(c.isPressed("control")||c.isPressed("meta")),releasePressedKeys:()=>c.releasePressedKeys(),destroy:()=>c.unmount()}})({handleEvent:(e,t)=>"global"===t||p.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||p.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",e=>{!1===e.ctrlKey&&!1===e.metaKey&&F.releasePressedKeys()}),this.getShortcutManager=function(){return F},a=new hF(p);let B=sn(this)?function(e){let t=ow({errorIdExists:e=>`The "${e}" focus scope is already registered.`}),r=e.getShortcutManager(),n=null;function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hV.UNKNOWN;n!==e&&(null!==n&&i(n),(n=e).activate(t),r.setActiveContextName(e.getShortcutsContextName()))}function i(e){s(),n===e&&(n=null,e.deactivate())}function s(){let r=t.getValues(),o=r.filter(e=>e.runOnlyIf()&&"modal"===e.getType());r.forEach(t=>{o.length>0&&o.includes(t)||0===o.length||t.hasContainerDetached()?t.enable():t.disable(),t===n?t.contains(e.rootDocument.activeElement)?t.deactivateFocusCatchers():t.activateFocusCatchers():t.runOnlyIf()?t.activateFocusCatchers():t.deactivateFocusCatchers()})}function a(r,s){if(!r.isConnected||!rU(r))return;let a=t.getValues().filter(e=>e.runOnlyIf()),l=!1;a.forEach(t=>{!l&&t.contains(r)&&(l=!0,s!==hV.UNKNOWN&&e.listen(),o(t,s))}),!l&&n&&(i(n),e.unlisten())}let l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!1;function n(e){r||t.onFocus?.(e)}function o(e){t.onClick?.(e)}function i(e){"Tab"===e.key&&t.onTabKeyDown?.(e)}function s(){r=!0}function a(){r=!1}return{mount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document;e.addEventListener("focusin",n),e.addEventListener("click",o),e.addEventListener("keydown",i),e.addEventListener("mousedown",s),e.addEventListener("mouseup",a),t=rC(t)}},unmount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document;e.removeEventListener("focusin",n),e.removeEventListener("click",o),e.removeEventListener("keydown",i),e.removeEventListener("mousedown",s),e.removeEventListener("mouseup",a),t=rC(t)}}}}(e.rootWindow,{onFocus:e=>{a(e.target,e.target.dataset.htFocusSource??hV.UNKNOWN)},onClick:e=>{a(e.target,hV.CLICK)},onTabKeyDown:()=>{s()}});return l.mount(),{getActiveScopeId:function(){return n?t.getId(n):null},registerScope:function(n,o){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.hasItem(n)&&t_(`Scope with id "${n}" already registered`);let s=function(e,t){let r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={shortcutsContextName:"grid",type:hB.INLINE,contains:e=>e===t||t.contains(e),runOnlyIf:()=>!0,enableFocusCatchers:!0,...o},s=!1===i.enableFocusCatchers?null:(r=hU(e,hV.TAB_FROM_ABOVE),n=hU(e,hV.TAB_FROM_BELOW),t.prepend(r),t.append(n),{activate(){r.tabIndex=0,n.tabIndex=0},deactivate(){r.tabIndex=-1,n.tabIndex=-1},destroy(){r.remove(),n.remove()}});return{getType:()=>i.type,hasContainerDetached:()=>!e.rootWrapperElement.contains(t),getShortcutsContextName:()=>i.shortcutsContextName,runOnlyIf:()=>i.runOnlyIf(),contains:e=>i.contains(e),activate:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hV.UNKNOWN;i.onActivate?.(e)},deactivate:()=>{i.onDeactivate?.()},activateFocusCatchers:()=>{s?.activate()},deactivateFocusCatchers:()=>{s?.deactivate()},enable:()=>{t.removeAttribute("inert")},disable:()=>{t.setAttribute("inert","true")},destroy:()=>{s?.destroy()}}}(e,o,i);t.addItem(n,s),r.getOrCreateContext(s.getShortcutsContextName())},unregisterScope:function(e){t.hasItem(e)||t_(`Scope with id "${e}" not found`),t.getItem(e).destroy(),t.removeItem(e)},activateScope:(e,r)=>(function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hV.UNKNOWN;t.hasItem(e)||t_(`Scope with id "${e}" not found`);let n=r??hV.UNKNOWN;o(t.getItem(e),n)})(e,r),deactivateScope:e=>{!t.hasItem(e)&&t_(`Scope with id "${e}" not found`),i(t.getItem(e))},destroy:()=>l.unmount()}}(p):null;this.getFocusManager=function(){return a},this.getFocusScopeManager=function(){return sn(p)||t_("The FocusScopeManager is only available for the main Handsontable instance."),B};let V=y.theme,U=y.themeName,z=dn(p.rootContainer);sn(p)&&!z&&(tU(V)||!V&&!U)&&x(V),oA().forEach(e=>{let t=oM(e);T.addItem(e,new t(this))}),u=p,[dr,dt].forEach(e=>e(u)),sn(this)&&(c=p,[hj].forEach(e=>e(c))),F.setActiveContextName("grid"),nG.getSingleton().run(p,"construct")}function dG(e,t,r,n,o,i,s){let a=s.ariaTags,l=[],h=[],d=[],u=[];s._isBaseRendererCalled=!0,s.className&&rO(t,s.className),s.readOnly?(l.push(s.readOnlyCellClassName),a&&u.push(tM())):a&&d.push(tM()[0]),!1===s.valid&&s.invalidCellClassName?(l.push(s.invalidCellClassName),a&&u.push(tN())):(h.push(s.invalidCellClassName),a&&d.push(tN()[0])),!1===s.wordWrap&&s.noWordWrapClassName&&l.push(s.noWordWrapClassName),!i&&s.placeholder&&l.push(s.placeholderCellClassName),s.textEllipsis&&l.push("htTextEllipsis"),r_(t,h),rO(t,l),rH(t,d),rk(t,u)}function d$(e,t,r){e.addEventListener(t,r,!1)}function dY(e,t,r){e.removeEventListener(t,r,!1)}function dj(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function dq(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300,textContent:e=>e.value,...r},o=e.body,i=e.createTextNode(""),s=e.createElement("span");function a(){i.textContent=n.textContent(t),s.style.position="absolute",s.style.fontSize=dj(t).fontSize,s.style.fontFamily=dj(t).fontFamily,s.style.whiteSpace="pre",o.appendChild(s);let e=parseInt(dj(t)?.paddingInlineStart||0,10),r=parseInt(dj(t)?.paddingInlineEnd||0,10),a=s.clientWidth+e+r+1;o.removeChild(s);let l=t.style;l.height=`${n.minHeight}px`,n.minWidth>a?l.width=`${n.minWidth}px`:a>n.maxWidth?l.width=`${n.maxWidth}px`:l.width=`${a}px`;let h=t.scrollHeight?t.scrollHeight-1:0;n.minHeight>h?l.height=`${n.minHeight}px`:n.maxHeight<h?(l.height=`${n.maxHeight}px`,l.overflowY="visible"):l.height=`${h}px`}function l(){e.defaultView.setTimeout(a,0)}return{init:function(e,r){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=e;if(r&&r.minHeight)if("inherit"===r.minHeight)n.minHeight=t.clientHeight;else{let e=parseInt(r.minHeight,10);isNaN(e)||(n.minHeight=e)}if(r&&r.maxHeight)if("inherit"===r.maxHeight)n.maxHeight=t.clientHeight;else{let e=parseInt(r.maxHeight,10);isNaN(e)||(n.maxHeight=e)}if(r&&r.minWidth)if("inherit"===r.minWidth)n.minWidth=t.clientWidth;else{let e=parseInt(r.minWidth,10);isNaN(e)||(n.minWidth=e)}if(r&&r.maxWidth)if("inherit"===r.maxWidth)n.maxWidth=t.clientWidth;else{let e=parseInt(r.maxWidth,10);isNaN(e)||(n.maxWidth=e)}s.firstChild||(s.className="autoResize",s.style.display="inline-block",s.appendChild(i)),"TEXTAREA"===t.nodeName&&(t.style.resize="none",t.style.height=`${n.minHeight}px`,t.style.minWidth=`${n.minWidth}px`,t.style.maxWidth=`${n.maxWidth}px`,t.style.overflowY="hidden"),o&&(d$(t,"input",a),d$(t,"keydown",l)),a()},resize:a,unObserve(){dY(t,"input",a),dY(t,"keydown",l)}}}function dK(e,t){let r=r5(t),n=t.value.split("\n"),o=r,i=0;for(let t=0;t<n.length;t++){let s=n[t];0!==t&&(i+=n[t-1].length+1);let a=i+s.length;if("home"===e?o=i:"end"===e&&(o=a),r<=a)break}ne(t,o)}dG.RENDERER_TYPE="base";let dX="ht_editor_hidden",dQ="textEditor";class dZ extends h7{static get EDITOR_TYPE(){return"text"}eventManager=new n4(this);autoResize=dq(this.hot.rootDocument);TEXTAREA;textareaStyle;TEXTAREA_PARENT;textareaParentStyle;layerClass;constructor(e){super(e),this.eventManager=new n4(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this._opened=!0,this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.autoResize.unObserve(),ry(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,r,n,o,i){let s=this.state;if(super.prepare(e,t,r,n,o,i),!i.readOnly){this.refreshDimensions(!0);let{allowInvalid:e}=i;e&&!this.isOpened()&&(this.TEXTAREA.value=""),s===h9.FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(e,t){this.state===h9.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),ne(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"textarea",{rootDocument:t}=this.hot;this.TEXTAREA=t.createElement(e),rk(this.TEXTAREA,[["data-hot-input",""],ta(-1)]),rO(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=t.createElement("DIV"),rO(this.TEXTAREA_PARENT,"handsontableInputHolder"),rx(this.TEXTAREA_PARENT,this.layerClass)&&r_(this.TEXTAREA_PARENT,this.layerClass),rO(this.TEXTAREA_PARENT,dX),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){ro()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",r_(this.TEXTAREA_PARENT,this.layerClass),rO(this.TEXTAREA_PARENT,dX)}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="";let e=this.TEXTAREA_PARENT.childNodes,t=!1;od(e.length-1,r=>{if(rx(e[r],"handsontableEditor"))return t=!0,!1}),rx(this.TEXTAREA_PARENT,dX)&&r_(this.TEXTAREA_PARENT,dX),t?this.layerClass="ht_editor_visible":this.layerClass=this.getEditedCellsLayerClass(),rO(this.TEXTAREA_PARENT,this.layerClass)}refreshValue(){let 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!==h9.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD){e||this.close();return}let{top:t,start:r,width:n,maxWidth:o,height:i,maxHeight:s}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${r}px`,this.showEditableElement();let a=this.hot.rootWindow.getComputedStyle(this.TD);this.TEXTAREA.style.fontSize=a.fontSize,this.TEXTAREA.style.fontFamily=a.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor,this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(n,o),minHeight:Math.min(i,s),maxWidth:o,maxHeight:s},!0)}bindEvents(){ra()&&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===h9.EDITING&&this.focus()}),this.addHook("afterRowResize",()=>{this.refreshDimensions(),this.state===h9.EDITING&&this.focus()})}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){let e=this.hot.getShortcutManager().getContext("editor"),t=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};e.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(t(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(t(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(t(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[r]=t;dK(r,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[r]=t;dK(r,this.TEXTAREA)}}],{runOnlyIf:()=>eq(this.hot.getSelected()),group:dQ})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(dQ)}}function dJ(e,t,r,n,o,i,s){let a=i;!a&&s.placeholder&&(a=s.placeholder),a=ej(a),s.trimWhitespace&&(a=a.trim()),rV(t,a)}dJ.RENDERER_TYPE="text";let d0={CELL_TYPE:"text",editor:dZ,renderer:dJ};function d1(e,t){let r=new dW(e,t||{},sr);return r.init(),r}ha(d0),oL(dG),d1.editors={BaseEditor:h7},d1.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new dW(e,t,sr)},d1.DefaultSettings=hu(),d1.hooks=nG.getSingleton(),d1.CellCoords=iC,d1.CellRange=iw,d1.packageName="handsontable",d1.buildDate="19/05/2026 08:00:12",d1.version="17.1.0-rc15",d1.languages={dictionaryKeys:S,getLanguageDictionary:lU,getLanguagesDictionaries:function(){return lB()},registerLanguageDictionary:lV,getTranslatedPhrase:lz},d1.themes={hasTheme:dH,getTheme:dL,getThemeNames:dP,getThemes:dD,registerTheme:dB};let d2="handsontableEditor";class d3 extends dZ{static get EDITOR_TYPE(){return"handsontable"}isFlippedVertically=!1;isFlippedHorizontally=!1;open(){super.open();let 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(),ne(this.TEXTAREA,0,this.TEXTAREA.value.length),this.htEditor.updateSettings({width:this.getTargetDropdownWidth(),height:this.getTargetDropdownHeight()}),this.refreshDimensions(),this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i);let s=this,a={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){let r=this.getSourceData(t.row,t.col);void 0!==r&&s.setValue(r),s.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&tL(a,i.handsontable),this.htOptions=a}beginEditing(e,t){let r=this.hot.getSettings().onBeginEditing;r&&!1===r()||super.beginEditing(e,t)}createElements(){super.createElements();let e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,r){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedActive()){let e=this.htEditor.getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,r)}flipDropdownVerticallyIfNeeded(){let{view:e}=this.hot,t=this.getEditedCellRect(),r=t.top;e.isVerticallyScrollableByWindow()&&(r=Math.max(r+(e.getTableOffset().top-this.hot.rootWindow.scrollY),0));let n=this.getDropdownHeight(),o=e.getWorkspaceHeight()-r-t.height,i=n>o&&r>o+t.height;return i?this.flipDropdownVertically():this.unflipDropdownVertically(),{isFlipped:i,spaceAbove:r,spaceBelow:o}}flipDropdownVertically(){let e=this.htEditor.rootElement.style;e.position="absolute",e.top=`${-this.getDropdownHeight()}px`,this.isFlippedVertically=!0}unflipDropdownVertically(){let e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.isFlippedVertically=!1}flipDropdownHorizontallyIfNeeded(){let{view:e}=this.hot,t=this.getEditedCellRect(),r=t.start+t.width;e.isHorizontallyScrollableByWindow()&&(r=Math.max(r+(e.getTableOffset().left-this.hot.rootWindow.scrollX),0));let n=this.getDropdownWidth(),o=e.getWorkspaceWidth()-r+t.width,i=n>o&&r>o;return i?this.flipDropdownHorizontally():this.unflipDropdownHorizontally(),{isFlipped:i,spaceInlineStart:r,spaceInlineEnd:o}}flipDropdownHorizontally(){let e=this.htEditor.rootElement.style,{width:t}=this.getEditedCellRect();e.position="absolute",e[this.hot.isRtl()?"right":"left"]=`${-(this.getDropdownWidth()-t)}px`,this.isFlippedHorizontally=!0}unflipDropdownHorizontally(){let e=this.htEditor.rootElement.style;e.position="absolute",e[this.hot.isRtl()?"right":"left"]="",this.isFlippedHorizontally=!1}getDropdownHeight(){return this.htEditor.getTableHeight()}getDropdownWidth(){return this.htEditor.getTableWidth()}getTargetDropdownWidth(){return this.htEditor.view.getTableWidth()}getTargetDropdownHeight(){return this.htEditor.view.getTableHeight()+1}assignHooks(){this.hot.addHook("afterDestroy",()=>{this.htEditor?.destroy()}),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}registerShortcuts(){let e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();let t=(e,t)=>{let r=this.htEditor;if(void 0!==e&&(e<0||this.isFlippedVertically&&e>r.countRows()-1?r.deselectCell():r.selectCell(e,0),r.getData().length))return t.preventDefault(),nk(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{let r,n=this.htEditor;return!n.getSelectedActive()&&this.isFlippedVertically?r=n.countRows()-1:n.getSelectedActive()&&(r=this.isFlippedVertically?Math.max(0,n.getSelectedActive()[0]-1):n.getSelectedActive()[0]-1),t(r,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{let r,n=this.htEditor;return n.getSelectedActive()||this.isFlippedVertically?n.getSelectedActive()&&(this.isFlippedVertically?r=n.getSelectedActive()[0]+1:this.isFlippedVertically||(r=Math.min(n.countRows()-1,n.getSelectedActive()[0]+1))):r=0,t(r,e)},preventDefault:!1}],{group:d2,relativeToGroup:hY,position:"before"})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(d2)}}class d6 extends d3{static get EDITOR_TYPE(){return"autocomplete"}query=null;strippedChoices=[];rawChoices=[];#tM=this.hot.guid.slice(0,9);getValue(){let e=this.rawChoices.find(e=>{let t=this.stripValueIfNeeded(e);return(tQ(t)?t.value:t)===this.TEXTAREA.value});return eq(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),rO(this.htContainer,"autocompleteEditor"),rO(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&rk(this.TEXTAREA,[["type","text"],["role","combobox"],tS("listbox"),["aria-autocomplete","list"]])}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i),this.hot.getSettings().ariaTags&&rk(this.TEXTAREA,[tA("false"),["aria-controls",`${this.#tM}-listbox-${e}-${t}`]]),this.htOptions={...this.htOptions,valueGetter:e=>tQ(e)?e.value:e}}open(){super.open();let e=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,r=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,n=r?.length,{row:o,col:i}=this;this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",e=>this.onBeforeKeyDown(e)),this.htEditor.addHook("afterScroll",this.#tN),this.htEditor.updateSettings({colWidths:e?[r0(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,renderer:(e,o,i,s,a,l,h)=>{let d,u;dJ(e,o,i,s,a,l,h);let{filteringCaseSensitive:c,allowHtml:g,locale:p}=this.cellProperties,m=this.query,f=ej(l);f&&!g&&-1!==(d=!0===c?f.indexOf(m):f.toLocaleLowerCase(p).indexOf(m.toLocaleLowerCase(p)))&&(u=f.substr(d,m.length),f=f.replace(u,`<strong>${u}</strong>`)),t&&rk(o,[["role","option"],...r?[["aria-setsize",n]]:[],...r?[["aria-posinset",r.indexOf(l)+1]]:[],["id",`${this.htEditor.rootElement.id}_${i}-${s}`]]),o.innerHTML=f},afterSelectionEnd:(e,r)=>{if(t){let t=e=>{rk(e,[tx()]),rk(this.TEXTAREA,"aria-activedescendant",e.id)},n=this.htEditor.getCell(e,r,!0);null!==n?t(n):this.htEditor.addHookOnce("afterScrollVertically",()=>{t(this.htEditor.getCell(e,r,!0))})}}}),t&&(rk(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...tl()),rk(this.htEditor.rootElement,[tm(),["aria-live","polite"],["aria-relevant","text"],["id",`${this.#tM}-listbox-${o}-${i}`]]),rk(this.TEXTAREA,...tA("true"))),this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)})}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&rk(this.TEXTAREA,[tA("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){let 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){let t=r5(this.TEXTAREA),r=r9(this.TEXTAREA),n=this.cellProperties.sortByRelevance,o=this.cellProperties.filter,i=this.stripValueIfNeeded(this.getValue()),s=tQ(i)?i.value:i,a=null,l=e;n||(l=l.toSorted());let h=[],d=this.cellProperties.locale,u=this.cellProperties.filteringCaseSensitive,c=u?s:s.toLocaleLowerCase(d);for(let e=0;e<l.length;e++){let t=tQ(l[e])?to(ej(l[e].value)):to(ej(l[e]));if(-1!==(u?t:t.toLocaleLowerCase(d)).indexOf(c)&&(h.push(e),!1===o))break}!1===o?i.length>0&&(a=h[0]):a=(l=h.map(e=>l[e])).indexOf(c)>-1?l.indexOf(c):0,this.strippedChoices=l,0===l.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData(ex([l])),l.length>0&&(this.updateDropdownDimensions(),this.flipDropdownVerticallyIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a)),this.hot.listen(),ne(this.TEXTAREA,t,t===r?void 0:r)}flipDropdownVerticallyIfNeeded(){let e=super.flipDropdownVerticallyIfNeeded(),{isFlipped:t,spaceAbove:r,spaceBelow:n}=e;return this.limitDropdownIfNeeded(t?r:n),e}limitDropdownIfNeeded(e){let t=this.getDropdownHeight();if(t>e){let r=0,n=0,o=null;do r+=n=this.htEditor.stylesHandler.getDefaultRowHeight();while(r<e);o=r-n,this.isFlippedVertically&&(this.htEditor.rootElement.style.top=`${parseInt(this.htEditor.rootElement.style.top,10)+t-o}px`),this.setDropdownHeight(r-n)}}updateDropdownDimensions(){let e=nt(),t=this.getTargetEditorWidth()+e,r=this.getTargetEditorHeight()+e;this.htEditor.updateSettings({width:t,height:r}),this.#tI(),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e}),this.#tI(),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()}getTargetEditorHeight(){let e=0;if(!this.hot.getCurrentThemeName()){let t=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore"));e=parseInt(t.borderTopWidth,10)+parseInt(t.borderBottomWidth,10)}return Array.from({length:Math.min(this.cellProperties.visibleRows,this.strippedChoices.length)},(e,t)=>t).reduce((e,t)=>e+(this.hot.stylesHandler.getDefaultRowHeight()+ +(0===t)),0)+e}getTargetEditorWidth(){let e=0;if(!this.hot.getCurrentThemeName()){let t=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore"));e=parseInt(t.borderInlineStartWidth,10)+parseInt(t.borderInlineEndWidth,10)}return this.htEditor.getColWidth(0)+e}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){let{allowHtml:t}=this.cellProperties,r=e=>ej(t?e:to(e));return e.every(e=>tQ(e))?e.map(e=>({key:r(e.key),value:r(e.value)})):e.map(e=>r(e))}#tN=nw(()=>{this.focus()},100);#tI(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getTargetEditorWidth()+nr(this.hot.rootDocument)})}onBeforeKeyDown(e){if(nN(e.keyCode)||e.keyCode===nA.BACKSPACE||e.keyCode===nA.DELETE||e.keyCode===nA.INSERT){let t=10;e.keyCode===nA.C&&(e.ctrlKey||e.metaKey)||(this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)},t))}}}class d4 extends h7{static get EDITOR_TYPE(){return"checkbox"}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===t.target.nodeName){let e=this.TD.querySelector('input[type="checkbox"]');rx(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}var d5=r(7539),d9=r.n(d5);let d7=()=>window.document,d8=function(e,t,r,n){e.addEventListener(t,r,!!n)},ue=function(e,t,r,n){e.removeEventListener(t,r,!!n)},ut=function(e,t){return -1!==(" "+e.className+" ").indexOf(" "+t+" ")},ur=function(e,t){ut(e,t)||(e.className=""===e.className?t:e.className+" "+t)},un=function(e,t){var r;e.className=(r=(" "+e.className+" ").replace(" "+t+" "," ")).trim?r.trim():r.replace(/^\s+|\s+$/g,"")},uo=function(e){return/Array/.test(Object.prototype.toString.call(e))},ui=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},us=function(e){let t=e.getDay();return 0===t||6===t},ua=function(e,t){return[31,e%4==0&&e%100!=0||e%400==0?29:28,31,30,31,30,31,31,30,31,30,31][t]},ul=function(e){ui(e)&&e.setHours(0,0,0,0)},uh=function(e,t){return e.getTime()===t.getTime()},ud=function(e,t,r){let n,o;for(n in t)(o=void 0!==e[n])&&"object"==typeof t[n]&&null!==t[n]&&void 0===t[n].nodeName?ui(t[n])?r&&(e[n]=new Date(t[n].getTime())):uo(t[n])?r&&(e[n]=t[n].slice(0)):e[n]=ud({},t[n],r):(r||!o)&&(e[n]=t[n]);return e},uu=function(e,t,r){let n=d7().createEvent("HTMLEvents");n.initEvent(t,!0,!1),n=ud(n,r),e.dispatchEvent(n)},uc=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},ug={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},up=function(e,t,r){for(t+=e.firstDay;t>=7;)t-=7;return r?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},um=function(e){let t=[],r="false";if(e.isEmpty)if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';else 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"),r="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="'+r+'"><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>"},uf=function(e,t){e.setHours(0,0,0,0);let r=e.getDate(),n=e.getDay(),o=t-1,i=function(e){return(e+7-1)%7};e.setDate(r+o-i(n));let s=new Date(e.getFullYear(),0,t);return 1+Math.round(((e.getTime()-s.getTime())/864e5-o+i(s.getDay()))/7)},uy=function(e,t,r,n,o){let i=new Date(n,r,t);return'<td class="pika-week">'+(e.hasMoment?e.moment(i).isoWeek():uf(i,o))+"</td>"},ub=function(e){let t,r=[];for(e.showWeekNumber&&r.push("<th></th>"),t=0;t<7;t++)r.push('<th scope="col"><abbr title="'+up(e,t)+'">'+up(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?r.reverse():r).join("")+"</tr></thead>"},uC=function(e,t,r,n,o,i){let s,a,l,h=e._o,d=r===h.minYear,u=r===h.maxYear,c='<div id="'+i+'" class="pika-title" role="heading" aria-live="polite">',g,p,m=!0,f=!0;for(l=[],s=0;s<12;s++)l.push('<option value="'+(r===o?s-t:12+s-t)+'"'+(s===n?' selected="selected"':"")+(d&&s<h.minMonth||u&&s>h.maxMonth?' disabled="disabled"':"")+">"+h.i18n.months[s]+"</option>");for(g='<div class="pika-label">'+h.i18n.months[n]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",uo(h.yearRange)?(s=h.yearRange[0],a=h.yearRange[1]+1):(s=r-h.yearRange,a=1+r+h.yearRange),l=[];s<a&&s<=h.maxYear;s++)s>=h.minYear&&l.push('<option value="'+s+'"'+(s===r?' selected="selected"':"")+">"+s+"</option>");return p='<div class="pika-label">'+r+h.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",h.showMonthAfterYear?c+=p+g:c+=g+p,d&&(0===n||h.minMonth>=n)&&(m=!1),u&&(11===n||h.maxMonth<=n)&&(f=!1),0===t&&(c+='<button class="pika-prev'+(m?"":" is-disabled")+'" type="button">'+h.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(c+='<button class="pika-next'+(f?"":" is-disabled")+'" type="button">'+h.i18n.nextMonth+"</button>"),c+"</div>"};function uw(e){let t=this,r=t.config(e);t._onMouseDown=function(e){if(!t._v)return;let n=(e=e||window.event).target||e.srcElement;if(n){if(!ut(n,"is-disabled"))if(!ut(n,"pika-button")||ut(n,"is-empty")||ut(n.parentNode,"is-disabled"))ut(n,"pika-prev")?t.prevMonth():ut(n,"pika-next")&&t.nextMonth();else t.setDate(new Date(n.getAttribute("data-pika-year"),n.getAttribute("data-pika-month"),n.getAttribute("data-pika-day"))),r.bound&&window.setTimeout(function(){t.hide(),r.blurFieldOnSelect&&r.field&&r.field.blur()},100);if(ut(n,"pika-select"))t._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},t._onChange=function(e){let r=(e=e||window.event).target||e.srcElement;r&&(ut(r,"pika-select-month")?t.gotoMonth(r.value):ut(r,"pika-select-year")&&t.gotoYear(r.value))},t._onKeyChange=function(e){if(e=e||window.event,t.isVisible())switch(e.keyCode){case 13:case 27:r.field&&r.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(r.parse)return r.parse(r.field.value,r.format);if(!this.hasMoment)return new Date(Date.parse(r.field.value));{let e=this.moment(r.field.value,r.format,r.formatStrict);return e&&e.isValid()?e.toDate():null}},t._onInputChange=function(e){let r;e.firedBy!==t&&(ui(r=t._parseFieldValue())&&t.setDate(r),t._v||t.show())},t._onInputFocus=function(){t.show()},t._onInputClick=function(){t.show()},t._onInputBlur=function(){let e=d7().activeElement;do if(ut(e,"pika-single"))return;while(e=e.parentNode);t._c||(t._b=window.setTimeout(function(){t.hide()},50)),t._c=!1},t._onClick=function(e){let n=(e=e||window.event).target||e.srcElement,o=n;if(n){!hasEventListeners&&ut(n,"pika-select")&&!n.onchange&&(n.setAttribute("onchange","return;"),d8(n,"change",t._onChange));do if(ut(o,"pika-single")||o===r.trigger)return;while(o=o.parentNode);t._v&&n!==r.trigger&&o!==r.trigger&&t.hide()}},t.el=d7().createElement("div"),t.el.className="pika-single"+(r.isRTL?" is-rtl":"")+(r.theme?" "+r.theme:""),d8(t.el,"mousedown",t._onMouseDown,!0),d8(t.el,"touchend",t._onMouseDown,!0),d8(t.el,"change",t._onChange),r.keyboardInput&&d8(d7(),"keydown",t._onKeyChange),r.field&&(r.container?r.container.appendChild(t.el):r.bound?d7().body.appendChild(t.el):r.field.parentNode.insertBefore(t.el,r.field.nextSibling),d8(r.field,"change",t._onInputChange),r.defaultDate||(r.defaultDate=t._parseFieldValue(),r.setDefaultDate=!0));let n=r.defaultDate;ui(n)?r.setDefaultDate?t.setDate(n,!0):t.gotoDate(n):t.gotoDate(new Date),r.bound?(this.hide(),t.el.className+=" is-bound",d8(r.trigger,"click",t._onInputClick),d8(r.trigger,"focus",t._onInputFocus),d8(r.trigger,"blur",t._onInputBlur)):this.show()}uw.prototype={config:function(e){this._o||(this._o=ud({},ug,!0));let t=ud(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 r=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=r>4?4:r,ui(t.minDate)||(t.minDate=!1),ui(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),uo(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))||ug.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(e){return(e=e||this._o.format,ui(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 ui(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="",uu(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),!ui(e))return;let r=this._o.minDate,n=this._o.maxDate;ui(r)&&e<r?e=r:ui(n)&&e>n&&(e=n),this._d=new Date(e.getTime()),ul(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),uu(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(ui(e)){if(this.calendars){let r=new Date(this.calendars[0].year,this.calendars[0].month,1),n=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),o=e.getTime();n.setMonth(n.getMonth()+1),n.setDate(n.getDate()-1),t=o<r.getTime()||n.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 r,n=this.getDate()||new Date,o=24*parseInt(t)*36e5;"add"===e?r=new Date(n.valueOf()+o):"subtract"===e&&(r=new Date(n.valueOf()-o)),this.setDate(r)},adjustCalendars:function(){this.calendars[0]=uc(this.calendars[0]);for(let e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=uc({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?(ul(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=ug.minDate,this._o.minYear=ug.minYear,this._o.minMonth=ug.minMonth,this._o.startRange=ug.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(ul(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=ug.maxDate,this._o.maxYear=ug.maxYear,this._o.maxMonth=ug.maxMonth,this._o.endRange=ug.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=this._o,r=t.minYear,n=t.maxYear,o=t.minMonth,i=t.maxMonth,s="",a;this._y<=r&&(this._y=r,!isNaN(o)&&this._m<o&&(this._m=o)),this._y>=n&&(this._y=n,!isNaN(i)&&this._m>i&&(this._m=i));for(let e=0;e<t.numberOfMonths;e++)a="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),s+='<div class="pika-lendar">'+uC(this,e,this.calendars[e].year,this.calendars[e].month,this.calendars[0].year,a)+this.render(this.calendars[e].year,this.calendars[e].month,a)+"</div>";this.el.innerHTML=s,t.bound&&"hidden"!==t.field.type&&window.setTimeout(function(){t.trigger.focus()},1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),t.bound&&t.field.setAttribute("aria-label",t.ariaLabel)},adjustPosition:function(){let e,t,r,n,o,i,s,a,l,h,d;this._o.container||(this.el.style.position="absolute",e=this._o.trigger,t=this.el.offsetWidth,r=this.el.offsetHeight,n=window.innerWidth||d7().documentElement.clientWidth,o=window.innerHeight||d7().documentElement.clientHeight,i=d7().body.scrollTop||d7().documentElement.scrollTop,h=!0,d=!0,s=(l=e.getBoundingClientRect()).left+window.pageXOffset,a=l.bottom+window.pageYOffset,(this._o.reposition&&s+t>n||this._o.position.indexOf("right")>-1&&s-t+e.offsetWidth>0)&&(s=s-t+e.offsetWidth,h=!1),(this._o.reposition&&a+r>o+i||this._o.position.indexOf("top")>-1&&a-r-e.offsetHeight>0)&&(a=a-r-e.offsetHeight,d=!1),s<0&&(s=0),a<0&&(a=0),this.el.style.left=s+"px",this.el.style.top=a+"px",ur(this.el,h?"left-aligned":"right-aligned"),ur(this.el,d?"bottom-aligned":"top-aligned"),un(this.el,h?"right-aligned":"left-aligned"),un(this.el,d?"top-aligned":"bottom-aligned"))},render:function(e,t,r){var n,o,i,s;let a=this._o,l=new Date,h=ua(e,t),d=new Date(e,t,1).getDay(),u=[],c=[];ul(l),a.firstDay>0&&(d-=a.firstDay)<0&&(d+=7);let g=0===t?11:t-1,p=11===t?0:t+1,m=0===t?e-1:e,f=11===t?e+1:e,y=ua(m,g),b=h+d,C=b;for(;C>7;)C-=7;b+=7-C;let w=!1;for(let r=0,i=0;r<b;r++){let s=new Date(e,t,1+(r-d)),b=!!ui(this._d)&&uh(s,this._d),C=uh(s,l),S=-1!==a.events.indexOf(s.toDateString()),R=r<d||r>=h+d,E=1+(r-d),T=t,A=e,M=a.startRange&&uh(a.startRange,s),N=a.endRange&&uh(a.endRange,s),I=a.startRange&&a.endRange&&a.startRange<s&&s<a.endRange,x=a.minDate&&s<a.minDate||a.maxDate&&s>a.maxDate||a.disableWeekends&&us(s)||a.disableDayFn&&a.disableDayFn(s);R&&(r<d?(E=y+E,T=g,A=m):(E-=h,T=p,A=f));let O={day:E,month:T,year:A,hasEvent:S,isSelected:b,isToday:C,isDisabled:x,isEmpty:R,isStartRange:M,isEndRange:N,isInRange:I,showDaysInNextAndPreviousMonths:a.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:a.enableSelectionDaysInNextAndPreviousMonths};if(a.pickWholeWeek&&b&&(w=!0),c.push(um(O)),7==++i){a.showWeekNumber&&c.unshift(uy(this,r-d,t,e,a.firstWeekOfYearMinDays)),u.push((n=c,o=a.isRTL,'<tr class="pika-row'+(a.pickWholeWeek?" pick-whole-week":"")+(w?" is-selected":"")+'">'+(o?n.reverse():n).join("")+"</tr>")),c=[],i=0,w=!1}}return i=a,s=u,'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+r+'">'+ub(i)+"<tbody>"+s.join("")+"</tbody></table>"},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),un(this.el,"is-hidden"),this._o.bound&&(d8(d7(),"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&&ue(d7(),"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),ur(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(),ue(this.el,"mousedown",this._onMouseDown,!0),ue(this.el,"touchend",this._onMouseDown,!0),ue(this.el,"change",this._onChange),e.keyboardInput&&ue(d7(),"keydown",this._onKeyChange),e.field&&(ue(e.field,"change",this._onInputChange),e.bound&&(ue(e.trigger,"click",this._onInputClick),ue(e.trigger,"focus",this._onInputFocus),ue(e.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}};let uS="date",uv="dateEditor",uR=new WeakSet;class uE extends dZ{static get EDITOR_TYPE(){return uS}parentDestroyed=!1;$datePicker=null;init(){"function"!=typeof d9()&&t_("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||this.close()})}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"),rO(this.datePicker,"htDatepickerHolder"),this.hot.rootPortalElement.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",e=>{rx(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()})}destroyElements(){let e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;uR.has(this.cellProperties.instance)||(uR.add(this.cellProperties.instance),rp("The Pikaday-based `date` editor is deprecated and will be removed in the next major release, replaced by the native HTML date input.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`date` cell type documentation: https://handsontable.com/docs/date-cell-type/"));let 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:uv})}close(){this.$datePicker?.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout(()=>{let e=this.hot._getEditorManager();e.closeEditor(),this.hot.view.render(),e.prepareEditor()}),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(uv),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){let t,r=this.#tx(),n=this.hot.view.isMouseDown(),o=!!e&&nI(e.keyCode);this.datePicker.style.display="block",this.$datePicker=new uw(this.getDatePickerConfig()),"function"==typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(d9()),this.$datePicker._onInputFocus=function(){},this.originalValue?(t=this.originalValue,d9()(t,r,!0).isValid()&&this.$datePicker.setMoment(d9()(t,r),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),o||n||this.setValue("")):this.cellProperties.defaultDate?(t=this.cellProperties.defaultDate,d9()(t,r,!0).isValid()&&this.$datePicker.setMoment(d9()(t,r),!0),o||n||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){let e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&tP(t,this.cellProperties.datePickerConfig);let r=t.onSelect,n=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.keyboardInput=!1,t.format=t.format??this.#tx(),t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=d9()(t).format(this.#tx())),this.setValue(t),r&&r(),rs()&&this.hideDatepicker()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),n&&n()},t}refreshDimensions(e){if(super.refreshDimensions(e),this.state!==h9.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.hideDatepicker();let{rowIndexMapper:t,columnIndexMapper:r}=this.hot,{wtOverlays:n}=this.hot.view._wt,{wtTable:o}=n.getParentOverlay(this.TD)??this.hot.view._wt,i=t.getVisualFromRenderableIndex(o.getFirstPartiallyVisibleRow()),s=t.getVisualFromRenderableIndex(o.getLastPartiallyVisibleRow()),a=r.getVisualFromRenderableIndex(o.getFirstPartiallyVisibleColumn()),l=r.getVisualFromRenderableIndex(o.getLastPartiallyVisibleColumn());if(this.row>=i&&this.row<=s&&this.col>=a&&this.col<=l){let e,t=this.TD.getBoundingClientRect(),r=r0(this.datePicker),n=r1(this.datePicker),o=r1(this.TD),i=this.hot.rootWindow,s=this.hot.rootDocument.documentElement,a=i.pageYOffset,l=i.pageYOffset+s.clientHeight,h=i.pageXOffset,d=i.pageXOffset+s.clientWidth,u=a+t.top+o;if(u+n>l){let e=a+t.top-n;u=e>=a?Math.max(a,e-1):l-n}this.datePickerStyle.top=`${u}px`;let c=h+t.left,g=h+t.right;this.hot.isRtl()?(e=g-r)<h&&(e=Math.min(c,d-r)):(e=c)+r>d&&(e=Math.max(g-r,h)),e=og(e,h,d-r),this.datePickerStyle.left=`${e}px`}else this.hideDatepicker()}#tx(){return this.cellProperties.dateFormat??"DD/MM/YYYY"}}class uT extends d6{static get EDITOR_TYPE(){return"dropdown"}prepare(e,t,r,n,o,i){i.filter=!1,i.strict=!0,super.prepare(e,t,r,n,o,i)}finishEditing(e,t,r){if(this.isOpened()){let t=this.hot.getSelectedRangeActive();(eK(t)||eq(t)&&!t.includes(this.hot._createCellCoords(this.row,this.col)))&&(e=!0)}super.finishEditing(e,t,r)}}let uA=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;function uM(e){let t=new Date(e);return isNaN(new Date(`${e}T00:00`).getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}function uN(e){if(eX(e))return null;if("string"==typeof e&&uA.test(e)){let[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)}return null}function uI(e){if("string"!=typeof e||!uA.test(e))return!1;let t=new Date(e);return!Number.isNaN(t.getTime())&&e===t.toISOString().slice(0,10)}let ux=/^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?$/;function uO(e){if(eX(e)||"string"!=typeof e)return null;let t=ux.exec(e);if(!t)return null;let r=Number(t[1]),n=Number(t[2]),o=void 0!==t[3]?Number(t[3]):0,i=t[4];return new Date(1970,0,1,r,n,o,void 0!==i?Number(i.padEnd(3,"0").slice(0,3)):0)}function u_(e){return"string"==typeof e&&ux.test(e)}class uk extends dZ{static get EDITOR_TYPE(){return"intl-date"}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}createElements(){super.createElements("input"),this.TEXTAREA.setAttribute("type","date")}setValue(e){(eX(e)&&(e=this.cellProperties.defaultDate),uI(e))?super.setValue(e):rg(e$`IntlDateEditor: value must be in ISO date format ("YYYY-MM-DD")\x20
|
|
197
197
|
required by the native date input. Received:`,e)}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}class uH extends dZ{static get EDITOR_TYPE(){return"intl-time"}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}createElements(){super.createElements("input"),this.TEXTAREA.setAttribute("type","time")}setValue(e){u_(e)?super.setValue(e):rg(e$`IntlTimeEditor: value must be in 24-hour time format ("HH:mm", "HH:mm:ss" or "HH:mm:ss.SSS")\x20
|
|
198
198
|
required by the native time input. Received:`,e)}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}class uL extends dZ{static get EDITOR_TYPE(){return"numeric"}}class uP extends dZ{autoResize=dq(this.hot.rootDocument,{textContent:e=>"•".repeat(e.value.length)});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,rP(this.TEXTAREA_PARENT),this.TEXTAREA.setAttribute(...ta(-1)),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}let uD="ht_editor_visible",uF="selectEditor";class uB extends h7{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";let e=this.hot.rootDocument.createElement("DIV"),t=this.hot.getSettings().ariaTags;e.className="htAutocompleteArrow",t&&e.setAttribute(...tC()),e.appendChild(this.hot.rootDocument.createTextNode(String.fromCharCode(9660))),rO(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",rx(this.selectWrapper,uD)&&r_(this.selectWrapper,uD),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,r,n,o,i){let s;super.prepare(e,t,r,n,o,i);let a=this.cellProperties.selectOptions;s="function"==typeof a?this.prepareOptions(a(this.row,this.col,this.prop)):this.prepareOptions(a),rP(this.select),tW(s,(e,t)=>{let r=this.hot.rootDocument.createElement("OPTION");r.value=t,rB(r,e,this.hot.getSettings().sanitizer),this.select.appendChild(r)})}prepareOptions(e){let t={};if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)t[e[r]]=e[r];else"object"==typeof e&&(t=e);return t}refreshValue(){let e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==h9.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();let{top:e,start:t,width:r,height:n}=this.getEditedCellRect(),o=this.selectWrapper.style;o.height=`${n}px`,o.width=`${r}px`,o.top=`${e}px`,o[this.hot.isRtl()?"right":"left"]=`${t}px`,o.margin="0px",rO(this.selectWrapper,uD)}registerShortcuts(){let e=this.hot.getShortcutManager().getContext("editor");this.isInFullEditMode()&&e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{let e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{let e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],{group:uF})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(uF)}}class uV extends dZ{static get EDITOR_TYPE(){return"time"}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i),this.TEXTAREA.dir="ltr"}}function uU(e){return e.querySelector('input[type="checkbox"]')}function uz(e,t){return tQ(t)?Array.isArray(e)&&e.some(e=>tQ(e)?tV(e,t):e===t):e.includes(t)}class uW{constructor({input:e,eventManager:t}){this.input=e,this.eventManager=t,this.enabled=!0,this.onInput=this.onInput.bind(this)}getInputElement(){return this.input}setValue(e){this.input.value=e}toggle(e){this.enabled=e,this.input&&(e?this.listen():this.unlisten())}listen(){this.eventManager.addEventListener(this.input,"input",this.onInput)}unlisten(){this.eventManager.removeEventListener(this.input,"input",this.onInput)}onInput(){this.#tO(this.input.value)}#tO(e){this.runLocalHooks("triggerFilter",e)}}tB(uW,sy);let uG="ht-multi-select-editor",u$=`${uG}-search-input-wrapper`,uY=`${uG}-search-icon`,uj=`${uG}-search-input`,uq=`${uG}-separator`,uK=`${uG}-item-`,uX=`${uG}-item-selected`;function uQ(e){let t=uU(e);rO(e,uX),t.checked||(t.checked=!0)}function uZ(e){let t=uU(e);r_(e,uX),t.checked&&(t.checked=!1)}function uJ(e){let{dropdownListElement:t,index:r}=e,n=t.children[r];if(n){let e=uU(n);e&&e.blur()}}class u0{#t_=null;#tk=null;#tH=null;#tL=null;#tP=null;#tD=null;#tF=null;#ts=null;#u=new n4(this);#tB={visibleRowsNumber:null,entriesCount:0,flippedVertically:!1,currentlySelectedItemIndex:0,checkboxChangeListeners:new Map,areCheckboxesDisabled:!1,sourceSortFunction:null};constructor(e,t){this.#tk=e,this.#ts=this.#tk.ownerDocument,this.#t_=t,this.init()}init(){this.#tH=function(e){let{root:t}=e;return t.createElement("ul")}({root:this.#ts}),this.#tL=function(e){let{root:t}=e,r=t.createElement("input");return rk(r,[tb("Search options"),["type","text"],["size",3],["placeholder","Search..."],["id",uj]]),rO(r,uj),r}({root:this.#ts});let e=function(e){let{root:t}=e,r=t.createElement("div");return rO(r,uY),rk(r,[tC()]),r}({root:this.#ts});this.#tD=function(e){let{root:t}=e,r=t.createElement("div");return r.className=u$,r}({root:this.#ts}),this.#tP=function(e){let{root:t}=e,r=t.createElement("div");return r.className=uq,r}({root:this.#ts}),this.#tD.appendChild(e),this.#tD.appendChild(this.#tL),this.#tk.appendChild(this.#tD),this.#tk.appendChild(this.#tP),this.#tk.appendChild(this.#tH),this.#tF=new uW({input:this.#tL,eventManager:this.#u})}setVisibleRowsNumberSetting(e){this.#tB.visibleRowsNumberSetting=e}setSourceSortFunction(e){this.#tB.sourceSortFunction=e??null}setSearchInputVisibility(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.#tD.style.display=e?"":"none",this.#tP.style.display=e?"":"none",this.#tF.toggle(e)}fillDropdown(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.removeAllDropdownItems(),this.#tB.currentlySelectedItemIndex=0,Array.isArray(t)||(t=[]),this.#tB.sourceSortFunction&&(e=this.#tB.sourceSortFunction(e)),e.forEach((e,r)=>{this.#tV({rootDocument:this.#ts,itemKey:e?.key,itemValue:e?.value??e,indexWithinList:r,checked:uz(t,e),disabled:this.#tB.areCheckboxesDisabled})}),this.#tB.entriesCount=e.length,this.runLocalHooks("afterDropdownFill")}updateDimensions(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.#tU(),n=this.#tz(e),o=n?e.spaceAbove:e.spaceBelow;if(!t&&n&&(this.#tB.flippedVertically=!0),this.#tB.entriesCount>0&&o<this.getHeight(!0)){let e=Math.max(Math.floor((o-this.#tW())/r)-1,1);this.#tB.actualRenderedItemsCount=this.#tB.visibleRowsNumberSetting?Math.min(e,this.#tB.visibleRowsNumberSetting):e}else this.#tB.actualRenderedItemsCount=Math.min(this.#tB.entriesCount,this.#tB.visibleRowsNumberSetting);this.#tB.actualRenderedItemsCount&&this.#tB.entriesCount>this.#tB.actualRenderedItemsCount?this.#tk.style.height=`${this.getHeight()}px`:this.#tk.style.height="",this.#tG(e),this.#tk.scrollTop=0}getDropdownWidth(){return function(e){let{dropdownListElement:t}=e;return t.offsetWidth}({dropdownListElement:this.#tH})}deselectAllItems(){!function(e){let{dropdownListElement:t}=e;t.querySelectorAll(`.${uX}`).forEach(e=>uZ(e))}({dropdownListElement:this.#tH})}focusFirstItem(){this.#tB.entriesCount>0&&this.#t$(0)}focusItem(e){this.#t$(e)}focusPreviousItem(){0===this.#tB.currentlySelectedItemIndex?this.focusSearchInput():(uJ({dropdownListElement:this.#tH,index:this.#tB.currentlySelectedItemIndex}),this.#t$(this.#tB.currentlySelectedItemIndex-1))}focusNextItem(){this.#tB.currentlySelectedItemIndex!==this.#tB.entriesCount-1&&(uJ({dropdownListElement:this.#tH,index:this.#tB.currentlySelectedItemIndex}),this.#t$(this.#tB.currentlySelectedItemIndex+1))}focusSearchInput(){this.#tL&&this.#tL.focus()}reset(){this.removeAllDropdownItems(),this.#tY(),this.#tL&&(this.#tL.value=""),this.#tk.style.position="",this.#tk.style.top="",this.#tk.style.height="",this.#tk.scrollTop=0}isFlippedVertically(){return this.#tB.flippedVertically}getHeight(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.#ts.defaultView.getComputedStyle(this.#tk);return this.#tj(e)+this.#tW()+(!0===t?2*parseInt(r.getPropertyValue("--ht-menu-vertical-padding"),10):0)}getInputController(){return this.#tF}removeAllDropdownItems(){Array.from(this.#tH.children).forEach(e=>this.#tq(e)),this.#tB.checkboxChangeListeners.clear(),this.#tH.innerHTML=""}disableCheckboxes(){this.#tB.areCheckboxesDisabled=!0,function(e){let{dropdownListElement:t}=e;t.querySelectorAll('input[type="checkbox"]:not(:checked)').forEach(e=>{e.dataset.disabled=!0})}({dropdownListElement:this.#tH})}enableCheckboxes(){this.#tB.areCheckboxesDisabled=!1,function(e){let{dropdownListElement:t}=e;t.querySelectorAll('input[type="checkbox"]').forEach(e=>{e.dataset.disabled=!1})}({dropdownListElement:this.#tH})}#t$(e){this.#tB.currentlySelectedItemIndex=e,function(e){let{dropdownListElement:t,index:r}=e,n=t.children[r];if(n){let e=uU(n);e&&e.focus()}}({dropdownListElement:this.#tH,index:e})}#tz(e){let{spaceAbove:t,spaceBelow:r,cellHeight:n}=e;return this.getHeight(!0)>r&&t>r+n}#tG(e){let{cellHeight:t}=e;this.#tB.flippedVertically?(this.#tk.style.position="absolute",this.#tk.style.top=`${-this.getHeight(!1,!0)-t-2}px`):(this.#tk.style.position="",this.#tk.style.top="")}#tU(){let e=this.#ts.defaultView.getComputedStyle(this.#tk);return 2*parseInt(e.getPropertyValue("--ht-menu-item-vertical-padding"),10)+parseInt(e.getPropertyValue("--ht-line-height"),10)}#tj(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.#tB.entriesCount;return(e?t:this.#tB.actualRenderedItemsCount??t)*this.#tU()}#tW(){if(!this.#tF.enabled)return 0;let e=this.#ts.defaultView.getComputedStyle(this.#tk);return this.#tD.offsetHeight+(this.#tP.offsetHeight+2*parseInt(e.getPropertyValue("--ht-menu-vertical-padding"),10))}#tV(e){let{rootDocument:t,itemKey:r,itemValue:n,indexWithinList:o,checked:i=!1,disabled:s=!1}=e,a=function(e){let{rootDocument:t,instanceId:r,itemKey:n,itemValue:o,indexWithinList:i,checked:s=!1,disabled:a=!1}=e,l=t.createElement("li"),h=t.createElement("div"),d=t.createElement("input"),u=t.createElement("label");return d.id=`${r}-${uK}${i}`,d.type="checkbox",d.dataset.value=o,d.dataset.index=i,d.dataset.disabled=!s&&a,n&&(d.dataset.key=n),u.htmlFor=d.id,u.textContent=o,h.appendChild(d),h.appendChild(u),l.appendChild(h),l}({rootDocument:t,instanceId:this.#t_,itemKey:r,itemValue:n,indexWithinList:o,checked:i,disabled:s});i&&uQ(a),this.#tK(a),this.#tH.appendChild(a)}#tK(e){let t=uU(e),r=()=>{if("true"===t.dataset.disabled&&t.checked){t.checked=!1;return}t.checked?(uQ(e),this.runLocalHooks("afterDropdownItemChecked",t.dataset.key,t.dataset.value)):(uZ(e),this.runLocalHooks("afterDropdownItemUnchecked",t.dataset.key,t.dataset.value))},n=e=>{e.target!==t&&"true"!==t.dataset.disabled&&"LABEL"!==e.target.tagName&&(t.checked=!t.checked,t.dispatchEvent(new Event("change")))};this.#tB.checkboxChangeListeners.set(t,{change:r,click:n}),this.#u.addEventListener(t,"change",r),this.#u.addEventListener(e,"click",n)}#tq(e){let t=uU(e),r=this.#tB.checkboxChangeListeners.get(t);this.#u.removeEventListener(t,"change",r.change),this.#u.removeEventListener(e,"click",r.click),this.#tB.checkboxChangeListeners.delete(t)}#tY(){this.#tB.visibleRowsNumberSetting=null,this.#tB.entriesCount=0,this.#tB.flippedVertically=!1,this.#tB.currentlySelectedItemIndex=0,this.#tB.checkboxChangeListeners.clear(),this.#tB.areCheckboxesDisabled=!1,this.#tB.sourceSortFunction=null}}tB(u0,sy);class u1{selectedItems=this.selectedItems??new Set;maxSelectionsCount=1/0;constructor(e){Array.isArray(e)?this.selectedItems=new Set(e):this.selectedItems=new Set}setMaxSelectionCount(e){this.maxSelectionsCount=e}add(e){this.selectedItems.size>=this.maxSelectionsCount||(Array.isArray(e)?e.forEach(e=>this.selectedItems.add(e)):this.selectedItems.add(e))}remove(e){if(!tQ(e))return this.selectedItems.delete(e);{let t=Array.from(this.selectedItems).find(t=>tV(t,e));if(void 0!==t)return this.selectedItems.delete(t),!0}return!1}has(e){return uz(this.getItemsArray(),e)}clear(){this.selectedItems.clear()}getSize(){return this.selectedItems.size}getItemsArray(){return Array.from(this.selectedItems)}}let u2="multiselect",u3="multiselectEditor";class u6 extends h7{_closeAfterDataChange=!1;#tX=new u1;#tQ=null;dropdownContainerElement=null;dropdownController=this.dropdownController??null;static get EDITOR_TYPE(){return u2}constructor(e){super(e),this.eventManager=new n4(this),this.createElements(),this.bindEvents()}createElements(){let{rootDocument:e}=this.hot;this.#tQ=e.createElement("div"),this.#tQ.style.display="none",rO(this.#tQ,"handsontableEditor"),this.dropdownContainerElement=this.hot.rootDocument.createElement("div"),rO(this.dropdownContainerElement,"ht-multi-select-editor handsontableEditor"),rk(this.dropdownContainerElement,[tb("Select options"),["role","group"]]),this.#tQ.appendChild(this.dropdownContainerElement),this.hot.rootElement.appendChild(this.#tQ),this.dropdownController=new u0(this.dropdownContainerElement,this.hot.guid)}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i);let s=tt(o)?JSON.parse(o):o,a=eU(Array.isArray(s)?s:[s],this.#tZ(),(e,t)=>JSON.stringify(e)===JSON.stringify(t));this.dropdownController.reset(),a.length>=this.#tJ("maxSelections")&&this.#t0(),this.#t1(a),this.dropdownController.setSourceSortFunction(this.cellProperties.sourceSortFunction),this.dropdownController.fillDropdown(this.#tZ(),a),this.dropdownController.setVisibleRowsNumberSetting(this.#tJ("visibleRows")),this.dropdownController.setSearchInputVisibility(this.#tJ("searchInput")),void 0!==i.maxSelections&&this.#tX.setMaxSelectionCount(i.maxSelections)}finishEditing(e,t,r){super.finishEditing(e,t,r)}bindEvents(){var e=this;this.dropdownController.addLocalHook("afterDropdownItemChecked",(e,t)=>{this.#t2(e,t),this.#tX.getSize()>=this.cellProperties.maxSelections&&this.#t0()}),this.dropdownController.addLocalHook("afterDropdownItemUnchecked",(e,t)=>{this.#t3(e,t),this.#tX.getSize()<this.cellProperties.maxSelections&&this.#t6()}),this.addHook("afterDestroy",()=>this.destroy()),this.addHook("afterSetSourceDataAtCell",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#t4(...r)}),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.dropdownController.getInputController().addLocalHook("triggerFilter",e=>this.#t5(e))}open(e){if(nN(e?.keyCode)){let t=1===e.key.length?e.key:String.fromCharCode(e.keyCode);this.dropdownController.getInputController().enabled&&(this.dropdownController.getInputController().setValue(t),this.#t5(t)),e.preventDefault(),this.enableFullEditMode()}this.#t9(),this.refreshDimensions(),this.hot.getShortcutManager().setActiveContextName("editor"),this.#t7(),this.dropdownController.getInputController().listen(),this.dropdownController.updateDimensions(this.#t8())}close(){this.#re(),this.#rt(),this.dropdownController.getInputController().unlisten()}getValue(){return this.#tX.getItemsArray()}setValue(){}refreshDimensions(){if(!this.getEditedCell())return void this.close();let{top:e,start:t,height:r}=this.getEditedCellRect(),n=this.#tQ.style;n.top=`${e+r}px`,n[this.hot.isRtl()?"right":"left"]=`${t}px`,rO(this.#tQ,"ht_editor_visible")}focus(){!1===this.#tJ("searchInput")?this.dropdownController.focusFirstItem():this.dropdownController.focusSearchInput()}getInputElement(){return this.dropdownController.getInputController().getInputElement()}destroy(){this.close(),this.dropdownController.reset()}#tZ(){return this.cellProperties.source??[]}#t7(){let e=this.hot.getShortcutManager().getContext("editor");e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.dropdownController.focusPreviousItem()}},{keys:[["ArrowDown"]],callback:()=>{this.hot.rootDocument.activeElement===this.getInputElement()?this.dropdownController.focusFirstItem():this.dropdownController.focusNextItem()}}],{group:u3}),e.addShortcuts([{keys:[["enter"],["shift","enter"],["control/meta","enter"],["control/meta","shift","enter"]],runOnlyIf:()=>!this.#tJ("enterCommits"),callback:e=>{let t=this.hot.rootDocument.activeElement;return"INPUT"===t.tagName&&"checkbox"===t.type&&(t.checked=!t.checked,t.dispatchEvent(new Event("change"))),e.preventDefault(),!1}},{keys:[["space"]],runOnlyIf:()=>!this.#tJ("enterCommits"),callback:e=>{e.preventDefault()}}],{group:u3,relativeToGroup:hY,position:"before"})}#rt(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(u3)}#t9(){this.#tQ.style.display=""}#re(){this.#tQ.style.display="none"}#t0(){this.dropdownController.disableCheckboxes()}#t6(){this.dropdownController.enableCheckboxes()}#t5(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.#tJ("filterSelectedItems")??!0,r=this.#tZ().filter(r=>{let n=r?.value??r;return!!(!t&&this.#tX.has(r))||(this.cellProperties.filteringCaseSensitive?n.includes(e):n.toLowerCase().includes(e.toLowerCase()))});this.dropdownController.fillDropdown(r,this.#tX.getItemsArray()),this.dropdownController.updateDimensions(this.#t8(),!0)}#t8(){let e=this.getEditedCellRect(),t=this.hot.view.isVerticallyScrollableByWindow(),r=this.hot.view.getWorkspaceHeight(),n=e.top;t&&(n=Math.max(n+(this.hot.view.getTableOffset().top-this.hot.rootWindow.scrollY),0));let o=r-n-e.height;return{spaceAbove:n,spaceBelow:o,cellHeight:e.height}}#rr(){let e=this.#tX.getItemsArray();this.saveValue([[e]])}#t2(e,t){e?this.#tX.add({key:e,value:t}):this.#tX.add(t),this.#rr(),this.refreshDimensions()}#t3(e,t){e?this.#tX.remove({key:e,value:t}):this.#tX.remove(t),this.#rr(),this.refreshDimensions()}#t1(e){e.length>0?this.#tX=new u1(e):this.#tX=new u1}#tJ(e){return this.cellProperties[e]}#t4(e,t){this.isOpened()&&t===`${u2}-renderer`&&parseInt(e[0][0],10)===this.cellProperties.visualRow&&parseInt(e[0][1],10)===this.cellProperties.visualCol&&(this.#t1(e[0][3]),this.dropdownController.fillDropdown(this.#tZ(),this.#tX.getItemsArray()),this.dropdownController.focusItem(0),this.#tX.getSize()>=this.cellProperties.maxSelections?this.#t0():this.#t6())}}function u4(e,t,r,n,o,i){rB(t,null==i?"":i,!1)}function u5(e,t,r,n,o,i,s){let{rootDocument:a}=e,l=s.allowHtml?u4:dJ,h=a.createElement("DIV"),d=e.getSettings().ariaTags;if(h.className="htAutocompleteArrow",d&&h.setAttribute(...tC()),h.appendChild(a.createTextNode(String.fromCharCode(9660))),l.apply(this,[e,t,r,n,o,i,s]),t.firstChild||t.appendChild(a.createTextNode(String.fromCharCode(160))),t.insertBefore(h,t.firstChild),rO(t,"htAutocomplete"),!e.acArrowListener){let o=new n4(e);e.acArrowListener=function(o){rx(o.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(r,n),t)},o.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",()=>{o.destroy()})}}function u9(e,t,r,n,o,i,s){u5.apply(this,[e,t,r,n,o,i,s])}u4.RENDERER_TYPE="html",u5.RENDERER_TYPE="autocomplete",u9.RENDERER_TYPE="dropdown";let u7="#bad-value#",u8="ht-loading",ce=new WeakMap,ct=new WeakMap,cr="data-row",cn="data-col",co="checkbox";function ci(e,t,r,n,o,i,s){let a,{rootDocument:l}=e,h=e.getSettings().ariaTags;!function(e){let t=ct.get(e);if(!t){let{rootElement:r}=e;(t=new n4(e)).addEventListener(r,"click",t=>(function(e,t){let{target:r}=e;if(!cs(r)||!r.hasAttribute(cr)||!r.hasAttribute(cn))return;let n=parseInt(r.getAttribute(cr),10),o=parseInt(r.getAttribute(cn),10);t.getCellMeta(n,o).readOnly&&e.preventDefault()})(t,e)),t.addEventListener(r,"mouseup",t=>(function(e,t){let{target:r}=e;!cs(r)||r.hasAttribute(cr)&&r.hasAttribute(cn)&&setTimeout(t.listen,10)})(t,e)),t.addEventListener(r,"change",t=>(function(e,t){let{target:r}=e;if(!cs(r)||!r.hasAttribute(cr)||!r.hasAttribute(cn))return;let n=parseInt(r.getAttribute(cr),10),o=parseInt(r.getAttribute(cn),10),i=t.getCellMeta(n,o);if(!i.readOnly){let r=null;r=e.target.checked?void 0===i.uncheckedTemplate||i.checkedTemplate:void 0!==i.uncheckedTemplate&&i.uncheckedTemplate,t.setDataAtCell(n,o,r)}})(t,e)),ct.set(e,t)}}(e);let d=((a=l.createElement("input")).className="htCheckboxRendererInput",a.type="checkbox",a.setAttribute("tabindex","-1"),a.cloneNode(!1)),u=s.label,c=!1;if(void 0===s.checkedTemplate&&(s.checkedTemplate=!0),void 0===s.uncheckedTemplate&&(s.uncheckedTemplate=!1),rP(t),i===s.checkedTemplate||ej(i).toLocaleLowerCase(s.locale)===ej(s.checkedTemplate).toLocaleLowerCase(s.locale)?d.checked=!0:i===s.uncheckedTemplate||ej(i).toLocaleLowerCase(s.locale)===ej(s.uncheckedTemplate).toLocaleLowerCase(s.locale)?d.checked=!1:eX(i)?rO(d,"noValue"):(d.style.display="none",rO(d,"htBadValue"),c=!0),rk(d,[[cr,r],[cn,n]]),h&&rk(d,[tb(d.checked?e.getTranslatedPhrase(lu):e.getTranslatedPhrase(lc)),tI(d.checked),["role","checkbox"]]),!c&&u){let s="";if(u.value)s="function"==typeof u.value?u.value.call(this,r,n,o,i):u.value;else if(u.property){let t=e.getDataAtRowProp(r,u.property);s=null!==t?t:""}let a=function(e,t,r){let n=e.createElement("label");n.className=`htCheckboxRendererLabel ${r?"fullWidth":""}`;let o=e.createTextNode(t);if(r){let t=e.createElement("span");t.appendChild(o),n.appendChild(t)}else n.appendChild(o);return n.cloneNode(!0)}(l,s,!0!==u.separated);"before"===u.position?u.separated?(t.appendChild(a),t.appendChild(d)):(a.appendChild(d),d=a):u.position&&"after"!==u.position||(u.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],r=e.getSelectedRange(),n=[],o=new Map,i=[],s=0;if(r){for(let a=0;a<r.length;a++){let{row:l,col:h}=r[a].getTopStartCorner(),{row:d,col:u}=r[a].getBottomEndCorner();for(let r=l;r<=d;r+=1)for(let a=h;a<=u;a+=1){let l=e.getCellMeta(r,a);if(l.hidden)continue;let h={checkedTemplate:l.checkedTemplate,uncheckedTemplate:l.uncheckedTemplate};if("checkbox"!==l.type){!0!==t||l.readOnly||(o.has(n.length)?o.set(n.length,[...o.get(n.length),[r,a,null]]):o.set(n.length,[[r,a,null]]));continue}if(!0===l.readOnly)continue;void 0===l.checkedTemplate&&(l.checkedTemplate=!0),void 0===l.uncheckedTemplate&&(l.uncheckedTemplate=!1);let d=e.getDataAtCell(r,a);!1===t?[l.checkedTemplate,l.checkedTemplate.toString()].includes(d)?i.push([r,a,l.uncheckedTemplate,h]):[l.uncheckedTemplate,l.uncheckedTemplate.toString(),null,void 0].includes(d)&&i.push([r,a,l.checkedTemplate,h]):i.push([r,a,l.uncheckedTemplate,h]),s+=1}n.push(s),s=0}if((i=i.every(e=>{let[,,t]=e;return t===i[0][2]})?i.map(e=>{let[t,r,n]=e;return[t,r,n]}):i.map(e=>{let[t,r,,n]=e;return[t,r,n.checkedTemplate]})).length>0){let r=[];if(n.forEach((e,t)=>{let n=i.splice(0,e);o.size&&o.has(t)&&(n=[...n,...o.get(t)]),r.push(n)}),t){let t=[];r.forEach(e=>{e.forEach(e=>{t.push(e)})}),t.length>0&&e.setDataAtCell(t)}else r.forEach(t=>{t.length>0&&e.setDataAtCell(t)})}}}function p(){let t=e.getSelectedRange();if(t){for(let r=0;r<t.length;r++){let n=t[r].getTopStartCorner(),o=t[r].getBottomEndCorner();for(let t=n.row;t<=o.row;t++)for(let r=n.col;r<=o.col;r++){if(e.getCellMeta(t,r).readOnly)continue;let n=e.getCell(t,r);if(nf(n)&&n.querySelectorAll("input[type=checkbox]").length>0)return!0}}return!1}}u&&(!u||u.separated)||t.appendChild(d),c&&t.appendChild(l.createTextNode(u7)),ce.has(e)||(ce.set(e,!0),e.getShortcutManager().getContext("grid").addShortcuts([{keys:[["space"]],callback:()=>(g(),!p()),runOnlyIf:()=>e.getSelectedRangeActive()?.highlight.isCell()},{keys:[["enter"]],callback:()=>(g(),!p()),runOnlyIf:()=>{let t=e.getSelectedRangeActive();return e.getSettings().enterBeginsEditing&&t?.highlight.isCell()&&!e.selection.isMultiple()}},{keys:[["delete"],["backspace"]],callback:()=>(g(!0),!p()),runOnlyIf:()=>e.getSelectedRangeActive()?.highlight.isCell()}],{group:"checkboxRenderer",relativeToGroup:hY,position:"before"}))}function cs(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}function ca(e,t,r,n,o,i,s){u5.apply(this,[e,t,r,n,o,i,s])}nG.getSingleton().add("modifyAutoColumnSizeSeed",function(e,t,r){let{label:n,type:o,row:i,column:s,prop:a}=t;if(o!==co||!n)return;let{value:l,property:h}=n,d=r;if(l)d="function"==typeof l?l(i,s,a,r):l;else if(h){let e=this.getDataAtRowProp(i,h);d=null!==e?e:r}return`${ej(d).length}`}),ci.RENDERER_TYPE=co,ca.RENDERER_TYPE="handsontable";let cl={year:"numeric",month:"2-digit",day:"2-digit"};function ch(e,t){let{dateFormat:r,locale:n,allowEmpty:o}=t;if(eX(e))return o?e:u7;let i=uN(e);if(null===i)return u7;let s=tU(r)?r:cl;return new Intl.DateTimeFormat(n,s).format(i)}function cd(e,t,r,n,o,i,s){dJ.apply(this,[e,t,r,n,o,i,s])}cd.valueFormatter=ch,cd.RENDERER_TYPE="intl-date";let cu={hour:"numeric",minute:"2-digit"};function cc(e,t,r,n,o,i,s){dJ.apply(this,[e,t,r,n,o,i,s]),t.dir="ltr"}cc.RENDERER_TYPE="intl-time";var cg=r(6558);let cp={useGrouping:!1,maximumFractionDigits:20};function cm(e){let{numericFormat:t}=e;return t?.pattern!==void 0||t?.culture!==void 0}let cf=new WeakSet;function cy(e,t){return oa(e)&&(e=cm(t)?function(e,t){let{numericFormat:r}=t,n=r&&r.culture||"-",o=r&&r.pattern;if(void 0!==n&&!cg.A.languages()[n]){let e=n.replace("-",""),t=cg.A.allLanguages?cg.A.allLanguages[n]:cg.A[e];t&&cg.A.registerLanguage(t)}return cg.A.setLanguage(n),(0,cg.A)(e).format(o||"0")}(e,t):function(e,t){let{numericFormat:r,locale:n}=t;return new Intl.NumberFormat(n,r??cp).format(e)}(e,t)),e}function cb(e,t,r,n,o,i,s){if(cm(s)&&!cf.has(s.instance)&&(cf.add(s.instance),rp("The `numericFormat.pattern` and `numericFormat.culture` options are deprecated and will be removed in the next major release. Pass `Intl.NumberFormat` options directly to `numericFormat` and use the `locale` cell property instead of `culture`.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`numericFormat` documentation: https://handsontable.com/docs/api/options/#numericformat\n`locale` documentation: https://handsontable.com/docs/api/options/#locale")),oa(e.getDataAtCell(r,n))){let e=[];if(Array.isArray(s.className))e=s.className;else{let t=s.className??"";t.length&&(e=t.split(" "))}0>e.indexOf("htLeft")&&0>e.indexOf("htCenter")&&0>e.indexOf("htRight")&&0>e.indexOf("htJustify")&&e.push("htRight"),0>e.indexOf("htNumeric")&&e.push("htNumeric"),s.className=e.join(" "),t.dir="ltr"}dJ.apply(this,[e,t,r,n,o,i,s])}function cC(e,t,r,n,o,i){rB(t,i,e.getSettings().sanitizer)}function cw(e,t,r,n,o,i,s){dJ.apply(this,[e,t,r,n,o,i,s])}cb.valueFormatter=cy,cb.RENDERER_TYPE="numeric",cC.valueFormatter=function(e,t){let r=t.hashLength||ej(e).length,n=t.hashSymbol||"*",o="";for(let e=0;e<r;e++)o+=n;return o},cC.RENDERER_TYPE="password",cw.RENDERER_TYPE="select";let cS=new WeakSet;function cv(e,t,r,n,o,i,s){cS.has(s.instance)||"string"!=typeof s.timeFormat||(cS.add(s.instance),rp("The `time` cell type with string-based `timeFormat` (moment.js) is deprecated. In the next major release, `time` will accept only Intl.DateTimeFormat options (object). To start migrating, use the `intl-time` cell type now; it will become the `time` cell type after the next major release (the `intl-time` will become an alias for `time`).\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`time` cell type: https://handsontable.com/docs/time-cell-type/")),dJ.apply(this,[e,t,r,n,o,i,s]),t.dir="ltr"}function cR(e,t){let r=e=>tU(e)&&eq(e.key)&&eq(e.value)?r(e.key)&&r(e.value):null==e,n=e;(r(n)&&(n=""),this.allowEmpty&&""===n)?t(!0):this.strict&&this.source?"function"==typeof this.source?this.source(n,cE(n,t)):cE(n,t)(this.source):t(!0)}function cE(e,t){return function(r){let n=!1;for(let t=0,o=r.length;t<o;t++)if(tV(e,r[t])){n=!0;break}t(n)}}function cT(e,t){let r=n1(uS,this.instance),n=e,o=!0;null==n&&(n="");let i=d9()(n,this.dateFormat||r.defaultDateFormat,!0).isValid(),s=d9()(new Date(n)).isValid()||i;if(this.allowEmpty&&""===n&&(s=!0,i=!0),s||(o=!1),!s&&i&&(o=!0),s&&!i)if(!0===this.correctFormat){var a,l;let e,t,r,i=(a=n,l=this.dateFormat,e=d9()(uM(a)),t=d9()(a,l),r=a.search(/[A-Za-z]/g)>-1,(e.isValid()&&e.format("x")===t.format("x")||!t.isValid()||r?e:t).format(l));this.instance.setDataAtCell(this.visualRow,this.visualCol,i,"dateValidator"),o=!0}else o=!1;t(o)}function cA(e,t){cR.apply(this,[e,t])}function cM(e,t){t(!!(this.allowEmpty&&eX(e))||uI(e))}function cN(e,t){t(!!(this.allowEmpty&&eX(e))||u_(e))}function cI(e,t){let r=e;(null==r&&(r=""),this.allowEmpty&&""===r)?t(!0):(this.allowEmpty||""!==r)&&Array.isArray(r)?Array.isArray(r)&&0===r.length?t(!0):this.source?"function"==typeof this.source?this.source(r,cx(r,t)):cx(r,t)(this.source):t(!0):t(!1)}function cx(e,t){return function(r){let n=!0;for(let t=0,o=e.length;t<o;t++){let o=!1;for(let n=0,i=r.length;n<i;n++)if(tQ(e[t])&&!tQ(r[n])||!tQ(e[t])&&tQ(r[n])){o=!1;break}else tQ(e[t])&&tQ(r[n])&&tV(e[t],r[n])?o=!0:"string"==typeof e[t]&&"string"==typeof r[n]&&e[t]===r[n]&&(o=!0);if(!o){n=!1;break}}t(n)}}function cO(e,t){let r=e;null==r&&(r=""),t(!!this.allowEmpty&&""===r||""!==r&&oa(e))}cv.RENDERER_TYPE="time",cR.VALIDATOR_TYPE="autocomplete",cT.VALIDATOR_TYPE="date",cA.VALIDATOR_TYPE="dropdown",cM.VALIDATOR_TYPE="intl-date",cN.VALIDATOR_TYPE="intl-time",cI.VALIDATOR_TYPE="multiselect",cO.VALIDATOR_TYPE="numeric";let c_=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"];function ck(e,t){let r=this.timeFormat||"h:mm:ss a",n=!0,o=e;null===o&&(o=""),o=/^\d{3,}$/.test(o)?parseInt(o,10):o;let i=/^\d{1,2}$/.test(o);i&&(o+=":00");let s=d9()(o,c_,!0).isValid()?d9()(o):d9()(o,r),a=s.isValid(),l=d9()(o,r,!0).isValid()&&!i;if(this.allowEmpty&&""===o&&(a=!0,l=!0),a||(n=!1),!a&&l&&(n=!0),a&&!l)if(!0===this.correctFormat){let e=s.format(r);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"timeValidator"),n=!0}else n=!1;t(n)}function cH(e){return tU(e)&&void 0!==e.value?e.value:e}function cL(e,t,r){return tQ(this.getSourceDataAtCell(this.toPhysicalRow(t),this.toPhysicalColumn(r)))?tQ(e)?e:{key:e,value:e}:e}ck.VALIDATOR_TYPE="time";let cP=new WeakSet;function cD(e,t,r,n,o,i,s){cP.has(s.instance)||"string"!=typeof s.dateFormat||(cP.add(s.instance),rp("The `date` cell type with string-based `dateFormat` (moment.js) is deprecated. In the next major release, `date` will accept only Intl.DateTimeFormat options (object). To start migrating, use the `intl-date` cell type now; it will become the `date` cell type after the next major release (the `intl-date` will become an alias for `date`).\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`date` cell type: https://handsontable.com/docs/date-cell-type/")),u5.apply(this,[e,t,r,n,o,i,s])}cD.RENDERER_TYPE="date";let cF="ht-multi-select",cB=`${cF}-chip`,cV=`${cF}-chip-remove`,cU=`${cF}-chip-label`,cz=`${cF}-overflow`,cW=new WeakSet,cG=new WeakMap,c$=new WeakMap;function cY(e,t){return tQ(e)?e[t]:e}function cj(e){if(null==e||""===e)return[];if(Array.isArray(e))return e;if("string"==typeof e)try{let t=JSON.parse(e);return Array.isArray(t)?t:[t]}catch{return e.trim()?[e]:[]}return[e]}let cq="multiselect";function cK(e,t,r,n,o,i,s){let a;dG.apply(this,[e,t,r,n,o,i,s]);let l=i;if(!l&&s.placeholder)return void rV(t,l=ej(l=s.placeholder));let{rootDocument:h}=e,d=e.getSettings().ariaTags,u=e.toPhysicalRow(r),c="string"==typeof n?n:e.toPhysicalColumn(n),g=cj(e.getSourceDataAtCell(u,c));if(rP(t),rO(t,"ht-multi-select-renderer"),0===g.length)return void t.appendChild(h.createTextNode(""));let p=h.createElement("div");p.className="ht-multi-select-chips-container",g.forEach(e=>{let t,n,i,s,a=(t=h.createElement("span"),n=cY(e,"value"),rO(t,cB),t.dataset.row=r,t.dataset.prop=o,t.title=n,rO(i=h.createElement("span"),cU),i.textContent=n,t.appendChild(i),rO(s=h.createElement("span"),cV),d&&s.setAttribute(...tC()),t.dataset.key=cY(e,"key"),t.appendChild(s),t);p.appendChild(a)}),t.appendChild(p),c$.has(e)||(c$.set(e,new n4(e)),c$.get(e).addEventListener(e.rootElement,"click",t=>{var r,n;if(!rx(t.target,cV))return;t.preventDefault(),t.stopPropagation();let o=t.target.closest(`.${cB}`);if(!o)return;let i=o.dataset.row,s=o.dataset.prop,a=e.toPhysicalRow(i),l="string"==typeof s?s:e.toPhysicalColumn(s),h=e.propToCol(s),d=e.getSourceDataAtCell(a,h),u=o.dataset.key,c=(r=cj(d),n=u,r.filter(e=>cY(e,"key")!==n));e.setSourceDataAtCell(a,l,c,`${cq}-renderer`),e.render()}),e.addHook("beforeOnCellMouseDown",e=>{rx(e.target,cV)&&nk(e)})),!function(e,t,r){let n=t.querySelectorAll(`.${cB}`);for(let e=0;e<n.length;e++)n[e].style.display="";if(null===e||0===n.length)return;let o=t.querySelector(`.${cz}`);if(o)o.style.display="",o.style.visibility="hidden";else{var i;let e;i=n.length,rO(e=r.createElement("span"),cz),e.textContent=`+${i}`,(o=e).style.visibility="hidden",t.appendChild(o)}let s=parseFloat(r.defaultView.getComputedStyle(t).gap)||0,a=o.offsetWidth,l=0,h=0;for(let t=0;t<n.length;t++){let r=l+n[t].offsetWidth+(t<n.length-1?s:0);if(r<=e-(t<n.length-1?a+s:0))l=r,h+=1;else break}let d=n.length-h;if(d>0){for(let e=h;e<n.length;e++)n[e].style.display="none";o.textContent=`+${d}`,o.style.visibility="visible"}else o.style.display="none"}((a=e.getColWidth(n),cG.has(e)?cG.get(e)?.[n]?.width!==a&&cG.set(e,{...cG.get(e),[n]:{width:a}}):cG.set(e,{[n]:{width:a}}),cW.has(e)||(e.addHook("beforeColumnResize",(t,r)=>{cG.get(e)?.[r]?.width!==t&&cG.set(e,{...cG.get(e),[r]:{width:t}})}),cW.add(e)),cG.get(e)?.[n]?.width??a),p,h)}function cX(e){return Array.isArray(e)?eG(e.map(e=>tQ(e)?e.value:e),", "):e}cK.RENDERER_TYPE=cq;let cQ=[];function cZ(e,t){if(Array.isArray(e)){"string"!=typeof t&&t_("registerConflict(blockedTargetKeys[], incompatibleSettingKeys) expects incompatibleSettingKeys to be a string.");for(let r=0;r<e.length;r+=1)cQ.push({blockedKey:e[r],incompatibleSettingKey:t});return}if("string"!=typeof e&&t_("registerConflict expects a string blocked target key when the first argument is not an array."),Array.isArray(t)){for(let r=0;r<t.length;r+=1){let n=t[r];"string"!=typeof n&&t_("registerConflict(blockedTargetKey, incompatibleSettingKeys) expects incompatibleSettingKeys to be a string array."),cQ.push({blockedKey:e,incompatibleSettingKey:n})}return}"string"==typeof t?cQ.push({blockedKey:e,incompatibleSettingKey:t}):t_("Invalid registerConflict arguments.")}let cJ=new Map([["plugin",function(e){return!!oM(e)}],["cell-type",hn],["editor",nQ],["renderer",oO],["validator",oF]]),c0=Symbol("mainSetting"),c1=[],c2=null;class c3{static get PLUGIN_KEY(){return"base"}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}static get DEFAULT_SETTINGS(){return{}}static get SETTINGS_VALIDATORS(){return null}#rn=null;eventManager=new n4(this);pluginName=null;pluginsInitializedCallbacks=[];isPluginsReady=!1;enabled=!1;initialized=!1;#e={};constructor(e){tz(this,"hot",e,{writable:!1}),c2=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),this.updatePluginSettings(this.hot.getSettings()[this.constructor.PLUGIN_KEY]);let e=this.constructor.PLUGIN_DEPS,t=Array.isArray(e)?e:[];if(t.length>0){let e=[];if(t.forEach(t=>{let[r,n]=t.split(":");cJ.has(r)||t_(`Unknown plugin dependency type "${r}" was found.`),cJ.get(r)(n)||e.push(` - ${n} (${r})`)}),e.length>0){let t=`The ${this.pluginName} plugin requires the following modules:
|
|
199
199
|
${e.join("\n")}
|