handsontable 18.1.2-rc2 → 18.1.2

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/base.js +2 -2
  3. package/base.mjs +2 -2
  4. package/dist/handsontable.full.js +7 -7
  5. package/dist/handsontable.full.min.js +5 -5
  6. package/dist/handsontable.js +7 -7
  7. package/dist/handsontable.min.js +33 -33
  8. package/dist/themes/classic.js +2 -2
  9. package/dist/themes/classic.min.js +2 -2
  10. package/dist/themes/horizon.js +2 -2
  11. package/dist/themes/horizon.min.js +2 -2
  12. package/dist/themes/main.js +2 -2
  13. package/dist/themes/main.min.js +2 -2
  14. package/dist/themes/static/variables/colors/ant.js +2 -2
  15. package/dist/themes/static/variables/colors/ant.min.js +2 -2
  16. package/dist/themes/static/variables/colors/classic.js +2 -2
  17. package/dist/themes/static/variables/colors/classic.min.js +2 -2
  18. package/dist/themes/static/variables/colors/horizon.js +2 -2
  19. package/dist/themes/static/variables/colors/horizon.min.js +2 -2
  20. package/dist/themes/static/variables/colors/main.js +2 -2
  21. package/dist/themes/static/variables/colors/main.min.js +2 -2
  22. package/dist/themes/static/variables/colors/material.js +2 -2
  23. package/dist/themes/static/variables/colors/material.min.js +2 -2
  24. package/dist/themes/static/variables/colors/shadcn.js +2 -2
  25. package/dist/themes/static/variables/colors/shadcn.min.js +2 -2
  26. package/dist/themes/static/variables/density.js +2 -2
  27. package/dist/themes/static/variables/density.min.js +2 -2
  28. package/dist/themes/static/variables/helpers/iconsMap.js +2 -2
  29. package/dist/themes/static/variables/helpers/iconsMap.min.js +2 -2
  30. package/dist/themes/static/variables/icons/horizon.js +2 -2
  31. package/dist/themes/static/variables/icons/horizon.min.js +2 -2
  32. package/dist/themes/static/variables/icons/main.js +2 -2
  33. package/dist/themes/static/variables/icons/main.min.js +2 -2
  34. package/dist/themes/static/variables/sizing.js +2 -2
  35. package/dist/themes/static/variables/sizing.min.js +2 -2
  36. package/dist/themes/static/variables/tokens/classic.js +2 -2
  37. package/dist/themes/static/variables/tokens/classic.min.js +2 -2
  38. package/dist/themes/static/variables/tokens/horizon.js +2 -2
  39. package/dist/themes/static/variables/tokens/horizon.min.js +2 -2
  40. package/dist/themes/static/variables/tokens/main.js +2 -2
  41. package/dist/themes/static/variables/tokens/main.min.js +2 -2
  42. package/helpers/mixed.js +2 -2
  43. package/helpers/mixed.mjs +2 -2
  44. package/package.json +1 -1
  45. package/styles/handsontable.css +2 -2
  46. package/styles/handsontable.min.css +2 -2
  47. package/styles/handsontableStyles.js +1 -1
  48. package/styles/handsontableStyles.mjs +1 -1
  49. package/styles/ht-icons-horizon.min.css +2 -2
  50. package/styles/ht-icons-main.min.css +2 -2
  51. package/styles/ht-theme-classic-no-icons.min.css +2 -2
  52. package/styles/ht-theme-classic.min.css +2 -2
  53. package/styles/ht-theme-horizon-no-icons.min.css +2 -2
  54. package/styles/ht-theme-horizon.min.css +2 -2
  55. package/styles/ht-theme-main-no-icons.min.css +2 -2
  56. 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: 18.1.2-rc2
29
- * Release date: 07/10/2026 (built at 07/10/2026 09:25:11)
28
+ * Version: 18.1.2
29
+ * Release date: 07/10/2026 (built at 07/10/2026 10:00:20)
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={603(e,t,r){"use strict";r.r(t),r.d(t,{EOF:()=>ev,LexerDefinitionErrorType:()=>C,NoViableAltException:()=>t_,Parser:()=>rs,resolveGrammar:()=>tE,defaultParserErrorProvider:()=>ty,EarlyExitException:()=>tP,CstParser:()=>ra,Option:()=>eN,createSyntaxDiagramsCode:()=>rh,Alternation:()=>eL,assignOccurrenceIndices:()=>tA,ParserDefinitionErrorType:()=>S,GAstVisitor:()=>eU,Rule:()=>eI,defaultGrammarValidatorErrorProvider:()=>tS,defaultGrammarResolverErrorProvider:()=>tw,tokenMatcher:()=>eE,clearCache:()=>rb,RepetitionMandatory:()=>eO,Terminal:()=>eP,RepetitionMandatoryWithSeparator:()=>ek,createTokenInstance:()=>eR,RepetitionWithSeparator:()=>e_,defaultLexerErrorProvider:()=>es,MismatchedTokenException:()=>tH,Repetition:()=>eH,tokenLabel:()=>eh,validateGrammar:()=>tT,NotAllInputParsedException:()=>tL,tokenName:()=>ed,Lexer:()=>el,generateParserModule:()=>rf,NonTerminal:()=>eM,EMPTY_ALT:()=>ri,generateParserFactory:()=>rm,EmbeddedActionsParser:()=>rl,isRecognitionException:()=>tk,createToken:()=>ew,serializeGrammar:()=>eD,Flat:()=>ex,serializeProduction:()=>eF,VERSION:()=>v});var n,o,i,s,a,l,h,d,u,c,g,p,m,f,b,C,y,w,S,v="6.5.0",R=r(642),E=r(713),T={},A=new E.RegExpParser;function M(e){var t=e.toString();if(T.hasOwnProperty(t))return T[t];var r=A.pattern(t);return T[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",N='Unable to use "first char" lexer optimizations:\n';function O(e,t,r){var n=X(e);t[n]=n,!0===r&&function(e,t){var r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){var o=X(n.charCodeAt(0));t[o]=o}else{var i=r.toLowerCase();if(i!==r){var o=X(i.charCodeAt(0));t[o]=o}}}(e,t)}function k(e,t){return(0,R.I6)(e.value,function(e){return"number"==typeof e?(0,R.gR)(t,e):void 0!==(0,R.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,R.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}(E.BaseRegExpVisitor);function _(e,t){if(!(t instanceof RegExp))return void 0!==(0,R.I6)(t,function(t){return(0,R.gR)(e,t.charCodeAt(0))});var r=M(t),n=new H(e);return n.visit(r),n.found}var L=(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)}),P="PATTERN",D="defaultMode",F="modes",B="boolean"==typeof RegExp("(?:)").sticky,V=/[^\\][\$]/,U=/[^\\[][\^]|^\^/;function z(e){var t=e.ignoreCase?"i":"";return RegExp("^(?:"+e.source+")",t)}function W(e){var t=e.ignoreCase?"iy":"y";return RegExp(""+e.source,t)}function G(e){var t=e.PATTERN;if((0,R.gd)(t))return!1;if((0,R.Tn)(t))return!0;if((0,R.zy)(t,"exec"))return!0;if((0,R.Kg)(t))return!1;throw Error("non exhaustive match")}function $(e){return!!(0,R.Kg)(e)&&1===e.length&&e.charCodeAt(0)}var Y={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 j(e,t){if((0,R.zy)(e,"LINE_BREAKS"))return!1;if((0,R.gd)(e.PATTERN)){try{_(t,e.PATTERN)}catch(e){return{issue:C.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if((0,R.Kg)(e.PATTERN))return!1;if(G(e))return{issue:C.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function q(e){return(0,R.Tj)(e,function(e){return(0,R.Kg)(e)&&e.length>0?e.charCodeAt(0):e})}function K(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}function X(e){return e<256?e:Q[e]}var Q=[];function Z(e,t){var r=e.tokenTypeIdx;return r===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[r]}function J(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var ee=1,et={};function er(e){var t,r,n,o=function(e){for(var t=(0,R.T9)(e),r=e,n=!0;n;){r=(0,R.oE)((0,R.Bq)((0,R.Tj)(r,function(e){return e.CATEGORIES})));var o=(0,R.iv)(r,t);t=t.concat(o),(0,R.Im)(o)?n=!1:r=o}return t}(e);t=o,(0,R.jJ)(t,function(e){var t,r;en(e)||(et[ee]=e,e.tokenTypeIdx=ee++),eo(e)&&!(0,R.cy)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),eo(e)||(e.CATEGORIES=[]),t=e,(0,R.zy)(t,"categoryMatches")||(e.categoryMatches=[]),r=e,(0,R.zy)(r,"categoryMatchesMap")||(e.categoryMatchesMap={})}),r=o,(0,R.jJ)(r,function(e){!function e(t,r){(0,R.jJ)(t,function(e){r.categoryMatchesMap[e.tokenTypeIdx]=!0}),(0,R.jJ)(r.CATEGORIES,function(n){var o=t.concat(r);(0,R.gR)(o,n)||e(o,n)})}([],e)}),n=o,(0,R.jJ)(n,function(e){e.categoryMatches=[],(0,R.jJ)(e.categoryMatchesMap,function(t,r){e.categoryMatches.push(et[r].tokenTypeIdx)})}),(0,R.jJ)(o,function(e){e.isParent=e.categoryMatches.length>0})}function en(e){return(0,R.zy)(e,"tokenTypeIdx")}function eo(e){return(0,R.zy)(e,"CATEGORIES")}function ei(e){return(0,R.zy)(e,"tokenTypeIdx")}var es={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=C||(C={}))[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 ea={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:es,traceInitPerf:!1,skipValidations:!1};Object.freeze(ea);var el=function(){function e(e,t){var r=this;if(void 0===t&&(t=ea),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,R.h1)(ea,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===ea.lineTerminatorsPattern)r.config.lineTerminatorsPattern=Y;else if(r.config.lineTerminatorCharacters===ea.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,R.cy)(e)?((n={modes:{}}).modes[D]=(0,R.T9)(e),n[D]=D):(o=!1,n=(0,R.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,R.zy)(e,D)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+D+"> property in its definition\n",type:C.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,R.zy)(e,F)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+F+"> property in its definition\n",type:C.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,R.zy)(e,F)&&(0,R.zy)(e,D)&&!(0,R.zy)(e.modes,e.defaultMode)&&t.push({message:"A MultiMode Lexer cannot be initialized with a "+D+": <"+e.defaultMode+">which does not exist\n",type:C.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,R.zy)(e,F)&&(0,R.jJ)(e.modes,function(e,r){(0,R.jJ)(e,function(e,n){(0,R.b0)(e)&&t.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+r+"> at index: <")+n+">\n",type:C.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,R.oE)((0,R.Bq)((0,R.LG)(e.modes,function(e){return e}))),l=(0,R.ku)(a,function(e){return e[P]===el.NA}),h=q(o),t&&(0,R.jJ)(l,function(e){var t=j(e,h);if(!1!==t){var r={message:function(e,t){if(t.issue===C.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===C.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,R.zy)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(s=!0):_(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:C.NO_LINE_BREAKS_FLAGS}),i))})),n.modes=n.modes?n.modes:{},(0,R.jJ)(n.modes,function(e,t){n.modes[t]=(0,R.ku)(e,function(e){return(0,R.b0)(e)})});var i=(0,R.HP)(n.modes);if((0,R.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,b,y,w,S,v,T,A,I,x,N,O,k,H,_,D,F,B,z,W;r.lexerDefinitionErrors=r.lexerDefinitionErrors.concat((t=[],a=e,l=(0,R.pb)(a,function(e){return!(0,R.zy)(e,P)}),n={errors:(0,R.Tj)(l,function(e){return{message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:C.MISSING_PATTERN,tokenTypes:[e]}}),valid:(0,R.iv)(a,l)},t=t.concat(n.errors),s=(h=n.valid,d=(0,R.pb)(h,function(e){var t=e[P];return!(0,R.gd)(t)&&!(0,R.Tn)(t)&&!(0,R.zy)(t,"exec")&&!(0,R.Kg)(t)}),o={errors:(0,R.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:C.INVALID_PATTERN,tokenTypes:[e]}}),valid:(0,R.iv)(h,d)}).valid,t=(t=(t=(t=(t=t.concat(o.errors)).concat((u=s,c=[],g=(0,R.pb)(u,function(e){return(0,R.gd)(e[P])}),(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 L(t,e),t.prototype.visitEndAnchor=function(e){this.found=!0},t}(E.BaseRegExpVisitor),f=(0,R.pb)(p,function(e){var t=e[P];try{var r=M(t),n=new m;return n.visit(r),n.found}catch(e){return V.test(t.source)}}),(0,R.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:C.EOI_ANCHOR_FOUND,tokenTypes:[e]}})))).concat((b=g,y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return L(t,e),t.prototype.visitStartAnchor=function(e){this.found=!0},t}(E.BaseRegExpVisitor),w=(0,R.pb)(b,function(e){var t=e[P];try{var r=M(t),n=new y;return n.visit(r),n.found}catch(e){return U.test(t.source)}}),(0,R.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:C.SOI_ANCHOR_FOUND,tokenTypes:[e]}})))).concat((S=g,v=(0,R.pb)(S,function(e){var t=e[P];return t instanceof RegExp&&(t.multiline||t.global)}),(0,R.Tj)(v,function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:C.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}})))).concat((T=g,A=[],I=(0,R.Tj)(T,function(e){return(0,R.TS)(T,function(t,r){return e.PATTERN.source!==r.PATTERN.source||(0,R.gR)(A,r)||r.PATTERN===el.NA||(A.push(r),t.push(r)),t},[])}),I=(0,R.oE)(I),x=(0,R.pb)(I,function(e){return e.length>1}),(0,R.Tj)(x,function(e){var t=(0,R.Tj)(e,function(e){return e.name});return{message:"The same RegExp pattern ->"+(0,R.$1)(e).PATTERN+"<-has been used in all of the following Token Types: "+t.join(", ")+" <-",type:C.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})))).concat((N=g,O=(0,R.pb)(N,function(e){return e[P].test("")}),(0,R.Tj)(O,function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:C.EMPTY_MATCH_PATTERN,tokenTypes:[e]}})))))).concat((k=s,H=(0,R.pb)(k,function(e){if(!(0,R.zy)(e,"GROUP"))return!1;var t=e.GROUP;return t!==el.SKIPPED&&t!==el.NA&&!(0,R.Kg)(t)}),(0,R.Tj)(H,function(e){return{message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:C.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}})))).concat((_=s,D=i,F=(0,R.pb)(_,function(e){return void 0!==e.PUSH_MODE&&!(0,R.gR)(D,e.PUSH_MODE)}),(0,R.Tj)(F,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:C.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}})))).concat((B=s,z=[],W=(0,R.TS)(B,function(e,t,r){var n,o=t.PATTERN;return o===el.NA||((0,R.Kg)(o)?e.push({str:o,idx:r,tokenType:t}):(0,R.gd)(o)&&(n=o,void 0===(0,R.I6)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],function(e){return -1!==n.source.indexOf(e)}))&&e.push({str:o.source,idx:r,tokenType:t})),e},[]),(0,R.jJ)(B,function(e,t){(0,R.jJ)(W,function(r){var n=r.str,o=r.idx,i=r.tokenType;if(t<o&&function(e,t){if((0,R.gd)(t)){var r=t.exec(e);return null!==r&&0===r.index}if((0,R.Tn)(t))return t(e,0,[],{});if((0,R.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";z.push({message:s,type:C.UNREACHABLE_PATTERN,tokenTypes:[e,i]})}})}),z))))}),(0,R.Im)(r.lexerDefinitionErrors)){var o;er(e),r.TRACE_INIT("analyzeTokenTypes",function(){var n,i,s,a,l,h,d,u,c,g,p,m,f,b,C,y,w;n={lineTerminatorCharacters:r.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:r.TRACE_INIT.bind(r)},(b=(n=(0,R.NT)(n,{useSticky:B,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(e,t){return t()}})).tracer)("initCharCodeToOptimizedIndexMap",function(){if((0,R.Im)(Q)){Q=Array(65536);for(var e=0;e<65536;e++)Q[e]=e>255?255+~~(e/255):e}}),b("Reject Lexer.NA",function(){i=(0,R.ku)(e,function(e){return e[P]===el.NA})}),C=!1,b("Transform Patterns",function(){C=!1,s=(0,R.Tj)(i,function(e){var t=e[P];if((0,R.gd)(t)){var r=t.source;return 1===r.length&&"^"!==r&&"$"!==r&&"."!==r?r:2!==r.length||"\\"!==r[0]||(0,R.gR)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?n.useSticky?W(t):z(t):r[1]}if((0,R.Tn)(t))return C=!0,{exec:t};if((0,R.zy)(t,"exec"))return C=!0,t;if("string"==typeof t)if(1===t.length)return t;else{var o=new RegExp(t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"));return n.useSticky?W(o):z(o)}throw Error("non exhaustive match")})}),b("misc mapping",function(){a=(0,R.Tj)(i,function(e){return e.tokenTypeIdx}),l=(0,R.Tj)(i,function(e){var t=e.GROUP;if(t!==el.SKIPPED){if((0,R.Kg)(t))return t;if((0,R.b0)(t))return!1;throw Error("non exhaustive match")}}),h=(0,R.Tj)(i,function(e){var t=e.LONGER_ALT;if(t)return(0,R.qh)(i,t)}),d=(0,R.Tj)(i,function(e){return e.PUSH_MODE}),u=(0,R.Tj)(i,function(e){return(0,R.zy)(e,"POP_MODE")})}),b("Line Terminator Handling",function(){var e=q(n.lineTerminatorCharacters);c=(0,R.Tj)(i,function(e){return!1}),"onlyOffset"!==n.positionTracking&&(c=(0,R.Tj)(i,function(t){return(0,R.zy)(t,"LINE_BREAKS")?t.LINE_BREAKS:!1===j(t,e)?_(e,t.PATTERN):void 0}))}),b("Misc Mapping #2",function(){g=(0,R.Tj)(i,G),p=(0,R.Tj)(s,$),m=(0,R.TS)(i,function(e,t){var r=t.GROUP;return(0,R.Kg)(r)&&r!==el.SKIPPED&&(e[r]=[]),e},{}),f=(0,R.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]}})}),y=!0,w=[],n.safeMode||b("First Char Optimization",function(){w=(0,R.TS)(i,function(e,t,r){if("string"==typeof t.PATTERN){var o;K(e,X(t.PATTERN.charCodeAt(0)),f[r])}else if((0,R.cy)(t.START_CHARS_HINT))(0,R.jJ)(t.START_CHARS_HINT,function(t){var n=X("string"==typeof t?t.charCodeAt(0):t);o!==n&&(o=n,K(e,n,f[r]))});else if((0,R.gd)(t.PATTERN))if(t.PATTERN.unicode)y=!1,n.ensureOptimizations&&(0,R.Zi)(""+N+" 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=M(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":O(s.value,r,n);break;case"Set":if(!0===s.complement)throw Error(x);(0,R.jJ)(s.value,function(e){if("number"==typeof e)O(e,r,n);else if(!0===n)for(var t=e.from;t<=e.to;t++)O(t,r,n);else{for(var t=e.from;t<=e.to&&t<256;t++)O(t,r,n);if(e.to>=256)for(var o=e.from>=256?e.from:256,i=e.to,s=X(o),a=X(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,R.cy)(t.value)?(0,R.Si)(t.value,e):e(t.value))}(s)||"Group"!==s.type&&!1===a)break}break;default:throw Error("non exhaustive match!")}return(0,R.zu)(r)}(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===x)t&&(0,R.x5)(""+N+" 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,R.Zi)(N+"\n Failed parsing: < "+e.toString()+" >\n Using the regexp-to-ast library version: "+E.VERSION+"\n Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}(t.PATTERN,n.ensureOptimizations);(0,R.Im)(i)&&(y=!1),(0,R.jJ)(i,function(t){K(e,t,f[r])})}else n.ensureOptimizations&&(0,R.Zi)(""+N+" 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"),y=!1;return e},[])}),b("ArrayPacking",function(){w=(0,R.VS)(w)}),o={emptyGroups:m,patternIdxToConfig:f,charCodeToPatternIdxToConfig:w,hasCustom:C,canBeOptimized:y}}),r.patternIdxToConfig[n]=o.patternIdxToConfig,r.charCodeToPatternIdxToConfig[n]=o.charCodeToPatternIdxToConfig,r.emptyGroups=(0,R.h1)(r.emptyGroups,o.emptyGroups),r.hasCustom=o.hasCustom||r.hasCustom,r.canModeBeOptimized[n]=o.canBeOptimized}})}),r.defaultMode=n.defaultMode,!(0,R.Im)(r.lexerDefinitionErrors)&&!r.config.deferDefinitionErrorsHandling)throw Error("Errors detected in definition of Lexer:\n"+(0,R.Tj)(r.lexerDefinitionErrors,function(e){return e.message}).join("-----------------------\n"));(0,R.jJ)(r.lexerDefinitionWarning,function(e){(0,R.x5)(e.message)}),r.TRACE_INIT("Choosing sub-methods implementations",function(){if(B?(r.chopInput=R.zK,r.match=r.matchWithTest):(r.updateLastIndex=R.tE,r.match=r.matchWithExec),o&&(r.handleModes=R.tE),!1===r.trackStartLines&&(r.computeNewColumn=R.zK),!1===r.trackEndLines&&(r.updateTokenEndLineColumnLocation=R.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,R.TS)(r.canModeBeOptimized,function(e,t,r){return!1===t&&e.push(r),e},[]);if(t.ensureOptimizations&&!(0,R.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(){T={}}),r.TRACE_INIT("toFastProperties",function(){(0,R.Bl)(r)})})}return e.prototype.tokenize=function(e,t){if(void 0===t&&(t=this.defaultMode),!(0,R.Im)(this.lexerDefinitionErrors))throw Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+(0,R.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,b,C,y,w=this,S=e,v=S.length,E=0,T=0,A=Array(this.hasCustom?0:Math.floor(e.length/10)),M=[],I=this.trackStartLines?1:void 0,x=this.trackStartLines?1:void 0,N=(r=this.emptyGroups,n={},o=(0,R.HP)(r),(0,R.jJ)(o,function(e){var t=r[e];if((0,R.cy)(t))n[e]=[];else throw Error("non exhaustive match")}),n),O=this.trackStartLines,k=this.config.lineTerminatorsPattern,H=0,_=[],L=[],P=[],D=[];Object.freeze(D);var F=void 0;function B(){return _}function V(e){var t=L[X(e)];return void 0===t?D:t}var U=function(e){if(1===P.length&&void 0===e.tokenType.PUSH_MODE){var t=w.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);M.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{P.pop();var r=(0,R.HV)(P);_=w.patternIdxToConfig[r],L=w.charCodeToPatternIdxToConfig[r],H=_.length;var n=w.canModeBeOptimized[r]&&!1===w.config.safeMode;F=L&&n?V:B}};function z(e){P.push(e),L=this.charCodeToPatternIdxToConfig[e],H=(_=this.patternIdxToConfig[e]).length,H=_.length;var t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;F=L&&t?V:B}for(z.call(this,t);E<v;){h=null;var W=S.charCodeAt(E),G=F(W),$=G.length;for(i=0;i<$;i++){var Y=(y=G[i]).pattern;d=null;var j=y.short;if(!1!==j?W===j&&(h=Y):!0===y.isCustom?null!==(C=Y.exec(S,E,A,N))?(h=C[0],void 0!==C.payload&&(d=C.payload)):h=null:(this.updateLastIndex(Y,E),h=this.match(Y,e,E)),null!==h){if(void 0!==(l=y.longerAlt)){var q=_[l],K=q.pattern;u=null,!0===q.isCustom?null!==(C=K.exec(S,E,A,N))?(a=C[0],void 0!==C.payload&&(u=C.payload)):a=null:(this.updateLastIndex(K,E),a=this.match(K,e,E)),a&&a.length>h.length&&(h=a,d=u,y=q)}break}}if(null!==h){if(c=h.length,void 0!==(g=y.group)&&(p=y.tokenTypeIdx,m=this.createTokenInstance(h,E,p,y.tokenType,I,x,c),this.handlePayload(m,d),!1===g?T=this.addToken(A,T,m):N[g].push(m)),e=this.chopInput(e,c),E+=c,x=this.computeNewColumn(x,c),!0===O&&!0===y.canLineTerminator){var Q=0,Z=void 0,J=void 0;k.lastIndex=0;do!0===(Z=k.test(h))&&(J=k.lastIndex-1,Q++);while(!0===Z);0!==Q&&(I+=Q,x=c-J,this.updateTokenEndLineColumnLocation(m,g,J,Q,I,x,c))}this.handleModes(y,U,z,m)}else{for(var ee=E,et=I,er=x,en=!1;!en&&E<v;)for(S.charCodeAt(E),e=this.chopInput(e,1),E++,s=0;s<H;s++){var eo=_[s],Y=eo.pattern,j=eo.short;if(!1!==j?S.charCodeAt(E)===j&&(en=!0):!0===eo.isCustom?en=null!==Y.exec(S,E,A,N):(this.updateLastIndex(Y,E),en=null!==Y.exec(e)),!0===en)break}f=E-ee,b=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(S,ee,f,et,er),M.push({offset:ee,line:et,column:er,length:f,message:b})}}return this.hasCustom||(A.length=T),{tokens:A,groups:N,errors:M}},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,R.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 eh(e){return eu(e)?e.LABEL:e.name}function ed(e){return e.name}function eu(e){return(0,R.Kg)(e.LABEL)&&""!==e.LABEL}var ec="categories",eg="label",ep="group",em="push_mode",ef="pop_mode",eb="longer_alt",eC="line_breaks",ey="start_chars_hint";function ew(e){return eS(e)}function eS(e){var t=e.pattern,r={};if(r.name=e.name,(0,R.b0)(t)||(r.PATTERN=t),(0,R.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,R.zy)(e,ec)&&(r.CATEGORIES=e[ec]),er([r]),(0,R.zy)(e,eg)&&(r.LABEL=e[eg]),(0,R.zy)(e,ep)&&(r.GROUP=e[ep]),(0,R.zy)(e,ef)&&(r.POP_MODE=e[ef]),(0,R.zy)(e,em)&&(r.PUSH_MODE=e[em]),(0,R.zy)(e,eb)&&(r.LONGER_ALT=e[eb]),(0,R.zy)(e,eC)&&(r.LINE_BREAKS=e[eC]),(0,R.zy)(e,ey)&&(r.START_CHARS_HINT=e[ey]),r}var ev=eS({name:"EOF",pattern:el.NA});function eR(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 eE(e,t){return Z(e,t)}er([ev]);var eT=(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)}),eA=function(){function e(e){this.definition=e}return e.prototype.accept=function(e){e.visit(this),(0,R.jJ)(this.definition,function(t){t.accept(e)})},e}(),eM=function(e){function t(t){var r=e.call(this,[])||this;return r.idx=1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(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}(eA),eI=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.orgText="",(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(eA),ex=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.ignoreAmbiguities=!1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(eA),eN=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(eA),eO=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(eA),ek=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(eA),eH=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(eA),e_=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(eA),eL=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,r.ignoreAmbiguities=!1,r.hasPredicates=!1,(0,R.kp)(r,(0,R.Up)(t,function(e){return void 0!==e})),r}return eT(t,e),t}(eA),eP=function(){function e(e){this.idx=1,(0,R.kp)(this,(0,R.Up)(e,function(e){return void 0!==e}))}return e.prototype.accept=function(e){e.visit(this)},e}();function eD(e){return(0,R.Tj)(e,eF)}function eF(e){function t(e){return(0,R.Tj)(e,eF)}if(e instanceof eM)return{type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(e instanceof ex)return{type:"Flat",definition:t(e.definition)};if(e instanceof eN)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof eO)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:eF(new eP({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof e_)return{type:"RepetitionWithSeparator",name:e.name,idx:e.idx,separator:eF(new eP({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 eL)return{type:"Alternation",name:e.name,idx:e.idx,definition:t(e.definition)};else if(e instanceof eP){var r={type:"Terminal",name:e.terminalType.name,label:eh(e.terminalType),idx:e.idx},n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=(0,R.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 eB=function(){function e(){}return e.prototype.walk=function(e,t){var r=this;void 0===t&&(t=[]),(0,R.jJ)(e.definition,function(n,o){var i=(0,R.gv)(e.definition,o+1);if(n instanceof eM)r.walkProdRef(n,i,t);else if(n instanceof eP)r.walkTerminal(n,i,t);else if(n instanceof ex)r.walkFlat(n,i,t);else if(n instanceof eN)r.walkOption(n,i,t);else if(n instanceof eO)r.walkAtLeastOne(n,i,t);else if(n instanceof ek)r.walkAtLeastOneSep(n,i,t);else if(n instanceof e_)r.walkManySep(n,i,t);else if(n instanceof eH)r.walkMany(n,i,t);else if(n instanceof eL)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 eN({definition:e.definition})].concat(t,r);this.walk(e,n)},e.prototype.walkAtLeastOneSep=function(e,t,r){var n=eV(e,t,r);this.walk(e,n)},e.prototype.walkMany=function(e,t,r){var n=[new eN({definition:e.definition})].concat(t,r);this.walk(e,n)},e.prototype.walkManySep=function(e,t,r){var n=eV(e,t,r);this.walk(e,n)},e.prototype.walkOr=function(e,t,r){var n=this,o=t.concat(r);(0,R.jJ)(e.definition,function(e){var t=new ex({definition:[e]});n.walk(t,o)})},e}();function eV(e,t,r){return[new eN({definition:[new eP({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var eU=function(){function e(){}return e.prototype.visit=function(e){switch(e.constructor){case eM:return this.visitNonTerminal(e);case ex:return this.visitFlat(e);case eN:return this.visitOption(e);case eO:return this.visitRepetitionMandatory(e);case ek:return this.visitRepetitionMandatoryWithSeparator(e);case e_:return this.visitRepetitionWithSeparator(e);case eH:return this.visitRepetition(e);case eL:return this.visitAlternation(e);case eP: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}(),ez=(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 eW(e,t){return void 0===t&&(t=[]),e instanceof eN||e instanceof eH||e instanceof e_||(e instanceof eL?(0,R.zN)(e.definition,function(e){return eW(e,t)}):!(e instanceof eM&&(0,R.gR)(t,e))&&e instanceof eA&&(e instanceof eM&&t.push(e),(0,R.Si)(e.definition,function(e){return eW(e,t)})))}function eG(e){if(e instanceof eM)return"SUBRULE";if(e instanceof eN)return"OPTION";if(e instanceof eL)return"OR";if(e instanceof eO)return"AT_LEAST_ONE";if(e instanceof ek)return"AT_LEAST_ONE_SEP";else if(e instanceof e_)return"MANY_SEP";else if(e instanceof eH)return"MANY";else if(e instanceof eP)return"CONSUME";else throw Error("non exhaustive match")}var e$=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 ez(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,R.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,R.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}(eU),eY=new e$;function ej(e){if(e instanceof eM)return ej(e.referencedRule);if(e instanceof eP)return[e.terminalType];if(e instanceof ex||e instanceof eN||e instanceof eH||e instanceof eO||e instanceof ek||e instanceof e_||e instanceof eP||e instanceof eI)return function(e){for(var t,r=[],n=e.definition,o=0,i=n.length>o,s=!0;i&&s;)s=eW(t=n[o]),r=r.concat(ej(t)),o+=1,i=n.length>o;return(0,R.sb)(r)}(e);if(e instanceof eL){var t,r;return t=e,r=(0,R.Tj)(t.definition,function(e){return ej(e)}),(0,R.sb)((0,R.Bq)(r))}throw Error("non exhaustive match")}var eq="_~IN~_",eK=(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)}),eX=function(e){function t(t){var r=e.call(this)||this;return r.topProd=t,r.follows={},r}return eK(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+eq+this.topProd.name),s=ej(new ex({definition:t.concat(r)}));this.follows[i]=s},t}(eB),eQ=(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 eZ(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset)}function eJ(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 e0(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}var e1=function(e){function t(t){var r=e.call(this)||this;return r.result=[],r.ruleIdx=t,r}return eQ(t,e),t.prototype.collectNamedDSLMethod=function(e,t,r){if(!(0,R.b0)(e.name)){var n,o=void 0;if(e instanceof eN||e instanceof eH||e instanceof eO||e instanceof eL)o=new t({definition:e.definition,idx:e.idx});else if(e instanceof ek||e instanceof e_)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,eN,512)},t.prototype.visitRepetition=function(e){this.collectNamedDSLMethod(e,eH,768)},t.prototype.visitRepetitionMandatory=function(e){this.collectNamedDSLMethod(e,eO,1024)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.collectNamedDSLMethod(e,ek,1536)},t.prototype.visitRepetitionWithSeparator=function(e){this.collectNamedDSLMethod(e,e_,1280)},t.prototype.visitAlternation=function(e){var t=this;this.collectNamedDSLMethod(e,eL,256);var r=e.definition.length>1;(0,R.jJ)(e.definition,function(n,o){if(!(0,R.b0)(n.name)){var i,s,a=n.definition;a=r?[new eN({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}(eU),e2=(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)}),e3=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 e2(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=ej(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 e2(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,R.T9)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,R.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,R.Im)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},t}(eB)),e6=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 e2(t,e),t.prototype.startWalking=function(){return this.walk(this.topRule),this.result},t}(eB),e5=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e2(t,e),t.prototype.walkMany=function(t,r,n){if(t.idx===this.occurrence){var o=(0,R.$1)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof eP&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkMany.call(this,t,r,n)},t}(e6),e4=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e2(t,e),t.prototype.walkManySep=function(t,r,n){if(t.idx===this.occurrence){var o=(0,R.$1)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof eP&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkManySep.call(this,t,r,n)},t}(e6),e9=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e2(t,e),t.prototype.walkAtLeastOne=function(t,r,n){if(t.idx===this.occurrence){var o=(0,R.$1)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof eP&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOne.call(this,t,r,n)},t}(e6),e7=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return e2(t,e),t.prototype.walkAtLeastOneSep=function(t,r,n){if(t.idx===this.occurrence){var o=(0,R.$1)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof eP&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,r,n)},t}(e6);function e8(e,t,r){void 0===r&&(r=[]),r=(0,R.T9)(r);var n=[],o=0;function i(i){var s=e8(i.concat((0,R.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 eM)return i(s.definition);if(s instanceof eN)n=i(s.definition);else if(s instanceof eO){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 eP({terminalType:s.separator})].concat(s.definition)})];return i(a)}else if(s instanceof e_){var a=s.definition.concat([new eH({definition:[new eP({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 eL)return(0,R.jJ)(s.definition,function(e){n=i(e.definition)}),n;else if(s instanceof eP)r.push(s.terminalType);else throw Error("non exhaustive match");o++}return n.push({partialPath:r,suffixDef:(0,R.gv)(e,o)}),n}function te(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,R.Im)(u);){var c=u.pop();if(c===s){a&&(0,R.HV)(u).idx<=h&&u.pop();continue}var g=c.def,p=c.idx,m=c.ruleStack,f=c.occurrenceStack;if(!(0,R.Im)(g)){var b=g[0];if(b===o){var C={idx:p,def:(0,R.gv)(g),ruleStack:(0,R.gc)(m),occurrenceStack:(0,R.gc)(f)};u.push(C)}else if(b instanceof eP)if(p<l-1){var y=p+1;if(r(t[y],b.terminalType)){var C={idx:y,def:(0,R.gv)(g),ruleStack:m,occurrenceStack:f};u.push(C)}}else if(p===l-1)d.push({nextTokenType:b.terminalType,nextTokenOccurrence:b.idx,ruleStack:m,occurrenceStack:f}),a=!0;else throw Error("non exhaustive match");else if(b instanceof eM){var w=(0,R.T9)(m);w.push(b.nonTerminalName);var S=(0,R.T9)(f);S.push(b.idx);var C={idx:p,def:b.definition.concat(i,(0,R.gv)(g)),ruleStack:w,occurrenceStack:S};u.push(C)}else if(b instanceof eN){var v={idx:p,def:(0,R.gv)(g),ruleStack:m,occurrenceStack:f};u.push(v),u.push(s);var E={idx:p,def:b.definition.concat((0,R.gv)(g)),ruleStack:m,occurrenceStack:f};u.push(E)}else if(b instanceof eO){var T=new eH({definition:b.definition,idx:b.idx}),A=b.definition.concat([T],(0,R.gv)(g)),C={idx:p,def:A,ruleStack:m,occurrenceStack:f};u.push(C)}else if(b instanceof ek){var M=new eP({terminalType:b.separator}),T=new eH({definition:[M].concat(b.definition),idx:b.idx}),A=b.definition.concat([T],(0,R.gv)(g)),C={idx:p,def:A,ruleStack:m,occurrenceStack:f};u.push(C)}else if(b instanceof e_){var v={idx:p,def:(0,R.gv)(g),ruleStack:m,occurrenceStack:f};u.push(v),u.push(s);var M=new eP({terminalType:b.separator}),I=new eH({definition:[M].concat(b.definition),idx:b.idx}),A=b.definition.concat([I],(0,R.gv)(g)),E={idx:p,def:A,ruleStack:m,occurrenceStack:f};u.push(E)}else if(b instanceof eH){var v={idx:p,def:(0,R.gv)(g),ruleStack:m,occurrenceStack:f};u.push(v),u.push(s);var I=new eH({definition:b.definition,idx:b.idx}),A=b.definition.concat([I],(0,R.gv)(g)),E={idx:p,def:A,ruleStack:m,occurrenceStack:f};u.push(E)}else if(b instanceof eL)for(var x=b.definition.length-1;x>=0;x--){var N={idx:p,def:b.definition[x].definition.concat((0,R.gv)(g)),ruleStack:m,occurrenceStack:f};u.push(N),u.push(s)}else if(b instanceof ex)u.push({idx:p,def:b.definition.concat((0,R.gv)(g)),ruleStack:m,occurrenceStack:f});else if(b instanceof eI)u.push(function(e,t,r,n){var o=(0,R.T9)(r);o.push(e.name);var i=(0,R.T9)(n);return i.push(1),{idx:t,def:e.definition,ruleStack:o,occurrenceStack:i}}(b,p,m,f));else throw Error("non exhaustive match")}}return d}var tt=(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=y||(y={}))[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 tr=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 tt(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,y.OPTION,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkAtLeastOne=function(t,r,n){this.checkIsTarget(t,y.REPETITION_MANDATORY,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkAtLeastOneSep=function(t,r,n){this.checkIsTarget(t,y.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkMany=function(t,r,n){this.checkIsTarget(t,y.REPETITION,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkManySep=function(t,r,n){this.checkIsTarget(t,y.REPETITION_WITH_SEPARATOR,r,n)||e.prototype.walkOption.call(this,t,r,n)},t}(eB),tn=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 tt(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,y.OPTION)},t.prototype.visitRepetition=function(e){this.checkIsTarget(e,y.REPETITION)},t.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,y.REPETITION_MANDATORY)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,y.REPETITION_MANDATORY_WITH_SEPARATOR)},t.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,y.REPETITION_WITH_SEPARATOR)},t.prototype.visitAlternation=function(e){this.checkIsTarget(e,y.ALTERNATION)},t}(eU);function to(e){for(var t=Array(e),r=0;r<e;r++)t[r]=[];return t}function ti(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 ts(e,t){for(var r=(0,R.Tj)(e,function(e){return e8([e],1)}),n=to(r.length),o=(0,R.Tj)(r,function(e){var t={};return(0,R.jJ)(e,function(e){var r=ti(e.partialPath);(0,R.jJ)(r,function(e){t[e]=!0})}),t}),i=r,s=1;s<=t;s++){var a=i;i=to(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=ti(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,R.Im)(d)||h.length===t){var c=n[e];if(!1===th(c,h)){c.push(h);for(var g=0;g<u.length;g++){var p=u[g];o[e][p]=!0}}}else{var m=e8(d,s+1,h);i[e]=i[e].concat(m),(0,R.jJ)(m,function(t){var r=ti(t.partialPath);(0,R.jJ)(r,function(t){o[e][t]=!0})})}}},h=0;h<a.length;h++)l(h)}return n}function ta(e,t,r,n){var o=new tn(e,y.ALTERNATION,n);return t.accept(o),ts(o.result,r)}function tl(e,t,r,n){var o=new tn(e,r);t.accept(o);var i=o.result,s=new tr(t,e,r).startWalking();return ts([new ex({definition:i}),new ex({definition:s})],n)}function th(e,t){e: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 e}return!0}}return!1}function td(e){return(0,R.Si)(e,function(e){return(0,R.Si)(e,function(e){return(0,R.Si)(e,function(e){return(0,R.Im)(e.categoryMatches)})})})}var tu=(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 tc(e){return eG(e)+"_#_"+e.idx+"_#_"+tg(e)}function tg(e){return e instanceof eP?e.terminalType.name:e instanceof eM?e.nonTerminalName:""}var tp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return tu(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}(eU),tm=/^[a-zA-Z_]\w*$/,tf=new RegExp(tm.source.replace("^","^\\$")),tb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.alternations=[],t}return tu(t,e),t.prototype.visitAlternation=function(e){this.alternations.push(e)},t}(eU),tC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return tu(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}(eU),ty={buildMismatchTokenMessage:function(e){var t=e.expected,r=e.actual;return e.previous,e.ruleName,"Expecting "+(eu(t)?"--\x3e "+eh(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,R.$1)(r).image+"'";if(n)return o+n+i;var s=(0,R.TS)(t,function(e,t){return e.concat(t)},[]),a=(0,R.Tj)(s,function(e){return"["+(0,R.Tj)(e,function(e){return eh(e)}).join(", ")+"]"});return o+"one of these possible Token sequences:\n"+(0,R.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,R.$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,R.Tj)(t,function(e){return"["+(0,R.Tj)(e,function(e){return eh(e)}).join(",")+"]"}).join(" ,"))+">"+i}};Object.freeze(ty);var tw={buildRuleNotFoundError:function(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"}},tS={buildDuplicateFoundError:function(e,t){var r=e.name,n=(0,R.$1)(t),o=n.idx,i=eG(n),s=n instanceof eP?n.terminalType.name:n instanceof eM?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: ->"+tf.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,R.$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,R.Tj)(e.prefixPath,function(e){return eh(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,R.Tj)(e.prefixPath,function(e){return eh(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=eG(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 "+R.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+"<-"}},tv=(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)}),tR=function(e){function t(t,r){var n=e.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=r,n.errors=[],n}return tv(t,e),t.prototype.resolveRefs=function(){var e=this;(0,R.jJ)((0,R.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}(eU);function tE(e){e=(0,R.NT)(e,{errMsgProvider:tw});var t,r={};return(0,R.jJ)(e.rules,function(e){r[e.name]=e}),(t=new tR(r,e.errMsgProvider)).resolveRefs(),t.errors}function tT(e){var t,r,n,o,i,s,a,l,h,d,u,c,g,p,m,f,b,C,w,v,E,T,A,M,I,x,N,O,k,H,_,L,P;return t=(e=(0,R.NT)(e,{errMsgProvider:tS,ignoredIssues:{}})).rules,r=e.maxLookahead,n=e.tokenTypes,o=e.ignoredIssues,i=e.errMsgProvider,s=e.grammarName,a=R.Tj(t,function(e){var t,r,n,o,s,a;return t=e,r=i,n=new tp,t.accept(n),o=n.allProductions,s=R.$z(o,tc),a=R.Up(s,function(e){return e.length>1}),R.Tj(R.zu(a),function(e){var n=R.$1(e),o=r.buildDuplicateFoundError(t,e),i=eG(n),s={message:o,type:S.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:i,occurrence:n.idx},a=tg(n);return a&&(s.parameter=a),s})}),l=R.Tj(t,function(e){return function e(t,r,n,o){void 0===o&&(o=[]);var i=[],s=function e(t){var r=[];if(R.Im(t))return r;var n=R.$1(t);if(n instanceof eM)r.push(n.referencedRule);else if(n instanceof ex||n instanceof eN||n instanceof eO||n instanceof ek||n instanceof e_||n instanceof eH)r=r.concat(e(n.definition));else if(n instanceof eL)r=R.Bq(R.Tj(n.definition,function(t){return e(t.definition)}));else if(n instanceof eP);else throw Error("non exhaustive match");var o=eW(n),i=t.length>1;if(!o||!i)return r;var s=R.gv(t);return r.concat(e(s))}(r.definition);if(R.Im(s))return[];var a=t.name;R.gR(s,t)&&i.push({message:n.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:o}),type:S.LEFT_RECURSION,ruleName:a});var l=R.iv(s,o.concat([t])),h=R.Tj(l,function(r){var i=R.T9(o);return i.push(r),e(t,r,n,i)});return i.concat(R.Bq(h))}(e,e,i)}),h=[],d=[],u=[],(0,R.Si)(l,R.Im)&&(h=(0,R.Tj)(t,function(e){var t,r,n,o;return t=e,r=i,n=new tb,t.accept(n),o=n.alternations,R.TS(o,function(e,n){var o=R.gc(n.definition),i=R.Tj(o,function(e,o){var i=te([e],[],null,1);return R.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(R.oE(i))},[])}),d=(0,R.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,R.ku)(h,function(e){return d[eG(e)+(0===e.idx?"":e.idx)]})),h=(0,R.ku)(h,function(e){return!0===e.ignoreAmbiguities}),R.TS(h,function(e,r){var o,i,s,l,h,d,u,c,g,p,m,f,b=ta(r.idx,t,r.maxLookahead||n,r),C=(o=b,i=r,s=t,l=a,h=[],d=(0,R.TS)(o,function(e,t,r){return!0===i.definition[r].ignoreAmbiguities||(0,R.jJ)(t,function(t){var n=[r];(0,R.jJ)(o,function(e,o){r!==o&&th(e,t)&&!0!==i.definition[o].ignoreAmbiguities&&n.push(o)}),n.length>1&&!th(h,t)&&(h.push(t),e.push({alts:n,path:t}))}),e},[]),R.Tj(d,function(e){var t=(0,R.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]}})),y=(u=b,c=r,g=t,p=a,m=[],f=(0,R.TS)(u,function(e,t,r){var n=(0,R.Tj)(t,function(e){return{idx:r,path:e}});return e.concat(n)},[]),(0,R.jJ)(f,function(e){if(!0!==c.definition[e.idx].ignoreAmbiguities){var t=e.idx,r=e.path,n=(0,R.JW)(f,function(e){var n;return!0!==c.definition[e.idx].ignoreAmbiguities&&e.idx<t&&(n=e.path,n.length<r.length&&(0,R.Si)(n,function(e,t){var n=r[t];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]}))}),o=(0,R.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(C,y)},[])}),w=t,v=r,E=i,T=[],(0,R.jJ)(w,function(e){var t=new tC;e.accept(t);var r=t.allProductions;(0,R.jJ)(r,function(t){var r=function(e){if(e instanceof eN)return y.OPTION;if(e instanceof eH)return y.REPETITION;if(e instanceof eO)return y.REPETITION_MANDATORY;if(e instanceof ek)return y.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof e_)return y.REPETITION_WITH_SEPARATOR;else if(e instanceof eL)return y.ALTERNATION;else throw Error("non exhaustive match")}(t),n=t.maxLookahead||v,o=tl(t.idx,e,r,n)[0];if((0,R.Im)((0,R.Bq)(o))){var i=E.buildEmptyRepetitionError({topLevelRule:e,repetition:t});T.push({message:i,type:S.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),u=T),A=t,M=n,I=i,x=[],N=(0,R.Tj)(M,function(e){return e.name}),(0,R.jJ)(A,function(e){var t=e.name;if((0,R.gR)(N,t)){var r=I.buildNamespaceConflictError(e);x.push({message:r,type:S.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),c=x,g=R.Tj(n,function(e){var t,r,n;return t=e,r=i,n=[],t.name.match(tm)||n.push({message:r.buildTokenNameError({tokenType:t,expectedPattern:tm}),type:S.INVALID_TOKEN_NAME}),n}),O=t,k=i,H=[],(0,R.jJ)(O,function(e){var t=new e1("");e.accept(t);var r=(0,R.Tj)(t.result,function(e){return e.orgProd});H.push((0,R.Tj)(r,function(t){var r,n,o,i;return r=e,n=t,o=k,i=[],n.name.match(tf)||i.push({message:o.buildInvalidNestedRuleNameError(r,n),type:S.INVALID_NESTED_RULE_NAME,ruleName:r.name}),i}))}),p=(0,R.Bq)(H),_=t,L=i,P=[],(0,R.jJ)(_,function(e){var t=new e1("");e.accept(t);var r=(0,R.$z)(t.result,function(e){return e.name}),n=(0,R.Up)(r,function(e){return e.length>1});(0,R.jJ)((0,R.zu)(n),function(t){var r=(0,R.Tj)(t,function(e){return e.orgProd}),n=L.buildDuplicateNestedRuleNameError(e,r);P.push({message:n,type:S.DUPLICATE_NESTED_NAME,ruleName:e.name})})}),m=P,f=(0,R.Tj)(t,function(e){var t,r,n,o;return t=e,r=i,n=new tb,t.accept(n),o=n.alternations,R.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},[])}),b=(0,R.Tj)(t,function(e){var t,r,n,o;return t=e,r=i,n=[],(o=t.name).match(tm)||n.push({message:r.buildInvalidRuleNameError({topLevelRule:t,expectedPattern:tm}),type:S.INVALID_RULE_NAME,ruleName:o}),n}),C=(0,R.Tj)(t,function(e){var r=e,n=t,o=s,a=i,l=[];if((0,R.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}),R.Bq(a.concat(g,p,m,u,l,h,d,c,f,b,C))}function tA(e){(0,R.jJ)(e.rules,function(e){var t=new e$;e.accept(t),(0,R.jJ)(t.dslMethods,function(e){(0,R.jJ)(e,function(e,t){e.idx=t+1})})})}var tM="MismatchedTokenException",tI="NoViableAltException",tx="EarlyExitException",tN="NotAllInputParsedException",tO=[tM,tI,tx,tN];function tk(e){return(0,R.gR)(tO,e.name)}function tH(e,t,r){this.name=tM,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}function t_(e,t,r){this.name=tI,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}function tL(e,t){this.name=tN,this.message=e,this.token=t,this.resyncedTokens=[]}function tP(e,t,r){this.name=tx,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}Object.freeze(tO),tH.prototype=Error.prototype,t_.prototype=Error.prototype,tL.prototype=Error.prototype,tP.prototype=Error.prototype;var tD={},tF="InRuleRecoveryException";function tB(e){this.name=tF,this.message=e}tB.prototype=Error.prototype;var tV=function(){function e(){}return e.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,R.zy)(e,"recoveryEnabled")?e.recoveryEnabled:rn.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=tU)},e.prototype.getTokenToInsert=function(e){var t=eR(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,R.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 tB("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,R.Im)(t))return!1;var n=this.LA(1);return void 0!==(0,R.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,R.gR)(r,e)},e.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),r=2;;){var n=t.tokenType;if((0,R.gR)(e,n))return n;t=this.LA(r),r++}},e.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return tD;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,R.Im)(this.LAST_EXPLICIT_RULE_STACK)||(t=(0,R.Tj)(this.LAST_EXPLICIT_RULE_STACK,function(t){return e.RULE_STACK[t]}),r=(0,R.Tj)(this.LAST_EXPLICIT_RULE_STACK,function(t){return e.RULE_OCCURRENCE_STACK[t]})),(0,R.Tj)(t,function(n,o){return 0===o?tD:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:r[o],inRule:e.shortRuleNameToFullName(t[o-1])}})},e.prototype.flattenFollowSet=function(){var e=this,t=(0,R.Tj)(this.buildFullFollowKeyStack(),function(t){return e.getFollowSetFromFollowKey(t)});return(0,R.Bq)(t)},e.prototype.getFollowSetFromFollowKey=function(e){if(e===tD)return[ev];var t=e.ruleName+e.idxInCallingRule+eq+e.inRule;return this.resyncFollows[t]},e.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,ev)||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,R.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,R.T9)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}},e.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,R.Im)(this.LAST_EXPLICIT_RULE_STACK)?(0,R.Tj)(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)}):(0,R.Tj)(this.LAST_EXPLICIT_RULE_STACK,function(t){return e.shortRuleNameToFullName(e.RULE_STACK[t])})},e}();function tU(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=ev,u=1),this.shouldInRepetitionRecoveryBeTried(d,u,s)&&this.tryInRepetitionRecovery(e,t,r,d)}var tz=function(){function e(){}return e.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,R.zy)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:rn.dynamicTokensEnabled,this.maxLookahead=(0,R.zy)(e,"maxLookahead")?e.maxLookahead:rn.maxLookahead,this.lookAheadFuncsCache=(0,R.rF)()?new Map:[],(0,R.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,R.jJ)(e,function(e){t.TRACE_INIT(e.name+" Rule Lookahead",function(){var r,n=(eY.reset(),e.accept(eY),r=eY.dslMethods,eY.reset(),r),o=n.alternation,i=n.repetition,s=n.option,a=n.repetitionMandatory,l=n.repetitionMandatoryWithSeparator,h=n.repetitionWithSeparator;(0,R.jJ)(o,function(r){var n=0===r.idx?"":r.idx;t.TRACE_INIT(""+eG(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=td(l=ta(n,e,o))?J:Z,a(l,i,h,s)),c=(d=t.fullRuleNameToShort[e.name],256|r.idx|d);t.setLaFuncCache(c,u)})}),(0,R.jJ)(i,function(r){t.computeLookaheadFunc(e,r.idx,768,y.REPETITION,r.maxLookahead,eG(r))}),(0,R.jJ)(s,function(r){t.computeLookaheadFunc(e,r.idx,512,y.OPTION,r.maxLookahead,eG(r))}),(0,R.jJ)(a,function(r){t.computeLookaheadFunc(e,r.idx,1024,y.REPETITION_MANDATORY,r.maxLookahead,eG(r))}),(0,R.jJ)(l,function(r){t.computeLookaheadFunc(e,r.idx,1536,y.REPETITION_MANDATORY_WITH_SEPARATOR,r.maxLookahead,eG(r))}),(0,R.jJ)(h,function(r){t.computeLookaheadFunc(e,r.idx,1280,y.REPETITION_WITH_SEPARATOR,r.maxLookahead,eG(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=td(h=tl(t,e,n,i))?J:Z,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,R.Si)(e,function(e){return 1===e.length}),o=e.length;if(!n||r)return function(){t: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 t;return!0}return!1};var i=(0,R.Bq)(e);if(1===i.length&&(0,R.Im)(i[0].categoryMatches)){var s=i[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}var a=(0,R.TS)(i,function(e,t,r){return e[t.tokenTypeIdx]=!0,(0,R.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,R.Si)(e,function(e){return(0,R.Si)(e,function(e){return 1===e.length})});if(t)return function(t){for(var n=(0,R.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))t: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 t;return i}}};if(!i||n)return function(){for(var t=0;t<o;t++){var n=e[t],i=n.length;t: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 t;return t}}};var s=(0,R.Tj)(e,function(e){return(0,R.Bq)(e)}),a=(0,R.TS)(s,function(e,t,r){return(0,R.jJ)(t,function(t){(0,R.zy)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),(0,R.jJ)(t.categoryMatches,function(t){(0,R.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}(),tW=/^\s*function\s*(\S*)\s*\(/,tG="name";function t$(e){var t=e.name;return t||e.toString().match(tW)[1]}function tY(e,t){var r=Object.getOwnPropertyDescriptor(e,tG);return(!!(0,R.b0)(r)||!!r.configurable)&&(Object.defineProperty(e,tG,{enumerable:!1,configurable:!0,writable:!1,value:t}),!0)}function tj(e,t){for(var r=(0,R.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 tq=["constructor","visit","validateVisitor"],tK=function(){function e(){}return e.prototype.initTreeBuilder=function(e){if(this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.outputCst=(0,R.zy)(e,"outputCst")?e.outputCst:rn.outputCst,this.nodeLocationTracking=(0,R.zy)(e,"nodeLocationTracking")?e.nodeLocationTracking:rn.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=eJ,this.setNodeLocationFromNode=eJ,this.cstPostRule=R.tE,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=R.tE,this.setNodeLocationFromNode=R.tE,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=eZ,this.setNodeLocationFromNode=eZ,this.cstPostRule=R.tE,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=R.tE,this.setNodeLocationFromNode=R.tE,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=R.tE,this.setNodeLocationFromNode=R.tE,this.cstPostRule=R.tE,this.setInitialNodeLocation=R.tE;else throw Error('Invalid <nodeLocationTracking> config option: "'+e.nodeLocationTracking+'"');else this.cstInvocationStateUpdate=R.tE,this.cstFinallyStateUpdate=R.tE,this.cstPostTerminal=R.tE,this.cstPostNonTerminal=R.tE,this.cstPostRule=R.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];e0(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}},e.prototype.getBaseCstVisitorConstructor=function(){if((0,R.b0)(this.baseCstVisitorConstructor)){var e,t,r,n=(e=this.className,t=this.allRuleNames,tY(r=function(){},e+"BaseSemantics"),r.prototype={visit:function(e,t){if((0,R.cy)(e)&&(e=e[0]),!(0,R.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,R.Tj)(o,function(e){if(!(0,R.Tn)(n[e]))return{msg:"Missing visitor method: <"+e+"> on "+t$(n.constructor)+" CST Visitor.",type:w.MISSING_METHOD,methodName:e}}),(0,R.oE)(i)),a=function(e,t){var r=[];for(var n in e)tm.test(n)&&(0,R.Tn)(e[n])&&!(0,R.gR)(tq,n)&&!(0,R.gR)(t,n)&&r.push({msg:"Redundant visitor method: <"+n+"> on "+t$(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 /"+tm.source+"/.",type:w.REDUNDANT_METHOD,methodName:n});return r}(e,r),s.concat(a));if(!(0,R.Im)(l)){var h=(0,R.Tj)(l,function(e){return e.msg});throw Error("Errors Detected in CST Visitor <"+t$(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,R.b0)(this.baseCstVisitorWithDefaultsConstructor)){var e,t,r,n,o,i=(e=this.className,t=this.allRuleNames,r=this.getBaseCstVisitorConstructor(),tY(n=function(){},e+"BaseSemanticsWithDefaults"),o=Object.create(r.prototype),(0,R.jJ)(t,function(e){o[e]=tj}),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];e0(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}(),tX=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)):rr},e.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?rr: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}(),tQ=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=ro),(0,R.gR)(this.definedRulesNames,e)){var n={message:tS.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=ro);var n,o,i,s=[];s=s.concat((n=this.definedRulesNames,o=this.className,i=[],R.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 eD((0,R.zu)(this.gastProductionsCache))},e}(),tZ=function(){function e(){}return e.prototype.initRecognizerEngine=function(e,t){if(this.className=t$(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=J,this.definedRulesNames=[],this.tokensMap={},this.allRuleNames=[],this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,R.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,R.cy)(e)){if((0,R.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,R.cy)(e))this.tokensMap=(0,R.TS)(e,function(e,t){return e[t.name]=t,e},{});else if((0,R.zy)(e,"modes")&&(0,R.Si)((0,R.Bq)((0,R.zu)(e.modes)),ei)){var r=(0,R.Bq)((0,R.zu)(e.modes)),n=(0,R.sb)(r);this.tokensMap=(0,R.TS)(n,function(e,t){return e[t.name]=t,e},{})}else if((0,R.Gv)(e))this.tokensMap=(0,R.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=ev;var o=(0,R.Si)((0,R.zu)(e),function(e){return(0,R.Im)(e.categoryMatches)});this.tokenMatcher=o?J:Z,er((0,R.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,R.zy)(r,"resyncEnabled")?r.resyncEnabled:ro.resyncEnabled,i=(0,R.zy)(r,"recoveryValueFunc")?r.recoveryValueFunc:ro.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,y.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],s,1024,e,e9)},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,e7],s,1536,e,e7)}else throw this.raiseEarlyExitException(e,y.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,e4],s,1280,e,e4)}},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,R.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,R.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 tL(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===tF)throw r;throw e}}throw r},e.prototype.saveRecogState=function(){var e=this.errors,t=(0,R.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),ev)},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}(),tJ=function(){function e(){}return e.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,R.NT)(e.errorMessageProvider,rn.errorMessageProvider)},e.prototype.SAVE_ERROR=function(e){if(tk(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,R.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,R.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=tl(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 tP(a,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,t){for(var r=this.getCurrRuleFullName(),n=ta(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 t_(a,this.LA(1),s))},e}(),t0=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(e,t){var r=this.gastProductionsCache[e];if((0,R.b0)(r))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return te([r],t,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(e){var t=(0,R.$1)(e.ruleStack);return new e3(this.getGAstProductions()[t],e).startWalking()},e}(),t1={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(t1);var t2=eS({name:"RECORDING_PHASE_TOKEN",pattern:el.NA});er([t2]);var t3=eR(t2,"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(t3);var t6={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 rr},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 t4.call(this,eN,e,t)},e.prototype.atLeastOneInternalRecord=function(e,t){t4.call(this,eO,t,e)},e.prototype.atLeastOneSepFirstInternalRecord=function(e,t){t4.call(this,ek,t,e,!0)},e.prototype.manyInternalRecord=function(e,t){t4.call(this,eH,t,e)},e.prototype.manySepFirstInternalRecord=function(e,t){t4.call(this,e_,t,e,!0)},e.prototype.orInternalRecord=function(e,t){return t9.call(this,e,t)},e.prototype.subruleInternalRecord=function(e,t,r){if(t8(t),!e||!1===(0,R.zy)(e,"ruleName")){var n=Error("<SUBRULE"+t7(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,R.se)(this.recordingProdStack),i=new eM({idx:t,nonTerminalName:e.ruleName,referencedRule:void 0});return o.definition.push(i),this.outputCst?t6:t1},e.prototype.consumeInternalRecord=function(e,t,r){if(t8(t),!en(e)){var n=Error("<CONSUME"+t7(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,R.se)(this.recordingProdStack),i=new eP({idx:t,terminalType:e});return o.definition.push(i),t3},e}();function t4(e,t,r,n){void 0===n&&(n=!1),t8(r);var o=(0,R.se)(this.recordingProdStack),i=(0,R.Tn)(t)?t:t.DEF,s=new e({definition:[],idx:r});return(0,R.zy)(t,"NAME")&&(s.name=t.NAME),n&&(s.separator=t.SEP),(0,R.zy)(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(s),i.call(this),o.definition.push(s),this.recordingProdStack.pop(),t1}function t9(e,t){var r=this;t8(t);var n=(0,R.se)(this.recordingProdStack),o=!1===(0,R.cy)(e),i=!1===o?e:e.DEF,s=new eL({definition:[],idx:t,ignoreAmbiguities:o&&!0===e.IGNORE_AMBIGUITIES});return(0,R.zy)(e,"NAME")&&(s.name=e.NAME),(0,R.zy)(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),s.hasPredicates=(0,R.zN)(i,function(e){return(0,R.Tn)(e.GATE)}),n.definition.push(s),(0,R.jJ)(i,function(e){var t=new ex({definition:[]});s.definition.push(t),(0,R.zy)(e,"NAME")&&(t.name=e.NAME),(0,R.zy)(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,R.zy)(e,"GATE")&&(t.ignoreAmbiguities=!0),r.recordingProdStack.push(t),e.ALT.call(r),r.recordingProdStack.pop()}),t1}function t7(e){return 0===e?"":""+e}function t8(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 re=function(){function e(){}return e.prototype.initPerformanceTracer=function(e){if((0,R.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=rn.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,R.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}(),rt=(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)}),rr=eR(ev,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(rr);var rn=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:ty,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),ro=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function ri(e){return void 0===e&&(e=void 0),function(){return e}}(b=S||(S={}))[b.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",b[b.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",b[b.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",b[b.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",b[b.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",b[b.LEFT_RECURSION=5]="LEFT_RECURSION",b[b.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",b[b.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",b[b.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",b[b.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",b[b.INVALID_NESTED_RULE_NAME=10]="INVALID_NESTED_RULE_NAME",b[b.DUPLICATE_NESTED_NAME=11]="DUPLICATE_NESTED_NAME",b[b.NO_NON_EMPTY_LOOKAHEAD=12]="NO_NON_EMPTY_LOOKAHEAD",b[b.AMBIGUOUS_PREFIX_ALTS=13]="AMBIGUOUS_PREFIX_ALTS",b[b.TOO_MANY_ALTS=14]="TOO_MANY_ALTS";var rs=function(){function e(e,t){void 0===t&&(t=rn),this.ignoredIssues=rn.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,R.zy)(t,"ignoredIssues")&&t.ignoredIssues!==rn.ignoredIssues&&(0,R.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,R.zy)(t,"ignoredIssues")?t.ignoredIssues:rn.ignoredIssues,this.skipValidations=(0,R.zy)(t,"skipValidations")?t.skipValidations:rn.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,R.Bl)(t)}),t.TRACE_INIT("Grammar Recording",function(){try{t.enableRecording(),(0,R.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=tE({rules:(0,R.zu)(t.gastProductionsCache)}),t.definitionErrors.push.apply(t.definitionErrors,n)}),t.TRACE_INIT("Grammar Validations",function(){if((0,R.Im)(n)&&!1===t.skipValidations){var e=tT({rules:(0,R.zu)(t.gastProductionsCache),maxLookahead:t.maxLookahead,tokenTypes:(0,R.zu)(t.tokensMap),ignoredIssues:t.ignoredIssues,errMsgProvider:tS,grammarName:r});t.definitionErrors.push.apply(t.definitionErrors,e)}}),(0,R.Im)(t.definitionErrors)&&(t.recoveryEnabled&&t.TRACE_INIT("computeAllProdsFollows",function(){var e,r,n=(e=(0,R.zu)(t.gastProductionsCache),r={},(0,R.jJ)(e,function(e){var t=new eX(e).startWalking();(0,R.kp)(r,t)}),r);t.resyncFollows=n}),t.TRACE_INIT("ComputeLookaheadFunctions",function(){t.preComputeLookaheadFunctions((0,R.zu)(t.gastProductionsCache))})),t.TRACE_INIT("expandAllNestedRuleNames",function(){var e,r,n,o=(e=(0,R.zu)(t.gastProductionsCache),r=t.fullRuleNameToShort,n={allRuleNames:[]},(0,R.jJ)(e,function(e){var t=r[e.name];n.allRuleNames.push(e.name);var o=new e1(t);e.accept(o),(0,R.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,R.Im)(t.definitionErrors))throw Error("Parser Definition Errors detected:\n "+(0,R.Tj)(t.definitionErrors,function(e){return e.message}).join("\n-------------------------------\n"))})},e.DEFER_DEFINITION_ERRORS_HANDLING=!1,e}();(0,R.XJ)(rs,[tV,tz,tK,tX,tZ,tQ,tJ,t0,t5,re]);var ra=function(e){function t(t,r){void 0===r&&(r=rn);var n=(0,R.lR)(r);return n.outputCst=!0,e.call(this,t,n)||this}return rt(t,e),t}(rs),rl=function(e){function t(t,r){void 0===r&&(r=rn);var n=(0,R.lR)(r);return n.outputCst=!1,e.call(this,t,n)||this}return rt(t,e),t}(rs);function rh(e,t){var r=void 0===t?{}:t,n=r.resourceBase,o=void 0===n?"https://unpkg.com/chevrotain@"+v+"/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@"+v+"/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 rd(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,R.Tj)(t,function(e){var t;return rp(1,'$.RULE("'+(t=e).name+'", function() {')+"\n"+rg(t.definition,2)+(rp(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 ru(e,t,r){var n=rp(r,"$."+(e+t.idx)+"(");return t.name||t.separator?(n+="{\n",t.name&&(n+=rp(r+1,'NAME: "'+t.name+'"')+",\n"),t.separator&&(n+=rp(r+1,"SEP: this.tokensMap."+t.separator.name)+",\n"),n+="DEF: "+rc(t.definition,r+2)+"\n",n+=rp(r,"}")+"\n"):n+=rc(t.definition,r+1),n+=rp(r,")")+"\n"}function rc(e,t){var r="function() {\n";return r+=rg(e,t),r+=rp(t,"}")+"\n"}function rg(e,t){var r="";return(0,R.jJ)(e,function(e){r+=function(e,t){var r;if(e instanceof eM)return rp(t,"$.SUBRULE"+e.idx+"($."+e.nonTerminalName+")\n");if(e instanceof eN)return ru("OPTION",e,t);if(e instanceof eO)return ru("AT_LEAST_ONE",e,t);if(e instanceof ek)return ru("AT_LEAST_ONE_SEP",e,t);if(e instanceof e_)return ru("MANY_SEP",e,t);else if(e instanceof eH)return ru("MANY",e,t);else if(e instanceof eL)return rp(t,"$.OR"+e.idx+"([")+"\n"+(0,R.Tj)(e.definition,function(e){var r,n,o;return r=e,o=rp(n=t+1,"{")+"\n",r.name&&(o+=rp(n+1,'NAME: "'+r.name+'",')+"\n"),o+=rp(n+1,"ALT: function() {")+"\n",o+=rg(r.definition,n+1),o+=rp(n+1,"}")+"\n",o+=rp(n,"}")}).join(",\n")+"\n"+rp(t,"])\n");else if(e instanceof eP)return r=e.terminalType.name,rp(t,"$.CONSUME"+e.idx+"(this.tokensMap."+r+")\n");else if(e instanceof ex)return rg(e.definition,t);else throw Error("non exhaustive match")}(e,t+1)}),r}function rp(e,t){return Array(4*e+1).join(" ")+t}function rm(e){var t,n=Function("tokenVocabulary","config","chevrotain"," \n"+rd(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 rf(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"+rd(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")}},642(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(N(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 b(e,t){return f(e,function(e){return!t(e)})}function C(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 y(e,t){return!!N(e)&&e.hasOwnProperty(t)}function w(e,t){return void 0!==R(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 v(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}function R(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(t.call(null,n))return n}}function E(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 T(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 A(e){return b(e,function(e){return null==e})}function M(e,t){void 0===t&&(t=function(e){return e});var r=[];return T(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 N(e){return e instanceof Object}function O(e,t){for(var r=0;r<e.length;r++)if(!t(e[r],r))return!1;return!0}function k(e,t){return b(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 _(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return r;return -1}function L(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 P(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];y(e,l)||(e[l]=i[l])}}return e}function D(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return P.apply(null,[{}].concat(e))}function F(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 B(e,t){for(var r=v(e),n=o(t),i=0;i<n.length;i++){var s=n[i],a=t[s];r[s]=a}return r}function V(){}function U(e){return e}function z(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 W(e){console&&console.error&&console.error("Error: "+e)}function G(e){console&&console.warn&&console.warn("Warning: "+e)}function $(){return"function"==typeof Map}function Y(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 j(e){function t(){}t.prototype=e;var r=new t;function n(){return typeof r.bar}return n(),n(),e}function q(e){return e[e.length-1]}function K(e){var t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}r.d(t,{$1:()=>l,$z:()=>F,Bl:()=>j,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:()=>N,HP:()=>o,HV:()=>h,I6:()=>R,Im:()=>n,JW:()=>E,Kg:()=>u,LG:()=>s,NT:()=>D,O1:()=>K,Si:()=>O,T9:()=>S,TS:()=>T,Tj:()=>a,Tn:()=>g,Up:()=>C,VS:()=>z,XJ:()=>Y,Zi:()=>W,b0:()=>c,cy:()=>I,gR:()=>w,gc:()=>m,gd:()=>x,gv:()=>p,h1:()=>B,iv:()=>k,jJ:()=>d,kp:()=>L,ku:()=>b,lR:()=>v,oE:()=>A,pb:()=>f,qh:()=>_,rF:()=>$,sb:()=>M,se:()=>q,tE:()=>V,x5:()=>G,zK:()=>U,zN:()=>H,zu:()=>i,zy:()=>y})},713(e,t){var r,n;"u">typeof self&&self,void 0===(n="function"==typeof(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"}})?r.apply(t,[]):r)||(e.exports=n)},732(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]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}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})};var n={};return(()=>{"use strict";r.d({},{iz:()=>tK,f1:()=>ig});var e,t,n,o,i,s,a,l,h,d,u,c,g,p,m,f,b,C,y,w,S,v,R,E,T,A,M,I,x,N,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={};r.r(eo),r.d(eo,{AbsPlugin:()=>iS,AddressPlugin:()=>iy,ArrayPlugin:()=>iw,BitShiftPlugin:()=>iv,BitwiseLogicOperationsPlugin:()=>iA,BooleanPlugin:()=>iM,CharPlugin:()=>iI,CodePlugin:()=>ix,ComplexPlugin:()=>aR,ConditionalAggregationPlugin:()=>sM,CountBlankPlugin:()=>iN,CountUniquePlugin:()=>iO,DatabasePlugin:()=>iH,DateTimePlugin:()=>i_,DegreesPlugin:()=>iB,DeltaPlugin:()=>iV,ExpPlugin:()=>iU,FinancialPlugin:()=>iz,FormulaTextPlugin:()=>iq,HyperlinkPlugin:()=>iK,InformationPlugin:()=>iX,IsEvenPlugin:()=>iQ,IsOddPlugin:()=>iZ,LogarithmPlugin:()=>iJ,LookupPlugin:()=>sk,MathConstantsPlugin:()=>i1,MathPlugin:()=>aw,MatrixPlugin:()=>i6,MedianPlugin:()=>i5,ModuloPlugin:()=>i4,NumericAggregationPlugin:()=>sr,PercentilePlugin:()=>i8,PowerPlugin:()=>si,RadiansPlugin:()=>ss,RadixConversionPlugin:()=>sa,RandomPlugin:()=>sp,RomanPlugin:()=>sH,RoundingPlugin:()=>sC,SequencePlugin:()=>sm,SimpleArithmerticPlugin:()=>sP,SqrtPlugin:()=>sy,StatisticalAggregationPlugin:()=>a_,StatisticalPlugin:()=>ay,SumprodPlugin:()=>sI,TextPlugin:()=>sx,TrigonometryPlugin:()=>sN}),(R=e||(e={})).RELATIVE="RELATIVE",R.ABSOLUTE="ABSOLUTE";class ei{constructor(e,t,r){this.type=e,this.col=t,this.sheet=r}static absolute(t,r){return new ei(e.ABSOLUTE,t,r)}static relative(t,r){return new ei(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 ei(this.type,this.col+t,n)}shiftedByColumns(e){return new ei(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),rZ(t,r)}shiftRelativeDimensions(e,t){let r=this.isColumnRelative()?this.col+e:this.col;return new ei(this.type,r,this.sheet)}shiftAbsoluteDimensions(e,t){let r=this.isColumnAbsolute()?this.col+e:this.col;return new ei(this.type,r,this.sheet)}withSheet(e){return new ei(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(rJ(r))return;let n=eN(r.col),o=this.type===e.ABSOLUTE?"$":"";return`${o}${n}`}exceedsSheetSizeLimits(e){return this.col>=e}}class es{constructor(e,t,r){this.type=e,this.row=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.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 es(this.type,this.row+r,n)}shiftedByRows(e){return new es(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),rX(t,r)}shiftRelativeDimensions(e,t){let r=this.isRowRelative()?this.row+t:this.row;return new es(this.type,r,this.sheet)}shiftAbsoluteDimensions(e,t){let r=this.isRowAbsolute()?this.row+t:this.row;return new es(this.type,r,this.sheet)}withSheet(e){return new es(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(rQ(r))return;let n=this.type===e.ABSOLUTE?"$":"";return`${n}${r.row+1}`}exceedsSheetSizeLimits(e){return this.row>=e}}(E=t||(t={})).CELL_REFERENCE_RELATIVE="CELL_REFERENCE",E.CELL_REFERENCE_ABSOLUTE="CELL_REFERENCE_ABSOLUTE",E.CELL_REFERENCE_ABSOLUTE_COL="CELL_REFERENCE_ABSOLUTE_COL",E.CELL_REFERENCE_ABSOLUTE_ROW="CELL_REFERENCE_ABSOLUTE_ROW";class ea{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()?ea.absolute.bind(this):e.isColumnAbsolute()?ea.absoluteCol.bind(this):t.isRowAbsolute()?ea.absoluteRow.bind(this):ea.relative.bind(this))(e.col,t.row,r)}static relative(e,r,n){return new ea(e,r,t.CELL_REFERENCE_RELATIVE,n)}static absolute(e,r,n){return new ea(e,r,t.CELL_REFERENCE_ABSOLUTE,n)}static absoluteCol(e,r,n){return new ea(e,r,t.CELL_REFERENCE_ABSOLUTE_COL,n)}static absoluteRow(e,r,n){return new ea(e,r,t.CELL_REFERENCE_ABSOLUTE_ROW,n)}toSimpleCellAddress(e){let r=r5(this,e);return this.type===t.CELL_REFERENCE_ABSOLUTE?r0(r,this.col,this.row):this.type===t.CELL_REFERENCE_ABSOLUTE_ROW?r0(r,e.col+this.col,this.row):this.type===t.CELL_REFERENCE_ABSOLUTE_COL?r0(r,this.col,e.row+this.row):r0(r,e.col+this.col,e.row+this.row)}toColumnAddress(){return new ei(this.isColumnRelative()?e.RELATIVE:e.ABSOLUTE,this.col,this.sheet)}toRowAddress(){return new es(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),rZ(t,r)}toSimpleRowAddress(e){let t=r5(this,e),r=this.row;return this.isRowRelative()&&(r+=e.row),rX(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 ea(this.col,this.row+e,this.type,this.sheet)}shiftedByColumns(e){return new ea(this.col+e,this.row,this.type,this.sheet)}moved(e,t,r){let n=void 0===this.sheet?void 0:e;return new ea(this.col+t,this.row+r,this.type,n)}withSheet(e){return new ea(this.col,this.row,this.type,e)}isInvalid(e){return r1(this.toSimpleCellAddress(e))}shiftRelativeDimensions(e,t){return new ea(this.isColumnAbsolute()?this.col:this.col+e,this.isRowAbsolute()?this.row:this.row+t,this.type,this.sheet)}shiftAbsoluteDimensions(e,t){return new ea(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(r1(r))return;let n=eN(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 el="A-Za-z\xc0-ʯ",eh=`${el}0-9_.`,ed=`[${el}0-9_]+`,eu=`(${ed}|'(((?!').|'')*)')!`,ec=`(${eu})?\\$?[A-Za-z]+\\$?[0-9]+`,eg=`(${eu})?\\$?[A-Za-z]+`,ep=`(${eu})?\\$?[0-9]+`,em="[rR][0-9]*[cC][0-9]*",ef=`(${ec})[^${eh}]`,eb=`[${el}_][${eh}]*`,eC=["0","1","2","3","4","5","6","7","8","9"],ey=[...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)),ew=RegExp(`^(${eu})?(\\$?)([A-Za-z]+)(\\$?)([0-9]+)$`),eS=RegExp(`^(${eu})?(\\$?)([A-Za-z]+)$`),ev=RegExp(`^(${eu})?(\\$?)([0-9]+)$`),eR=RegExp(`^${ed}$`),eE=(e,t,r)=>{let n=ew.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 ea.absolute(o,i,s);else if("$"===n[5])return ea.absoluteCol(o,i-t.row,s);else if("$"===n[7])return ea.absoluteRow(o-t.col,i,s);else return ea.relative(o-t.col,i-t.row,s)},eT=(e,t,r)=>{let n=eS.exec(e);if(!n)return;let o=ex(n[6]),i=eH(ek(n),r);if(null!==i)if("$"===n[5])return ei.absolute(o,i);else return ei.relative(o-t.col,i)},eA=(e,t,r)=>{let n=ev.exec(e);if(!n)return;let o=Number(n[6])-1,i=eH(ek(n),r);if(null!==i)if("$"===n[5])return es.absolute(o,i);else return es.relative(o-t.row,i)},eM=(e,t,r)=>{let n=ew.exec(t);if(!n)return;let o=ex(n[6]),i=Number(n[8])-1,s=eH(ek(n),e);if(null!==s)return r0(void 0===s?r:s,o,i)},eI=(e,t,r)=>{let n=eN(t.col),o=eO(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 eN(e){let t="";for(;e>=0;)t=String.fromCharCode(e%26+97)+t,e=Math.floor(e/26)-1;return t.toUpperCase()}function eO(e,t){let r=t(e);if(void 0!==r)if(eR.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 e_=r(603);let eL=(e,t)=>({type:e,message:t});(T=n||(n={})).LexingError="LexingError",T.ParserError="ParsingError",T.StaticOffsetError="StaticOffsetError",T.StaticOffsetOutOfRangeError="StaticOffsetOutOfRangeError",T.RangeOffsetNotAllowed="RangeOffsetNotAllowed",T.InvalidRangeSize="InvalidRangeSize",(A=o||(o={})).EMPTY="EMPTY",A.NUMBER="NUMBER",A.STRING="STRING",A.MINUS_UNARY_OP="MINUS_UNARY_OP",A.PLUS_UNARY_OP="PLUS_UNARY_OP",A.PERCENT_OP="PERCENT_OP",A.CONCATENATE_OP="CONCATENATE_OP",A.EQUALS_OP="EQUALS_OP",A.NOT_EQUAL_OP="NOT_EQUAL_OP",A.GREATER_THAN_OP="GREATER_THAN_OP",A.LESS_THAN_OP="LESS_THAN_OP",A.GREATER_THAN_OR_EQUAL_OP="GREATER_THAN_OR_EQUAL_OP",A.LESS_THAN_OR_EQUAL_OP="LESS_THAN_OR_EQUAL_OP",A.PLUS_OP="PLUS_OP",A.MINUS_OP="MINUS_OP",A.TIMES_OP="TIMES_OP",A.DIV_OP="DIV_OP",A.POWER_OP="POWER_OP",A.FUNCTION_CALL="FUNCTION_CALL",A.NAMED_EXPRESSION="NAMED_EXPRESSION",A.PARENTHESIS="PARENTHESES",A.CELL_REFERENCE="CELL_REFERENCE",A.CELL_RANGE="CELL_RANGE",A.COLUMN_RANGE="COLUMN_RANGE",A.ROW_RANGE="ROW_RANGE",A.ERROR="ERROR",A.ERROR_WITH_RAW_INPUT="ERROR_WITH_RAW_INPUT",A.ARRAY="ARRAY",(M=i||(i={}))[M.RELATIVE=0]="RELATIVE",M[M.START_ABSOLUTE=1]="START_ABSOLUTE",M[M.BOTH_ABSOLUTE=2]="BOTH_ABSOLUTE";let eP=(e,t)=>({type:o.CELL_REFERENCE,reference:e,leadingWhitespace:null==t?void 0:t.image}),eD=(e,t,r,n)=>(ez(e,t,r),{type:o.CELL_RANGE,start:e,end:t,sheetReferenceType:r,leadingWhitespace:n}),eF=(e,t,r)=>({type:o.ARRAY,args:e,leadingWhitespace:null==t?void 0:t.image,internalWhitespace:null==r?void 0:r.image}),eB=(e,t)=>({type:o.ERROR,error:e,leadingWhitespace:null==t?void 0:t.image}),eV=(e,t,r)=>({type:o.ERROR_WITH_RAW_INPUT,error:t,rawInput:e,leadingWhitespace:null==r?void 0:r.image}),eU=()=>({type:o.ERROR,error:rK.parsingError()});function ez(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 eW(e,t){return(null!=t?t:"")+e}let eG={[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 e${constructor(e){this.functionRegistry=e,this.cache=new Map}set(e,t){let r=tw(t,this.functionRegistry),n={ast:t,relativeDependencies:r,hasVolatileFunction:eY(t,this.functionRegistry.isFunctionVolatile),hasStructuralChangeFunction:eY(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 eY=(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 eY(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 eY(e.left,t)||eY(e.right,t);case o.PARENTHESIS:return eY(e.expression,t);case o.FUNCTION_CALL:if(t(e.procedureName))return!0;return e.args.some(e=>eY(e,t));case o.ARRAY:return e.args.some(e=>e.some(e=>eY(e,t)))}};class ej{}ej.DistinctSigns="Distinct signs.",ej.WrongArgNumber="Wrong number of arguments.",ej.EmptyArg="Empty function argument.",ej.EmptyArray="Empty array not allowed.",ej.ArrayDimensions="Array dimensions are not compatible.",ej.NoSpaceForArrayResult="No space for array result.",ej.ValueSmall="Value too small.",ej.ValueLarge="Value too large.",ej.BadCriterion="Incorrect criterion.",ej.RangeManySheets="Range spans more than one sheet.",ej.CellRangeExpected="Cell range expected.",ej.WrongDimension="Wrong range dimension.",ej.ScalarExpected="Cell range not allowed.",ej.NumberCoercion="Value cannot be coerced to number.",ej.NumberExpected="Number argument expected.",ej.IntegerExpected="Value needs to be an integer.",ej.BadMode="Mode not recognized.",ej.DateBounds="Date outside of bounds.",ej.OutOfSheet="Resulting reference is out of the sheet.",ej.WrongType="Wrong type of argument.",ej.NaN="NaN or infinite value encountered.",ej.EqualLength="Ranges need to be of equal length.",ej.Negative="Value cannot be negative.",ej.NotBinary="String does not represent a binary number.",ej.NotOctal="String does not represent an octal number.",ej.NotHex="String does not represent a hexadecimal number.",ej.EndStartPeriod="End period needs to be at least start period.",ej.CellRefExpected="Cell reference expected.",ej.EmptyRange="Empty range not allowed.",ej.BadRef="Address is not correct.",ej.NumberRange="Number-only range expected.",ej.ValueNotFound="Value not found.",ej.ValueBaseLarge="Value in base too large.",ej.ValueBaseSmall="Value in base too small.",ej.ValueBaseLong="Value in base too long.",ej.NegativeLength="Length cannot be negative.",ej.PatternNotFound="Pattern not found.",ej.OneValue="Needs at least one value.",ej.TwoValues="Range needs to contain at least two elements.",ej.ThreeValues="Range needs to contain at least three elements.",ej.IndexBounds="Index out of bounds.",ej.IndexLarge="Index too large.",ej.Formula="Expected formula.",ej.NegativeCount="Count cannot be negative.",ej.ParseError="Parsing error.",ej.SheetRef="Sheet does not exist.",ej.PeriodLong="Period number cannot exceed life length.",ej.InvalidDate="Invalid date.",ej.BitshiftLong="Result of bitshift is too long.",ej.EmptyString="Empty-string argument not allowed.",ej.LengthBounds="Length out of bounds.",ej.NegativeTime="Time cannot be negative.",ej.NoDefault="No default option.",ej.NoConditionMet="None of the conditions were met.",ej.Selector="Selector cannot exceed the number of arguments.",ej.StartEndDate="Start date needs to be earlier than end date.",ej.IncorrectDateTime="String does not represent correct DateTime.",ej.CharacterCodeBounds="Character code out of bounds.",ej.NonZero="Argument cannot be 0.",ej.LessThanOne="Argument cannot be less than 1.",ej.WeekendString="Incorrect weekend bitmask string.",ej.InvalidRoman="Invalid roman numeral.",ej.WrongOrder="Wrong order of values.",ej.ComplexNumberExpected="Complex number expected.",ej.ShouldBeIorJ="Should be 'i' or 'j'.",ej.SizeMismatch="Array dimensions mismatched.",ej.ResultTooLong="Result exceeds the maximum allowed length.",ej.FunctionName=e=>`Function name ${e} not recognized.`,ej.NamedExpressionName=e=>`Named expression ${e} not recognized.`,ej.LicenseKey=e=>`License key is ${e}.`;let eq=(0,e_.createToken)({name:"AdditionOp",pattern:e_.Lexer.NA}),eK=(0,e_.createToken)({name:"PlusOp",pattern:/\+/,categories:eq}),eX=(0,e_.createToken)({name:"MinusOp",pattern:/-/,categories:eq}),eQ=(0,e_.createToken)({name:"MultiplicationOp",pattern:e_.Lexer.NA}),eZ=(0,e_.createToken)({name:"TimesOp",pattern:/\*/,categories:eQ}),eJ=(0,e_.createToken)({name:"DivOp",pattern:/\//,categories:eQ}),e0=(0,e_.createToken)({name:"PowerOp",pattern:/\^/}),e1=(0,e_.createToken)({name:"PercentOp",pattern:/%/}),e2=(0,e_.createToken)({name:"BooleanOp",pattern:e_.Lexer.NA}),e3=(0,e_.createToken)({name:"EqualsOp",pattern:/=/,categories:e2}),e6=(0,e_.createToken)({name:"NotEqualOp",pattern:/<>/,categories:e2}),e5=(0,e_.createToken)({name:"GreaterThanOp",pattern:/>/,categories:e2}),e4=(0,e_.createToken)({name:"LessThanOp",pattern:/</,categories:e2}),e9=(0,e_.createToken)({name:"GreaterThanOrEqualOp",pattern:/>=/,categories:e2}),e7=(0,e_.createToken)({name:"LessThanOrEqualOp",pattern:/<=/,categories:e2}),e8=(0,e_.createToken)({name:"ConcatenateOp",pattern:/&/}),te=(0,e_.createToken)({name:"LParen",pattern:/\(/}),tt=(0,e_.createToken)({name:"RParen",pattern:/\)/}),tr=(0,e_.createToken)({name:"ArrayLParen",pattern:/{/}),tn=(0,e_.createToken)({name:"ArrayRParen",pattern:/}/}),to=(0,e_.createToken)({name:"StringLiteral",pattern:/"([^"\\]*(\\.[^"\\]*)*)"/}),ti=(0,e_.createToken)({name:"ErrorLiteral",pattern:/#[A-Za-z0-9\/]+[?!]?/}),ts=(0,e_.createToken)({name:"RangeSeparator",pattern:RegExp(":")}),ta=(0,e_.createToken)({name:"ColumnRange",pattern:RegExp(`${eg}:${eg}`)}),tl=(0,e_.createToken)({name:"RowRange",pattern:RegExp(`${ep}:${ep}`)}),th=(0,e_.createToken)({name:"ProcedureName",pattern:RegExp(`([${el}][${eh}]*)\\(`)}),td=new class{constructor(){this.POSSIBLE_START_CHARACTERS=[...ey,...eC,"$","'","_"],this.cellReferenceRegexp=RegExp(ef,"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)}},tu=(0,e_.createToken)({name:"CellReference",pattern:td.match.bind(td),start_chars_hint:td.POSSIBLE_START_CHARACTERS,line_breaks:!1}),tc=new class{constructor(){this.POSSIBLE_START_CHARACTERS=[...ey,"_"],this.namedExpressionRegexp=RegExp(eb,"y"),this.r1c1CellRefRegexp=RegExp(`^${em}$`)}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}},tg=(0,e_.createToken)({name:"NamedExpression",pattern:tc.match.bind(tc),start_chars_hint:tc.POSSIBLE_START_CHARACTERS,line_breaks:!1});class tp extends e_.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,e_.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(th),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(tt);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(tg);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(te),this.MANY_SEP({SEP:this.lexerConfig.ArgSeparator,DEF:()=>{e.push(this.SUBRULE(this.booleanExpression))}}),this.CONSUME(tt),this.handleOffsetHeuristic(e)}),this.columnRangeExpression=this.RULE("columnRangeExpression",()=>{var e;let t=this.CONSUME(ta),[r,i]=t.image.split(":"),s=this.ACTION(()=>eT(r,this.formulaAddress,this.resolveSheetReference)),a=this.ACTION(()=>eT(i,this.formulaAddress,this.resolveSheetReference));if(void 0===s||void 0===a)return eB(new rK(d.REF));if(s.exceedsSheetSizeLimits(this.lexerConfig.maxColumns)||a.exceedsSheetSizeLimits(this.lexerConfig.maxColumns))return eV(t.image,new rK(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}=tp.fixSheetIdsForRangeEnds(s,a);return e=t.leadingWhitespace,ez(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(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 eB(new rK(d.REF));if(s.exceedsSheetSizeLimits(this.lexerConfig.maxRows)||a.exceedsSheetSizeLimits(this.lexerConfig.maxRows))return eV(t.image,new rK(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}=tp.fixSheetIdsForRangeEnds(s,a);return e=t.leadingWhitespace,ez(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(tu),t=this.ACTION(()=>eE(e.image,this.formulaAddress,this.resolveSheetReference));return void 0===t?eV(e.image,new rK(d.REF),e.leadingWhitespace):t.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?eV(e.image,new rK(d.NAME),e.leadingWhitespace):eP(t,e.leadingWhitespace)}),this.endRangeReference=this.RULE("endRangeReference",e=>{var t;let r=this.CONSUME(tu),n=this.ACTION(()=>eE(e.image,this.formulaAddress,this.resolveSheetReference)),o=this.ACTION(()=>eE(r.image,this.formulaAddress,this.resolveSheetReference));return void 0===n||void 0===o?this.ACTION(()=>eV(`${e.image}:${r.image}`,new rK(d.REF),e.leadingWhitespace)):n.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)||o.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?this.ACTION(()=>eV(`${e.image}:${r.image}`,new rK(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(()=>eE(e.image,this.formulaAddress,this.resolveSheetReference));return void 0===i?eB(new rK(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(tu);return this.CONSUME2(ts),this.SUBRULE(this.endOfRangeExpression,{ARGS:[e]})}),this.endRangeWithOffsetStartReference=this.RULE("endRangeWithOffsetStartReference",e=>{let t=this.CONSUME(tu),r=this.ACTION(()=>eE(t.image,this.formulaAddress,this.resolveSheetReference));return void 0===r?this.ACTION(()=>eB(new rK(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(ts),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))}}])}),eF(e)}),this.parenthesisExpression=this.RULE("parenthesisExpression",()=>{let e,t,r=this.CONSUME(te),n=this.SUBRULE(this.booleanExpression),i=this.CONSUME(tt);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(tr),t=this.SUBRULE(this.insideArrayExpression),r=this.CONSUME(tn);return eF(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(to),{type:o.STRING,value:e.image.slice(1,-1),leadingWhitespace:null==(t=e.leadingWhitespace)?void 0:t.image}}},{ALT:()=>{let e=this.CONSUME(ti),t=e.image.toUpperCase(),r=this.lexerConfig.errorMapping[t];return r?eB(new rK(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(e1));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(eq),t=this.SUBRULE(this.atomicExpression);if((0,e_.tokenMatcher)(e,eK)){let r;return r=e.leadingWhitespace,{type:o.PLUS_UNARY_OP,value:t,leadingWhitespace:null==r?void 0:r.image}}if((0,e_.tokenMatcher)(e,eX)){let r;return r=e.leadingWhitespace,{type:o.MINUS_UNARY_OP,value:t,leadingWhitespace:null==r?void 0:r.image}}return this.customParsingError=eL(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(e0),r=this.SUBRULE2(this.atomicExpression);if((0,e_.tokenMatcher)(t,e0)){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(eQ),r=this.SUBRULE2(this.powerExpression);if((0,e_.tokenMatcher)(t,eZ)){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,e_.tokenMatcher)(t,eJ)){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(eq),r=this.SUBRULE2(this.multiplicationExpression);if((0,e_.tokenMatcher)(t,eK)){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,e_.tokenMatcher)(t,eX)){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(e8),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(e2),r=this.SUBRULE2(this.concatenateExpression);if((0,e_.tokenMatcher)(t,e3)){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,e_.tokenMatcher)(t,e6)){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,e_.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,e_.tokenMatcher)(t,e4)){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,e_.tokenMatcher)(t,e9)){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,e_.tokenMatcher)(t,e7)){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(e3),this.SUBRULE(this.booleanExpression))),this.lexerConfig=e,this.formulaAddress=r0(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=eU()),{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}=tp.fixSheetIdsForRangeEnds(e,t);return eD(o,i,s,r)}static fixSheetIdsForRangeEnds(e,t){let r=tp.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 ea(u.reference.col+a,u.reference.row+s,u.reference.type,null!=(r=u.reference.sheet)?r:void 0),b=f.col,C=f.row;if((u.reference.type===t.CELL_REFERENCE_RELATIVE||u.reference.type===t.CELL_REFERENCE_ABSOLUTE_COL)&&(C+=this.formulaAddress.row),(u.reference.type===t.CELL_REFERENCE_RELATIVE||u.reference.type===t.CELL_REFERENCE_ABSOLUTE_ROW)&&(b+=this.formulaAddress.col),b<0||C<0)return eB(new rK(d.REF,ej.OutOfSheet));if(1===h&&1===l)return eP(f);{let e=new ea(f.col+h-1,f.row+l-1,f.type,f.sheet);return eD(f,e,null==u.reference.sheet?i.RELATIVE:i.BOTH_ABSOLUTE)}}parsingError(e,t){return this.customParsingError=eL(e,t),eU()}static rangeSheetReferenceType(e,t){return void 0===e?i.RELATIVE:void 0===t?i.START_ABSOLUTE:i.BOTH_ABSOLUTE}}class tm{constructor(e){this.lexerConfig=e,this.lexer=new e_.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 tm.filterTokensByNeighbors(e,(e,t,r)=>((0,e_.tokenMatcher)(e,tu)||(0,e_.tokenMatcher)(e,ts))&&(0,e_.tokenMatcher)(t,this.lexerConfig.WhiteSpace)&&((0,e_.tokenMatcher)(r,tu)||(0,e_.tokenMatcher)(r,ts)))}skipWhitespacesBeforeArgSeparators(e){return tm.filterTokensByNeighbors(e,(e,t,r)=>!(0,e_.tokenMatcher)(e,this.lexerConfig.ArgSeparator)&&(0,e_.tokenMatcher)(t,this.lexerConfig.WhiteSpace)&&(0,e_.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,e_.tokenMatcher)(e[e.length-1],this.lexerConfig.WhiteSpace)&&e.pop(),e}}class tf{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 eW("",e.leadingWhitespace);case o.NUMBER:return eW(tb(e.value,this.config.decimalSeparator),e.leadingWhitespace);case o.STRING:return eW('"'+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+eW(")",e.internalWhitespace);return eW(n,e.leadingWhitespace)}case o.NAMED_EXPRESSION:return eW((null==(r=this.namedExpressions.nearestNamedExpression(e.expressionName,t.sheet))?void 0:r.displayName)||e.expressionName,e.leadingWhitespace);case o.CELL_REFERENCE:return eW((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 eW(this.formatRange(e,t),e.leadingWhitespace);case o.PLUS_UNARY_OP:{let r=this.unparseAst(e.value,t);return eW("+",e.leadingWhitespace)+r}case o.MINUS_UNARY_OP:{let r=this.unparseAst(e.value,t);return eW("-",e.leadingWhitespace)+r}case o.PERCENT_OP:return this.unparseAst(e.value,t)+eW("%",e.leadingWhitespace);case o.ERROR:return eW(this.config.translationPackage.getErrorTranslation(e.error?e.error.type:d.ERROR),e.leadingWhitespace);case o.ERROR_WITH_RAW_INPUT:return eW(e.rawInput,e.leadingWhitespace);case o.PARENTHESIS:{let r="("+this.unparseAst(e.expression,t)+eW(")",e.internalWhitespace);return eW(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)+eW("}",e.internalWhitespace);return eW(r,e.leadingWhitespace)}default:{let r=this.unparseAst(e.left,t),n=this.unparseAst(e.right,t);return r+eW(eG[e.type],e.leadingWhitespace)+n}}}unparseSheetName(e){let t=eO(e,e=>this.sheetMapping.getSheetNameOrThrowError(e,{includePlaceholders:!0}));if(void 0===t)throw new tK(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,e_.createToken)({name:"WhiteSpace",pattern:s}),l=(0,e_.createToken)({name:"ArrayRowSep",pattern:e.arrayRowSeparator}),h=(0,e_.createToken)({name:"ArrayColSep",pattern:e.arrayColumnSeparator}),d=(0,e_.createToken)({name:"NumberLiteral",pattern:RegExp(`(([${e.decimalSeparator}]\\d+)|(\\d+([${e.decimalSeparator}]\\d*)?))(e[+-]?\\d+)?`)}),u=(0,e_.createToken)({name:"OffsetProcedureName",pattern:RegExp(n,"i")});e.functionArgSeparator===e.arrayColumnSeparator?(t=h,r=[]):e.functionArgSeparator===e.arrayRowSeparator?(t=l,r=[]):r=[t=(0,e_.createToken)({name:"ArgSeparator",pattern:e.functionArgSeparator})];let c=[a,eK,eX,eZ,eJ,e0,e3,e6,e1,e9,e7,e5,e4,te,tt,tr,tn,u,th,ts,...r,ta,tl,d,to,ti,e8,e2,eq,eQ,tu,tg,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 tm(this.lexerConfig),this.formulaParser=new tp(this.lexerConfig,this.resolveSheetReference),this.cache=new e$(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:eU(),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=tw(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(ei.compareByAbsoluteAddress(this.formulaAddress)),[i,s]=r.map(e=>e.toRowAddress()).sort(es.compareByAbsoluteAddress(this.formulaAddress)),[a,l]=r.map(e=>e.sheet).sort(tC.compareSheetIds.bind(this));return{start:ea.fromColAndRow(n,i,a),end:ea.fromColAndRow(o,s,l)}}orderColumnRangeEnds(e,t){let r=[e,t],[n,o]=r.sort(ei.compareByAbsoluteAddress(this.formulaAddress)),[i,s]=r.map(e=>e.sheet).sort(tC.compareSheetIds.bind(this));return{start:new ei(n.type,n.col,i),end:new ei(o.type,o.col,s)}}orderRowRangeEnds(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.row,i),end:new es(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,e_.tokenMatcher)(i,tu)){let e=eE(i.image,t,this.resolveSheetReference);n=void 0===e?n.concat(i.image):n.concat(e.hash(!0))}else if((0,e_.tokenMatcher)(i,th)){let e=i.image.toUpperCase().slice(0,-1),t=null!=(r=this.lexerConfig.functionMapping[e])?r:e;n=n.concat(t,"(")}else if((0,e_.tokenMatcher)(i,ta)){let[e,r]=i.image.split(":"),o=eT(e,t,this.resolveSheetReference),s=eT(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,e_.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 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 eW(tb(e.value,this.config.decimalSeparator),e.leadingWhitespace);case o.STRING:return eW('"'+e.value+'"',e.leadingWhitespace);case o.NAMED_EXPRESSION:return eW(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+eW(")",e.internalWhitespace);return eW(r,e.leadingWhitespace)}case o.CELL_REFERENCE:return eW(e.reference.hash(!0),e.leadingWhitespace);case o.COLUMN_RANGE:case o.ROW_RANGE:case o.CELL_RANGE:return eW(e.start.hash(e.sheetReferenceType!==i.RELATIVE)+":"+e.end.hash(e.sheetReferenceType===i.BOTH_ABSOLUTE),e.leadingWhitespace);case o.MINUS_UNARY_OP:return eW("-"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case o.PLUS_UNARY_OP:return eW("+"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case o.PERCENT_OP:return this.computeHashOfAstNode(e.value)+eW("%",e.leadingWhitespace);case o.ERROR:return eW(this.config.translationPackage.getErrorTranslation(e.error?e.error.type:d.ERROR),e.leadingWhitespace);case o.ERROR_WITH_RAW_INPUT:return eW(e.rawInput,e.leadingWhitespace);case o.ARRAY:return eW("{"+e.args.map(e=>e.map(e=>this.computeHashOfAstNode(e)).join(",")).join(";")+eW("}",e.internalWhitespace),e.leadingWhitespace);case o.PARENTHESIS:{let t="("+this.computeHashOfAstNode(e.expression)+eW(")",e.internalWhitespace);return eW(t,e.leadingWhitespace)}default:return this.computeHashOfAstNode(e.left)+eW(eG[e.type],e.leadingWhitespace)+this.computeHashOfAstNode(e.right)}}bindWhitespacesToTokens(e){let t=[],r=e[0];(0,e_.tokenMatcher)(r,this.lexerConfig.WhiteSpace)||t.push(r);for(let r=1;r<e.length;++r){let n=e[r];if((0,e_.tokenMatcher)(n,this.lexerConfig.WhiteSpace))continue;let o=e[r-1];(0,e_.tokenMatcher)(o,this.lexerConfig.WhiteSpace)&&(n.leadingWhitespace=o),t.push(n)}return t}tokenizeFormula(e){return this.lexer.tokenizeFormula(e)}}let ty=(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 tT(e.expressionName));return;case o.CELL_REFERENCE:n&&r.push(new tS(e.reference));return;case o.CELL_RANGE:n&&e.start.sheet===e.end.sheet&&r.push(new tv(e.start,e.end));return;case o.COLUMN_RANGE:n&&e.start.sheet===e.end.sheet&&r.push(new tR(e.start,e.end));return;case o.ROW_RANGE:n&&e.start.sheet===e.end.sheet&&r.push(new tE(e.start,e.end));return;case o.PERCENT_OP:case o.PLUS_UNARY_OP:case o.MINUS_UNARY_OP:return void ty(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:ty(e.left,t,r,!0),ty(e.right,t,r,!0);return;case o.PARENTHESIS:ty(e.expression,t,r,n);return;case o.FUNCTION_CALL:{let n=!t.doesFunctionNeedArgumentToBeComputed(e.procedureName);e.args.forEach(e=>ty(e,t,r,n));return}}},tw=(e,t)=>{let r=[];return ty(e,t,r,!0),r};class tS{constructor(e){this.dependency=e}absolutize(e){return this.dependency.toSimpleCellAddress(e)}}class tv{constructor(e,t){this.start=e,this.end=t}absolutize(e){return new r8(this.start.toSimpleCellAddress(e),this.end.toSimpleCellAddress(e))}}class tR{constructor(e,t){this.start=e,this.end=t}absolutize(e){let t=this.start.toSimpleColumnAddress(e),r=this.end.toSimpleColumnAddress(e);return new ne(t.sheet,t.col,r.col)}}class tE{constructor(e,t){this.start=e,this.end=t}absolutize(e){let t=this.start.toSimpleRowAddress(e),r=this.end.toSimpleRowAddress(e);return new nt(t.sheet,t.row,r.row)}}class tT{constructor(e){this.name=e}absolutize(e){return this}}let tA=(e,t)=>e.map(e=>e.absolutize(t)),tM=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 tN(e,t){if("number"==typeof e)return t;{let r=e.fromNumber(t);return r.format=e.format,r}}class tO 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 t_ extends tx{getDetailedType(){return s.NUMBER_DATETIME}}class tL extends tx{getDetailedType(){return s.NUMBER_PERCENT}}function tP(e){return"number"==typeof e||e instanceof tx}function tD(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 tF{constructor(e,t,r,n){this._data=e,this.range=t,this.dependencyGraph=r,this._hasOnlyNumbers=n,this.size=void 0===e?new nR(t.effectiveWidth(r),t.effectiveHeight(r)):new nR(e[0].length,e.length)}get data(){return this.ensureThatComputed(),this._data}static fromRange(e,t,r){return new tF(e,t,r,!0)}static onlyNumbers(e){return new tF(e,void 0,void 0,!0)}static onlyValues(e){return new tF(e,void 0,void 0,void 0)}static onlyRange(e,t){return new tF(void 0,e,t,void 0)}static fromScalar(e){return new tF([[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 r0(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],r0(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 tF?(this._hasOnlyNumbers=!1,new rK(d.VALUE,ej.ScalarExpected)):(tP(t)||(this._hasOnlyNumbers=!1),t)}))}}class tB{constructor(){this.changes=new Map}static empty(){return new tB}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 tF)for(let t of r.effectiveAddressesFromData(e))this.changes.delete(r3(t));this.changes.set(r3(e),t)}addInterpreterValue(e,t,r){this.add(t,{address:t,value:e,oldValue:r})}}class tV{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 tV(this.displayName,this.address,this.added,this.options)}}class tU{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 tz{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 tW{constructor(){this.nextNamedExpressionRow=0,this.workbookStore=new tU,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(`^${ec}$`),r=RegExp(`^${em}$`),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 tV(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 tV(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 tz&&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 tz,this.worksheetStores.set(e,t)),t}worksheetStore(e){return this.worksheetStores.get(e)}nextAddress(){return r0(tW.SHEET_FOR_WORKBOOK_EXPRESSIONS,0,this.nextNamedExpressionRow++)}}tW.SHEET_FOR_WORKBOOK_EXPRESSIONS=-1;let tG=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 tG(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 tG(e.left)||tG(e.right);case o.PARENTHESIS:return tG(e.expression);case o.FUNCTION_CALL:return e.args.some(e=>tG(e));case o.ARRAY:return e.args.some(e=>e.some(e=>tG(e)))}};class t${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 t$(e,t,t+r-1)}static fromRowStartAndEnd(e,t,r){return new t$(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 t$(this.sheet,t,r)}firstRow(){return new t$(this.sheet,this.rowStart,this.rowStart)}}class tY{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 tY(e,t,t+r-1)}static fromColumnStartAndEnd(e,t,r){return new tY(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 tY(this.sheet,t,r)}firstColumn(){return new tY(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 tj{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 tq extends tj{incrementCriterionFunctionFullCacheUsed(){}incrementCriterionFunctionPartialCacheUsed(){}start(e){}end(e){}}class tK extends Error{constructor(e){super(`There's no sheet with id = ${e}`)}}class tX extends Error{constructor(e){super(`There's no sheet with name '${e}'`)}}class tQ extends Error{constructor(e){super(`Sheet with name ${e} already exists`)}}class tZ extends Error{constructor(){super("Sheet size limit exceeded")}}class tJ extends Error{constructor(){super("This is not a formula")}}class t0 extends Error{constructor(e){super(`Address (row = ${e.row}, col = ${e.col}) is invalid`)}}class t1 extends Error{constructor(e){super(`Invalid arguments, expected ${e}`)}}class t2 extends Error{constructor(e,t){super(`Sheets ${e} and ${t} are not equal.`)}}class t3 extends Error{constructor(e){super(`Name of Named Expression '${e}' is already present`)}}class t6 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 t4 extends Error{constructor(){super("There is no operation to undo")}}class t9 extends Error{constructor(){super("There is no operation to redo")}}class t7 extends Error{constructor(){super("There is nothing to paste")}}function t8(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 re extends Error{constructor(e){super(`Unable to parse value: ${JSON.stringify(e,t8,4)}`)}}class rt extends Error{constructor(e,t){super(`Expected value of type: ${e} for config parameter: ${t}`)}}class rr extends Error{constructor(e){super(`Config parameter ${e} cannot be empty.`)}}class rn extends Error{constructor(e,t){super(`Config parameter ${e} should be at least ${t}`)}}class ro extends Error{constructor(e,t){super(`Config parameter ${e} should be at most ${t}`)}}class ri extends Error{constructor(e,t){super(`Expected one of ${e} for config parameter: ${t}`)}}class rs extends Error{constructor(){super("Computations are suspended")}}class ra extends Error{constructor(e){super(`Translation for ${e} is missing in the translation package you're using.`)}}class rl extends Error{constructor(e){super(`Cannot register translation for function with id: ${e}`)}}class rh extends Error{constructor(){super("Language not registered.")}}class rd extends Error{constructor(){super("Language already registered.")}}class ru extends Error{static functionNotDeclaredInPlugin(e,t){return new ru(`Function with id ${e} not declared in plugin ${t}`)}static functionMethodNotFound(e,t){return new ru(`Function method ${e} not found in plugin ${t}`)}}class rc extends Error{static cannotRegisterFunctionWithId(e){return new rc(`Cannot register function with id ${e}`)}static cannotUnregisterFunctionWithId(e){return new rc(`Cannot unregister function with id ${e}`)}static cannotUnregisterProtectedPlugin(){return new rc("Cannot unregister protected plugin")}}class rg extends Error{constructor(){super("Cannot perform this operation, source location has an array inside.")}}class rp extends Error{constructor(){super("Cannot perform this operation, target location has an array inside.")}}class rm extends Error{constructor(){super("Relative addresses not allowed in named expressions.")}}class rf 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 tK(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 tK(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 tK(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 rG?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 rG(0,0))}removeSheetIfExists(e){return this.mapping.delete(e)}getCellValue(e){let t=this.getCell(e);return void 0===t?tM:t instanceof rT?t.getArrayCellValue(e):t.getCellValue()}getRawValue(e){let t=this.getCell(e);return t instanceof rU?t.getValues().rawValue:t instanceof rT?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(r3(e))}setArray(e,t){this.arrayMapping.set(r3(e.start),t)}removeArray(e){"string"==typeof e?this.arrayMapping.delete(e):this.arrayMapping.delete(r3(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 ry{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 rw{constructor(e){if(this.size=new nR(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 rw(e instanceof tF?e.data:[[e]])}simpleRangeValue(){return tF.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(tM));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(tM));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 rS{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 rv{}class rR extends rv{constructor(){super()}}class rE extends rR{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 rA(e,t,n):new rT(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 rT extends rE{constructor(e,t,r,n=0){super(e,t,n),r.isRef?this.array=new rS(new rK(d.REF,ej.NoSpaceForArrayResult),nR.error()):this.array=new ry(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 rK)return this.setErrorValue(e),e;let t=rw.fromInterpreterValue(e);return t.resize(this.array.size),this.array=t,e}getCellValue(){if(this.array instanceof ry)throw Error("Array not computed yet.");return this.array.simpleRangeValue()}valueOrUndef(){if(!(this.array instanceof ry))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 rK(d.REF)}}getArrayCellRawValue(e){let t=this.getArrayCellValue(e);if(!(t instanceof rK)&&t!==tM)return tI(t)}setArrayCellValue(e,t){let r=e.col-this.cellAddress.col,n=e.row-this.cellAddress.row;this.array instanceof rw&&this.array.set(r,n,t)}setNoSpace(){return this.array=new rS(new rK(d.SPILL,ej.NoSpaceForArrayResult),nR.error()),this.getCellValue()}getRange(){return r8.spanFrom(this.cellAddress,this.width,this.height)}getRangeOrUndef(){return r8.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 ry)}columnsFromArray(){return tY.fromNumberOfColumns(this.cellAddress.sheet,this.cellAddress.col,this.width)}rowsFromArray(){return t$.fromNumberOfRows(this.cellAddress.sheet,this.cellAddress.row,this.height)}ensureRecentData(e){}isLeftCorner(e){return r4(this.cellAddress,e)}setErrorValue(e){this.array=new rS(e,this.array.size)}}class rA extends rE{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 rM extends rv{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 rM){let e=t.range.intersectionWith(r);return void 0!==e?Array.from(e.addresses(o)):[]}return t instanceof rE?(i=t.getFormula(n),s=t.getAddress(n),tw(i,e).filter(e=>e instanceof tS).map(e=>e.dependency.toSimpleCellAddress(s)).filter(e=>r.addressInRange(e))):[]};(N=l||(l={}))[N.ON_STACK=0]="ON_STACK",N[N.PROCESSED=1]="PROCESSED",N[N.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 rN{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 rO{constructor(e){this.dependencyQuery=e,this.nodesSparseArray=[],this.edgesSparseArray=[],this.dirtyAndVolatileNodeIds=new rN({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=r0(e.end.sheet,e.end.col,e.end.row-1),r=this.getRangeVertex(e.start,t);if(void 0!==r)return{smallerRangeVertex:r,restRange:r8.fromSimpleCellAddresses(r0(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 ra(`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 ra(`errors.${e}`)}getUITranslation(e){let t=this.ui[e];if(void 0!==t)return t;throw new ra(`ui.${e}`)}checkUI(){for(let e of Object.values(h))if(!(e in this.ui))throw new ra(`ui.${e}`)}checkErrors(){for(let e of Object.values(d))if(!(e in this.errors)&&e!==d.LIC)throw new ra(`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 rl(e)}}(h||(h={})).NEW_SHEET_PREFIX="NEW_SHEET_PREFIX";class r_{constructor(e,t,r=!1){this.id=e,this.displayName=t,this.isPlaceholder=r}get canonicalName(){return rL.canonicalizeSheetName(this.displayName)}}class rL{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 tX(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 tQ(e);return t.isPlaceholder=!1,t.id}this.lastSheetId++;let r=new r_(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 tQ(t);r.isPlaceholder=!1;return}e>this.lastSheetId&&(this.lastSheetId=e);let n=new r_(e,t);this._storeSheetInMappings(n)}addPlaceholderIfNotExists(e){let t=this._getSheetByName(e,{includePlaceholders:!0});if(t)return t.id;this.lastSheetId++;let r=new r_(this.lastSheetId,e,!0);return this._storeSheetInMappings(r),r.id}addPlaceholderWithId(e,t){if(this._getSheetByName(t,{includePlaceholders:!0}))throw new tQ(t);if(this.hasSheetWithId(e,{includePlaceholders:!0}))throw Error(`Sheet with id ${e} already exists`);e>this.lastSheetId&&(this.lastSheetId=e);let r=new r_(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 tQ(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(rL.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 tK(e);return r}}class rP{constructor(e,t){this.sheetMapping=e,this.addressMapping=t}ensureSheetRegistered(e){let t=this.sheetMapping.addPlaceholderIfNotExists(e);return this.addressMapping.addSheetStrategyPlaceholderIfNotExists(t),t}}function rD(e){if(!Array.isArray(e))throw new t1("an array of arrays.");for(let t=0;t<e.length;t++)if(!Array.isArray(e[t]))throw new t1("an array of arrays.")}function rF(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 rB{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=tB.empty(),this.dependencyQueryAddresses=e=>{if(e instanceof rM)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 tT?this.namedExpressions.namedExpressionOrPlaceholder(t.name,e.sheet).address:r6(t)?t:r7(t.start,t.end))}}},this.dependencyQueryVertices=e=>{if(e instanceof rM)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 r8)return[t.start,this.rangeMapping.getVertexOrThrow(t.start,t.end)];if(!(t instanceof tT))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 r8(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 rE?(t=e.getAddress(this.lazilyTransformingAstService),[t,tA(tw(e.getFormula(this.lazilyTransformingAstService),this.functionRegistry),t)]):void 0},this.graph=new rO(this.dependencyQueryVertices),this.sheetReferenceRegistrar=new rP(r,e)}static buildEmpty(e,t,r,n,o){return new rB(new rb(t.chooseAddressMappingPolicy),new rk,new rL(t.translationPackage),new rC,o,e,r,n)}setFormulaToCell(e,t,r,n,o,i){let s=rE.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 rT&&this.arrayMapping.removeArray(r.getRange()),r instanceof rU)r.getValues().rawValue!==t.rawValue&&(r.setValues(t),this.graph.markNodeAsDirty(r));else{let n=new rU(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 tB.empty();if(this.graph.adjacentNodes(t).size>0){let r=new rV;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 r8){let t=this.getRange(e.start,e.end);void 0===t&&(t=new rM(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 tT){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 rV,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 rT)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,rF([])),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 rT?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 rT)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 rV)&&t!==e)return!1}return!0}moveCells(e,t,r,n){for(let o of e.addressesWithDirection(t,r,this)){let i=r0(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 rM&&!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 rM&&!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=r8.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 rT&&(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 rK(d.REF,ej.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 rK(d.REF,ej.SheetRef);let t=this.addressMapping.getCellValue(e);return t instanceof tF?new rK(d.VALUE,ej.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 rA&&e.ensureRecentData(this.lazilyTransformingAstService)}*rawValuesFromRange(e){for(let t of e.addresses(this)){let e=this.getScalarValue(t);e!==tM&&(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 rE?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 rT&&!t.isLeftCorner(e)}getAndClearContentChanges(){let e=this.changes;return this.changes=tB.empty(),e}getAdjacentNodesAddresses(e){let t=this.graph.adjacentNodes(e),r=[];return t.forEach(e=>{e instanceof rM?r.push(r7(e.start,e.end)):e instanceof rE&&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=r0(e,n.col,n.row),s=r0(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=r0(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!==tW.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 rT&&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 rK(d.REF),t,r):(this.addressMapping.removeCell(t),this.changes.addChange(tM,t,r)):this.changes.addChange(tM,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 tT)&&!(e instanceof r8)&&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 rE||t instanceof rM)&&(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 rM(r8.spanFrom(e.range.start,e.range.width(),e.range.height()-1));this.rangeMapping.addOrUpdateVertex(r),this.graph.addNodeIfNotExists(r);let n=new r8(r0(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):r8.spanFrom(r0(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=r8.spanFrom(t,e.width,e.height),n=this.shrinkPossibleArrayAndGetCell(t);if(e instanceof rT&&this.setArray(r,e),this.exchangeOrAddGraphNode(n,e),this.addressMapping.setCell(t,e),e instanceof rT){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 rT))return;let r=r8.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(t$.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=r0(e,i,s),o=r0(e,i,s+r),a=n.getArrayCellValue(t);this.addressMapping.moveCell(o,t),this.changes.addChange(tM,o,a)}}}fixArraysAfterRemovingRows(e,t,r){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,-r),!(t<=0))for(let[,r]of this.arrayMapping.arraysInRows(t$.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(tY.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=r0(e,s,i),o=r0(e,s+r,i),a=n.getArrayCellValue(t);this.addressMapping.moveCell(o,t),this.changes.addChange(tM,o,a)}}}fixArraysAfterRemovingColumns(e,t,r){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,-r),!(t<=0))for(let[,r]of this.arrayMapping.arraysInCols(tY.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 rT?(this.setNoSpaceIfArray(t),this.getCell(e)):t}setNoSpaceIfArray(e){e instanceof rT&&(this.shrinkArrayToCorner(e),e.setNoSpace())}removeVertex(e){this.removeVertexAndCleanupDependencies(e),e instanceof rM&&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 rM||o instanceof rV)&&this.graph.removeNode(o).forEach(e=>t.add(e)),o instanceof rM?(this.rangeMapping.removeVertexIfExists(o),r.add(o.sheet)):o instanceof rV&&r6(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 rV extends rR{constructor(){super()}getCellValue(){return tM}}class rU extends rR{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 rz extends rR{constructor(e,t){super(),this.errors=e,this.rawInput=t}getCellValue(){let e=this.errors.map(e=>e.message).find(e=>e);return rK.parsingError(e)}getFormula(){return this.rawInput}}class rW{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[r0(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[r0(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[r0(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 rG{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[r0(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[r0(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[r0(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]}}(O=d||(d={})).DIV_BY_ZERO="DIV_BY_ZERO",O.NAME="NAME",O.VALUE="VALUE",O.NUM="NUM",O.NA="NA",O.CYCLE="CYCLE",O.REF="REF",O.SPILL="SPILL",O.LIC="LIC",O.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 r$=Object.assign(Object.assign({},c),g),rY=Object.assign(Object.assign({},c),s),rj=e=>{switch(e){case r$.EMPTY:return 0;case r$.NUMBER:return 1;case r$.STRING:return 2;case r$.BOOLEAN:return 3;case r$.ERROR:return 4}throw Error("Cell value not computed")},rq=e=>{if(e===tM)return r$.EMPTY;if(e instanceof rK||e instanceof tF)return r$.ERROR;if("string"==typeof e)return r$.STRING;if(tP(e))return r$.NUMBER;if("boolean"==typeof e)return r$.BOOLEAN;throw Error("Cell value not computed")};class rK{constructor(e,t,r){this.type=e,this.message=t,this.root=r}static parsingError(e){return new rK(d.ERROR,`${ej.ParseError}${e?" "+e:""}`)}attachRootVertex(e){return void 0===this.root?new rK(this.type,this.message,e):this}}let rX=(e,t)=>({sheet:e,row:t}),rQ=e=>e.row<0,rZ=(e,t)=>({sheet:e,col:t}),rJ=e=>e.col<0,r0=(e,t,r)=>({sheet:e,col:t,row:r}),r1=e=>e.col<0||e.row<0,r2=(e,t,r,n)=>r0(t,e.col+r,e.row+n),r3=e=>`${e.sheet},${e.row},${e.col}`;function r6(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},r4=(e,t)=>e.sheet===t.sheet&&e.col===t.col&&e.row===t.row;function r9(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"start"in e&&r6(e.start)&&"end"in e&&r6(e.end)}let r7=(e,t)=>({start:e,end:t});class r8{constructor(e,t){if(e.sheet!==t.sheet)throw new t2(e.sheet,t.sheet);this.start=r0(e.sheet,e.col,e.row),this.end=r0(t.sheet,t.col,t.row)}get sheet(){return this.start.sheet}static fromSimpleCellAddresses(e,t){if(e.sheet!==t.sheet)throw new t2(e.sheet,t.sheet);let r=t.col-e.col,n=t.row-e.row;return Number.isFinite(n)&&Number.isFinite(r)?new r8(e,t):Number.isFinite(n)?new nt(e.sheet,e.row,t.row):new ne(e.sheet,e.col,t.col)}static fromAst(e,t){return e.type===o.CELL_RANGE?r8.fromCellRange(e,t):e.type===o.COLUMN_RANGE?ne.fromColumnRange(e,t):nt.fromRowRangeAst(e,t)}static fromAstOrUndef(e,t){try{return r8.fromAst(e,t)}catch(e){return}}static fromCellRange(e,t){return new r8(e.start.toSimpleCellAddress(t),e.end.toSimpleCellAddress(t))}static spanFrom(e,t,r){let n=r8.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 nt(e.sheet,e.row,e.row+r-1)}else if(!Number.isFinite(r)&&Number.isFinite(t)){if(0!==e.row)return;return new ne(e.sheet,e.col,e.col+t-1)}else if(Number.isFinite(r)&&Number.isFinite(t))return new r8(e,r0(e.sheet,e.col+t-1,e.row+r-1))}static fromCoordinates(e,t,r,n,o){return new r8(r0(e,t,r),r0(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 r8(r0(this.sheet,n,t),r0(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 r8.spanFrom(r0(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 t$?this.removeRows(e.start,e.end):this.removeColumns(e.start,e.end)}shouldBeRemoved(){return 0>=this.width()||0>=this.height()}rangeWithSameWidth(e,t){return r8.spanFrom(r0(this.sheet,this.start.col,e),this.width(),t)}rangeWithSameHeight(e,t){return r8.spanFrom(r0(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=r0(this.sheet,this.start.col+r,this.start.row+t);e[t].push(n)}}return e}withStart(e){return new r8(e,this.end)}sameDimensionsAs(e){return this.width()===e.width()&&this.height()===e.height()}sameAs(e){return r4(this.start,e.start)&&r4(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(r0(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(r0(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 r0(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 r0(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 r0(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 r0(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 r0(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 ne extends r8{constructor(e,t,r){super(r0(e,t,0),r0(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 t2(r.sheet,n.sheet);return new ne(r.sheet,r.col,n.col)}shouldBeRemoved(){return 0>=this.width()}shiftByRows(e){}expandByRows(e){}shifted(e,t){return new ne(this.sheet,this.start.col+e,this.end.col+e)}rangeWithSameHeight(e,t){return new ne(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 nt extends r8{constructor(e,t,r){super(r0(e,0,t),r0(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 t2(r.sheet,n.sheet);return new nt(r.sheet,r.row,n.row)}shouldBeRemoved(){return 0>=this.height()}shiftByColumns(e){}expandByColumns(e){}shifted(e,t){return new nt(this.sheet,this.start.row+t,this.end.row+t)}rangeWithSameWidth(e,t){return new nt(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 nr{constructor(e,t,r){this.formulaAddress=e,this.arraysFlag=t,this.formulaVertex=r}}let nn=/^\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij]))\s*(([+-])\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij])))?$/;class no{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=>tN(e,-tI(e)),this.unaryPlus=e=>e,this.unaryPercent=e=>new tL(tI(e)/100),this.concat=(e,t)=>e.concat(t),this.nonstrictadd=(e,t)=>{if(e instanceof rK)return e;if(t instanceof rK)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 rK(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 rK)return r;else if(tP(r)||"string"==typeof r){let e=this.coerceScalarToComplex(r);e instanceof rK||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 rK)return r;else tP(r)&&t.push(tI(r));return t},this.manyToOnlyNumbersDropNulls=e=>{let t=[];for(let r of e)if(r instanceof rK)return r;else if(tP(r))t.push(tI(r));else if(r!==tM)return new rK(d.VALUE,ej.NumberExpected);return t},this.manyToCoercedNumbersDropNulls=e=>{let t=[];for(let r of e){if(r instanceof rK)return r;if(r===tM)continue;let e=this.coerceScalarToNumberOrError(r);tP(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(np(r)||this.config.useRegularExpressions&&nf(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 rK?e:null!=(t=this.coerceToMaybeNumber(e))?t:new rK(d.VALUE,ej.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===tM)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 tP(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 tL(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 tF)t.push(r);else if(r!==tM){let e=this.coerceScalarToComplex(r);if(e instanceof rK)return e;t.push(e)}let r=[];for(let e of t)if(e instanceof tF){let t=this.manyToExactComplex(e.valuesFromTopLeftCorner());if(t instanceof rK)return t;r.push(...t)}else r.push(e);return r}coerceScalarToComplex(e){return e instanceof rK?e:e===tM?[0,0]:tP(e)?[tI(e),0]:"string"==typeof e?this.coerceStringToComplex(e):new rK(d.NUM,ej.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 tO(e,n);case s.NUMBER_DATETIME:return new t_(e,n);case s.NUMBER_TIME:return new tH(e,n);case s.NUMBER_PERCENT:return new tL(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);np(o)||nf(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);np(t)||nf(t)?r+="\\"+t:r+=t,n++}else np(o)?r+="."+o:nf(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);np(o)||nf(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=nS(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(tP(r)&&tP(n))return this.floatCmp(r,n)}return(e===tM?e=nl(t):t===tM&&(t=nl(e)),"string"==typeof e&&"string"==typeof t)?this.stringCmp(e,t):"boolean"==typeof e&&"boolean"==typeof t?nc(na(e),na(t)):tP(e)&&tP(t)?this.floatCmp(e,t):e===tM&&t===tM?0:nc(rj(rq(e)),rj(rq(t)))}stringCmp(e,t){return this.collator.compare(e,t)}manyToNumbers(e,t){let r=[];for(let t of e)if(t instanceof tF)r.push(t);else{let e=tI(this.coerceScalarToNumberOrError(t));if(e instanceof rK)return e;r.push(e)}let n=[];for(let e of r)if(e instanceof tF){let r=t(e.valuesFromTopLeftCorner());if(r instanceof rK)return r;n.push(...r)}else n.push(e);return n}coerceStringToComplex(e){let t,r,n=nn.exec(e);return null===n?new rK(d.NUM,ej.ComplexNumberExpected):(t=void 0!==n[6]?"-"===n[1]?[0,-1]:[0,1]:this.parseComplexToken(n[1]+n[3],n[5]))instanceof rK||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 rK?r:""!==n[5]||""===n[13]?new rK(d.NUM,ej.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 rK(d.NUM,ej.ComplexNumberExpected):""===t?[r,0]:[0,r]}}function ni([e,t],r){if(!isFinite(e)||!isFinite(t))return new rK(d.NUM,ej.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 ns(e){return e instanceof tF?e:tF.fromScalar(e)}function na(e){return Number(e)}function nl(e){return"string"==typeof e?"":tP(e)?0:"boolean"!=typeof e&&tM}function nh(e){if(e instanceof rK||"boolean"==typeof e)return e;{if(e===tM)return!1;if(tP(e))return 0!==tI(e);let t=e.toUpperCase();return"TRUE"===t||"FALSE"!==t&&""!==t&&void 0}}function nd(e){return e instanceof rK||"string"==typeof e?e:e===tM?"":tP(e)?tI(e).toString():e?"TRUE":"FALSE"}function nu(e){return e===tM?0:e}function nc(e,t){let r=tI(e),n=tI(t);return r>n?1:r<n?-1:0}function ng(e){return isNaN(e)||e===1/0||e===-1/0}function np(e){return["*","?"].includes(e)}let nm=["{","}","[","]","(",")","<",">","=",".","+","-",",","\\","$","^","!"];function nf(e){return nm.includes(e)}function nb(e,t){let{type:r,format:n}=tD(e),{type:o,format:i}=tD(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}=tD(e),{type:o,format:i}=tD(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 ny(e){return nS(e.toLowerCase(),"nfd").replace(/[\u0300-\u036f]/g,"")}function nw(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 nS(e,t){return e.normalize(t.toUpperCase())}(_=p||(p={})).STRING="STRING",_.NUMBER="NUMBER",_.BOOLEAN="BOOLEAN",_.SCALAR="SCALAR",_.NOERROR="NOERROR",_.RANGE="RANGE",_.INTEGER="INTEGER",_.COMPLEX="COMPLEX",_.ANY="ANY";class nv{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])=>e),s=o.map(([,e])=>e),a=o.map(([,,e])=>e),l=this.buildMetadataForEachArgumentValue(i.length,r),h=t.arraysFlag&&!r.vectorizationForbidden;if(!this.isNumberOfArgumentValuesValid(l,i.length))return new rK(d.NA,ej.WrongArgNumber);let[u,c]=h?this.calculateSizeOfVectorizedResultArray(i,l):[1,1];if(1===u&&1===c){let e=this.vectorizeAndBroadcastArgumentsIfNecessary(h,i,l,0,0);return this.calculateSingleCellOfResultArray(t,e,l,s,a,n,r.returnNumberType)}let g=[...Array(u).keys()].map(e=>[...Array(c).keys()].map(o=>{let d=this.vectorizeAndBroadcastArgumentsIfNecessary(h,i,l,e,o),u=this.calculateSingleCellOfResultArray(t,d,l,s,a,n,r.returnNumberType);if(u instanceof tF)throw Error("Function returning array cannot be vectorized.");return u}));return tF.onlyValues(g)},this.runFunctionWithReferenceArgument=(e,t,r,n,i,s=()=>new rK(d.NA,ej.CellRefExpected))=>{let a;if(0===e.length)return this.returnNumberWrapper(n(),r.returnNumberType);if(e.length>1)return new rK(d.NA,ej.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=r8.fromAst(l,t.formulaAddress).start}catch(e){return new rK(d.REF,ej.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=n.type===o.EMPTY,i=this.evaluateAst(n,t);if(i instanceof tF)for(let t of i.valuesFromTopLeftCorner())r.push([t,!0,e]);else r.push([i,!1,e])}return r}coerceToType(e,t,r){let n;if(e instanceof tF)switch(t.argumentType){case p.RANGE:case p.ANY:n=e;break;default:{let t=nw(e,r);if(void 0===t)return;e=t}}if(!(e instanceof tF))switch(t.argumentType){case p.INTEGER:case p.NUMBER:let o=this.coerceScalarToNumberOrError(e);if(!tP(o)){n=o;break}let i=tI(o);if(void 0!==t.maxValue&&i>t.maxValue)return new rK(d.NUM,ej.ValueLarge);if(void 0!==t.minValue&&i<t.minValue)return new rK(d.NUM,ej.ValueSmall);if(void 0!==t.lessThan&&i>=t.lessThan)return new rK(d.NUM,ej.ValueLarge);if(void 0!==t.greaterThan&&i<=t.greaterThan)return new rK(d.NUM,ej.ValueSmall);if(t.argumentType===p.INTEGER&&!Number.isInteger(i))return new rK(d.NUM,ej.IntegerExpected);n=o;break;case p.STRING:n=nd(e);break;case p.BOOLEAN:n=nh(e);break;case p.SCALAR:case p.NOERROR:case p.ANY:n=e;break;case p.RANGE:if(e instanceof rK)return e;n=ns(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,s){let a=this.coerceArgumentsToRequiredTypes(e,t,r,n,o);if(a instanceof rK)return a;let l=i(...a);return this.returnNumberWrapper(l,s)}coerceArgumentsToRequiredTypes(e,t,r,n,o){let i=[];for(let s=0;s<r.length;s++){let a=r[s],l=t[s],h=void 0===l?null==a?void 0:a.defaultValue:o[s]&&(null==a?void 0:a.emptyAsDefault)&&(null==a?void 0:a.defaultValue)!==void 0?a.defaultValue:l;if(void 0===h){i.push(void 0);continue}let u=this.coerceToType(h,a,e);if(void 0===u&&!n[s])return new rK(d.VALUE,ej.WrongType);if(u instanceof rK&&a.argumentType!==p.SCALAR)return u;i.push(u)}return i}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,e.type===o.EMPTY])}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 tF&&![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&&tP(e)?this.arithmeticHelper.ExtendedNumberFactory(tI(e),{type:t,format:r}):e}}class nR{constructor(e,t,r=!1){this.width=e,this.height=t,this.isRef=r}static error(){return new nR(1,1,!0)}static scalar(){return new nR(1,1,!1)}isScalar(){return 1===this.width&&1===this.height||this.isRef}}class nE{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=r8.fromAstOrUndef(e,t.formulaAddress);if(void 0===r)return nR.error();return new nR(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 nR(Math.min(...n),r.reduce((e,t)=>e+t,0))}case o.STRING:case o.NUMBER:return nR.scalar();case o.CELL_REFERENCE:return new nR(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 nR.error();return new nR(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 nR.error();return new nR(r.width,r.height)}case o.PARENTHESIS:return this.checkArraySizeForAst(e.expression,t);case o.EMPTY:default:return nR.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 nR(1,1);let o=e.args.map(e=>{var r;return this.checkArraySizeForAst(e,new nr(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 nR.error();for(;i.length<o.length;){if(void 0===n.repeatLastArgs)return nR.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 nR(s,a)}}class nT{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 nA(e,t,r){if(void 0===e)return im.defaultConfig[r];if("string"==typeof t)if(typeof e===t)return e;else throw new rt(t,r);if(t.includes(e))return e;throw new ri(t.map(e=>`'${e}'`).join(" "),r)}function nM(e,t,r){if(e<r)throw new rn(t,r)}function nI(e,t,r,n){if(t(e))return e;if(void 0===e)return im.defaultConfig[n];throw new rt(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 nN(e,t,r){if(typeof e!==t)throw new rt(t,r)}let nO=RegExp("^ss(\\.(s+|0+))?$"),nk=RegExp("^[0-9/.\\-: ]+[ap]?m?$"),nH=RegExp("\\s+"),n_=RegExp("[ /.-]"),nL=nB(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=>nO.test(e))}}),nP=nB(function(e){let t=e.toLowerCase().trim().split(n_);return{itemsCount:t.length,dayItem:t.indexOf("dd"),monthItem:t.indexOf("mm"),shortYearItem:t.indexOf("yy"),longYearItem:t.indexOf("yyyy")}});function nD(e,t){var r,n,o;let i;if(void 0===t)return;let{itemsCount:s,hourItem:a,minuteItem:l,secondItem:h}=nL(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 nF(e,t){var r;if(void 0===t)return;let{itemsCount:n,dayItem:o,monthItem:i,shortYearItem:s,longYearItem:a}=nP(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 nB(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 nV=[31,28,31,30,31,30,31,31,30,31,30,31],nU=[0,31,59,90,120,151,181,212,243,273,304,334];function nz(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 nW(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 nG={year:9999,month:12,day:31};class n${constructor(e){this.config=e,this.minDateAbsoluteValue=this.dateToNumberFromZero(e.nullDate),this.maxDateValue=this.dateToNumber(nG),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(nW(t))if(nz(t))return new t_(nK(t)+this.dateToNumber(t),r+" "+n);else return new tH(nK(t),n);else if(nz(t))return new tO(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<=nV[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,nU[6]<=t&&(r+=6),nU[r+3]<=t&&(r+=3),nU[r+2]<=t?r+=2:nU[r+1]<=t&&(r+=1),r),a=i-nU[s]-(this.isLeapYear(o)&&s>1?1:0);return{year:o,month:s+1,day:a+1}}numberToSimpleDateTime(e){let t=nq(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:nV[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(!nz(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+nU[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 nY(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 nj(e){return Math.round(3600*e*24)/86400}function nq(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 nK(e){return((e.seconds/60+e.minutes)/60+e.hours)/24}function nX(e){return{year:e.year,month:e.month,day:Math.min(30,e.day)}}let nQ=/(\\.|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,nZ=/(\\.|[#0]+(\.[#0]*)?)/g;function nJ(e,t){return{type:e,value:t}}function n0(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(nJ(m.FREE_TEXT,e))}i[0].startsWith("\\")?r.push(nJ(m.FREE_TEXT,i[0])):r.push(nJ(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(nJ(m.FREE_TEXT,e))}return r}function n1(e){let t=function(e){let t;nQ.lastIndex=0;let r=[];do null!==(t=nQ.exec(e))&&r.push(t);while(t);return r}(e);if(!t.every(e=>n2(e)))return{type:f.DATE,tokens:n0(t,e)}}(L=m||(m={})).FORMAT="FORMAT",L.FREE_TEXT="FREE_TEXT",(P=f||(f={})).DATE="DATE",P.NUMBER="NUMBER",P.STRING="STRING";function n2(e){return e[0].startsWith("\\")}function n3(e,t){let r=`${e}`;for(;r.length<t;)r="0"+r;return r}function n6(e,t){return e.split(t).length-1}let n5="length",n4=e=>(e+"").replace(/\-/g,""),n9=e=>e.codePointAt(0)-65,n7={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."},n8=!1;var oe=b||(b={});oe.Number=class{constructor(e){var t;this.value=e,this.value=tN(this.value,0===(t=tI(this.value))?0:t)}},oe.String=class{constructor(e){this.value=e}},oe.Boolean=class{constructor(e){this.value=e}};class ot{static getSingletonInstance(){return ot.instance||(ot.instance=new ot),ot.instance}}oe.Empty=ot,oe.Formula=class{constructor(e){this.formula=e}},oe.Error=class{constructor(e,t){this.value=new rK(e,t)}};class or{constructor(e,t,r){this.config=e,this.dateHelper=t,this.numberLiteralsHelper=r}parse(e){if(null==e)return b.Empty.getSingletonInstance();if("number"==typeof e)if(ng(e))return new b.Error(d.NUM,ej.ValueLarge);else return new b.Number(e);if("boolean"==typeof e)return new b.Boolean(e);if(e instanceof Date){let t=this.dateHelper.dateToNumber({day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()})+nK({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()+e.getMilliseconds()/1e3});return t<0?new b.Error(d.NUM,ej.DateBounds):new b.Number(t%1==0?new tO(t,"Date()"):t<1?new tH(t,"Date()"):new t_(t,"Date()"))}if("string"==typeof e){let r;if("true"===(r=e.toLowerCase())||"false"===r)return new b.Boolean("true"===e.toLowerCase());{var t;let r;if(e.startsWith("="))return new b.Formula(e);if(t=this.config.errorMapping,r=e.toUpperCase(),/#[A-Za-z0-9\/]+[?!]?/.test(r)&&Object.prototype.hasOwnProperty.call(t,r))return new b.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 tL(s/100):2===i?new tk(s,n):s,new b.Number(e)}let a=this.dateHelper.dateStringToDateNumber(o);return void 0!==a?new b.Number(a):new b.String(e.startsWith("'")?e.slice(1):e)}}else throw new re(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)]}}}(D=C||(C={}))[D.COPY=0]="COPY",D[D.CUT=1]="CUT",(F=y||(y={}))[F.VALUE=0]="VALUE",F[F.EMPTY=1]="EMPTY",F[F.FORMULA=2]="FORMULA",F[F.PARSING_ERROR=3]="PARSING_ERROR";class on{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[r0(e.sheet,e.col+r,e.row+t),this.content[t][r]]}}class oo{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 on(e,t,r,C.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(r0(e.sheet,e.col+r,e.row+o));n[o].push(t)}}this.clipboard=new on(e,t,r,C.COPY,n)}abortCut(){this.clipboard&&this.clipboard.type===C.CUT&&this.clear()}clear(){this.clipboard=void 0}ensureItIsPossibleToCopyPaste(e){if(void 0===this.clipboard)return;if(r1(e)||!this.dependencyGraph.sheetMapping.hasSheetWithId(e.sheet))throw new t1("a valid target address.");let t=r8.spanFrom(e,this.clipboard.width,this.clipboard.height);if(t.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new tZ;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===C.CUT}isCopyClipboard(){return void 0!==this.clipboard&&this.clipboard.type===C.COPY}}class oi{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 ea?Object.assign(Object.assign({},e),{reference:r}):r===d.REF?eB(new rK(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?eB(new rK(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?eB(new rK(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?eB(new rK(d.REF)):e}}class os extends oi{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 oa extends oi{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 ol extends oi{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 oh extends oi{constructor(e,t,r,n){super(),this.sourceRange=e,this.toRight=t,this.toBottom=r,this.toSheet=n,this.dependentFormulaTransformer=new od(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 r0(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 ea){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 ea&&t instanceof ea){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 od extends oi{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 ea?this.sourceRange.addressInRange(e.toSimpleCellAddress(t)):e instanceof es?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 ou extends oi{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 oc extends oi{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 og extends oi{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 op{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return oy(this.indexes)}rowsSpans(){return this.normalizedIndexes().map(e=>t$.fromNumberOfRows(this.sheet,e[0],e[1]))}}class om{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return ow(this.indexes)}rowsSpans(){return this.normalizedIndexes().map(e=>t$.fromNumberOfRows(this.sheet,e[0],e[1]))}}class of{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return ow(this.indexes)}columnsSpans(){return this.normalizedIndexes().map(e=>tY.fromNumberOfColumns(this.sheet,e[0],e[1]))}}class ob{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return oy(this.indexes)}columnsSpans(){return this.normalizedIndexes().map(e=>tY.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=tB.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 og(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=t$.fromNumberOfRows(e,n,r);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddRows(o),n<t&&(t+=r);let i=r0(e,0,t),s=r0(e,0,n);this.moveCells(i,1/0,r,s);let a=t$.fromNumberOfRows(e,t,r);return this.doRemoveRows(a),this.lazilyTransformingAstService.commitCombinedMode()}moveColumns(e,t,r,n){let o=tY.fromNumberOfColumns(e,n,r);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddColumns(o),n<t&&(t+=r);let i=r0(e,t,0),s=r0(e,n,0);this.moveCells(i,r,1/0,s);let a=tY.fromNumberOfColumns(e,t,r);return this.doRemoveColumns(a),this.lazilyTransformingAstService.commitCombinedMode()}moveCells(e,t,r,n){this.ensureItIsPossibleToMoveCells(e,t,r,n);let o=r8.spanFrom(e,t,r),i=r8.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 oh(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=r8.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=r8.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(r1(e)||!(oS(t)&&oS(r)||(o=e,i=t,s=r,0===o.row&&oS(i)&&s===1/0||0===o.col&&oS(s)&&i===1/0))||r1(n)||!this.sheetMapping.hasSheetWithId(e.sheet)||!this.sheetMapping.hasSheetWithId(n.sheet))throw new t1("a valid range of cells to move.");let a=r8.spanFrom(e,t,r),l=r8.spanFrom(n,t,r);if(l.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new tZ;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new rg;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(l))throw new rp}restoreClipboardCells(e,t){let r=[];for(let[n,o]of t)if(this.restoreCell(n,o),o.type===y.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 y.VALUE:this.setValueToCell(t,e);break;case y.FORMULA:this.setFormulaToCellFromCache(t.hash,e);break;case y.EMPTY:this.setCellEmpty(e);break;case y.PARSING_ERROR:this.setParsingErrorToCell(t.rawInput,t.errors,e)}}getOldContent(e){let t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof rV)return[e,{type:y.EMPTY}];if(t instanceof rU)return[e,Object.assign({type:y.VALUE},t.getValues())];if(t instanceof rE)return[t.getAddress(this.lazilyTransformingAstService),{type:y.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))}];if(t instanceof rz)return[e,{type:y.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 rV)return{type:y.EMPTY};if(t instanceof rU)return Object.assign({type:y.VALUE},t.getValues());if(t instanceof rT){let r=t.getArrayCellValue(e);return r===tM?{type:y.EMPTY}:{type:y.VALUE,parsedValue:r,rawValue:t.getArrayCellRawValue(e)}}if(t instanceof rA)return{type:y.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))};if(t instanceof rz)return{type:y.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=r0(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 b.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 b.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=r0(e,n,r);this.setCellContent(o,t[r][n])}}setParsingErrorToCell(e,t,r){this.removeCellValueFromColumnSearch(r);let n=new rz(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,tA(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=>!r4(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(tM,e)}setFormulaToCellFromCache(e,t){let{ast:r,hasVolatileFunction:n,hasStructuralChangeFunction:o,dependencies:i}=this.parser.fetchCachedResult(e),s=tA(i,t),[a]=new ol(t.sheet).transformSingleAst(r,t);this.parser.rememberNewAst(a);let l=s.filter(e=>e instanceof tT||(e instanceof r8?!(r1(e.start)||r1(e.end)):!r1(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=tB.empty(),e}forceApplyPostponedTransformations(){this.dependencyGraph.forceApplyPostponedTransformations(),this.columnSearch.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 oc(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 ou(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 oa(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 os(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 rA&&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 tA(o,n))r instanceof tT&&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 b.Formula){let t=this.parser.parse(r.formula,r0(-1,0,0));if(tG(t.ast))throw new rm;let{ast:n,hasVolatileFunction:o,hasStructuralChangeFunction:i,dependencies:s}=t;this.dependencyGraph.setFormulaToCell(e,n,tA(s,e),nR.scalar(),o,i)}else r instanceof b.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 r8.spanFrom(n,t,r).addresses(this.dependencyGraph)){let t=this.addressMapping.getCell(i,{throwIfCellNotExists:!0});if(t instanceof rA&&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 tA(r,t)){if(!(i instanceof tT))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(tW.SHEET_FOR_WORKBOOK_EXPRESSIONS,new rW(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 rA){let{ast:e,hasVolatileFunction:r,hasStructuralChangeFunction:o,dependencies:i}=this.parser.fetchCachedResultForAst(t.getFormula(this.lazilyTransformingAstService));this.dependencyGraph.setFormulaToCell(n.address,e,tA(i,n.address),nR.scalar(),r,o)}else t instanceof rV?this.setCellEmpty(n.address):t instanceof rU&&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 rE&&!t.isComputed()}}function oy(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 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];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 oS(e){return Number.isInteger(e)&&e>0}class ov{getReferencedOldDataVersions(){return[]}}class oR extends ov{constructor(e,t){super(),this.command=e,this.rowsRemovals=t}doUndo(e){e.undoRemoveRows(this)}doRedo(e){e.redoRemoveRows(this)}getReferencedOldDataVersions(){return this.rowsRemovals.filter(e=>e.version>0).map(e=>e.version-1)}}class oE extends ov{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)}getReferencedOldDataVersions(){return this.version>0?[this.version-1]:[]}}class oT extends ov{constructor(e){super(),this.command=e}doUndo(e){e.undoAddRows(this)}doRedo(e){e.redoAddRows(this)}}class oA extends ov{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 oM extends ov{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 ov{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 ov{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)}getReferencedOldDataVersions(){return this.version>0?[this.version-1]:[]}}class oN extends ov{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)}getReferencedOldDataVersions(){return this.version>0?[this.version-1]:[]}}class oO extends ov{constructor(e){super(),this.command=e}doUndo(e){e.undoAddColumns(this)}doRedo(e){e.redoAddColumns(this)}}class ok extends ov{constructor(e,t){super(),this.command=e,this.columnsRemovals=t}doUndo(e){e.undoRemoveColumns(this)}doRedo(e){e.redoRemoveColumns(this)}getReferencedOldDataVersions(){return this.columnsRemovals.filter(e=>e.version>0).map(e=>e.version-1)}}class oH extends ov{constructor(e,t){super(),this.sheetName=e,this.sheetId=t}doUndo(e){e.undoAddSheet(this)}doRedo(e){e.redoAddSheet(this)}}class o_ extends ov{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 oL extends ov{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)}getReferencedOldDataVersions(){return void 0!==this.version&&this.version>0?[this.version-1]:[]}}class oP extends ov{constructor(e,t){super(),this.sheetId=e,this.oldSheetContent=t}doUndo(e){e.undoClearSheet(this)}doRedo(e){e.redoClearSheet(this)}}class oD extends ov{constructor(e){super(),this.cellContents=e}doUndo(e){e.undoSetCellContents(this)}doRedo(e){e.redoSetCellContents(this)}}class oF extends ov{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 oB extends ov{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 oV extends ov{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 oU extends ov{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 oz extends ov{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)}getReferencedOldDataVersions(){return this.operations.flatMap(e=>e.getReferencedOldDataVersions())}}class oW{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 oz}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){0===this.undoLimit||(this.oldData.has(e)||this.oldData.set(e,[]),this.oldData.get(e).push([t,r]))}clearRedoStack(){this.cleanupOldDataForEntries(this.redoStack,this.undoStack),this.redoStack=[]}clearUndoStack(){this.cleanupOldDataForEntries(this.undoStack,this.redoStack),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 om(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 of(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 op(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;r4(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){this.operations.forceApplyPostponedTransformations();let{sheet:t}=e;this.operations.moveRows(t,e.undoStart,e.numberOfRows,e.undoEnd),this.restoreOldDataFromVersion(e.version-1)}undoMoveColumns(e){this.operations.forceApplyPostponedTransformations();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=r0(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=r0(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=r0(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=r0(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);let t=Math.max(0,this.undoStack.length-this.undoLimit);if(t>0){let e=this.undoStack.splice(0,t);this.cleanupOldDataForEntries(e,[...this.undoStack,...this.redoStack])}}cleanupOrphanedOldData(){let e=this.collectReferencedOldDataVersions(this.undoStack,this.redoStack);for(let t of this.oldData.keys())e.has(t)||this.oldData.delete(t)}cleanupOldDataForEntries(e,t){let r=this.collectReferencedOldDataVersions(t);for(let t of e)for(let e of t.getReferencedOldDataVersions())r.has(e)||this.oldData.delete(e)}collectReferencedOldDataVersions(...e){var t,r;return new Set([...e.flatMap(e=>e.flatMap(e=>e.getReferencedOldDataVersions())),...null!=(r=null==(t=this.batchUndoEntry)?void 0:t.getReferencedOldDataVersions())?r:[]])}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 oG{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 om(e,t);this.ensureItIsPossibleToAddRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addRows(r),this.undoRedo.saveOperation(new oT(r))}removeRows(e,...t){let r=new op(e,t);this.ensureItIsPossibleToRemoveRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();let n=this.operations.removeRows(r);this.undoRedo.saveOperation(new oR(r,n))}addColumns(e,...t){let r=new of(e,t);this.ensureItIsPossibleToAddColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addColumns(r),this.undoRedo.saveOperation(new oO(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 oE(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 oN(e,t,r,n,o))}cut(e,t,r){this.clipboardOperations.cut(e,t,r)}ensureItIsPossibleToCopy(e,t,r){if(!o$(t))throw new t1("width to be positive integer.");if(!o$(r))throw new t1("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 t7;if(this.clipboardOperations.isCutClipboard())this.moveCells(t.sourceLeftCorner,t.width,t.height,e);else if(this.clipboardOperations.isCopyClipboard()){this.clipboardOperations.ensureItIsPossibleToCopyPaste(e);let r=r8.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 oF(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 o_(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 oL(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 oP(e,t))}setCellContents(e,t){if(t instanceof Array){for(let e=0;e<t.length;e++)if(!(t[e]instanceof Array))throw new t1("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 oD(r))}setSheetContent(e,t){this.ensureScopeIdIsValid(e),this.ensureItIsPossibleToChangeSheetContents(e,t),rD(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 oA(e,t,r))}validateSwapRowIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new tK(e);this.validateRowOrColumnMapping(e,t,"row")}testColumnOrderForArrays(e,t){for(let[r,n]of t)if(r!==n){let t=r8.spanFrom({sheet:e,col:r,row:0},1,1/0);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new rg}}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 oM(e,t,r))}validateSwapColumnIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new tK(e);this.validateRowOrColumnMapping(e,t,"column")}testRowOrderForArrays(e,t){for(let[r,n]of t)if(r!==n){let t=r8.spanFrom({sheet:e,col:0,row:r},1/0,1);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new rg}}mappingFromOrder(e,t,r){if(!this.sheetMapping.hasSheetWithId(e))throw new tK(e);let n="row"===r?this.dependencyGraph.getSheetHeight(e):this.dependencyGraph.getSheetWidth(e);if(t.length!==n)throw new t1(`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 t4;this.clipboardOperations.abortCut(),this.undoRedo.undo()}redo(){if(this.undoRedo.isRedoStackEmpty())throw new t9;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 oB(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 oU(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 oV(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 tK(e);if(this.dependencyGraph.getSheetHeight(e)+t.map(e=>e[1]).reduce((e,t)=>e+t,0)>this.maxRows)throw new tZ;for(let[e,r]of t)if(!oY(e)||!o$(r))throw new t1("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(!oY(r)||!oY(t))throw new t1("starting and ending row to be nonnegative.");if(t<r)throw new t1("starting row to be smaller than the ending row.");if(!this.sheetMapping.hasSheetWithId(e))throw new tK(e)}}ensureItIsPossibleToAddColumns(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new tK(e);if(this.dependencyGraph.getSheetWidth(e)+t.map(e=>e[1]).reduce((e,t)=>e+t,0)>this.maxColumns)throw new tZ;for(let[e,r]of t)if(!oY(e)||!o$(r))throw new t1("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(!oY(r)||!oY(t))throw new t1("starting and ending column to be nonnegative.");if(t<r)throw new t1("starting column to be smaller than the ending column.");if(!this.sheetMapping.hasSheetWithId(e))throw new tK(e)}}ensureItIsPossibleToMoveRows(e,t,r,n){this.ensureItIsPossibleToAddRows(e,[n,r]);let o=r0(e,0,t),i=r0(e,0,n);if(!this.sheetMapping.hasSheetWithId(e)||r1(o)||r1(i)||!o$(r)||n<=t+r&&n>=t)throw new t1("a valid range of rows to move.");let s=this.dependencyGraph.getSheetWidth(e),a=r8.spanFrom(o,s,r);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new rg;if(n>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllRows(t$.fromNumberOfRows(e,n-1,2)))throw new rp}ensureItIsPossibleToMoveColumns(e,t,r,n){this.ensureItIsPossibleToAddColumns(e,[n,r]);let o=r0(e,t,0),i=r0(e,n,0);if(!this.sheetMapping.hasSheetWithId(e)||r1(o)||r1(i)||!o$(r)||n<=t+r&&n>=t)throw new t1("a valid range of columns to move.");let s=this.dependencyGraph.getSheetHeight(e),a=r8.spanFrom(o,r,s);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new rg;if(n>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllColumns(tY.fromNumberOfColumns(e,n-1,2)))throw new rp}ensureItIsPossibleToAddSheet(e){if(this.sheetMapping.hasSheetWithName(e))throw new tQ(e)}ensureItIsPossibleToRenameSheet(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new tK(e);let r=this.sheetMapping.getSheetId(t);if(void 0!==r&&r!==e)throw new tQ(t)}ensureItIsPossibleToChangeContent(e){if(r1(e))throw new t0(e);if(!this.sheetMapping.hasSheetWithId(e.sheet))throw new tK(e.sheet)}ensureItIsPossibleToChangeCellContents(e,t){let r=rF(t),n=r8.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=rF(t),n=r8.spanFrom(r0(e,0,0),r.width,r.height);this.ensureRangeInSizeLimits(n)}ensureRangeInSizeLimits(e){if(e.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new tZ}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 tK(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(!oY(o[e])||o[e]>=n)throw new t1(`${r} numbers to be nonnegative integers and less than sheet ${"row"===r?"height":"width"}.`);if(o[e]===o[e+1])throw new t1(`source ${r} numbers to be unique.`);if(o[e]!==i[e])throw new t1(`target ${r} numbers to be permutation of source ${r} numbers.`)}}ensureNamedExpressionNameIsValid(e,t){if(!this.namedExpressions.isNameValid(e))throw new t6(e);if(!this.namedExpressions.isNameAvailable(e,t))throw new t3(e)}ensureNamedExpressionIsValid(e){let t=this.cellContentParser.parse(e);if(t instanceof b.Formula&&tG(this.parser.parse(t.formula,r0(-1,0,0)).ast))throw new rm}}function o$(e){return Number.isInteger(e)&&e>0}function oY(e){return Number.isInteger(e)&&e>=0}class oj{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=tB.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 tA(r,t))if(e instanceof r8&&void 0===this.dependencyGraph.getRange(e.start,e.end)){let t=new rM(e);this.dependencyGraph.rangeMapping.addOrUpdateVertex(t),n.push(t)}let o=this.evaluateAstToCellValue(e,new nr(t,this.config.useArrayArithmetic));return n.forEach(e=>{this.dependencyGraph.rangeMapping.removeVertexIfExists(e)}),o}recomputeVertex(e,t){if(e instanceof rE){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 rM)||(e.clearCache(),!0)}processVertexOnCycle(e,t){if(e instanceof rM)e.clearCache();else if(e instanceof rE){let r=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.remove(tI(e.valueOrUndef()),r);let n=new rK(d.CYCLE,void 0,e);e.setCellValue(n),t.addChange(n,r)}}recomputeFormulas(e,t){e.forEach(e=>{e instanceof rE&&e.setCellValue(new rK(d.CYCLE,void 0,e))}),t.forEach(e=>{if(e instanceof rE){let t=this.recomputeFormulaVertexValue(e),r=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.add(tI(t),r)}else e instanceof rM&&e.clearCache()})}recomputeFormulaVertexValue(e){let t=e.getAddress(this.lazilyTransformingAstService);if(e instanceof rT&&(e.array.size.isRef||!this.dependencyGraph.isThereSpaceForArray(e)))return e.setNoSpace();{let r=e.getFormula(this.lazilyTransformingAstService),n=this.evaluateAstToCellValue(r,new nr(t,this.config.useArrayArithmetic,e));return e.setCellValue(n)}}evaluateAstToCellValue(e,t){let r=this.interpreter.evaluateAst(e,t);return r instanceof tF?r:r===tM&&this.config.evaluateNullToZero?0:r}}class oq{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 oK{constructor(e,t){this.name=e,this.newValue=t}}class oX{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===tW.SHEET_FOR_WORKBOOK_EXPRESSIONS){let e=this.namedExpressions.namedExpressionInAddress(r.row);if(!e)throw Error("Missing named expression");return new oK(e.displayName,this.exportScalarOrRange(t))}if(!(t instanceof tF))return new oq(r,this.exportValue(t));{let e=[];for(let[n,o]of t.entriesFromTopLeftCorner(r))e.push(new oq(o,this.exportValue(n)));return e}}exportValue(e){return e instanceof tF?this.detailedError(new rK(d.VALUE,ej.ScalarExpected)):this.config.smartRounding&&tP(e)?this.cellValueRounding(tI(e)):e instanceof rK?this.detailedError(e):e===tM?null:tI(e)}exportScalarOrRange(e){return e instanceof tF?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===tW.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 nT(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 oQ{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 oZ(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 oZ{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=r0(n,o,e),l=this.cellContentParser.parse(i);if(l instanceof b.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 rz(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 rA(e.ast,s,0);t.set(r,tA(e.dependencies,s)),this.dependencyGraph.addVertex(s,r),e.hasVolatileFunction&&this.dependencyGraph.markAsVolatile(r),e.hasStructuralChangeFunction&&this.dependencyGraph.markAsDependentOnStructureChange(r)}else{let n=new rT(e.ast,s,new nR(r.width,r.height));t.set(n,tA(e.dependencies,s)),this.dependencyGraph.addArrayVertex(s,n)}}}else if(l instanceof b.Empty);else{this.shrinkArrayIfNeeded(s);let e=new rU(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 rT&&this.dependencyGraph.shrinkArrayToCorner(t)}}let oJ=new Map([["gpl-v3",1],["missing",2],["invalid",3],["expired",4]]);class o0 extends nv{version(e,t){return this.runFunction(e.args,t,this.metadata("VERSION"),()=>{let e,{licenseKeyValidityState:t,licenseKey:r}=this.config;return oJ.has(r)?e=oJ.get(r):oJ.has(t)?e=oJ.get(t):"valid"===t&&(e=r.slice(-5)),`HyperFormula v${ig.version}, ${e}`})}}function o1(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 rf(e,t.name);n=t.implementedFunctions[o]}if(void 0===n)throw ru.functionNotDeclaredInPlugin(e,t.name);return n}o0.implementedFunctions={VERSION:{method:"version",parameters:[]}};class o2{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))o2.loadPluginFunctions(t,this.instancePlugins);else this.instancePlugins=new Map(o2.plugins);for(const[e,t]of o2.protectedFunctions())o2.loadFunctionUnprotected(t,e,this.instancePlugins);for(const[e,t]of this.instancePlugins.entries())this.categorizeFunction(e,o1(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 rc.cannotUnregisterFunctionWithId(e);this.plugins.delete(e)}static unregisterFunctionPlugin(e){for(let t of this.protectedPlugins())if(t===e)throw rc.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(ig.getRegisteredLanguagesCodes());Object.keys(e).forEach(r=>{t.has(r)&&ig.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 rc.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=o1(t,e),o=n.method;if(this.handleDeprecatedMetadata(t,n),Object.prototype.hasOwnProperty.call(e.prototype,o))r.set(t,e);else throw ru.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=o1(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(!o2.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)o2.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)}}o2.plugins=new Map,o2._protectedPlugins=new Map([["VERSION",o0],["OFFSET",void 0]]),(B=w||(w={})).GREATER_THAN="GREATER_THAN",B.GREATER_THAN_OR_EQUAL="GREATER_THAN_OR_EQUAL",B.LESS_THAN="LESS_THAN",B.LESS_THAN_OR_EQUAL="LESS_THAN_OR_EQUAL",B.NOT_EQUAL="NOT_EQUAL",B.EQUAL="EQUAL";let o3=(e,t)=>({operator:e,value:t});class o6{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:o4(r,t)}}parseCriterion(e,t){if("number"==typeof e||"boolean"==typeof e)return o3(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 o3(n,null);if(void 0!==i)return o3(n,tI(i));if(n===w.EQUAL||n===w.NOT_EQUAL)return o3(n,null!=s?s:r)}}}let o5=/([<>=]+)(.*)/,o4=(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===tM;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!==tM}};class o9{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)=>o8(this.arithmeticHelper.eq,e,t),this.notEqualOp=(e,t)=>o8(this.arithmeticHelper.neq,e,t),this.greaterThanOp=(e,t)=>o8(this.arithmeticHelper.gt,e,t),this.lessThanOp=(e,t)=>o8(this.arithmeticHelper.lt,e,t),this.greaterThanOrEqualOp=(e,t)=>o8(this.arithmeticHelper.geq,e,t),this.lessThanOrEqualOp=(e,t)=>o8(this.arithmeticHelper.leq,e,t),this.concatOp=(e,t)=>o8(this.arithmeticHelper.concat,nd(e),nd(t)),this.plusOp=(e,t)=>o8(this.arithmeticHelper.addWithEpsilon,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.minusOp=(e,t)=>o8(this.arithmeticHelper.subtract,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.timesOp=(e,t)=>o8(this.arithmeticHelper.multiply,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.powerOp=(e,t)=>o8(this.arithmeticHelper.pow,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.divOp=(e,t)=>o8(this.arithmeticHelper.divide,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.unaryMinusOp=e=>o7(this.arithmeticHelper.unaryMinus,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.percentOp=e=>o7(this.arithmeticHelper.unaryPercent,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.unaryPlusOp=e=>this.arithmeticHelper.unaryPlus(e),this.functionRegistry.initializePlugins(this),this.criterionBuilder=new o6(e)}evaluateAst(e,t){var r,n,o;let i=this.evaluateAstWithoutPostprocessing(e,t);if(tP(i))if(ng(tI(i)))return new rK(d.NUM,ej.NaN);else{i=tN(i,0===(r=tI(i))?0:r)}return i instanceof tF&&1===i.height()&&1===i.width()&&([[i]]=i.data),n=i,o=t.formulaVertex,n instanceof rK&&void 0!==o?n.attachRootVertex(o):n}evaluateAstWithoutPostprocessing(e,t){switch(e.type){case o.EMPTY:return tM;case o.CELL_REFERENCE:{let r=e.reference.toSimpleCellAddress(t.formulaAddress);if(r1(r))return new rK(d.REF,ej.BadRef);if(!this.isSheetValid(e.reference))return new rK(d.REF,ej.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&&!o2.functionIsProtected(e.procedureName))return new rK(d.LIC,ej.LicenseKey(this.config.licenseKeyValidityState));let r=this.functionRegistry.getFunction(e.procedureName);if(void 0!==r)return r(e,new nr(t.formulaAddress,t.arraysFlag||this.functionRegistry.isArrayFunction(e.procedureName),t.formulaVertex));return new rK(d.NAME,ej.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 rK(d.NAME,ej.NamedExpressionName(e.expressionName))}case o.CELL_RANGE:{if(!this.isSheetValid(e.start)||!this.isSheetValid(e.end))return new rK(d.REF,ej.SheetRef);if(!this.rangeSpansOneSheet(e))return new rK(d.REF,ej.RangeManySheets);let r=r8.fromCellRange(e,t.formulaAddress),n=this.dependencyGraph.getArray(r);if(n){let e=n.array;if(e instanceof ry)throw Error("Array should be already computed");if(e instanceof rK)return e;if(e instanceof rw)return tF.fromRange(e.raw(),r,this.dependencyGraph);else throw Error("Unknown array")}return tF.onlyRange(r,this.dependencyGraph)}case o.COLUMN_RANGE:{if(!this.isSheetValid(e.start)||!this.isSheetValid(e.end))return new rK(d.REF,ej.SheetRef);if(!this.rangeSpansOneSheet(e))return new rK(d.REF,ej.RangeManySheets);let r=ne.fromColumnRange(e,t.formulaAddress);return tF.onlyRange(r,this.dependencyGraph)}case o.ROW_RANGE:{if(!this.isSheetValid(e.start)||!this.isSheetValid(e.end))return new rK(d.REF,ej.SheetRef);if(!this.rangeSpansOneSheet(e))return new rK(d.REF,ej.RangeManySheets);let r=nt.fromRowRangeAst(e,t.formulaAddress);return tF.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=ns(this.evaluateAst(r,t)),o=n.height();if(void 0===e)e=o,i.push(...n.data);else if(e!==o)return new rK(d.REF,ej.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 rK(d.REF,ej.SizeMismatch);n.push(...i)}}return tF.onlyValues(n)}case o.ERROR_WITH_RAW_INPUT:case o.ERROR:return e.error}}isSheetValid(e){return void 0===e.sheet||e.sheet===tW.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 tF&&!r.arraysFlag&&(t=null!=(n=nw(t,r))?n:new rK(d.VALUE,ej.ScalarExpected)),t instanceof rK)return t;if(t instanceof tF){let r=t.data.map(t=>t.map(e));return tF.onlyValues(r)}return e(t)}binaryRangeWrapper(e,t,r,n){var o,i;if(t instanceof tF&&!n.arraysFlag&&(t=null!=(o=nw(t,n))?o:new rK(d.VALUE,ej.ScalarExpected)),t instanceof rK)return t;if(r instanceof tF&&!n.arraysFlag&&(r=null!=(i=nw(r,n))?i:new rK(d.VALUE,ej.ScalarExpected)),r instanceof rK)return r;if(t instanceof tF||r instanceof tF){if(!(t instanceof tF))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 tF.onlyValues(n)}else t=tF.fromScalar(t);if(!(r instanceof tF))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 tF.onlyValues(n)}else r=tF.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 tF.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 tF.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 rK(d.NA)}}return tF.onlyValues(i)}return e(t,r)}}function o7(e,t){return t instanceof rK?t:e(t)}function o8(e,t,r){return t instanceof rK?t:r instanceof rK?r:e(t,r)}class ie{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 it{constructor(e,t){this.stats=e,this.maxPendingLazyTransformations=t,this.transformations=[],this.versionOffset=0}version(){return this.versionOffset+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 ie(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);let n=this.version();for(let o=Math.max(r,this.versionOffset);o<n;o++){let r=this.transformations[o-this.versionOffset];r.isIrreversible()&&(this.undoRedo.storeDataForVersion(o,t,this.parser.computeHashFromAst(e)),this.parser.rememberNewAst(e));let[n,i]=r.transformSingleAst(e,t);e=n,t=i}let o=this.parser.rememberNewAst(e);return this.stats.end(a.TRANSFORM_ASTS_POSTPONED),[o,t,n]}*getTransformationsFrom(e,t){let r=this.version();for(let n=Math.max(e,this.versionOffset);n<r;n++){let e=this.transformations[n-this.versionOffset];(!t||t(e))&&(yield e)}}needsCompaction(){return this.transformations.length>=this.maxPendingLazyTransformations}compact(){this.versionOffset+=this.transformations.length,this.transformations=[]}}function ir(e,t){return typeof e==typeof t?e===tM?0:e<t?-1:+(e>t):e===tM?-1:t===tM?1:t instanceof rK||"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 io{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?ny(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(r0(t.sheet,e,t.start.row))):e=>tI(i.getCellValue(r0(t.sheet,t.start.col,e))),h="asc"===n?(e,t)=>ir(e,t):(e,t)=>-ir(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?ny(e):e);if("returnNotFound"===r)return"first"===n?o.indexOf(e):o.lastIndexOf(e);let i="returnLowerBound"===r?(e,t)=>ir(e,t):(e,t)=>-ir(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 ii extends io{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){}forceApplyPostponedTransformations(){}find(e,t,r){return this.basicFind(e,t,"row",r)}}class is{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 ii(e)}add(e,t){if(e!==tM&&!(e instanceof rK))if(e instanceof tF)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 tF)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=r2(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?ny(e):e,s=o.get(i);if(!s||!s.index||0===s.index.length)return;let a=is.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?ia(n,e.index,"upperBound"):ia(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)}forceApplyPostponedTransformations(){for(let[e,t]of this.index)t.forEach((t,r)=>{if(t)for(let n of t.keys())this.ensureRecentData(e,r,n)})}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 oa||t instanceof oc)))o instanceof oa?this.addRows(t,o.rowsSpan,r):o instanceof oc&&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=ny(e));let r=this.getValueIndex(t.sheet,t.col,e);is.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=ny(e));let n=r.get(e);if(!n)return;let o=ia(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);is.shiftRows(n,t.rowStart,t.numberOfRows)}removeRows(e,t,r){let n=this.getValueIndex(t.sheet,e,r);is.removeRowsFromValues(n,t),is.shiftRows(n,t.rowEnd+1,-t.numberOfRows)}static addValue(e,t){let r=ia(t,e.index,"lowerBound");e.index[r]!==t&&e.index.splice(r+1,0,t)}static removeRowsFromValues(e,t){let r=ia(t.rowStart,e.index,"upperBound"),n=ia(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=ia(t,e.index,"upperBound");if(-1!==n)for(let t=n;t<e.index.length;++t)e.index[t]+=r}}function ia(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 il{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 ih{constructor(e,t,r){this.dependencyGraph=e,this.unparser=t,this.exporter=r}getCellHyperlink(e){let t=this.dependencyGraph.getCell(e);if(t instanceof rA){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 rA){let n=r.getFormula(this.dependencyGraph.lazilyTransformingAstService);return t=null!=t?t:e,this.unparser.unparse(n,t)}if(r instanceof rT){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 rz)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=r0(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 tf(e,this.dependencyGraph.sheetMapping,t);return new ih(this.dependencyGraph,r,this.exporter)}}class id{static buildFromSheets(e,t={},r=[]){let n=new im(t);return this.buildEngine(n,e,r)}static buildFromSheet(e,t={},r=[]){let n=new im(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 im(e),{},t)}static rebuildWithConfig(e,t,r,n){return this.buildEngine(e,t,r,n)}static buildEngine(e,t={},r=[],n=e.useStats?new tj:new tq){n.start(a.BUILD_ENGINE_TOTAL);let o=new tW,i=new o2(e),s=new it(n,e.maxPendingLazyTransformations),l=rB.buildEmpty(s,e,i,o,n),h=e.useColumnIndex?new is(l,e,n):new ii(l),d=l.sheetMapping,u=l.addressMapping;for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];rD(n);let o=rF(n);if(o.height>e.maxRows||o.width>e.maxColumns)throw new tZ;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 tf(e,d,o),p=new n$(e),m=new il(e),f=new no(e,p,m),b=new or(e,p,m),C=new nE(e,i),y=new oC(e,l,h,b,c,n,s,o,C),w=new oW(e,y);s.undoRedo=w;let S=new oo(e,l,y),v=new oG(e,y,w,S,l,h,c,b,s,o),R=new oX(e,o,d,s),E=new ih(l,g,R),T=new o9(e,l,h,n,f,i,o,E,C,p);n.measure(a.GRAPH_BUILD,()=>{new oQ(l,h,c,b,n,C).buildGraph(t,n)}),r.forEach(e=>{v.ensureItIsPossibleToAddNamedExpression(e.name,e.expression,e.scope),v.operations.addNamedExpression(e.name,e.expression,e.scope,e.options)});let A=new oj(e,n,T,s,l,h);return A.run(),n.end(a.BUILD_ENGINE_TOTAL),{config:e,stats:n,dependencyGraph:l,columnSearch:h,parser:c,unparser:g,cellContentParser:b,evaluator:A,lazilyTransformingAstService:s,crudOperations:v,exporter:R,namedExpressions:o,serialization:E,functionRegistry:i}}}var iu=r(732);(V=S||(S={})).SheetAdded="sheetAdded",V.SheetRemoved="sheetRemoved",V.SheetRenamed="sheetRenamed",V.NamedExpressionAdded="namedExpressionAdded",V.NamedExpressionRemoved="namedExpressionRemoved",V.ValuesUpdated="valuesUpdated",V.EvaluationSuspended="evaluationSuspended",V.EvaluationResumed="evaluationResumed";class ic extends iu.TinyEmitter{emit(e,...t){return super.emit(e,...t),this}}class ig{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 ic,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(id.buildFromSheet(e,t,r))}static buildFromSheets(e,t={},r=[]){return this.buildFromEngineState(id.buildFromSheets(e,t,r))}static buildEmpty(e={},t=[]){return this.buildFromEngineState(id.buildEmpty(e,t))}static getLanguage(e){nN(e,"string","languageCode");let t=this.registeredLanguages.get(e);if(void 0!==t)return t;throw new rh}static registerLanguage(e,t){if(nN(e,"string","languageCode"),this.registeredLanguages.has(e))throw new rd;this.registeredLanguages.set(e,new rH(Object.assign({},t.functions),Object.assign({},t.errors),Object.assign({},t.ui)))}static unregisterLanguage(e){if(nN(e,"string","languageCode"),this.registeredLanguages.has(e))this.registeredLanguages.delete(e);else throw new rh}static getRegisteredLanguagesCodes(){return Array.from(this.registeredLanguages.keys())}static registerFunctionPlugin(e,t){o2.registerFunctionPlugin(e,t)}static unregisterFunctionPlugin(e){o2.unregisterFunctionPlugin(e)}static registerFunction(e,t,r){nN(e,"string","functionId"),o2.registerFunction(e,t,r)}static unregisterFunction(e){nN(e,"string","functionId"),o2.unregisterFunction(e)}static unregisterAllFunctions(){o2.unregisterAll()}static getRegisteredFunctionNames(e){nN(e,"string","code");let t=o2.getRegisteredFunctionIds();return this.getLanguage(e).getFunctionTranslations(t)}static getFunctionPlugin(e){return nN(e,"string","functionId"),o2.getFunctionPlugin(e)}static getAllFunctionPlugins(){return o2.getPlugins()}static buildFromEngineState(e){return new ig(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(!r6(e))throw new rt("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellValue(e)}getCellFormula(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");return this._serialization.getCellFormula(e)}getCellHyperlink(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellHyperlink(e)}getCellSerialized(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellSerialized(e)}getSheetValues(e){return nN(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetValues(e)}getSheetFormulas(e){return nN(e,"number","sheetId"),this._serialization.getSheetFormulas(e)}getSheetSerialized(e){return nN(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetSerialized(e)}getAllSheetsDimensions(){return this._serialization.genericAllSheetsGetter(e=>this.getSheetDimensions(e))}getSheetDimensions(e){return nN(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(r6(e))t=new r8(e,e);else if(r9(e))t=new r8(e.start,e.end);else throw new rt("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 nN(e,"number","sheetId"),this._crudOperations.setRowOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapRowIndexes(e,t){nN(e,"number","sheetId");try{return this._crudOperations.validateSwapRowIndexes(e,t),this._crudOperations.testRowOrderForArrays(e,t),!0}catch(e){return!1}}setRowOrder(e,t){nN(e,"number","sheetId");let r=this._crudOperations.mappingFromOrder(e,t,"row");return this.swapRowIndexes(e,r)}isItPossibleToSetRowOrder(e,t){nN(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 nN(e,"number","sheetId"),this._crudOperations.setColumnOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapColumnIndexes(e,t){nN(e,"number","sheetId");try{return this._crudOperations.validateSwapColumnIndexes(e,t),this._crudOperations.testColumnOrderForArrays(e,t),!0}catch(e){return!1}}setColumnOrder(e,t){nN(e,"number","sheetId");let r=this._crudOperations.mappingFromOrder(e,t,"column");return this.swapColumnIndexes(e,r)}isItPossibleToSetColumnOrder(e,t){nN(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){nN(e,"number","sheetId");let r=ow(t);try{return this._crudOperations.ensureItIsPossibleToAddRows(e,...r),!0}catch(e){return!1}}addRows(e,...t){return nN(e,"number","sheetId"),this._crudOperations.addRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveRows(e,...t){nN(e,"number","sheetId");let r=oy(t);try{return this._crudOperations.ensureItIsPossibleToRemoveRows(e,...r),!0}catch(e){return!1}}removeRows(e,...t){return nN(e,"number","sheetId"),this._crudOperations.removeRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToAddColumns(e,...t){nN(e,"number","sheetId");let r=ow(t);try{return this._crudOperations.ensureItIsPossibleToAddColumns(e,...r),!0}catch(e){return!1}}addColumns(e,...t){return nN(e,"number","sheetId"),this._crudOperations.addColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveColumns(e,...t){nN(e,"number","sheetId");let r=oy(t);try{return this._crudOperations.ensureItIsPossibleToRemoveColumns(e,...r),!0}catch(e){return!1}}removeColumns(e,...t){return nN(e,"number","sheetId"),this._crudOperations.removeColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveCells(e,t){if(!r6(t))throw new rt("SimpleCellAddress","destinationLeftCorner");if(!r9(e))throw new rt("SimpleCellRange","source");try{let r=new r8(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(!r6(t))throw new rt("SimpleCellAddress","destinationLeftCorner");if(!r9(e))throw new rt("SimpleCellRange","source");let r=new r8(e.start,e.end);return this._crudOperations.moveCells(r.start,r.width(),r.height(),t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveRows(e,t,r,n){nN(e,"number","sheetId"),nN(t,"number","startRow"),nN(r,"number","numberOfRows"),nN(n,"number","targetRow");try{return this._crudOperations.ensureItIsPossibleToMoveRows(e,t,r,n),!0}catch(e){return!1}}moveRows(e,t,r,n){return nN(e,"number","sheetId"),nN(t,"number","startRow"),nN(r,"number","numberOfRows"),nN(n,"number","targetRow"),this._crudOperations.moveRows(e,t,r,n),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveColumns(e,t,r,n){nN(e,"number","sheetId"),nN(t,"number","startColumn"),nN(r,"number","numberOfColumns"),nN(n,"number","targetColumn");try{return this._crudOperations.ensureItIsPossibleToMoveColumns(e,t,r,n),!0}catch(e){return!1}}moveColumns(e,t,r,n){return nN(e,"number","sheetId"),nN(t,"number","startColumn"),nN(r,"number","numberOfColumns"),nN(n,"number","targetColumn"),this._crudOperations.moveColumns(e,t,r,n),this.recomputeIfDependencyGraphNeedsIt()}copy(e){if(!r9(e))throw new rt("SimpleCellRange","source");let t=new r8(e.start,e.end);return this._crudOperations.copy(t.start,t.width(),t.height()),this.getRangeValues(e)}cut(e){if(!r9(e))throw new rt("SimpleCellRange","source");let t=new r8(e.start,e.end);return this._crudOperations.cut(t.start,t.width(),t.height()),this.getRangeValues(e)}paste(e){if(!r6(e))throw new rt("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(!r9(e))throw new rt("SimpleCellRange","source");return new r8(e.start,e.end).arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellValue(e)))}getRangeFormulas(e){if(!r9(e))throw new rt("SimpleCellRange","source");return new r8(e.start,e.end).arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellFormula(e)))}getRangeSerialized(e){if(!r9(e))throw new rt("SimpleCellRange","source");return new r8(e.start,e.end).arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellSerialized(e)))}getFillRangeData(e,t,r=!1){if(!r9(e))throw new rt("SimpleCellRange","source");if(!r9(t))throw new rt("SimpleCellRange","target");let n=new r8(e.start,e.end),o=new r8(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){nN(e,"string","sheetName");try{return this._crudOperations.ensureItIsPossibleToAddSheet(e),!0}catch(e){return!1}}addSheet(e){void 0!==e&&nN(e,"string","sheetName");let t=this._crudOperations.addSheet(e);return this.recomputeIfDependencyGraphNeedsIt(),this._emitter.emit(S.SheetAdded,t),t}isItPossibleToRemoveSheet(e){nN(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(e){return!1}}removeSheet(e){nN(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){nN(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(e){return!1}}clearSheet(e){return nN(e,"number","sheetId"),this._crudOperations.clearSheet(e),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToReplaceSheetContent(e,t){nN(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),this._crudOperations.ensureItIsPossibleToChangeSheetContents(e,t),!0}catch(e){return!1}}setSheetContent(e,t){return nN(e,"number","sheetId"),this._crudOperations.setSheetContent(e,t),this.recomputeIfDependencyGraphNeedsIt()}simpleCellAddressFromString(e,t){return nN(e,"string","cellAddress"),nN(t,"number","sheetId"),eM(this.sheetMapping.getSheetId.bind(this.sheetMapping),e,t)}simpleCellRangeFromString(e,t){return nN(e,"string","cellRange"),nN(t,"number","sheetId"),((e,t,r)=>{let n=t.split(":");if(2!==n.length)return;let[o,i]=n,s=eM(e,o,r);if(void 0===s)return;let a=eM(e,i,s.sheet);if(void 0!==a&&s.sheet===a.sheet)return r7(s,a)})(this.sheetMapping.getSheetId.bind(this.sheetMapping),e,t)}simpleCellAddressToString(e,t={}){if(!r6(e))throw new rt("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(!r9(e))throw new rt("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(r6(e))t=this._dependencyGraph.addressMapping.getCell(e);else if(r9(e))t=this._dependencyGraph.rangeMapping.getRangeVertex(e.start,e.end);else throw new rt("SimpleCellAddress | SimpleCellRange",e);return void 0===t?[]:this._dependencyGraph.getAdjacentNodesAddresses(t)}getCellPrecedents(e){let t;if(r6(e))t=this._dependencyGraph.addressMapping.getCell(e);else if(r9(e))t=this._dependencyGraph.rangeMapping.getRangeVertex(e.start,e.end);else throw new rt("SimpleCellAddress | SimpleCellRange",e);return void 0===t?[]:this._dependencyGraph.dependencyQueryAddresses(t)}getSheetName(e){return nN(e,"number","sheetId"),this.sheetMapping.getSheetName(e)}getSheetNames(){return this.sheetMapping.getSheetNames()}getSheetId(e){return nN(e,"string","sheetName"),this.sheetMapping.getSheetId(e)}doesSheetExist(e){return nN(e,"string","sheetName"),this.sheetMapping.hasSheetWithName(e)}getCellType(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");var t=this.dependencyGraph.getCell(e);if(t instanceof rT)if(t.isLeftCorner(e))return u.ARRAYFORMULA;else return u.ARRAY;return t instanceof rA||t instanceof rz?u.FORMULA:t instanceof rU?u.VALUE:u.EMPTY}doesCellHaveSimpleValue(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");return this.getCellType(e)===u.VALUE}doesCellHaveFormula(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");let t=this.getCellType(e);return t===u.FORMULA||t===u.ARRAYFORMULA}isCellEmpty(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");return this.getCellType(e)===u.EMPTY}isCellPartOfArray(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");let t=this.getCellType(e);return t===u.ARRAY||t===u.ARRAYFORMULA}getCellValueType(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),rq(this.dependencyGraph.getCellValue(e))}getCellValueDetailedType(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();var t=this.dependencyGraph.getCellValue(e);return tP(t)?t instanceof tx?t.getDetailedType():s.NUMBER_RAW:rq(t)}getCellValueFormat(e){if(!r6(e))throw new rt("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();var t=this.dependencyGraph.getCellValue(e);if(tP(t))return t instanceof tx?t.format:void 0}countSheets(){return this.sheetMapping.numberOfSheets()}isItPossibleToRenameSheet(e,t){nN(e,"number","sheetId"),nN(t,"string","newName");try{return this._crudOperations.ensureItIsPossibleToRenameSheet(e,t),!0}catch(e){return!1}}renameSheet(e,t){nN(e,"number","sheetId"),nN(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){nN(e,"string","expressionName"),void 0!==r&&nN(r,"number","scope");try{return this._crudOperations.ensureItIsPossibleToAddNamedExpression(e,t,r),!0}catch(e){return!1}}addNamedExpression(e,t,r,n){nN(e,"string","expressionName"),void 0!==r&&nN(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){nN(e,"string","expressionName"),void 0!==t&&nN(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){nN(e,"string","expressionName"),void 0!==t&&nN(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){nN(e,"string","expressionName"),void 0!==t&&nN(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){nN(e,"string","expressionName"),void 0!==r&&nN(r,"number","scope");try{return this._crudOperations.ensureItIsPossibleToChangeNamedExpression(e,t,r),!0}catch(e){return!1}}changeNamedExpression(e,t,r,n){return nN(e,"string","expressionName"),void 0!==r&&nN(r,"number","scope"),this._crudOperations.changeNamedExpressionExpression(e,r,t,n),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveNamedExpression(e,t){nN(e,"string","expressionName"),void 0!==t&&nN(t,"number","scope");try{return this._crudOperations.isItPossibleToRemoveNamedExpression(e,t),!0}catch(e){return!1}}removeNamedExpression(e,t){nN(e,"string","expressionName"),void 0!==t&&nN(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&&nN(e,"number","scope"),this._crudOperations.ensureScopeIdIsValid(e),this._namedExpressions.getAllNamedExpressionsNamesInScope(e)}getAllNamedExpressionsSerialized(){return this._serialization.getAllNamedExpressionsSerialized()}normalizeFormula(e){nN(e,"string","formulaString");let{ast:t,address:r}=this.extractTemporaryFormula(e);if(void 0===t)throw new tJ;return this._unparser.unparse(t,r)}calculateFormula(e,t){nN(e,"string","formulaString"),nN(t,"number","sheetId"),this._crudOperations.ensureScopeIdIsValid(t);let{ast:r,address:n,dependencies:o}=this.extractTemporaryFormula(e,t);if(void 0===r)throw new tJ;let i=this.evaluator.runAndForget(r,n,o);return this._exporter.exportScalarOrRange(i)}getNamedExpressionsFromFormula(e){nN(e,"string","formulaString");let{ast:t,dependencies:r}=this.extractTemporaryFormula(e);if(void 0===t)throw new tJ;return[...new Set(r.filter(e=>e instanceof tT).map(e=>e.name))]}validateFormula(e){nN(e,"string","formulaString");let{ast:t}=this.extractTemporaryFormula(e);return void 0!==t}getRegisteredFunctionNames(){return ig.getLanguage(this._config.language).getFunctionTranslations(this._functionRegistry.getRegisteredFunctionIds())}getFunctionPlugin(e){return nN(e,"string","functionId"),this._functionRegistry.getFunctionPlugin(e)}getAllFunctionPlugins(){return this._functionRegistry.getPlugins()}numberToDateTime(e){return nN(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDateTime(e)}numberToDate(e){return nN(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDate(e)}numberToTime(e){return nN(e,"number","val"),nq(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 rs}extractTemporaryFormula(e,t=1){let r=this._cellContentParser.parse(e),n={sheet:t,col:0,row:0};if(!(r instanceof b.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=id.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}compactLazyTransformationsIfNeeded(){var e;this._lazilyTransformingAstService.needsCompaction()&&(this._dependencyGraph.forceApplyPostponedTransformations(),this._columnSearch.forceApplyPostponedTransformations(),this._lazilyTransformingAstService.compact(),null==(e=this._lazilyTransformingAstService.undoRedo)||e.cleanupOrphanedOldData())}recomputeIfDependencyGraphNeedsIt(){if(this._evaluationSuspended)return[];{let e=this._crudOperations.getAndClearContentChanges(),t=this.dependencyGraph.verticesToRecompute();this.dependencyGraph.clearDirtyVertices(),this.compactLazyTransformationsIfNeeded(),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}}}ig.version="3.3.0",ig.buildDate="20/05/2026 14:43:58",ig.releaseDate="20/05/2026",ig.languages={},ig.registeredLanguages=new Map;let ip=new WeakMap;class im{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:b,licenseKey:C,matchWholeCell:y,arrayColumnSeparator:w,arrayRowSeparator:S,maxRows:v,maxColumns:R,nullYear:E,nullDate:T,parseDateTime:A,precisionEpsilon:M,precisionRounding:I,stringifyDateTime:x,stringifyDuration:N,smartRounding:O,timeFormats:k,thousandSeparator:H,useArrayArithmetic:_,useStats:L,undoLimit:P,maxPendingLazyTransformations:D,useColumnIndex:F,useRegularExpressions:B,useWildcards:V}=e;t&&im.warnDeprecatedOptions(e),this.useArrayArithmetic=nA(_,"boolean","useArrayArithmetic"),this.accentSensitive=nA(r,"boolean","accentSensitive"),this.caseSensitive=nA(n,"boolean","caseSensitive"),this.caseFirst=nA(o,["upper","lower","false"],"caseFirst"),this.ignorePunctuation=nA(g,"boolean","ignorePunctuation"),this.chooseAddressMappingPolicy=null!=i?i:im.defaultConfig.chooseAddressMappingPolicy,this.dateFormats=[...nI(l,Array.isArray,"array","dateFormats")],this.timeFormats=[...nI(k,Array.isArray,"array","timeFormats")],this.functionArgSeparator=nA(u,"string","functionArgSeparator"),this.decimalSeparator=nA(h,[".",","],"decimalSeparator"),this.language=nA(f,"string","language"),this.ignoreWhiteSpace=nA(b,["standard","any"],"ignoreWhiteSpace"),this.licenseKey=nA(C,"string","licenseKey"),this.thousandSeparator=nA(H,["",","," ","."],"thousandSeparator"),this.arrayColumnSeparator=nA(w,[",",";"],"arrayColumnSeparator"),this.arrayRowSeparator=nA(S,[";","|"],"arrayRowSeparator"),this.localeLang=nA(m,"string","localeLang"),this.functionPlugins=[...null!=c?c:im.defaultConfig.functionPlugins],this.smartRounding=nA(O,"boolean","smartRounding"),this.evaluateNullToZero=nA(d,"boolean","evaluateNullToZero"),this.nullYear=nA(E,"number","nullYear"),nM(this.nullYear,"nullYear",0),function(e,t){if(e>100)throw new ro(t,100)}(this.nullYear,"nullYear"),this.precisionRounding=nA(I,"number","precisionRounding"),nM(this.precisionRounding,"precisionRounding",0),this.precisionEpsilon=nA(M,"number","precisionEpsilon"),nM(this.precisionEpsilon,"precisionEpsilon",0),this.useColumnIndex=nA(F,"boolean","useColumnIndex"),this.useStats=nA(L,"boolean","useStats"),this.parseDateTime=nA(A,"function","parseDateTime"),this.stringifyDateTime=nA(x,"function","stringifyDateTime"),this.stringifyDuration=nA(N,"function","stringifyDuration"),this.translationPackage=ig.getLanguage(this.language),this.errorMapping=this.translationPackage.buildErrorMapping(),this.nullDate=nI(T,nz,"IDate","nullDate"),this.leapYear1900=nA(p,"boolean","leapYear1900"),this.undoLimit=nA(P,"number","undoLimit"),this.maxPendingLazyTransformations=nA(D,"number","maxPendingLazyTransformations"),this.useRegularExpressions=nA(B,"boolean","useRegularExpressions"),this.useWildcards=nA(V,"boolean","useWildcards"),this.matchWholeCell=nA(y,"boolean","matchWholeCell"),nM(this.undoLimit,"undoLimit",0),nM(this.maxPendingLazyTransformations,"maxPendingLazyTransformations",1),this.maxRows=nA(v,"number","maxRows"),nM(this.maxRows,"maxRows",1),this.maxColumns=nA(R,"number","maxColumns"),this.currencySymbol=this.setupCurrencySymbol(a),nM(this.maxColumns,"maxColumns",1),this.context=s,ip.set(this,{licenseKeyValidityState:function(e){let t={template:"missing",vars:{}};if("gpl-v3"===e||"internal-use-in-handsontable"===e||"hftrial-0168e-1f2b7-47158-70b05-0842f"===e)t.template="valid";else if("string"==typeof e&&function(e){if((e=(e+"").replace(/\-/g,""))[n5]!==n9("Z"))return!1;let t=0;return 0===[[0,n9("G")+1],[n9("H"),n9("H")-1],[n9("G")+n9("H"),n9("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},n9("A"))}(e)){var r,n;let o,i,s,a,l,h,d,u,c,[g,p,m]="20/05/2026".split("/"),f=Math.floor(new Date(`${p}/${g}/${m}`).getTime()/864e5),b=25===n4(r=e)[n5]?(o=n4(r),i=parseInt("12",16),s=n9("F"),parseInt(o.substr(i,s),16)/(a=n4(r),l=n9("C"),h=n9("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((b+1)*864e5)).getMonth()],u=n.getDate(),c=n.getFullYear(),`${d} ${u}, ${c}`),f>b?t.template="expired":t.template="valid"}else""!==e&&(t.template="invalid");return n8||"valid"===t.template||(console.warn(n7[t.template](t.vars)),n8=!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 rt("string[]","currencySymbol");if(""===e)throw new rr("currencySymbol")}),t}get licenseKeyValidityState(){return ip.get(this).licenseKeyValidityState}getConfig(){return ib(this)}mergeConfig(e){let t=Object.assign({},this.getConfig(),e);return im.warnDeprecatedOptions(e),new im(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 im.defaultConfig){let o=null!=(t=e[n])?t:im.defaultConfig[n];Array.isArray(o)?r[n]=[...o]:r[n]=o}return r}im.defaultConfig={accentSensitive:!1,currencySymbol:["$"],caseSensitive:!1,caseFirst:"lower",context:void 0,chooseAddressMappingPolicy:new class{call(){return rG}},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(n_);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 nD(a,r);if(1===a.length)return nF(s,t);let l=nF(s.slice(0,s.length-1),t),h=nD(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=n1(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+=n3(s?(e.hours+11)%12+1:e.hours,r.value.length);break;case"d":case"dd":o+=n3(e.day,r.value.length);break;case"s":case"ss":o+=n3(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+=n3(e.minutes,r.value.length):o+=n3(e.month,r.value.length),i=!0;break;case"yy":o+=n3(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(nO.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=n1(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+=n3(e.hours,t.value.length),e.hours=0;break;case"[hh]":o+=n3(e.hours,t.value.length-2),e.hours=0;break;case"m":case"mm":o+=n3(e.minutes,t.value.length),e.minutes=0;break;case"[mm]":o+=n3(e.minutes+60*e.hours,t.value.length-2),e.minutes=0,e.hours=0;break;case"s":case"ss":o+=n3(Math.floor(e.seconds),t.value.length);break;default:if(nO.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,maxPendingLazyTransformations:50,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",DAVERAGE:"DAVERAGE",DCOUNT:"DCOUNT",DCOUNTA:"DCOUNTA",DGET:"DGET",DMAX:"DMAX",DMIN:"DMIN",DPRODUCT:"DPRODUCT",DSTDEV:"DSTDEV",DSTDEVP:"DSTDEVP",DSUM:"DSUM",DVAR:"DVAR",DVARP:"DVARP",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",SEQUENCE:"SEQUENCE",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",TEXTJOIN:"TEXTJOIN",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",PERCENTILE:"PERCENTILE","PERCENTILE.INC":"PERCENTILE.INC","PERCENTILE.EXC":"PERCENTILE.EXC",QUARTILE:"QUARTILE","QUARTILE.INC":"QUARTILE.INC","QUARTILE.EXC":"QUARTILE.EXC",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"}};(U=v||(v={}))[U.FullyAbsolute=1]="FullyAbsolute",U[U.RowAbsoluteColRelative=2]="RowAbsoluteColRelative",U[U.RowRelativeColAbsolute=3]="RowRelativeColAbsolute",U[U.FullyRelative=4]="FullyRelative";class iy extends nv{verifyAddressArguments(e,t,r,n){if(n){if(e<1||t<1)return new rK(d.VALUE,ej.LessThanOne)}else if(v.FullyAbsolute==r){if(e<1||t<1)return new rK(d.VALUE,ej.LessThanOne)}else if(v.RowAbsoluteColRelative==r){if(e<1)return new rK(d.VALUE,ej.LessThanOne)}else if(v.RowRelativeColAbsolute==r&&t<1)return new rK(d.VALUE,ej.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=eN(t-1),a="";null!=o&&(a=`${o}!`);let l=0==t?"C":`C[${t}]`,h=0==e?"R":`R[${e}]`;return v.FullyRelative==r?n?`${a}${s}${e}`:`${a}${h}${l}`:v.RowRelativeColAbsolute==r?n?`${a}$${s}${e}`:`${a}${h}C${t}`:v.RowAbsoluteColRelative==r?n?`${a}${s}$${e}`:`${a}R${e}${l}`:n?`${a}$${s}$${e}`:`${a}R${e}C${t}`})}}iy.implementedFunctions={ADDRESS:{method:"address",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER},{argumentType:p.NUMBER,optionalArg:!0,defaultValue:1,minValue:1,maxValue:4,emptyAsDefault:!0},{argumentType:p.BOOLEAN,optionalArg:!0,defaultValue:!0,emptyAsDefault:!0},{argumentType:p.STRING,optionalArg:!0}]}};class iw extends nv{arrayformula(e,t){return this.runFunction(e.args,t,this.metadata("ARRAYFORMULA"),e=>e)}arrayformulaArraySize(e,t){if(1!==e.args.length)return nR.error();let r=this.metadata("ARRAYFORMULA");return e.args.map(e=>{var n;return this.arraySizeForAst(e,new nr(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 tF.onlyValues(o)})}arrayconstrainArraySize(e,t){if(3!==e.args.length)return nR.error();let r=this.metadata("ARRAY_CONSTRAIN"),{height:n,width:i}=e.args.map(e=>{var n;return this.arraySizeForAst(e,new nr(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))?nR.error():new nR(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 rK(d.NA,ej.EqualLength);if(e.width()>1&&e.height()>1)return new rK(d.NA,ej.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!==nh(r.data[o][n])){e=!1;break}e&&i.push(r[o][n])}i.length>0&&n.push(i)}return n.length>0?tF.onlyValues(n):new rK(d.NA,ej.EmptyRange)})}filterArraySize(e,t){if(e.args.length<=1)return nR.error();let r=this.metadata("FILTER"),n=e.args.map(e=>{var n;return this.arraySizeForAst(e,new nr(t.formulaAddress,t.arraysFlag||null!=(n=null==r?void 0:r.enableArrayArithmeticForArguments)&&n))});return new nR(Math.max(...n.map(e=>e.width)),Math.max(...n.map(e=>e.height)))}}iw.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 iS extends nv{abs(e,t){return this.runFunction(e.args,t,this.metadata("ABS"),Math.abs)}}iS.implementedFunctions={ABS:{method:"abs",parameters:[{argumentType:p.NUMBER}]}};class iv extends nv{bitlshift(e,t){return this.runFunction(e.args,t,this.metadata("BITLSHIFT"),iR)}bitrshift(e,t){return this.runFunction(e.args,t,this.metadata("BITRSHIFT"),iE)}}function iR(e,t){return t<0?iE(e,-t):iT(e*Math.pow(2,t))}function iE(e,t){return t<0?iR(e,-t):iT(Math.floor(e/Math.pow(2,t)))}function iT(e){return e>0xffffffffffff?new rK(d.NUM,ej.BitshiftLong):e}iv.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 iA extends nv{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)}}iA.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 iM extends nv{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 rK(d.NA,ej.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 rK)&&this.arithmeticHelper.eq(e,t[n]))return t[n+1];return n<r?t[n]:new rK(d.NA,ej.NoDefault)})}iferror(e,t){return this.runFunction(e.args,t,this.metadata("IFERROR"),(e,t)=>e instanceof rK?t:e)}ifna(e,t){return this.runFunction(e.args,t,this.metadata("IFNA"),(e,t)=>e instanceof rK&&e.type===d.NA?t:e)}choose(e,t){return this.runFunction(e.args,t,this.metadata("CHOOSE"),(e,...t)=>e>t.length?new rK(d.NUM,ej.Selector):t[e-1])}}iM.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 nv{char(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),e=>e<1||e>=256?new rK(d.VALUE,ej.CharacterCodeBounds):String.fromCharCode(Math.trunc(e)))}unichar(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),e=>e<1||e>=1114112?new rK(d.VALUE,ej.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 nv{code(e,t){return this.runFunction(e.args,t,this.metadata("CODE"),e=>0===e.length?new rK(d.VALUE,ej.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 rK(d.VALUE,ej.EmptyString)})}}ix.implementedFunctions={CODE:{method:"code",parameters:[{argumentType:p.STRING}]},UNICODE:{method:"unicode",parameters:[{argumentType:p.STRING}]}};class iN extends nv{countblank(e,t){return this.runFunction(e.args,t,this.metadata("COUNTBLANK"),(...e)=>{let t=0;return e.forEach(e=>{e===tM&&t++}),t})}}iN.implementedFunctions={COUNTBLANK:{method:"countblank",parameters:[{argumentType:p.SCALAR}],repeatLastArgs:1,expandRanges:!0}};class iO extends nv{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 rK?r.add(n.type):""!==n&&t.add(n);return t.size+r.size})}}iO.implementedFunctions={COUNTUNIQUE:{method:"countunique",parameters:[{argumentType:p.SCALAR}],repeatLastArgs:1,expandRanges:!0}};let ik=[{argumentType:p.RANGE},{argumentType:p.SCALAR},{argumentType:p.RANGE}];class iH extends nv{withDatabaseArgs(e,t,r,n){return this.runFunction(e.args,t,this.metadata(r),(e,t,r)=>{let o=this.resolveFieldIndex(e,t);if(o instanceof rK)return o;let i=this.buildDatabaseCriteria(e,r);return i instanceof rK?i:n(e.data,o,i)})}dcount(e,t){return this.withDatabaseArgs(e,t,"DCOUNT",(e,t,r)=>{let n=0;for(let o=1;o<e.length;o++)if(this.rowMatchesCriteria(e[o],r)){let r=e[o][t];if(r instanceof rK)return r;tP(r)&&n++}return n})}dcounta(e,t){return this.withDatabaseArgs(e,t,"DCOUNTA",(e,t,r)=>{let n=0;for(let o=1;o<e.length;o++)if(this.rowMatchesCriteria(e[o],r)){let r=e[o][t];if(r instanceof rK)return r;r!==tM&&null!=r&&n++}return n})}dproduct(e,t){return this.withDatabaseArgs(e,t,"DPRODUCT",(e,t,r)=>{let n=1,o=!1;for(let i=1;i<e.length;i++)if(this.rowMatchesCriteria(e[i],r)){let r=e[i][t];if(r instanceof rK)return r;tP(r)&&(n*=tI(r),o=!0)}return o?n:0})}dsum(e,t){return this.withDatabaseArgs(e,t,"DSUM",(e,t,r)=>{let n=0;for(let o=1;o<e.length;o++)if(this.rowMatchesCriteria(e[o],r)){let r=e[o][t];if(r instanceof rK)return r;tP(r)&&(n+=tI(r))}return n})}daverage(e,t){return this.withDatabaseArgs(e,t,"DAVERAGE",(e,t,r)=>{let n=0,o=0;for(let i=1;i<e.length;i++)if(this.rowMatchesCriteria(e[i],r)){let r=e[i][t];if(r instanceof rK)return r;tP(r)&&(n+=tI(r),o++)}return 0===o?new rK(d.DIV_BY_ZERO):n/o})}dget(e,t){return this.withDatabaseArgs(e,t,"DGET",(e,t,r)=>{let n,o=0;for(let i=1;i<e.length;i++)if(this.rowMatchesCriteria(e[i],r)){if(++o>1)return new rK(d.NUM,ej.ValueLarge);n=e[i][t]}return 0===o?new rK(d.VALUE,ej.WrongType):n instanceof rK?n:n===tM||null==n?0:n})}dmax(e,t){return this.withDatabaseArgs(e,t,"DMAX",(e,t,r)=>{let n=-1/0,o=!1;for(let i=1;i<e.length;i++)if(this.rowMatchesCriteria(e[i],r)){let r=e[i][t];if(r instanceof rK)return r;if(tP(r)){let e=tI(r);e>n&&(n=e),o=!0}}return o?n:0})}dmin(e,t){return this.withDatabaseArgs(e,t,"DMIN",(e,t,r)=>{let n=1/0,o=!1;for(let i=1;i<e.length;i++)if(this.rowMatchesCriteria(e[i],r)){let r=e[i][t];if(r instanceof rK)return r;if(tP(r)){let e=tI(r);e<n&&(n=e),o=!0}}return o?n:0})}dstdev(e,t){return this.withDatabaseArgs(e,t,"DSTDEV",(e,t,r)=>{let n=this.collectNumericValues(e,t,r);if(n instanceof rK)return n;if(n.length<=1)return new rK(d.DIV_BY_ZERO);let o=n.reduce((e,t)=>e+t,0)/n.length;return Math.sqrt(n.reduce((e,t)=>e+Math.pow(t-o,2),0)/(n.length-1))})}dstdevp(e,t){return this.withDatabaseArgs(e,t,"DSTDEVP",(e,t,r)=>{let n=this.collectNumericValues(e,t,r);if(n instanceof rK)return n;if(0===n.length)return new rK(d.DIV_BY_ZERO);let o=n.reduce((e,t)=>e+t,0)/n.length;return Math.sqrt(n.reduce((e,t)=>e+Math.pow(t-o,2),0)/n.length)})}dvar(e,t){return this.withDatabaseArgs(e,t,"DVAR",(e,t,r)=>{let n=this.collectNumericValues(e,t,r);if(n instanceof rK)return n;if(n.length<=1)return new rK(d.DIV_BY_ZERO);let o=n.reduce((e,t)=>e+t,0)/n.length;return n.reduce((e,t)=>e+Math.pow(t-o,2),0)/(n.length-1)})}dvarp(e,t){return this.withDatabaseArgs(e,t,"DVARP",(e,t,r)=>{let n=this.collectNumericValues(e,t,r);if(n instanceof rK)return n;if(0===n.length)return new rK(d.DIV_BY_ZERO);let o=n.reduce((e,t)=>e+t,0)/n.length;return n.reduce((e,t)=>e+Math.pow(t-o,2),0)/n.length})}collectNumericValues(e,t,r){let n=[];for(let o=1;o<e.length;o++)if(this.rowMatchesCriteria(e[o],r)){let r=e[o][t];if(r instanceof rK)return r;tP(r)&&n.push(tI(r))}return n}resolveFieldIndex(e,t){if(t instanceof rK)return t;let r=e.data[0];if("string"==typeof t){let e=t.toLowerCase();for(let t=0;t<r.length;t++){let n=r[t];if("string"==typeof n&&n.toLowerCase()===e)return t}return new rK(d.VALUE,ej.WrongType)}let n="boolean"==typeof t?Number(t):t;if(tP(n)){let e=Math.trunc(tI(n));return!Number.isFinite(e)||e<1||e>r.length?new rK(d.VALUE,ej.WrongType):e-1}return new rK(d.VALUE,ej.WrongType)}buildDatabaseCriteria(e,t){var r;let n=e.data[0],o=t.data,i=o[0];for(let e of i)if(e instanceof rK)return e;let s=i.map(e=>{if("string"!=typeof e)return -1;let t=e.toLowerCase();return n.findIndex(e=>"string"==typeof e&&e.toLowerCase()===t)}),a=[];for(let e=1;e<o.length;e++){let t=[];for(let n=0;n<i.length;n++){let i=s[n];if(-1===i)continue;let a=null==(r=o[e])?void 0:r[n];if(a===tM||null==a)continue;if(a instanceof rK)return a;let l=tP(a)?tI(a):a,h=this.interpreter.criterionBuilder.fromCellValue(l,this.arithmeticHelper);if(void 0===h)return new rK(d.VALUE,ej.BadCriterion);t.push({columnIndex:i,lambda:h.lambda})}a.push(t)}return a}rowMatchesCriteria(e,t){return 0!==t.length&&t.some(t=>0===t.length||t.every(t=>{let r=e[t.columnIndex],n=tP(r)?tI(r):r;return t.lambda(n)}))}}iH.implementedFunctions={DCOUNT:{method:"dcount",parameters:ik},DCOUNTA:{method:"dcounta",parameters:ik},DPRODUCT:{method:"dproduct",parameters:ik},DSTDEV:{method:"dstdev",parameters:ik},DSTDEVP:{method:"dstdevp",parameters:ik},DSUM:{method:"dsum",parameters:ik},DVAR:{method:"dvar",parameters:ik},DVARP:{method:"dvarp",parameters:ik},DAVERAGE:{method:"daverage",parameters:ik},DGET:{method:"dget",parameters:ik},DMAX:{method:"dmax",parameters:ik},DMIN:{method:"dmin",parameters:ik}};class i_ extends nv{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=nX(i),o=nX(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 rK(d.NUM,ej.DateBounds):e}return new rK(d.VALUE,ej.InvalidDate)})}time(e,t){return this.runFunction(e.args,t,this.metadata("TIME"),(e,t,r)=>{let n=nK({hours:Math.trunc(e),minutes:Math.trunc(t),seconds:Math.trunc(r)});return n<0?new rK(d.NUM,ej.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(nY(r,t)));return void 0===(n=this.dateTimeHelper.getWithinBounds(n))?new rK(d.NUM,ej.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=>nq(nj(e)%1).hours)}minute(e,t){return this.runFunction(e.args,t,this.metadata("MINUTE"),e=>nq(nj(e)%1).minutes)}second(e,t){return this.runFunction(e.args,t,this.metadata("SECOND"),e=>nq(nj(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(nq(e),t);if(void 0!==i)return i;let s=function(e){let t,r=(nZ.lastIndex=0,null!==(t=nZ.exec(e))?[t]:[]);if(!r.every(e=>n2(e)))return{type:f.NUMBER,tokens:n0(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=n6(s.substr(0,s.length-d.length),"0");d=n3(d,e+d.length)}let c=n6(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=iD.get(t);return void 0===n?new rK(d.NUM,ej.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=iD.get(t);return void 0===s?new rK(d.NUM,ej.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 rK(d.VALUE,ej.IncorrectDateTime):nz(t)?(nW(t)?Math.trunc(nK(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 rK(d.VALUE,ej.IncorrectDateTime):tI(t)%1})}now(e,t){return this.runFunction(e.args,t,this.metadata("NOW"),()=>{let e=new Date(Date.now());return nK({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=nY(this.dateTimeHelper.numberToSimpleDate(e),t)).year,month:r.month,day:Math.min(r.day,nV[r.month-1])},o=this.dateTimeHelper.dateToNumber(n);return void 0===(o=this.dateTimeHelper.getWithinBounds(o))?new rK(d.NUM,ej.DateBounds):o})}datedif(e,t){return this.runFunction(e.args,t,this.metadata("DATEDIF"),(e,t,r)=>{if(e>t)return new rK(d.NUM,ej.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 rK(d.NUM,ej.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=iP(r);if(i instanceof rK)return i;let s=this.simpleRangeToFilteredHolidays(i,n);return s instanceof rK?s:o*this.countWorkdays(e,t,i,s)}workdaycore(e,t,r,n){e=Math.trunc(e),t=Math.trunc(t);let o=iP(r);if(o instanceof rK)return o;let i=this.simpleRangeToFilteredHolidays(o,n);if(i instanceof rK)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-(iL(t+1,n)-iL(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 rK)return e;let o=[];for(let e of n)if(e!==tM)if(!tP(e))return new rK(d.VALUE,ej.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 iL(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 iP(e){var t;return"number"!=typeof e&&"string"!=typeof e?new rK(d.VALUE,ej.WrongType):"string"!=typeof e?null!=(t=iF.get(e))?t:new rK(d.NUM,ej.BadMode):7===e.length&&/^(0|1)*$/.test(e)&&"1111111"!==e?e:new rK(d.NUM,ej.WeekendString)}i_.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 iD=new Map([[1,0],[2,1],[11,1],[12,2],[13,3],[14,4],[15,5],[16,6],[17,0]]),iF=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 iB extends nv{degrees(e,t){return this.runFunction(e.args,t,this.metadata("DEGREES"),e=>180/Math.PI*e)}}iB.implementedFunctions={DEGREES:{method:"degrees",parameters:[{argumentType:p.NUMBER}]}};class iV extends nv{delta(e,t){return this.runFunction(e.args,t,this.metadata("DELTA"),(e,t)=>+(e===t))}}iV.implementedFunctions={DELTA:{method:"delta",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:0}]}};class iU extends nv{exp(e,t){return this.runFunction(e.args,t,this.metadata("EXP"),Math.exp)}}iU.implementedFunctions={EXP:{method:"exp",parameters:[{argumentType:p.NUMBER}]}};class iz extends nv{pmt(e,t){return this.runFunction(e.args,t,this.metadata("PMT"),iW)}ipmt(e,t){return this.runFunction(e.args,t,this.metadata("IPMT"),iG)}ppmt(e,t){return this.runFunction(e.args,t,this.metadata("PPMT"),iY)}fv(e,t){return this.runFunction(e.args,t,this.metadata("FV"),i$)}cumipmt(e,t){return this.runFunction(e.args,t,this.metadata("CUMIPMT"),(e,t,r,n,o,i)=>{if(n>o)return new rK(d.NUM,ej.EndStartPeriod);let s=0;for(let a=n;a<=o;a++)s+=iG(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 rK(d.NUM,ej.EndStartPeriod);let s=0;for(let a=n;a<=o;a++)s+=iY(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 rK(d.NUM,ej.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 rK(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 rK(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 rK(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 rK(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 rK(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 rK(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 rK(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 rK(d.NUM);else return new rK(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 rK(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 rK(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 rK(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 rK(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 rK(d.NUM);let i=360-r*(t-e);return 0===i?0:i<0?new rK(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 rK(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 rK(d.NUM);let i=360-r*(t-e);return 0===i?0:i<0?new rK(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 rK(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 rK(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 rK)return e;for(let t of r)if(tP(t))e*=1+tI(t);else if(t!==tM)return new rK(d.VALUE,ej.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 rK?r:ij(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 rK)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 rK(d.DIV_BY_ZERO);let l=n.length,h=ij(r,s);if(h instanceof rK)return h;let u=ij(t,a);return u instanceof rK?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 rK(d.VALUE,ej.NumberExpected);let o=r.valuesFromTopLeftCorner();for(let e of o)if("number"!=typeof e)return new rK(d.VALUE,ej.NumberExpected);if(o.length!==n.length)return new rK(d.NUM,ej.EqualLength);let i=o.length,s=0;if(o[0]<0)return new rK(d.NUM,ej.ValueSmall);for(let t=0;t<i;t++){if(o[t]=Math.floor(o[t]),o[t]<o[0])return new rK(d.NUM,ej.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 rK(d.VALUE);let r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(r instanceof rK)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 rK(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(!isFinite(o))break;if(o<=-1&&(o=(r-1)/2),1e-10>Math.abs(o-r))return o;r=o}return new rK(d.NUM)}(r,t):new rK(d.NUM)})}}function iW(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 iG(e,t,r,n,o,i){let s=iW(e,r,n,o,i);return 1===t?e*(i?0:-n):e*(i?i$(e,t-2,s,n,i)-s:i$(e,t-1,s,n,i))}function i$(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 iY(e,t,r,n,o,i){return iW(e,r,n,o,i)-iG(e,t,r,n,o,i)}function ij(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 rK(d.DIV_BY_ZERO);r/=1+e}return r}iz.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 iq extends nv{formulatext(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("FORMULATEXT"),()=>new rK(d.NA,ej.WrongArgNumber),e=>{var t;return null!=(t=this.serialization.getCellFormula(e))?t:new rK(d.NA,ej.Formula)})}}iq.implementedFunctions={FORMULATEXT:{method:"formulatext",parameters:[{argumentType:p.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,isDependentOnSheetStructureChange:!0,vectorizationForbidden:!0}};class iK extends nv{hyperlink(e,t){return this.runFunction(e.args,t,this.metadata("HYPERLINK"),(t,r)=>(e.hyperlink=t,null!=r?r:t))}}iK.implementedFunctions={HYPERLINK:{method:"hyperlink",parameters:[{argumentType:p.STRING},{argumentType:p.STRING,optionalArg:!0}]}};class iX extends nv{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 rK&&e.type!==d.NA)}iserror(e,t){return this.runFunction(e.args,t,this.metadata("ISERROR"),e=>e instanceof rK)}isformula(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ISFORMULA"),()=>new rK(d.NA,ej.WrongArgNumber),e=>this.dependencyGraph.addressMapping.getCell(e)instanceof rE)}isblank(e,t){return this.runFunction(e.args,t,this.metadata("ISBLANK"),e=>e===tM)}isna(e,t){return this.runFunction(e.args,t,this.metadata("ISNA"),e=>e instanceof rK&&e.type==d.NA)}isnumber(e,t){return this.runFunction(e.args,t,this.metadata("ISNUMBER"),tP)}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 rK&&(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 rK(d.NA,ej.WrongArgNumber);if(e.args.some(e=>e.type===o.EMPTY))return new rK(d.NUM,ej.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 tF?e.width():e instanceof rK?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 rK(d.NA,ej.WrongArgNumber);if(e.args.some(e=>e.type===o.EMPTY))return new rK(d.NUM,ej.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 tF?e.height():e instanceof rK?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 rK(d.VALUE,ej.LessThanOne):r>e.width()||t>e.height()?new rK(d.NUM,ej.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 rK(d.VALUE,ej.CellRangeExpected)})}na(e,t){return new rK(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 rK(d.NA,ej.SheetRef)})}sheets(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEETS"),()=>this.dependencyGraph.sheetMapping.numberOfSheets(),()=>1,()=>new rK(d.VALUE,ej.CellRefExpected))}}iX.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 iQ extends nv{iseven(e,t){return this.runFunction(e.args,t,this.metadata("ISEVEN"),e=>e%2==0)}}iQ.implementedFunctions={ISEVEN:{method:"iseven",parameters:[{argumentType:p.NUMBER}]}};class iZ extends nv{isodd(e,t){return this.runFunction(e.args,t,this.metadata("ISODD"),e=>e%2==1)}}iZ.implementedFunctions={ISODD:{method:"isodd",parameters:[{argumentType:p.NUMBER}]}};class iJ extends nv{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)}}iJ.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 i0=parseFloat(Math.PI.toFixed(14));class i1 extends nv{pi(e,t){return this.runFunction(e.args,t,this.metadata("PI"),()=>i0)}sqrtpi(e,t){return this.runFunction(e.args,t,this.metadata("SQRTPI"),e=>Math.sqrt(i0*e))}}function i2(e,t){return new nR(t.width,e.height)}function i3(e,t,r){return new nR(1+(e.width-t)/r,1+(e.height-t)/r)}i1.implementedFunctions={PI:{method:"pi",parameters:[]},SQRTPI:{method:"sqrtpi",parameters:[{argumentType:p.NUMBER,minValue:0}]}};class i6 extends nv{mmult(e,t){return this.runFunction(e.args,t,this.metadata("MMULT"),(e,t)=>{if(!e.hasOnlyNumbers()||!t.hasOnlyNumbers())return new rK(d.VALUE,ej.NumberRange);if(t.height()!==e.width())return new rK(d.VALUE,ej.ArrayDimensions);let r=i2(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 tF.onlyNumbers(n)})}mmultArraySize(e,t){if(2!==e.args.length)return nR.error();let r=this.metadata("MMULT"),[n,o]=e.args.map(e=>{var n;return this.arraySizeForAst(e,new nr(t.formulaAddress,t.arraysFlag||null!=(n=null==r?void 0:r.enableArrayArithmeticForArguments)&&n))});return i2(n,o)}maxpool(e,t){return this.runFunction(e.args,t,this.metadata("MAXPOOL"),(e,t,r=t)=>{if(!e.hasOnlyNumbers())return new rK(d.VALUE,ej.NumberRange);let n=i3(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 tF.onlyNumbers(o)})}medianpool(e,t){return this.runFunction(e.args,t,this.metadata("MEDIANPOOL"),(e,t,r=t)=>{if(!e.hasOnlyNumbers())return new rK(d.VALUE,ej.NumberRange);let n=i3(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 tF.onlyNumbers(o)})}maxpoolArraySize(e,t){let r;if(e.args.length<2||e.args.length>3)return nR.error();let n=this.metadata("MAXPOOL"),i=e.args.map(e=>{var r;return this.arraySizeForAst(e,new nr(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?nR.error():i3(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 tF.onlyValues(n)})}transposeArraySize(e,t){if(1!==e.args.length)return nR.error();let r=this.metadata("TRANSPOSE"),[n]=e.args.map(e=>{var n;return this.arraySizeForAst(e,new nr(t.formulaAddress,t.arraysFlag||null!=(n=null==r?void 0:r.enableArrayArithmeticForArguments)&&n))});return new nR(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}}}i6.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 i5 extends nv{median(e,t){return this.runFunction(e.args,t,this.metadata("MEDIAN"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);return t instanceof rK?t:0===t.length?new rK(d.NUM,ej.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 rK?r:(r.sort((e,t)=>e-t),(t=Math.trunc(t))>r.length)?new rK(d.NUM,ej.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 rK?r:(r.sort((e,t)=>e-t),(t=Math.trunc(t))>r.length)?new rK(d.NUM,ej.ValueLarge):r[t-1]})}}i5.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 nv{mod(e,t){return this.runFunction(e.args,t,this.metadata("MOD"),(e,t)=>0===t?new rK(d.DIV_BY_ZERO):e%t)}}function i9(e,t){let r=e.length,n=t*(r-1),o=Math.floor(n);return o+1<r?e[o]+(n-o)*(e[o+1]-e[o]):e[o]}function i7(e,t){let r=e.length,n=t*(r+1);if(n<1)return new rK(d.NUM,ej.ValueSmall);if(n>r)return new rK(d.NUM,ej.ValueLarge);let o=Math.floor(n);return o<r?e[o-1]+(n-o)*(e[o]-e[o-1]):e[o-1]}i4.implementedFunctions={MOD:{method:"mod",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]}};class i8 extends nv{percentile(e,t){return this.runFunction(e.args,t,this.metadata("PERCENTILE.INC"),(e,t)=>{let r=this.getSortedValues(e);return r instanceof rK?r:i9(r,t)})}percentileExc(e,t){return this.runFunction(e.args,t,this.metadata("PERCENTILE.EXC"),(e,t)=>{let r=this.getSortedValues(e);return r instanceof rK?r:i7(r,t)})}quartile(e,t){return this.runFunction(e.args,t,this.metadata("QUARTILE.INC"),(e,t)=>{if((t=Math.trunc(t))<0)return new rK(d.NUM,ej.ValueSmall);if(t>4)return new rK(d.NUM,ej.ValueLarge);let r=this.getSortedValues(e);return r instanceof rK?r:i9(r,t/4)})}quartileExc(e,t){return this.runFunction(e.args,t,this.metadata("QUARTILE.EXC"),(e,t)=>{if((t=Math.trunc(t))<1)return new rK(d.NUM,ej.ValueSmall);if(t>3)return new rK(d.NUM,ej.ValueLarge);let r=this.getSortedValues(e);return r instanceof rK?r:i7(r,t/4)})}getSortedValues(e){let t=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return t instanceof rK?t:0===t.length?new rK(d.NUM,ej.OneValue):(t.sort((e,t)=>e-t),t)}}function se(e){return tP(e)&&!Number.isFinite(tI(e))?0:e}i8.implementedFunctions={"PERCENTILE.INC":{method:"percentile",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER,minValue:0,maxValue:1}]},"PERCENTILE.EXC":{method:"percentileExc",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER,greaterThan:0,lessThan:1}]},"QUARTILE.INC":{method:"quartile",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER}]},"QUARTILE.EXC":{method:"quartileExc",parameters:[{argumentType:p.RANGE},{argumentType:p.NUMBER}]}},i8.aliases={PERCENTILE:"PERCENTILE.INC",QUARTILE:"QUARTILE.INC"};class st{constructor(e,t,r){this.sumsq=e,this.sum=t,this.count=r}static single(e){return new st(e*e,e,1)}compose(e){return new st(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}}st.empty=new st(0,0,0);class sr extends nv{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),sn)}max(e,t){return this.doMax(e.args,t)}maxa(e,t){return se(this.reduce(e.args,t,-1/0,"MAXA",(e,t)=>Math.max(e,t),tI,so))}min(e,t){return this.doMin(e.args,t)}mina(e,t){return se(this.reduce(e.args,t,1/0,"MINA",(e,t)=>Math.min(e,t),tI,so))}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,st.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>st.single(tI(e)),so);return n instanceof rK?n:null!=(r=n.averageValue())?r:new rK(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 rK?n:null!=(r=n.varSValue())?r:new rK(d.DIV_BY_ZERO)}varpa(e,t){var r;let n=this.reduceAggregateA(e.args,t);return n instanceof rK?n:null!=(r=n.varPValue())?r:new rK(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 rK)return r;{let e=r.varSValue();return void 0===e?new rK(d.DIV_BY_ZERO):Math.sqrt(e)}}stdevpa(e,t){let r=this.reduceAggregateA(e.args,t);if(r instanceof rK)return r;{let e=r.varPValue();return void 0===e?new rK(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 rK(d.NA,ej.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 rK(d.VALUE,ej.BadMode)}}reduceAggregate(e,t){return this.reduce(e,t,st.empty,"_AGGREGATE",(e,t)=>e.compose(t),e=>st.single(tI(e)),sn)}reduceAggregateA(e,t){return this.reduce(e,t,st.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>st.single(tI(e)),so)}doAverage(e,t){var r;let n=this.reduceAggregate(e,t);return n instanceof rK?n:null!=(r=n.averageValue())?r:new rK(d.DIV_BY_ZERO)}doVarS(e,t){var r;let n=this.reduceAggregate(e,t);return n instanceof rK?n:null!=(r=n.varSValue())?r:new rK(d.DIV_BY_ZERO)}doVarP(e,t){var r;let n=this.reduceAggregate(e,t);return n instanceof rK?n:null!=(r=n.varPValue())?r:new rK(d.DIV_BY_ZERO)}doStdevS(e,t){let r=this.reduceAggregate(e,t);if(r instanceof rK)return r;{let e=r.varSValue();return void 0===e?new rK(d.DIV_BY_ZERO):Math.sqrt(e)}}doStdevP(e,t){let r=this.reduceAggregate(e,t);if(r instanceof rK)return r;{let e=r.varPValue();return void 0===e?new rK(d.DIV_BY_ZERO):Math.sqrt(e)}}doCount(e,t){return this.reduce(e,t,0,"COUNT",(e,t)=>e+t,tI,e=>+!!tP(e))}doCounta(e,t){return this.reduce(e,t,0,"COUNTA",(e,t)=>e+t,tI,e=>+(e!==tM))}doMax(e,t){return se(this.reduce(e,t,-1/0,"MAX",(e,t)=>Math.max(e,t),tI,sn))}doMin(e,t){return se(this.reduce(e,t,1/0,"MIN",(e,t)=>Math.min(e,t),tI,sn))}doSum(e,t){return this.reduce(e,t,0,"SUM",this.addWithEpsilonRaw,tI,sn)}doProduct(e,t){return this.reduce(e,t,1,"PRODUCT",(e,t)=>e*t,tI,sn)}reduce(e,t,r,n,i,s,a){return e.length<1?new rK(d.NA,ej.WrongArgNumber):e.reduce((e,l)=>{let h;if(e instanceof rK)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 rK?o:i(o,e)}if((h=this.evaluateAst(l,t))instanceof tF)return Array.from(h.valuesFromTopLeftCorner()).map(a).filter(e=>void 0!==e).map(e=>e instanceof rK?e:s(e)).reduce((e,t)=>e instanceof rK?e:t instanceof rK?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 rK?h:i(e,s(h))},r)}evaluateRange(e,t,r,n,o,i,s){let a;try{a=r8.fromAst(e,t.formulaAddress)}catch(e){if(e instanceof t2)return new rK(d.REF,ej.RangeManySheets);throw e}if(!this.isSheetValid(a))return new rK(d.REF,ej.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 rK?e:t instanceof rK?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 rK?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 rK?s.push(t):void 0!==t&&s.push(n(t))}return s}}function sn(e){return tP(e)||e instanceof rK?e:void 0}function so(e){return"boolean"==typeof e?na(e):tP(e)||e instanceof rK?e:"string"==typeof e?0:void 0}sr.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}},sr.aliases={VAR:"VAR.S",VARP:"VAR.P",STDEV:"STDEV.S",STDEVP:"STDEV.P",VARS:"VAR.S",STDEVS:"STDEV.S"};class si extends nv{power(e,t){return this.runFunction(e.args,t,this.metadata("POWER"),Math.pow)}}si.implementedFunctions={POWER:{method:"power",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}]}};class ss extends nv{radians(e,t){return this.runFunction(e.args,t,this.metadata("RADIANS"),e=>Math.PI/180*e)}}ss.implementedFunctions={RADIANS:{method:"radians",parameters:[{argumentType:p.NUMBER}]}};class sa extends nv{dec2bin(e,t){return this.runFunction(e.args,t,this.metadata("DEC2BIN"),(e,t)=>sh(e,2,t))}dec2oct(e,t){return this.runFunction(e.args,t,this.metadata("DEC2OCT"),(e,t)=>sh(e,8,t))}dec2hex(e,t){return this.runFunction(e.args,t,this.metadata("DEC2HEX"),(e,t)=>sh(e,16,t))}bin2dec(e,t){return this.runFunction(e.args,t,this.metadata("BIN2DEC"),e=>{let t=sl(e,2,10);return void 0===t?new rK(d.NUM,ej.NotBinary):sg(t,2)})}bin2oct(e,t){return this.runFunction(e.args,t,this.metadata("BIN2OCT"),(e,t)=>{let r=sl(e,2,10);return void 0===r?new rK(d.NUM,ej.NotBinary):sh(sg(r,2),8,t)})}bin2hex(e,t){return this.runFunction(e.args,t,this.metadata("BIN2HEX"),(e,t)=>{let r=sl(e,2,10);return void 0===r?new rK(d.NUM,ej.NotBinary):sh(sg(r,2),16,t)})}oct2dec(e,t){return this.runFunction(e.args,t,this.metadata("OCT2DEC"),e=>{let t=sl(e,8,10);return void 0===t?new rK(d.NUM,ej.NotOctal):sg(t,8)})}oct2bin(e,t){return this.runFunction(e.args,t,this.metadata("OCT2BIN"),(e,t)=>{let r=sl(e,8,10);return void 0===r?new rK(d.NUM,ej.NotOctal):sh(sg(r,8),2,t)})}oct2hex(e,t){return this.runFunction(e.args,t,this.metadata("OCT2HEX"),(e,t)=>{let r=sl(e,8,10);return void 0===r?new rK(d.NUM,ej.NotOctal):sh(sg(r,8),16,t)})}hex2dec(e,t){return this.runFunction(e.args,t,this.metadata("HEX2DEC"),e=>{let t=sl(e,16,10);return void 0===t?new rK(d.NUM,ej.NotHex):sg(t,16)})}hex2bin(e,t){return this.runFunction(e.args,t,this.metadata("HEX2BIN"),(e,t)=>{let r=sl(e,16,10);return void 0===r?new rK(d.NUM,ej.NotHex):sh(sg(r,16),2,t)})}hex2oct(e,t){return this.runFunction(e.args,t,this.metadata("HEX2OCT"),(e,t)=>{let r=sl(e,16,10);return void 0===r?new rK(d.NUM,ej.NotHex):sh(sg(r,16),8,t)})}base(e,t){return this.runFunction(e.args,t,this.metadata("BASE"),su)}decimal(e,t){return this.runFunction(e.args,t,this.metadata("DECIMAL"),(e,t)=>{let r=sl(e,t,255);return void 0===r?new rK(d.NUM,ej.NotHex):parseInt(r,t)})}}function sl(e,t,r){let n=RegExp(`^[${"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".substr(0,t)}]+$`);if(!(e.length>r)&&n.test(e))return e}function sh(e,t,r){if(e>-sd(t)-1)return new rK(d.NUM,ej.ValueBaseLarge);if(e<sd(t))return new rK(d.NUM,ej.ValueBaseSmall);let n=sc(e,t);return void 0===r||e<0?n:n.length>r?new rK(d.NUM,ej.ValueBaseLong):n3(n,r)}function sd(e){return-Math.pow(e,10)/2}function su(e,t,r){let n=sc(e,t);return void 0!==r&&r>n.length?n3(n,r):n}function sc(e,t){let r=e<0?Math.pow(t,10):0;return(e+r).toString(t).toUpperCase()}function sg(e,t){let r=parseInt(e,t),n=Math.pow(t,10);return r>=n/2?r-n:r}sa.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 sp extends nv{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 rK(d.NUM,ej.WrongOrder):((e=Math.ceil(e))===(t=Math.floor(t)+1)&&(t+=1),e+Math.floor(Math.random()*(t-e))))}}sp.implementedFunctions={RAND:{method:"rand",parameters:[],isVolatile:!0},RANDBETWEEN:{method:"randbetween",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER}],isVolatile:!0}};class sm extends nv{static isValidDimension(e){return Number.isFinite(e)&&e>=sm.MIN_DIMENSION}static parseLiteralDimension(e){if(e.type===o.NUMBER)return Math.trunc(e.value);if(e.type===o.STRING){let t=Number(e.value);return Number.isFinite(t)?Math.trunc(t):void 0}if(e.type===o.PLUS_UNARY_OP&&e.value.type===o.NUMBER)return Math.trunc(e.value.value);if(e.type===o.MINUS_UNARY_OP&&e.value.type===o.NUMBER)return Math.trunc(-e.value.value);if(e.type===o.FUNCTION_CALL){if("TRUE"===e.procedureName&&0===e.args.length)return 1;if("FALSE"===e.procedureName&&0===e.args.length)return 0}}sequence(e,t){return this.runFunction(e.args,t,this.metadata("SEQUENCE"),(e,t,r,n)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return new rK(d.VALUE,ej.ValueLarge);if(e<0||t<0)return new rK(d.VALUE,ej.LessThanOne);let o=Math.trunc(e),i=Math.trunc(t);if(!sm.isValidDimension(o)||!sm.isValidDimension(i))return new rK(d.VALUE,ej.LessThanOne);if(o>this.config.maxRows||i>this.config.maxColumns)return new rK(d.VALUE,ej.ValueLarge);let s=[];for(let e=0;e<o;e++){let t=[];for(let o=0;o<i;o++)t.push(r+(e*i+o)*n);s.push(t)}return tF.onlyNumbers(s)})}sequenceArraySize(e,t){if(e.args.length<1||e.args.length>4)return nR.error();let r=e.args[0],n=e.args.length>1?e.args[1]:void 0;if(r.type===o.EMPTY)return nR.error();let i=sm.parseLiteralDimension(r);if(void 0===i)return nR.error();let s=void 0===n||n.type===o.EMPTY?1:sm.parseLiteralDimension(n);return void 0===s||!sm.isValidDimension(i)||!sm.isValidDimension(s)||i>this.config.maxRows||s>this.config.maxColumns?nR.error():new nR(s,i)}}function sf(e){let t=Math.ceil(e);return t%2==1?t:t+1}function sb(e){let t=Math.ceil(e);return t%2==0?t:t+1}sm.MIN_DIMENSION=1,sm.implementedFunctions={SEQUENCE:{method:"sequence",sizeOfResultArrayMethod:"sequenceArraySize",parameters:[{argumentType:p.NUMBER},{argumentType:p.NUMBER,defaultValue:1,emptyAsDefault:!0},{argumentType:p.NUMBER,defaultValue:1,emptyAsDefault:!0},{argumentType:p.NUMBER,defaultValue:1,emptyAsDefault:!0}],vectorizationForbidden:!0}};class sC extends nv{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?-sb(-e):sb(e))}odd(e,t){return this.runFunction(e.args,t,this.metadata("ODD"),e=>e<0?-sf(-e):sf(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 rK(d.DIV_BY_ZERO):e>0&&t<0?new rK(d.NUM,ej.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 rK(d.DIV_BY_ZERO):e>0&&t<0?new rK(d.NUM,ej.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)}}sC.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}]}},sC.aliases={"ISO.CEILING":"CEILING.PRECISE",TRUNC:"ROUNDDOWN"};class sy extends nv{sqrt(e,t){return this.runFunction(e.args,t,this.metadata("SQRT"),Math.sqrt)}}sy.implementedFunctions={SQRT:{method:"sqrt",parameters:[{argumentType:p.NUMBER}]}};class sw{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 rK(d.VALUE,ej.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=sR(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=r0(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(r0(r.start.sheet,r.start.col,r.end.row)),restConditionRanges:t.map(e=>e.withStart(r0(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=sR(t,s.map(e=>sv(this.dependencyGraph,e)),Array.from(sv(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 sS{constructor(e,t){this.conditionRange=e,this.criterionPackage=t}}function*sv(e,t){for(let r of t.addresses(e))yield tI(e.getScalarValue(r))}function*sR(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 sE{constructor(e,t){this.sum=e,this.count=t}static single(e){return new sE(e,1)}compose(e){return new sE(this.sum+e.sum,this.count+e.count)}averageValue(){return this.count>0?this.sum/this.count:void 0}}function sT(e){return tP(e)&&!Number.isFinite(tI(e))?0:e}function sA(e){return e instanceof rK?e:tP(e)?tI(e):void 0}sE.empty=new sE(0,0);class sM extends nv{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),sA);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),sA);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,sE.empty,(e,t)=>e.compose(t),e=>tP(e)?sE.single(tI(e)):sE.empty);return o instanceof rK?o:o.averageValue()||new rK(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)=>sT(this.computeConditionalAggregationFunction(e,t,r,1/0,n,sA));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)=>sT(this.computeConditionalAggregationFunction(e,t,r,-1/0,n,sA));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 rK(d.VALUE,ej.BadCriterion);s.push(new sS(r,n))}return new sw(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)}}sM.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 sI extends nv{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 rK(d.VALUE,ej.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 rK)return r;let n=this.coerceScalarToNumberOrError(r);tP(n)?e*=tI(n):e=0}n+=e}return n})}}sI.implementedFunctions={SUMPRODUCT:{method:"sumproduct",parameters:[{argumentType:p.RANGE}],repeatLastArgs:1}};class sx extends nv{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 rK(d.VALUE,ej.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 rK(d.VALUE,ej.NegativeCount):e.repeat(t))}right(e,t){return this.runFunction(e.args,t,this.metadata("RIGHT"),(e,t)=>t<0?new rK(d.VALUE,ej.NegativeLength):0===t?"":e.slice(-t))}left(e,t){return this.runFunction(e.args,t,this.metadata("LEFT"),(e,t)=>t<0?new rK(d.VALUE,ej.NegativeLength):e.slice(0,t))}mid(e,t){return this.runFunction(e.args,t,this.metadata("MID"),(e,t,r)=>t<1?new rK(d.VALUE,ej.LessThanOne):r<0?new rK(d.VALUE,ej.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 rK(d.VALUE,ej.LessThanOne):r<0?new rK(d.VALUE,ej.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 rK(d.VALUE,ej.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 rK(d.VALUE,ej.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 rK(d.VALUE,ej.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 rK(d.VALUE,ej.IndexBounds);let n=t.substring(r-1).indexOf(e)+r;return n>0?n:new rK(d.VALUE,ej.PatternNotFound)})}t(e,t){return this.runFunction(e.args,t,this.metadata("T"),e=>e instanceof rK||"string"==typeof e?e:"")}n(e,t){return this.runFunction(e.args,t,this.metadata("N"),e=>{var t;let r=e instanceof tF?null==(t=e.data[0])?void 0:t[0]:e;return r instanceof rK||"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 rK||tP(e))return e;if("string"!=typeof e)return new rK(d.VALUE,ej.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 rK(d.VALUE,ej.NumberCoercion)})}textjoin(e,t){return this.runFunction(e.args,t,this.metadata("TEXTJOIN"),(e,t,...r)=>{let n=this.flattenArgToStrings(e);if(n instanceof rK)return n;let o=[];for(let e of r){let t=this.flattenArgToStrings(e);if(t instanceof rK)return t;o.push(...t)}let i=t?o.filter(e=>""!==e):o;if(0===i.length)return"";let s=i.reduce((e,t,r)=>0===r?t:e+n[(r-1)%n.length]+t,"");return s.length>32767?new rK(d.VALUE,ej.ResultTooLong):s})}flattenArgToStrings(e){let t=e instanceof tF?e.valuesFromTopLeftCorner():[e],r=[];for(let e of t){if(e instanceof rK)return e;let t=nd(e);if(t instanceof rK)return t;r.push(t)}return r}parseStringToNumber(e){let t=e.trim();if(""!==t)return this.arithmeticHelper.coerceToMaybeNumber(t)}escapeRegExpSpecialCharacters(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}sx.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}]},TEXTJOIN:{method:"textjoin",repeatLastArgs:1,parameters:[{argumentType:p.ANY},{argumentType:p.BOOLEAN},{argumentType:p.ANY}]}};class sN extends nv{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 rK(d.DIV_BY_ZERO):Math.atan2(t,e))}cot(e,t){return this.runFunction(e.args,t,this.metadata("COT"),e=>0===e?new rK(d.DIV_BY_ZERO):1/Math.tan(e))}acot(e,t){return this.runFunction(e.args,t,this.metadata("ACOT"),e=>0===e?i0/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 rK(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 rK(d.DIV_BY_ZERO):1/Math.tanh(e))}acoth(e,t){return this.runFunction(e.args,t,this.metadata("ACOTH"),e=>0===e?new rK(d.NUM,ej.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 rK(d.DIV_BY_ZERO):1/Math.sinh(e))}}sN.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 sO extends io{constructor(e){super(e),this.dependencyGraph=e}find(e,t,r){return this.basicFind(e,t,"col",r)}}class sk extends nv{constructor(){super(...arguments),this.rowSearch=new sO(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 rK(d.VALUE,ej.WrongType):r<1?new rK(d.VALUE,ej.LessThanOne):r>o.width()?new rK(d.REF,ej.IndexLarge):this.doVlookup(nu(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 rK(d.VALUE,ej.WrongType):r<1?new rK(d.VALUE,ej.LessThanOne):r>o.height()?new rK(d.REF,ej.IndexLarge):this.doHlookup(nu(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 rK(d.VALUE,ej.BadMode);let s=t instanceof tF?t:tF.fromScalar(t),a=r instanceof tF?r:tF.fromScalar(r);return this.doXlookup(nu(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 nR.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 nR(l,1):new nR(1,a):nR.error()}match(e,t){return this.runFunction(e.args,t,this.metadata("MATCH"),(e,t,r)=>this.doMatch(nu(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?tF.onlyValues(t.data.map(e=>[e[0]])):tF.onlyRange(r8.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 rK(d.NA,ej.ValueNotFound);if(void 0===s)i=t.data[l][r];else{let e=r0(s.sheet,s.start.col+r,s.start.row+l);i=this.dependencyGraph.getCellValue(e)}return i instanceof tF?new rK(d.VALUE,ej.WrongType):i}doHlookup(e,t,r,n){let o,i,s=t.range;o=void 0===s?tF.onlyValues([t.data[0]]):tF.onlyRange(r8.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 rK(d.NA,ej.ValueNotFound);if(void 0===s)i=t.data[r][a];else{let e=r0(s.sheet,s.start.col+a,s.start.row+r);i=this.dependencyGraph.getCellValue(e)}return i instanceof tF?new rK(d.VALUE,ej.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 rK(d.VALUE,ej.WrongDimension);let l=s?this.columnSearch:this.rowSearch,h=this.searchInRange(e,t,o,i,l);if(-1===h)return n==d.NA?new rK(d.NA,ej.ValueNotFound):n;let u=s?[r.data[h]]:r.data.map(e=>[e[h]]);return tF.onlyValues(u)}doMatch(e,t,r){if(![-1,0,1].includes(r))return new rK(d.VALUE,ej.BadMode);if(t.width()>1&&t.height()>1)return new rK(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 rK(d.NA,ej.ValueNotFound):n+1}}sk.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 sH extends nv{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 rK)?t:(t=Math.trunc(t))<0?new rK(d.VALUE,ej.ValueSmall):t>4?new rK(d.VALUE,ej.ValueLarge):(r=e,n=t,o={val:r%1e3,acc:"M".repeat(Math.floor(r/1e3))},4===n&&(sL(o,"IM",999,1e3),sL(o,"ID",499,500)),n>=3&&(sL(o,"VM",995,1e3),sL(o,"VD",495,500)),n>=2&&(sL(o,"XM",990,1e3),sL(o,"XD",490,500)),n>=1&&(sL(o,"LM",950,1e3),sL(o,"LD",450,500)),sL(o,"CM",900,1e3),sL(o,"CD",400,500),sL(o,"D",500,900),o.acc+="C".repeat(Math.floor(o.val/100)),o.val%=100,n>=2&&(sL(o,"IC",99,100),sL(o,"IL",49,50)),n>=1&&(sL(o,"VC",95,100),sL(o,"VL",45,50)),sL(o,"XC",90,100),sL(o,"XL",40,50),sL(o,"L",50,90),o.acc+="X".repeat(Math.floor(o.val/10)),o.val%=10,sL(o,"IX",9,10),sL(o,"IV",4,5),sL(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 rK(d.VALUE,ej.InvalidRoman);let r={input:e,acc:0};return(s_(r,{token:"MMM",val:3e3},{token:"MM",val:2e3},{token:"M",val:1e3}),s_(r,{token:"IM",val:999},{token:"VM",val:995},{token:"XM",val:990},{token:"LM",val:950},{token:"CM",val:900}),s_(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}),s_(r,{token:"CCC",val:300},{token:"CC",val:200},{token:"C",val:100}),s_(r,{token:"IC",val:99},{token:"VC",val:95},{token:"XC",val:90}),s_(r,{token:"L",val:50},{token:"IL",val:49},{token:"VL",val:45},{token:"XL",val:40}),s_(r,{token:"XXX",val:30},{token:"XX",val:20},{token:"X",val:10}),s_(r,{token:"IX",val:9}),s_(r,{token:"V",val:5},{token:"IV",val:4}),s_(r,{token:"III",val:3},{token:"II",val:2},{token:"I",val:1}),""!==r.input)?new rK(d.VALUE,ej.InvalidRoman):t?-r.acc:r.acc})}}function s_(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 sL(e,t,r,n){e.val>=r&&e.val<n&&(e.val-=r,e.acc+=t)}sH.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 sP extends nv{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)}}sP.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 sD=Math;function sF(e,t){for(var r=0,n=0;r<e.length;++r)n=t*n+e[r];return n}function sB(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 sV(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 sB(r,i,s,a,o)}}var sU=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=sF(e,l))/(a=sF(t,l));else{var h=o-.785398164;s=sF(r,l=64/l),a=sF(n,l),i=sD.sqrt(.636619772/o)*(sD.cos(h)*s-sD.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=sD.abs(e)-2.356194491;return 8>Math.abs(e)?t=(r=e*sF(i,o))/(n=sF(s,o)):(r=sF(a,o=64/o),n=sF(l,o),t=sD.sqrt(.636619772/sD.abs(e))*(sD.cos(h)*r-sD.sin(h)*n*8/sD.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=sB(t,r,o(t),h(t),-1);else{for(var i=2*sD.floor((r+sD.floor(sD.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,sD.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}}(),sz=(z=[-0xb04cc5cd,0x1a4fa4b91,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),W=[0x954bf890d,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),G=[1,-.001098628627,2734510407e-14,-2073370639e-15,2093887211e-16].reverse(),$=[-.01562499995,1430488765e-13,-6911147651e-15,7621095161e-16,-934945152e-16].reverse(),Y=[-4900604943e3,127527439e4,-0xbffb0414e,734926455.1,-4237922.726,8511.937935].reverse(),j=[249958057e5,0x62d2b66f40,0xde8afbbf,22459040.02,102042.605,354.9632885,1].reverse(),q=[1,.00183105,-3516396496e-14,2457520174e-15,-240337019e-15].reverse(),K=[.04687499995,-2002690873e-13,8449199096e-15,-88228987e-14,105787412e-15].reverse(),sV(function(e){var t=0,r=0,n=0,o=e*e,i=e-.785398164;return e<8?t=(r=sF(z,o))/(n=sF(W,o))+.636619772*sU(e,0)*sD.log(e):(r=sF(G,o=64/o),n=sF($,o),t=sD.sqrt(.636619772/e)*(sD.sin(i)*r+sD.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*sF(Y,o))/(n=sF(j,o))+.636619772*(sU(e,1)*sD.log(e)-1/e):(r=sF(q,o=64/o),n=sF(K,o),t=sD.sqrt(.636619772/e)*(sD.sin(i)*r+sD.cos(i)*n*8/e)),t},"BESSELY",1,-1)),sW=(X=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),Q=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse(),Z=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),J=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse(),function e(t,r){if(0===(r=Math.round(r)))return t<=3.75?sF(X,t*t/14.0625):sD.exp(sD.abs(t))/sD.sqrt(sD.abs(t))*sF(Q,3.75/sD.abs(t));if(1===r)return t<3.75?t*sF(Z,t*t/14.0625):(t<0?-1:1)*sD.exp(sD.abs(t))/sD.sqrt(sD.abs(t))*sF(J,3.75/sD.abs(t));if(r<0)return NaN;if(0===sD.abs(t))return 0;if(t==1/0)return 1/0;var n,o=0,i=2/sD.abs(t),s=0,a=1,l=0;for(n=2*sD.round((r+sD.round(sD.sqrt(40*r)))/2);n>0;n--)l=n*i*a+s,s=a,a=l,sD.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}),sG=(ee=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),et=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse(),er=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),en=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse(),sV(function(e){return e<=2?-sD.log(e/2)*sW(e,0)+sF(ee,e*e/4):sD.exp(-e)/sD.sqrt(e)*sF(et,2/e)},function(e){return e<=2?sD.log(e/2)*sW(e,1)+1/e*sF(er,e*e/4):sD.exp(-e)/sD.sqrt(e)*sF(en,2/e)},"BESSELK",2,1));function s$(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 sY(e){return 1-s$(e)}function sj(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=sY(t)-o,t+=r/(1.1283791670955126*Math.exp(-t*t)-t*r);return e<1?t:-t}function sq(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 sK=function(e,t,r){return sZ(e,t)*r};function sX(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 sQ(e,t){let r,n=sX(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 sZ(e,t){let r,n,o,i,s,a=0,l=t-1,h=sX(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=(sQ(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 sJ=function(e,t,r){return Math.exp(-.5*Math.log(2*Math.PI)-Math.log(r)-Math.pow(e-t,2)/(2*r*r))},s0=function(e,t,r){return .5*(1+s$((e-t)/Math.sqrt(2*r*r)))},s1=function(e,t,r){return -1.4142135623730951*r*sj(2*e)+t};function s2(e,t){if(!(e<=0)&&!(t<=0))return e+t>170?Math.exp(s3(e,t)):sq(e)*sq(t)/sq(e+t)}function s3(e,t){return sX(e)+sX(t)-sX(e+t)}function s6(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=-sX(t)-sX(r)+sX(t+r);p<10&&0!==a&&1!==a&&(s=(s5(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 s5(e,t,r){var n=0===e||1===e?0:Math.exp(sX(t+r)-sX(t)-sX(r)+t*Math.log(e)+r*Math.log(1-e));return!(e<0)&&!(e>1)&&(e<(t+1)/(t+r+2)?n*s4(e,t,r)/t:1-n*s4(1-e,r,t)/r)}function s4(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 s9=function(e,t,r){return 0===r||1===r?+(t*r===e):ae(t,e)*Math.pow(r,e)*Math.pow(1-r,t-e)},s7=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(sX(i)-sX(o)-sX(n)+n*Math.log(r)+o*Math.log(1-r));return Math.round(1e10*(1-(r<(n+1)/(i+2)?s*s8(r,n,o,1e-10):1-s*s8(1-r,o,n,1e-10))))/1e10};function s8(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 ae(e,t){var r,n;return e>170||t>170?Math.exp((r=e,n=t,at(r)-at(n)-at(r-n))):ar(e)/ar(t)/ar(e-t)}function at(e){return e<0?NaN:sX(e+1)}function ar(e){return e<0?NaN:sq(e+1)}let an=function(e,t){return e<0?0:sQ(t/2,e/2)},ao=function(e,t){return 2*sZ(e,.5*t)},ai=function(e,t,r){return e<0?0:s5(t*e/(t*e+r),t/2,r/2)},as=function(e,t,r){return r/(t*(1/s6(e,t/2,r/2)-1))},aa={pdf:function(e,t){return t<0||e%1!=0||e<0?0:Math.pow(t,e)*Math.exp(-t)/ar(e)},cdf:function(e,t){var r=0;if(e<0)return 0;for(var n=0;r<=e;r++)n+=aa.pdf(r,t);return n}},al={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 al.pdf(t-r-n+e,t,t-r,t-n);else return al.pdf(n-e,t,t-r,n);if(2*n>t)return al.pdf(r-e,t,r,t-n);if(r<n)return al.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-al.cdf(o-t-1,r,r-n,o);if(2*o>r)return 1-al.cdf(n-t-1,r,n,r-o);if(n<o)return al.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))}},ah=function(e,t){var r=t/2;return s5((e+Math.sqrt(e*e+t))/(2*Math.sqrt(e*e+t)),r,r)},ad=function(e,t){var r=s6(2*Math.min(e,1-e),.5*t,.5);return r=Math.sqrt(t*(1-r)/r),e>.5?r:-r},au={pdf:function(e,t,r){return e===e>>>0&&(e<0?0:ae(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+=au.pdf(o,t,r);return n}};function ac(e){for(var t=0,r=e.length;--r>=0;)t+=e[r];return t}function ag(e){return ac(e)/e.length}function ap(e){for(var t,r=ag(e),n=0,o=e.length;--o>=0;)n+=(t=e[o]-r)*t;return n}function am(e,t){return ap(e)/(e.length-!!t)}function af(e,t){return Math.sqrt(am(e,t))}function ab(e,t){var r,n=ag(e),o=ag(t),i=e.length,s=Array(i);for(r=0;r<i;r++)s[r]=(e[r]-n)*(t[r]-o);return ac(s)/(i-1)}function aC(e,t){return ab(e,t)/af(e,1)/af(t,1)}class ay extends nv{erf(e,t){return this.runFunction(e.args,t,this.metadata("ERF"),(e,t)=>void 0===t?s$(e):s$(t)-s$(e))}erfc(e,t){return this.runFunction(e.args,t,this.metadata("ERFC"),sY)}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"),sq)}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:sQ(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-sX(l)-l*Math.log(h)))})}gammaln(e,t){return this.runFunction(e.args,t,this.metadata("GAMMALN"),sX)}gammainv(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.INV"),sK)}gauss(e,t){return this.runFunction(e.args,t,this.metadata("GAUSS"),e=>s0(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 rK(d.NUM,ej.ValueSmall):e>=i?new rK(d.NUM,ej.ValueLarge):(e=(e-o)/(i-o),n)?(s=e,a=t,l=r,s>1||s<0?+(s>1):s5(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)/s2(u,c):Math.exp((u-1)*Math.log(h)+(c-1)*Math.log(1-h)-s3(u,c)))})}betainv(e,t){return this.runFunction(e.args,t,this.metadata("BETA.INV"),(e,t,r,n,o)=>n>=o?new rK(d.NUM,ej.WrongOrder):s6(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 rK(d.NUM,ej.WrongOrder):(e=Math.trunc(e),t=Math.trunc(t),n)?s7(e,t,r):s9(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);s7(i,e,t)>=r?o=i:n=i}return o})}besselifn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELI"),(e,t)=>sW(e,Math.trunc(t)))}besseljfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELJ"),(e,t)=>sU(e,Math.trunc(t)))}besselkfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELK"),(e,t)=>sG(e,Math.trunc(t)))}besselyfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELY"),(e,t)=>sz(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)?an(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)-sX(o/2)))})}chisqdistrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST.RT"),(e,t)=>1-an(e,Math.trunc(t)))}chisqinv(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV"),(e,t)=>ao(e,Math.trunc(t)))}chisqinvrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV.RT"),(e,t)=>ao(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)?ai(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/s2(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*s9((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-ai(e,Math.trunc(t),Math.trunc(r)))}finv(e,t){return this.runFunction(e.args,t,this.metadata("F.INV"),(e,t,r)=>as(e,Math.trunc(t),Math.trunc(r)))}finvrt(e,t){return this.runFunction(e.args,t,this.metadata("F.INV.RT"),(e,t,r)=>as(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)?aa.cdf(e,t):aa.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 rK(d.NUM,ej.ValueLarge):(e=Math.trunc(e),t=Math.trunc(t),r=Math.trunc(r),n=Math.trunc(n),o)?al.cdf(e,n,r,t):al.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)?ah(e,t):(n=e,1/(Math.sqrt(o=(o=t)>1e100?1e100:o)*s2(.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-ah(e,Math.trunc(t)))*2)}tdistrt(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.RT"),(e,t)=>1-ah(e,Math.trunc(t)))}tdistold(e,t){return this.runFunction(e.args,t,this.metadata("TDIST"),(e,t,r)=>r*(1-ah(e,Math.trunc(t))))}tinv(e,t){return this.runFunction(e.args,t,this.metadata("T.INV"),(e,t)=>ad(e,Math.trunc(t)))}tinv2t(e,t){return this.runFunction(e.args,t,this.metadata("T.INV.2T"),(e,t)=>ad(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*s$((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*sj(2*n)+o)})}normdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.DIST"),(e,t,r,n)=>n?s0(e,t,r):sJ(e,t,r))}norminv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.INV"),(e,t,r)=>s1(e,t,r))}normsdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.DIST"),(e,t)=>t?s0(e,0,1):sJ(e,0,1))}normsinv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.INV"),e=>s1(e,0,1))}phi(e,t){return this.runFunction(e.args,t,this.metadata("PHI"),e=>sJ(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)?au.cdf(e,t,r):au.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(s1(t[1]/2,0,1)*t[2]/Math.sqrt(t[3])):Math.abs(s1(t[1]/2,0,1)*af(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 rK(d.DIV_BY_ZERO):function(){var e,t=[].slice.call(arguments),r=[,,];return e=4===t.length?Math.abs(ad(t[1]/2,t[3]-1)*t[2]/Math.sqrt(t[3])):Math.abs(ad(t[1]/2,t[2].length-1)*af(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)}}ay.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}]}},ay.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 aw extends nv{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 rK(d.NUM,ej.WrongOrder):aS(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 rK(d.NUM,ej.ValueLarge):0===e&&0===t?1:aS(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 rK)return t;let r=0;for(let e of t){if(e<0)return new rK(d.NUM,ej.ValueSmall);r=av(r,Math.trunc(e))}return r>Number.MAX_SAFE_INTEGER?new rK(d.NUM,ej.ValueLarge):r})}lcm(e,t){return this.runFunction(e.args,t,this.metadata("LCM"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(e);if(t instanceof rK)return t;let r=1;for(let e of t){var n,o;if(e<0)return new rK(d.NUM,ej.ValueSmall);n=r,o=Math.trunc(e),r=0===n||0===o?0:n*(o/av(n,o))}return r>Number.MAX_SAFE_INTEGER?new rK(d.NUM,ej.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 rK(d.NUM,ej.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 rK(d.NUM,ej.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 rK(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 rK)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 rK(d.NA,ej.EqualLength);let o=r.length,i=0;for(let e=0;e<o;e++){let t=r[e],o=n[e];if(t instanceof rK)return t;if(o instanceof rK)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 rK(d.NA,ej.EqualLength);let o=r.length,i=0;for(let e=0;e<o;e++){let t=r[e],o=n[e];if(t instanceof rK)return t;if(o instanceof rK)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 rK(d.NA,ej.EqualLength);let o=r.length,i=0;for(let e=0;e<o;e++){let t=r[e],o=n[e];if(t instanceof rK)return t;if(o instanceof rK)return o;"number"==typeof t&&"number"==typeof o&&(i+=Math.pow(t-o,2))}return i})}}function aS(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 av(e,t){for(e<t&&([e,t]=[t,e]);t>0;)[e,t]=[t,e%t];return e}aw.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 aR extends nv{complex(e,t){return this.runFunction(e.args,t,this.metadata("COMPLEX"),(e,t,r)=>"i"!==r&&"j"!==r?new rK(d.VALUE,ej.ShouldBeIorJ):ni([e,t],r))}imabs(e,t){return this.runFunction(e.args,t,this.metadata("IMABS"),aO)}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 rK(d.DIV_BY_ZERO):Math.atan2(t,e))}imconjugate(e,t){return this.runFunction(e.args,t,this.metadata("IMCONJUGATE"),([e,t])=>ni([e,-t]))}imcos(e,t){return this.runFunction(e.args,t,this.metadata("IMCOS"),e=>ni(aA(e)))}imcosh(e,t){return this.runFunction(e.args,t,this.metadata("IMCOSH"),e=>ni(aM(e)))}imcot(e,t){return this.runFunction(e.args,t,this.metadata("IMCOT"),e=>ni(aT(aA(e),aI(e))))}imcsc(e,t){return this.runFunction(e.args,t,this.metadata("IMCSC"),e=>ni(aT([1,0],aI(e))))}imcsch(e,t){return this.runFunction(e.args,t,this.metadata("IMCSCH"),e=>ni(aT([1,0],ax(e))))}imsec(e,t){return this.runFunction(e.args,t,this.metadata("IMSEC"),e=>ni(aT([1,0],aA(e))))}imsech(e,t){return this.runFunction(e.args,t,this.metadata("IMSECH"),e=>ni(aT([1,0],aM(e))))}imsin(e,t){return this.runFunction(e.args,t,this.metadata("IMSIN"),e=>ni(aI(e)))}imsinh(e,t){return this.runFunction(e.args,t,this.metadata("IMSINH"),e=>ni(ax(e)))}imtan(e,t){return this.runFunction(e.args,t,this.metadata("IMTAN"),e=>ni(aT(aI(e),aA(e))))}imdiv(e,t){return this.runFunction(e.args,t,this.metadata("IMDIV"),(e,t)=>ni(aT(e,t)))}improduct(e,t){return this.runFunction(e.args,t,this.metadata("IMPRODUCT"),(...e)=>{let t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof rK)return t;let r=[1,0];for(let e of t)r=aE(r,e);return ni(r)})}imsum(e,t){return this.runFunction(e.args,t,this.metadata("IMSUM"),(...e)=>{let t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof rK)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 ni(r)})}imsub(e,t){return this.runFunction(e.args,t,this.metadata("IMSUB"),(e,t)=>ni(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=>ni(aN(e)))}imln(e,t){return this.runFunction(e.args,t,this.metadata("IMLN"),e=>ni(ak(e)))}imlog10(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG10"),e=>{let[t,r]=ak(e),n=Math.log(10);return ni([t/n,r/n])})}imlog2(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG2"),e=>{let[t,r]=ak(e),n=Math.log(2);return ni([t/n,r/n])})}impower(e,t){return this.runFunction(e.args,t,this.metadata("IMPOWER"),(e,t)=>ni(aH(e,t)))}imsqrt(e,t){return this.runFunction(e.args,t,this.metadata("IMSQRT"),e=>ni(aH(e,.5)))}}function aE([e,t],[r,n]){return[e*r-t*n,e*n+r*t]}function aT([e,t],[r,n]){let o=Math.pow(r,2)+Math.pow(n,2),[i,s]=aE([e,t],[r,-n]);return[i/o,s/o]}function aA([e,t]){return[Math.cos(e)*Math.cosh(t),-Math.sin(e)*Math.sinh(t)]}function aM([e,t]){return[Math.cosh(e)*Math.cos(t),Math.sinh(e)*Math.sin(t)]}function aI([e,t]){return[Math.sin(e)*Math.cosh(t),Math.cos(e)*Math.sinh(t)]}function ax([e,t]){return[Math.sinh(e)*Math.cos(t),Math.cosh(e)*Math.sin(t)]}function aN([e,t]){return[Math.exp(e)*Math.cos(t),Math.exp(e)*Math.sin(t)]}function aO([e,t]){return Math.sqrt(e*e+t*t)}function ak([e,t]){return[Math.log(aO([e,t])),Math.atan2(t,e)]}function aH(e,t){let[r,n]=ak(e);return aN([t*r,t*n])}aR.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 a_ extends nv{avedev(e,t){return this.runFunction(e.args,t,this.metadata("AVEDEV"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rK)return t;if(0===t.length)return new rK(d.DIV_BY_ZERO);let r=ag(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 rK?t:0===t.length?0:ap(t)})}geomean(e,t){return this.runFunction(e.args,t,this.metadata("GEOMEAN"),(...e)=>{let t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof rK)return t;if(0===t.length)return new rK(d.NUM,ej.OneValue);for(let e of t)if(e<=0)return new rK(d.NUM,ej.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 rK)return t;if(0===t.length)return new rK(d.NUM,ej.OneValue);for(let e of t)if(e<=0)return new rK(d.NUM,ej.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 rK(d.NA,ej.EqualLength);let r=aL(e,t);return r instanceof rK?r:r[0].length<=1?new rK(d.DIV_BY_ZERO,ej.TwoValues):aC(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 rK(d.NA,ej.EqualLength);let r=aL(e,t);return r instanceof rK?r:r[0].length<=1?new rK(d.DIV_BY_ZERO,ej.TwoValues):Math.pow(aC(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 rK(d.NA,ej.EqualLength);let r=aL(e,t);if(r instanceof rK)return r;let n=r[0].length;return n<1?new rK(d.DIV_BY_ZERO,ej.OneValue):1===n?0:ab(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 rK(d.NA,ej.EqualLength);let r=aL(e,t);return r instanceof rK?r:r[0].length<=1?new rK(d.DIV_BY_ZERO,ej.TwoValues):ab(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 rK)return n;let o=n.length;if(void 0===r){if(o<2)return new rK(d.DIV_BY_ZERO,ej.TwoValues);r=af(n,!0)}return o<1?new rK(d.NA,ej.OneValue):0===r?new rK(d.DIV_BY_ZERO):1-s0((ag(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 rK)return r;if(n instanceof rK)return n;if(r.length<=1||n.length<=1)return new rK(d.DIV_BY_ZERO);let o=am(r,!0),i=am(n,!0);if(0===o||0===i)return new rK(d.DIV_BY_ZERO);let s=ai(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 rK(d.NA,ej.EqualLength);let r=aL(e,t);if(r instanceof rK)return r;let n=r[0].length;return n<=2?new rK(d.DIV_BY_ZERO,ej.ThreeValues):Math.sqrt((ap(r[0])-Math.pow(ab(r[0],r[1])*(n-1),2)/ap(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 rK(d.NA,ej.EqualLength);let r=aL(e,t);if(r instanceof rK)return r;let n=r[0].length;return n<=1?new rK(d.DIV_BY_ZERO,ej.TwoValues):ab(r[0],r[1])*(n-1)/ap(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 rK(d.NA,ej.EqualLength);let o=aL(e,t);if(o instanceof rK)return o;if(o[0].length<=1)return new rK(d.DIV_BY_ZERO,ej.TwoValues);let i=0;for(let e=0;e<o[0].length;e++){if(0===o[1][e])return new rK(d.DIV_BY_ZERO);i+=Math.pow(o[0][e]-o[1][e],2)/o[1][e]}return i<0?new rK(d.NUM,ej.NaN):1-an(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 rK)return o;if(i instanceof rK)return i;let s=o.length,a=i.length;if(1===n){if(a!==s)return new rK(d.NA,ej.EqualLength);if(s<=1)return new rK(d.DIV_BY_ZERO,ej.TwoValues);let e=Array(s);for(let t=0;t<s;t++)e[t]=o[t]-i[t];let t=af(e,!0);return 0===t?new rK(d.DIV_BY_ZERO):r*(1-ah(Math.abs(Math.sqrt(s)*ag(e)/t),s-1))}if(2===n){if(s<=1||a<=1)return new rK(d.DIV_BY_ZERO,ej.TwoValues);let e=(ap(o)+ap(i))/(s+a-2);return 0===e?new rK(d.DIV_BY_ZERO):r*(1-ah(Math.abs((ag(o)-ag(i))/Math.sqrt(e*(1/s+1/a))),s+a-2))}{if(s<=1||a<=1)return new rK(d.DIV_BY_ZERO,ej.TwoValues);let e=am(o,!0),t=am(i,!0);return 0===e&&0===t?new rK(d.DIV_BY_ZERO):r*(1-ah(Math.abs((ag(o)-ag(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 rK)return t;let r=t.length;if(r<3)return new rK(d.DIV_BY_ZERO,ej.ThreeValues);let n=ag(t),o=af(t,!0);return 0===o?new rK(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 rK)return t;let r=t.length;if(r<3)return new rK(d.DIV_BY_ZERO,ej.ThreeValues);let n=ag(t),o=af(t,!1);return 0===o?new rK(d.DIV_BY_ZERO):t.reduce((e,t)=>e+Math.pow((t-n)/o,3),0)/r})}}function aL(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 rK)return e;if(t instanceof rK)return t;tP(e)&&tP(t)&&(s.push(tI(e)),a.push(tI(t)))}return[s,a]}a_.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}},a_.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 aP extends ig{}aP.HyperFormula=ig,aP.ErrorType=d,aP.CellError=rK,aP.CellType=u,aP.CellValueType=r$,aP.CellValueDetailedType=rY,aP.DetailedCellError=nT,aP.ExportedCellChange=oq,aP.ExportedNamedExpressionChange=oK,aP.ConfigValueTooBigError=ro,aP.ConfigValueTooSmallError=rn,aP.EvaluationSuspendedError=rs,aP.ExpectedOneOfValuesError=ri,aP.ExpectedValueOfTypeError=rt,aP.ArraySize=nR,aP.SimpleRangeValue=tF,aP.EmptyValue=tM,aP.FunctionPlugin=nv,aP.FunctionArgumentType=p,aP.FunctionPluginValidationError=ru,aP.InvalidAddressError=t0,aP.InvalidArgumentsError=t1,aP.LanguageNotRegisteredError=rh,aP.LanguageAlreadyRegisteredError=rd,aP.MissingTranslationError=ra,aP.NamedExpressionDoesNotExistError=t5,aP.NamedExpressionNameIsAlreadyTakenError=t3,aP.NamedExpressionNameIsInvalidError=t6,aP.NoOperationToRedoError=t9,aP.NoOperationToUndoError=t4,aP.NoRelativeAddressesAllowedError=rm,aP.NoSheetWithIdError=tK,aP.NoSheetWithNameError=tX,aP.NotAFormulaError=tJ,aP.NothingToPasteError=t7,aP.ProtectedFunctionTranslationError=rl,aP.SheetNameAlreadyTakenError=tQ,aP.SheetSizeLimitExceededError=tZ,aP.SourceLocationHasArrayError=rg,aP.TargetLocationHasArrayError=rp,aP.UnableToParseError=re;let aD=im.defaultConfig.language;for(let e of(ig.registerLanguage(aD,iC),ig.languages[iC.langCode]=iC,Object.getOwnPropertyNames(eo)))e.startsWith("_")||ig.registerFunctionPlugin(eo[e]);window.HyperFormula=ig})(),(()=>{"use strict";let e,t,o,i;r.d(n,{default:()=>Si});var s={};r.r(s),r.d(s,{arrayAvg:()=>en,arrayEach:()=>J,arrayFilter:()=>Q,arrayFlatten:()=>function e(t){return X(t,(t,r)=>t.concat(Array.isArray(r)?e(r):r),[])},arrayMap:()=>Z,arrayMax:()=>et,arrayMin:()=>er,arrayReduce:()=>X,arraySum:()=>ee,arrayToString:()=>eu,arrayUnique:()=>es,extendArray:()=>q,getDifferenceOfArrays:()=>ea,getIntersectionOfArrays:()=>el,getUnionOfArrays:()=>eh,insertValuesInPlace:()=>ei,pivot:()=>K,removeIndexesInPlace:()=>eo,stringToArray:()=>ed,to2dArray:()=>j});var a={};r.r(a),r.d(a,{_BLOCKING_MODAL_STATES:()=>te,_LICENSE_EXPIRED_TITLE:()=>e5,_PURCHASE_LICENSE_TEXT:()=>e4,_formatExpiryClause:()=>e3,_formatIsoDate:()=>to,_getLicenseState:()=>ta,_injectProductInfo:()=>tn,isDefined:()=>eU,isEmpty:()=>eW,isRegExp:()=>eG,isUndefined:()=>ez,stringify:()=>eV});var l={};r.r(l),r.d(l,{throwWithCause:()=>th});var h={};r.r(h),r.d(h,{assignObjectDefaults:()=>tM,clone:()=>tm,createObjectPropListener:()=>tT,deepClone:()=>tp,deepExtend:()=>tg,deepMerge:()=>tI,deepObjectSize:()=>tE,defineGetter:()=>tw,duckSchema:()=>td,extend:()=>tc,getProperty:()=>tv,hasOwnProperty:()=>tA,inherit:()=>tu,isKeyValueObject:()=>tx,isObject:()=>tC,isObjectEqual:()=>tb,isPlainObject:()=>ty,mixin:()=>tf,objectEach:()=>tS,setProperty:()=>tR});var d={};r.r(d),r.d(d,{cancelAnimationFrame:()=>tO,cancelIdleTask:()=>tH,getComparisonFunction:()=>tP,isCSR:()=>tL,isTouchSupported:()=>t_,requestAnimationFrame:()=>tN,requestIdleTask:()=>tk});var u={};r.r(u),r.d(u,{isChrome:()=>tz,isChromeWebKit:()=>tW,isEdge:()=>tq,isEdgeWebKit:()=>tK,isFirefox:()=>tG,isFirefoxWebKit:()=>t$,isIOS:()=>tQ,isIpadOS:()=>tZ,isLinuxOS:()=>t1,isMacOS:()=>t0,isMobileBrowser:()=>tX,isSafari:()=>tY,isSafariBefore261:()=>tj,isWindowsOS:()=>tJ,setBrowserMeta:()=>tV,setPlatformMeta:()=>tU});var c={};r.r(c),r.d(c,{HTML_CHARACTERS:()=>rR,SANITIZER_WARN_KEY:()=>rE,addClass:()=>rb,addEvent:()=>rK,clearTextSelection:()=>r0,closest:()=>ra,closestDown:()=>rl,empty:()=>rv,eventTargetEl:()=>rn,fastInnerHTML:()=>rM,fastInnerText:()=>rI,findFirstParentWithClass:()=>rh,getCaretPosition:()=>rQ,getChildEl:()=>ng,getCssTransform:()=>r9,getDeepActiveElement:()=>nc,getFractionalScalingCompensation:()=>r2,getFrameElement:()=>ro,getMaximumScrollLeft:()=>rF,getMaximumScrollTop:()=>rD,getParent:()=>rt,getParentWindow:()=>ri,getScrollLeft:()=>rL,getScrollTop:()=>r_,getScrollableElement:()=>rP,getScrollbarWidth:()=>r3,getSelectionEndPosition:()=>rZ,getSelectionText:()=>rJ,getShadowHostChain:()=>nu,getStyle:()=>rW,getTrimmingContainer:()=>rz,getWindowScrollLeft:()=>rH,getWindowScrollTop:()=>rk,hasAccessToParentWindow:()=>rs,hasClass:()=>rf,hasHorizontalScrollbar:()=>r5,hasVerticalScrollbar:()=>r6,hasZeroHeight:()=>rN,index:()=>ru,innerHeight:()=>rj,innerWidth:()=>rq,isBottomMostColumnHeader:()=>rg,isChildOf:()=>rd,isDetached:()=>nr,isHTMLElement:()=>na,isHTMLInputElement:()=>nh,isHTMLTableCellElement:()=>nl,isInput:()=>r8,isInternalElement:()=>rr,isOutsideInput:()=>ne,isShadowRoot:()=>nd,isVisible:()=>rx,makeElementContentEditableAndSelectItsContent:()=>no,matchesCSSRules:()=>rG,missingSanitizerMessage:()=>rT,observeVisibilityChangeOnce:()=>nn,offset:()=>rO,outerHeight:()=>rY,outerWidth:()=>r$,overlayContainsElement:()=>rc,removeAttribute:()=>rw,removeClass:()=>rC,removeContentEditableFromElementAndDeselect:()=>ni,removeEvent:()=>rX,removeTextNodes:()=>rS,resetCssTransform:()=>r7,runWithSelectedContendEditableElement:()=>ns,selectElementIfAllowed:()=>nt,setAttribute:()=>ry,setCaretPosition:()=>r1,setOverlayPosition:()=>r4});var g={};r.r(g),r.d(g,{curry:()=>nw,curryRight:()=>nS,debounce:()=>nb,fastCall:()=>nv,isFunction:()=>np,partial:()=>ny,pipe:()=>nC,throttle:()=>nm,throttleAfterHits:()=>nf});var p={};r.r(p),r.d(p,{KEY_CODES:()=>nR,isCtrlKey:()=>nM,isCtrlMetaKey:()=>nI,isFunctionKey:()=>nA,isKey:()=>nx,isPrintableChar:()=>nT});var m={};r.r(m),r.d(m,{getFirstChangedTouch:()=>nD,getTouchPointById:()=>nF,hasTouchList:()=>nP,isImmediatePropagationStopped:()=>nO,isLeftClick:()=>nH,isMiddleClick:()=>n_,isRightClick:()=>nk,isTouchEvent:()=>nL,offsetRelativeTo:()=>nB,stopImmediatePropagation:()=>nN});var f={};r.r(f),r.d(f,{_dataToHTML:()=>ol,htmlToGridSettings:()=>og,instanceToHTML:()=>oa,replaceTdCellsWithTextContent:()=>oc});var b={};r.r(b),r.d(b,{equalsIgnoreCase:()=>om,escapeHtml:()=>oS,isJSON:()=>ob,isPercentValue:()=>oC,localeLowerCase:()=>oM,randomString:()=>of,sanitize:()=>ov,stripTags:()=>oy,substitute:()=>t2,toHyphen:()=>oR,toUpperCaseFirst:()=>op});var C={};r.r(C),r.d(C,{clamp:()=>oP,getParsedNumber:()=>oD,isCommaThousandsGroupedInteger:()=>oN,isDotThousandsGroupedFloat:()=>ok,isDotThousandsGroupedInteger:()=>oO,isLossyNumericConversion:()=>oB,isNumeric:()=>oI,isNumericLike:()=>ox,isUnsignedNumber:()=>oV,rangeEach:()=>oH,rangeEachReverse:()=>o_,valueAccordingPercent:()=>oL});var y={};r.r(y),r.d(y,{cloneRow:()=>aR,countFirstRowKeys:()=>aw,createEmptySpreadsheetData:()=>ab,createSpreadsheetData:()=>am,createSpreadsheetObjectData:()=>af,dataRowToChangesArray:()=>aC,hasChangeForCell:()=>ay,isArrayOfArrays:()=>aS,isArrayOfObjects:()=>av,spreadsheetColumnIndex:()=>ap,spreadsheetColumnLabel:()=>ag});var w={};r.r(w),r.d(w,{CANCEL:()=>aQ,CHECKBOX_CHECKED:()=>hw,CHECKBOX_RENDERER_NAMESPACE:()=>hy,CHECKBOX_UNCHECKED:()=>hS,COMMON_NAMESPACE:()=>aK,CONTEXTMENU_ITEMS_ADD_COMMENT:()=>lc,CONTEXTMENU_ITEMS_ALIGNMENT:()=>lf,CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM:()=>lR,CONTEXTMENU_ITEMS_ALIGNMENT_CENTER:()=>lC,CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY:()=>lw,CONTEXTMENU_ITEMS_ALIGNMENT_LEFT:()=>lb,CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE:()=>lv,CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT:()=>ly,CONTEXTMENU_ITEMS_ALIGNMENT_TOP:()=>lS,CONTEXTMENU_ITEMS_BORDERS:()=>lE,CONTEXTMENU_ITEMS_BORDERS_BOTTOM:()=>lM,CONTEXTMENU_ITEMS_BORDERS_LEFT:()=>lI,CONTEXTMENU_ITEMS_BORDERS_RIGHT:()=>lA,CONTEXTMENU_ITEMS_BORDERS_TOP:()=>lT,CONTEXTMENU_ITEMS_CLEAR_COLUMN:()=>a8,CONTEXTMENU_ITEMS_COPY:()=>le,CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY:()=>ln,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS:()=>lr,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS:()=>lt,CONTEXTMENU_ITEMS_CUT:()=>lo,CONTEXTMENU_ITEMS_EDIT_COMMENT:()=>lg,CONTEXTMENU_ITEMS_EXPORT:()=>li,CONTEXTMENU_ITEMS_EXPORT_FILE_CSV:()=>ls,CONTEXTMENU_ITEMS_EXPORT_FILE_XLSX:()=>la,CONTEXTMENU_ITEMS_FREEZE_COLUMN:()=>ll,CONTEXTMENU_ITEMS_HIDE_COLUMN:()=>lk,CONTEXTMENU_ITEMS_HIDE_ROW:()=>l_,CONTEXTMENU_ITEMS_INSERT_LEFT:()=>a2,CONTEXTMENU_ITEMS_INSERT_RIGHT:()=>a3,CONTEXTMENU_ITEMS_MERGE_CELLS:()=>ld,CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD:()=>lO,CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD:()=>lN,CONTEXTMENU_ITEMS_NO_ITEMS:()=>aJ,CONTEXTMENU_ITEMS_READ_ONLY:()=>a7,CONTEXTMENU_ITEMS_READ_ONLY_COMMENT:()=>lm,CONTEXTMENU_ITEMS_REDO:()=>a9,CONTEXTMENU_ITEMS_REMOVE_BORDERS:()=>lx,CONTEXTMENU_ITEMS_REMOVE_COLUMN:()=>a5,CONTEXTMENU_ITEMS_REMOVE_COMMENT:()=>lp,CONTEXTMENU_ITEMS_REMOVE_ROW:()=>a6,CONTEXTMENU_ITEMS_ROW_ABOVE:()=>a0,CONTEXTMENU_ITEMS_ROW_BELOW:()=>a1,CONTEXTMENU_ITEMS_SHOW_COLUMN:()=>lH,CONTEXTMENU_ITEMS_SHOW_ROW:()=>lL,CONTEXTMENU_ITEMS_UNDO:()=>a4,CONTEXTMENU_ITEMS_UNFREEZE_COLUMN:()=>lh,CONTEXTMENU_ITEMS_UNMERGE_CELLS:()=>lu,CONTEXT_MENU_ITEMS_NAMESPACE:()=>aZ,DATA_PROVIDER_BUTTONS_REFETCH:()=>hz,DATA_PROVIDER_ERRORS_CREATE:()=>hF,DATA_PROVIDER_ERRORS_FETCH:()=>hD,DATA_PROVIDER_ERRORS_REMOVE:()=>hV,DATA_PROVIDER_ERRORS_REQUEST_FAILED:()=>hU,DATA_PROVIDER_ERRORS_UPDATE:()=>hB,DATA_PROVIDER_NAMESPACE:()=>hP,EMPTY_DATA_STATE_BUTTONS_FILTERS_RESET:()=>hH,EMPTY_DATA_STATE_DESCRIPTION:()=>hN,EMPTY_DATA_STATE_DESCRIPTION_FILTERS:()=>hk,EMPTY_DATA_STATE_DESCRIPTION_LOADING:()=>hL,EMPTY_DATA_STATE_NAMESPACE:()=>hI,EMPTY_DATA_STATE_TITLE:()=>hx,EMPTY_DATA_STATE_TITLE_FILTERS:()=>hO,EMPTY_DATA_STATE_TITLE_LOADING:()=>h_,EXPORT_FILE_DIALOG_TITLE:()=>hM,EXPORT_FILE_NAMESPACE:()=>hA,FILTERS_BUTTONS_CANCEL:()=>hi,FILTERS_BUTTONS_CLEAR:()=>hn,FILTERS_BUTTONS_OK:()=>ho,FILTERS_BUTTONS_PLACEHOLDER_SEARCH:()=>hs,FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE:()=>hl,FILTERS_BUTTONS_PLACEHOLDER_VALUE:()=>ha,FILTERS_BUTTONS_SELECT_ALL:()=>hr,FILTERS_CONDITIONS_AFTER:()=>l0,FILTERS_CONDITIONS_AFTER_OR_EQUAL:()=>l1,FILTERS_CONDITIONS_BEFORE:()=>l2,FILTERS_CONDITIONS_BEFORE_OR_EQUAL:()=>l3,FILTERS_CONDITIONS_BEGINS_WITH:()=>lW,FILTERS_CONDITIONS_BETWEEN:()=>lZ,FILTERS_CONDITIONS_BY_VALUE:()=>lj,FILTERS_CONDITIONS_CONTAINS:()=>l$,FILTERS_CONDITIONS_EMPTY:()=>lB,FILTERS_CONDITIONS_ENDS_WITH:()=>lG,FILTERS_CONDITIONS_EQUAL:()=>lU,FILTERS_CONDITIONS_GREATER_THAN:()=>lq,FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL:()=>lK,FILTERS_CONDITIONS_LESS_THAN:()=>lX,FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL:()=>lQ,FILTERS_CONDITIONS_NAMESPACE:()=>lD,FILTERS_CONDITIONS_NONE:()=>lF,FILTERS_CONDITIONS_NOT_BETWEEN:()=>lJ,FILTERS_CONDITIONS_NOT_CONTAIN:()=>lY,FILTERS_CONDITIONS_NOT_EMPTY:()=>lV,FILTERS_CONDITIONS_NOT_EQUAL:()=>lz,FILTERS_CONDITIONS_TODAY:()=>l6,FILTERS_CONDITIONS_TOMORROW:()=>l5,FILTERS_CONDITIONS_YESTERDAY:()=>l4,FILTERS_DIVS_FILTER_BY_CONDITION:()=>l9,FILTERS_DIVS_FILTER_BY_VALUE:()=>l7,FILTERS_LABELS_CONJUNCTION:()=>l8,FILTERS_LABELS_DISJUNCTION:()=>he,FILTERS_NAMESPACE:()=>lP,FILTERS_VALUES_BLANK_CELLS:()=>ht,LOADING_NAMESPACE:()=>hv,LOADING_TITLE:()=>hR,NOTIFICATION_BUTTONS_CLOSE:()=>hT,NOTIFICATION_NAMESPACE:()=>hE,OK:()=>aX,PAGINATION_COUNTER_SECTION:()=>hg,PAGINATION_FIRST_PAGE:()=>hm,PAGINATION_LAST_PAGE:()=>hC,PAGINATION_NAMESPACE:()=>hh,PAGINATION_NAV_SECTION:()=>hp,PAGINATION_NEXT_PAGE:()=>hb,PAGINATION_PAGE_SIZE_AUTO:()=>hu,PAGINATION_PAGE_SIZE_SECTION:()=>hc,PAGINATION_PREV_PAGE:()=>hf,PAGINATION_SECTION:()=>hd});var S={};r.r(S),r.d(S,{ISO_DATETIME_REGEX:()=>cD,ISO_DATE_REGEX:()=>cI,TIME_REGEX:()=>c_,getNormalizedDate:()=>cx,getRelativeLocalDate:()=>cU,getTodayLocalDate:()=>cV,isSameLocalDay:()=>cz,isValidISODate:()=>cH,isValidISODateTime:()=>cB,isValidTime:()=>cP,parseToLocalDate:()=>cN,parseToLocalDateTime:()=>cF,parseToLocalTime:()=>cL});let v=e=>["tabindex",e],R=()=>["role","presentation"],E=()=>["role","gridcell"],T=()=>["role","gridcell button"],A=()=>["role","rowheader"],M=()=>["role","rowgroup"],I=()=>["role","columnheader"],x=()=>["role","row"],N=()=>["role","listbox"],O=()=>["scope","col"],k=()=>["scope","row"],H=e=>["aria-label",e],_=()=>["aria-hidden","true"],L=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return["aria-disabled",e]},P=e=>["aria-haspopup",e],D=e=>["aria-rowcount",e],F=e=>["aria-colcount",e],B=e=>["aria-rowindex",e],V=e=>["aria-colindex",e],U=e=>["aria-expanded",e],z=()=>["aria-readonly","true"],W=()=>["aria-invalid","true"],G=e=>["aria-checked",e],$=()=>["aria-selected","true"],Y=()=>["aria-busy","true"];function j(e){let t=e.length,r=0;for(;r<t;)e[r]=[e[r]],r+=1}function q(e,t){let r=t.length,n=0;for(;n<r;)e.push(t[n]),n+=1}function K(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 X(e,t,r,n){let o=-1,i=Array.isArray(e)?e:Array.from(e),s=i.length;n&&s&&(o+=1,r=i[o]);let a=r;for(o+=1;o<s;)a=t(a,i[o],o,i),o+=1;return a}function Q(e,t){let r=0,n=Array.isArray(e)?e:Array.from(e),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 Z(e,t){let r=0,n=Array.isArray(e)?e:Array.from(e),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 J(e,t){let r,n=0,o=(r=Array.isArray(e)?e:Array.from(e)).length;for(;n<o&&!1!==t(r[n],n,r);)n+=1;return r}function ee(e){return X(e,(e,t)=>e+t,0)}function et(e){return X(e,(e,t)=>void 0!==e&&e>t?e:t,e[0])}function er(e){return X(e,(e,t)=>void 0!==e&&e<t?e:t,e[0])}function en(e){return e.length?ee(e)/e.length:0}function eo(e,t){let r=0;for(let n=0;n<e.length;n++)t.has(n)||(e[r]=e[n],r+=1);return e.length=r,e}function ei(e,t,r,n){if(r<=0)return e;let o=e.length,i=Math.min(t,o);e.length=o+r;for(let t=o-1;t>=i;t--)e[t+r]=e[t];return e.fill(n,i,i+r),e}function es(e){let t=[],r=new Set;return J(e,e=>{r.has(e)||(r.add(e),t.push(e))}),t}function ea(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[n,...o]=[...t],i=n;return J(o,e=>{let t=new Set(e);i=i.filter(e=>!t.has(e))}),i}function el(){let e;for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];let o=[];J(r,(t,n)=>{"function"==typeof t?n===r.length-1&&(e=t):o.push(t)});let[i,...s]=o,a=i;return J(s,t=>{if(e)a=a.filter(r=>t.some(t=>e(r,t)));else{let e=new Set(t);a=a.filter(t=>e.has(t))}}),a}function eh(){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 J(o,e=>{J(e,e=>{i.has(e)||i.add(e)})}),Array.from(i)}function ed(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)}function eu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.join(t)}function ec(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return X(Array.from(e),(e,t,n)=>e+t.replace(/\r?\n\s*/g,"")+(r[n]?r[n]:""),"").trim()}function eg(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=Array.from(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.dataset.ref??null;delete e.dataset.ref,null!==t&&(s[t]=e)}),{fragment:i,refs:s}}let ep={"non-commercial-and-evaluation":"non-commercial-and-evaluation"},em=/^[0-9a-fA-F]{25}$/;function ef(e){return"entitlement"===function(e){if("string"!=typeof e)return"unknown";let t=e.trim(),r=t.toLowerCase();if(Object.prototype.hasOwnProperty.call(ep,r))return ep[r];let n=t.lastIndexOf("[");return -1!==n&&-1!==t.indexOf("]",n)?"entitlement":em.test(t.replace(/-/g,""))?"legacy":"unknown"}(e)}let eb=["usage_until","release_until"],eC=[0x428a2f98,0xd728ae22,0x71374491,0x23ef65cd,0xb5c0fbcf,0xec4d3b2f,0xe9b5dba5,0x8189dbbc,0x3956c25b,0xf348b538,0x59f111f1,0xb605d019,0x923f82a4,0xaf194f9b,0xab1c5ed5,0xda6d8118,0xd807aa98,0xa3030242,0x12835b01,0x45706fbe,0x243185be,0x4ee4b28c,0x550c7dc3,0xd5ffb4e2,0x72be5d74,0xf27b896f,0x80deb1fe,0x3b1696b1,0x9bdc06a7,0x25c71235,0xc19bf174,0xcf692694,0xe49b69c1,0x9ef14ad2,0xefbe4786,0x384f25e3,0xfc19dc6,0x8b8cd5b5,0x240ca1cc,0x77ac9c65,0x2de92c6f,0x592b0275,0x4a7484aa,0x6ea6e483,0x5cb0a9dc,0xbd41fbd4,0x76f988da,0x831153b5,0x983e5152,0xee66dfab,0xa831c66d,0x2db43210,0xb00327c8,0x98fb213f,0xbf597fc7,0xbeef0ee4,0xc6e00bf3,0x3da88fc2,0xd5a79147,0x930aa725,0x6ca6351,0xe003826f,0x14292967,0xa0e6e70,0x27b70a85,0x46d22ffc,0x2e1b2138,0x5c26c926,0x4d2c6dfc,0x5ac42aed,0x53380d13,0x9d95b3df,0x650a7354,0x8baf63de,0x766a0abb,0x3c77b2a8,0x81c2c92e,0x47edaee6,0x92722c85,0x1482353b,0xa2bfe8a1,0x4cf10364,0xa81a664b,0xbc423001,0xc24b8b70,0xd0f89791,0xc76c51a3,0x654be30,0xd192e819,0xd6ef5218,0xd6990624,0x5565a910,0xf40e3585,0x5771202a,0x106aa070,0x32bbd1b8,0x19a4c116,0xb8d2d0c8,0x1e376c08,0x5141ab53,0x2748774c,0xdf8eeb99,0x34b0bcb5,0xe19b48a8,0x391c0cb3,0xc5c95a63,0x4ed8aa4a,0xe3418acb,0x5b9cca4f,0x7763e373,0x682e6ff3,0xd6b2b8a3,0x748f82ee,0x5defb2fc,0x78a5636f,0x43172f60,0x84c87814,0xa1f0ab72,0x8cc70208,0x1a6439ec,0x90befffa,0x23631e28,0xa4506ceb,0xde82bde9,0xbef9a3f7,0xb2c67915,0xc67178f2,0xe372532b,0xca273ece,0xea26619c,0xd186b8c7,0x21c0c207,0xeada7dd6,0xcde0eb1e,0xf57d4f7f,0xee6ed178,0x6f067aa,0x72176fba,0xa637dc5,0xa2c898a6,0x113f9804,0xbef90dae,0x1b710b35,0x131c471b,0x28db77f5,0x23047d84,0x32caab7b,0x40c72493,0x3c9ebe0a,0x15c9bebc,0x431d67c4,0x9c100d4c,0x4cc5d4be,0xcb3e42b6,0x597f299c,0xfc657e2a,0x5fcb6fab,0x3ad6faec,0x6c44198c,0x4a475817];function ey(e){return`00000000${(e>>>0).toString(16)}`.slice(-8)}function ew(e){let t=e.length,r=Math.ceil((t+17)/128),n=new Uint8Array(128*r);n.set(e),n[t]=128;let o=8*t,i=n.length;n[i-7]=255&Math.floor(o/0x1000000000000),n[i-6]=255&Math.floor(o/0x10000000000),n[i-5]=255&Math.floor(o/0x100000000),n[i-4]=o>>>24&255,n[i-3]=o>>>16&255,n[i-2]=o>>>8&255,n[i-1]=255&o;let s=[0x6a09e667,0xf3bcc908,0xbb67ae85,0x84caa73b,0x3c6ef372,0xfe94f82b,0xa54ff53a,0x5f1d36f1,0x510e527f,0xade682d1,0x9b05688c,0x2b3e6c1f,0x1f83d9ab,0xfb41bd6b,0x5be0cd19,0x137e2179],a=Array(80),l=Array(80);for(let e=0;e<r;e+=1){let t=128*e;for(let e=0;e<16;e+=1){let r=t+8*e;a[e]=(n[r]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3])>>>0,l[e]=(n[r+4]<<24|n[r+5]<<16|n[r+6]<<8|n[r+7])>>>0}for(let e=16;e<80;e+=1){let t=a[e-2],r=l[e-2],n=a[e-15],o=l[e-15],i=(t>>>19|r<<13)^(r>>>29|t<<3)^t>>>6,s=(n>>>1|o<<31)^(n>>>8|o<<24)^n>>>7,h=(o>>>1|n<<31)^(o>>>8|n<<24)^(o>>>7|n<<25),d=(((r>>>19|t<<13)^(t>>>29|r<<3)^(r>>>6|t<<26))>>>0)+(l[e-7]>>>0)+(h>>>0)+(l[e-16]>>>0);l[e]=d>>>0,a[e]=(i>>>0)+(a[e-7]>>>0)+(s>>>0)+(a[e-16]>>>0)+Math.floor(d/0x100000000)>>>0}let r=s[0],o=s[1],i=s[2],h=s[3],d=s[4],u=s[5],c=s[6],g=s[7],p=s[8],m=s[9],f=s[10],b=s[11],C=s[12],y=s[13],w=s[14],S=s[15];for(let e=0;e<80;e+=1){let t=(p>>>14|m<<18)^(p>>>18|m<<14)^(m>>>9|p<<23),n=(m>>>14|p<<18)^(m>>>18|p<<14)^(p>>>9|m<<23),s=(r>>>28|o<<4)^(o>>>2|r<<30)^(o>>>7|r<<25),v=(o>>>28|r<<4)^(r>>>2|o<<30)^(r>>>7|o<<25),R=p&f^~p&C,E=r&i^r&d^i&d,T=o&h^o&u^h&u,A=(S>>>0)+(n>>>0)+((m&b^~m&y)>>>0)+(eC[2*e+1]>>>0)+(l[e]>>>0),M=A>>>0,I=(w>>>0)+(t>>>0)+(R>>>0)+(eC[2*e]>>>0)+(a[e]>>>0)+Math.floor(A/0x100000000)>>>0,x=(v>>>0)+(T>>>0),N=x>>>0,O=(s>>>0)+(E>>>0)+Math.floor(x/0x100000000)>>>0;w=C,S=y,C=f,y=b,f=p,b=m;let k=(g>>>0)+M;m=k>>>0,p=(c>>>0)+I+Math.floor(k/0x100000000)>>>0,c=d,g=u,d=i,u=h,i=r,h=o;let H=M+N;o=H>>>0,r=I+O+Math.floor(H/0x100000000)>>>0}let v=[r,o,i,h,d,u,c,g,p,m,f,b,C,y,w,S];for(let e=0;e<16;e+=2){let t=(s[e+1]>>>0)+(v[e+1]>>>0);s[e+1]=t>>>0,s[e]=(s[e]>>>0)+(v[e]>>>0)+Math.floor(t/0x100000000)>>>0}}return s.map(ey).join("")}function eS(e){let t=[];for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>=55296&&n<=56319&&r+1<e.length){let t=e.charCodeAt(r+1);t>=56320&&t<=57343&&(n=(n-55296)*1024+(t-56320)+65536,r+=1)}n<128?t.push(n):n<2048?t.push(192|n>>6,128|63&n):n<65536?t.push(224|n>>12,128|n>>6&63,128|63&n):t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n)}return t}function ev(e){let t="string"==typeof e?/^(\d{4})-(\d{2})-(\d{2})$/.exec(e):null;if(null===t)return null;let r=parseInt(t[1],10),n=parseInt(t[2],10),o=parseInt(t[3],10);if(r<100)return null;let i=Date.UTC(r,n-1,o),s=new Date(i);return s.getUTCFullYear()!==r||s.getUTCMonth()!==n-1||s.getUTCDate()!==o?null:i}let eR=/^[A-Za-z0-9\-_]+$/,eE=/^[0-9a-f]+$/,eT=/[\t\n\v\f\r \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/g,eA=/\\[nrt]/g;function eM(e){return e.replace(eA,"").replace(eT,"")}function eI(e){return eM(e).normalize("NFC")}function ex(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function eN(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function eO(e){return"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e&&e>=0}function ek(e){return Array.isArray(e)&&e.every(e=>"string"==typeof e)}function eH(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:!0,writable:!0,configurable:!0})}let e_=null,eL=null;function eP(e,t){if(!ex(e.products,t))return null;let r=e.products[t];return eN(r)?r:null}let eD=Object.freeze({unrestricted:!0,products:Object.freeze({})});function eF(e){return 864e5*Math.floor(e/864e5)}function eB(e,t){return(e-eF(t))/864e5}function eV(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 eU(e){return void 0!==e}function ez(e){return void 0===e}function eW(e){return null===e||""===e||ez(e)}function eG(e){return"[object RegExp]"===Object.prototype.toString.call(e)}let e$="length",eY=e=>parseInt(e,16),ej=e=>parseInt(e,10),eq=(e,t,r)=>e.substr(t,r),eK=e=>(e.codePointAt(0)??0)-65,eX=e=>`${e}`.replace(/\-/g,""),eQ=e=>eY(eq(eX(e),eY("12"),eK("F")))/(eY(eq(eX(e),eK("B"),~~![][e$]))||9),eZ=()=>"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),eJ=!1,e0=new Set,e1={invalid:()=>ec`
32
32
  The license key for Handsontable is invalid.\x20
@@ -69,7 +69,7 @@
69
69
  The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
70
70
  version ${r}. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your license\x20
71
71
  key or downgrade to a version released on or before ${t}. If you need any help, contact us\x20
72
- at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.`}},te=Object.freeze(["trial_hard_stop","invalid","missing"]);function tt(e){return -1!==te.indexOf(e)}function tr(e){return"string"==typeof e?e.trim():e}function tn(e){let t,{className:r,key:n,element:o,releaseDate:i}=e;if(ef(n=tr(n)))return function(e){let{className:t,key:r,element:n,releaseDate:o}=e;if(eZ())return null;let{lifecycle:i,channels:s}=ta(r,o),{state:a}=i,l={daysRemaining:i.daysRemaining,licensedUntil:i.licensedUntil??void 0,hotVersion:"18.1.2-rc2"};if(s.console&&!e0.has(r??"")){let e="invalid"===a?{severity:"warn",message:()=>e1.invalid({})}:e7[a];e&&(console[e.severity](e.message(l)),e0.add(r??""))}if(!s.ui||!n||tt(a))return null;let h=e8[a];if(!h)return null;let d=n.ownerDocument,u=d.createElement("div"),c=d.createElement("div");return u.className=`handsontable ${t}`,c.className=`${t}_inner`,c.innerHTML=h(l),u.appendChild(c),n.appendChild(u),u}({className:r,key:n,element:o,releaseDate:i});let s=!eW(n),a="string"==typeof n&&("non-commercial-and-evaluation"===n.toLowerCase()||"ht68e-1f2b7-47158-70b05-0842f"===n.toLowerCase()),l="18.1.2-rc2",h="invalid",d="invalid",u=tl(n=eX(n||""));if(a)h="non_commercial",d="valid";else if(s||u)if(u){let[e,r,o]=(i??"07/10/2026"??"").split("/").map(Number),s=Math.floor(Date.UTC(o,r-1,e)/864e5),a=eQ(n);t=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",timeZone:"UTC"}).format((a+1)*864e5),s>a?(h="expired",d="expired"):(h="valid",d="valid")}else h="invalid",d="invalid";else h="missing",d="missing";if(eZ()&&(h="valid",d="valid"),eJ||"valid"===h||(e1[h]({keyValidityDate:t,hotVersion:l})&&console["non_commercial"===h?"info":"warn"](e1[h]({keyValidityDate:t,hotVersion:l})),eJ=!0),"valid"!==d&&!tt(d)&&o&&e2[d]({keyValidityDate:t,hotVersion:l})){let e=document.createElement("div"),n=document.createElement("div");return e.className=`handsontable ${r}`,n.className=`${r}_inner`,n.innerHTML=e2[d]({keyValidityDate:t,hotVersion:l}),e.appendChild(n),o.appendChild(e),e}return null}function to(e){return new Date(e).toISOString().slice(0,10)}let ti=Object.freeze({console:!0,ui:!0});function ts(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{state:e,isTrial:!1,daysRemaining:null,licensedUntil:t}}function ta(e,t){let r,n=tr(e);if(eZ())return{lifecycle:ts("legacy_valid"),channels:ti,grants:eD};if(!ef(n))return{lifecycle:function(e,t){if("string"==typeof e&&("non-commercial-and-evaluation"===e.toLowerCase()||"ht68e-1f2b7-47158-70b05-0842f"===e.toLowerCase()))return ts("non_commercial");if(eW(e))return ts("missing");let r=eX(e||"");if(!tl(r))return ts("invalid");let[n,o,i]=(t??"07/10/2026"??"").split("/").map(Number),s=Math.floor(Date.UTC(i,o-1,n)/864e5),a=eQ(r);return s>a?ts("legacy_expired",to((a+1)*864e5)):ts("legacy_valid")}(n,t),channels:ti,grants:eD};let o=function(e){if("string"!=typeof e)return null;if(e!==e_){let t=function(e){let t,r,n=e.lastIndexOf("[");if(-1===n)return null;let o=e.indexOf("]",n);if(-1===o)return null;let i=eM(e.slice(n+1,o));if(i.length<=128)return null;let s=i.slice(0,-128),a=i.slice(-128);if(!eR.test(s)||!eE.test(a)||ew(eS(s))!==a)return null;let l=null===(r=function(e){let t=`${e}`.replace(/-/g,"+").replace(/_/g,"/").replace(/=+$/,"");if(!/^[A-Za-z0-9+/]*$/.test(t)||t.length%4==1)return null;let r=[];for(let e=0;e<t.length;e+=4){let n=[0,1,2,3].map(r=>{let n=t.charAt(e+r);return""===n?-1:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(n)});r.push(n[0]<<2|n[1]>>4),-1!==n[2]&&r.push((15&n[1])<<4|n[2]>>2),-1!==n[3]&&r.push((3&n[2])<<6|n[3])}return r}(s))?null:function(e){let t="",r=0;for(;r<e.length;){let n,o=e[r];o<128?(n=o,r+=1):o<224?(n=(31&o)<<6|63&e[r+1],r+=2):o<240?(n=(15&o)<<12|(63&e[r+1])<<6|63&e[r+2],r+=3):(n=(7&o)<<18|(63&e[r+1])<<12|(63&e[r+2])<<6|63&e[r+3],r+=4),n>=65536?(n-=65536,t+=String.fromCharCode(55296+(n>>10),56320+(1023&n))):t+=String.fromCharCode(n)}return t}(r);if(null===l)return null;try{t=JSON.parse(l)}catch(e){return null}if(!eN(t)||!eN(t.products))return null;let h=ex(p=t,"v")?!eO(p.v)||p.v<2?null:p.v:1;if(null===h||h>=2&&!function(e,t,r){if(""!==eI(r))return!1;let n=eI(t);return""!==n&&ex(e,"prose")&&"string"==typeof e.prose&&ew(eS(n)).slice(0,64)===e.prose}(t,e.slice(0,n),e.slice(o+1)))return null;let d={},u=t.products,c=!1;if(Object.keys(u).forEach(e=>{let t=function(e){if(!eN(e)||!ek(e.capabilities))return null;let t=eb.filter(t=>void 0!==e[t]);if(1!==t.length||null===ev(e[t[0]])||!eO(e.notice)||!eO(e.grace)||void 0!==e.flags&&!ek(e.flags))return null;let r={};return Object.keys(e).forEach(t=>eH(r,t,e[t])),eH(r,"capabilities",e.capabilities.slice()),eH(r,"notice",e.notice),eH(r,"grace",e.grace),eH(r,"flags",void 0===e.flags?[]:e.flags.slice()),eH(r,t[0],e[t[0]]),r}(u[e]);if(null===t){c=!0;return}eH(d,e,t)}),c)return null;var g,p,m={version:h,products:d};let f=[m];for(;f.length>0;){let e=f.pop();null===(g=e)||"object"!=typeof g||Object.isFrozen(g)||(Object.freeze(e),Object.keys(e).forEach(t=>f.push(e[t])))}return m}(e);e_=e,eL=t}return eL}(n),i=null===o?null:eP(o,"handsontable");if(null===o||null===i)return{lifecycle:ts("invalid"),channels:ti,grants:eD};let s=t||"07/10/2026";return{lifecycle:function(e,t){let r=-1!==e.flags.indexOf("trial");if(void 0!==e.release_until){let n=e.release_until;return{state:n>=t.buildDate||null===ev(t.buildDate)?"release_valid":"release_expired",isTrial:r,daysRemaining:null,licensedUntil:n}}let n=`${e.usage_until}`,o=ev(n)??eF(t.now),i=function(e,t,r){let n=e+864e5;if(r>=n)return r<n+864e5*t.grace?"soft_stop":"hard_stop";let o=eB(e,r);return t.notice>0&&o<=t.notice?"notice":"valid"}(o,e,t.now);return{state:`${r?"trial":"usage"}_${i}`,isTrial:r,daysRemaining:eB(o,t.now),licensedUntil:n}}(i,{now:Date.now(),buildDate:function(e){let[t,r,n]=`${e}`.split("/");return t&&r&&n?`${n}-${r.padStart(2,"0")}-${t.padStart(2,"0")}`:""}(s)}),channels:{console:-1===i.flags.indexOf("no-console-warns"),ui:-1===i.flags.indexOf("no-ui-warns")},grants:(r={},Object.keys(o.products).forEach(e=>{let t=eP(o,e);null!==t&&eH(r,e,{capabilities:t.capabilities.slice()})}),{unrestricted:!1,products:r})}}function tl(e){let t=[][e$],r=t;if(e[e$]!==eK("Z"))return!1;for(let t="",n="B<H4P+".split(""),o=eK(n.shift()??"A");o;o=eK(n.shift()??"A"))--o<""[e$]?r|=(ej(`${ej(eY(t)+(eY(eq(e,Math.abs(o),2))+String([])).padStart(2,"0"))}`)%97||2)>>1:t=eq(e,o,o?1===n[e$]?9:8:6);return r===t}function th(e){let t=Error(e);throw t.cause={handsontable:!0},t}function td(e){let t;if(Array.isArray(e))t=e.length?Array(e.length).fill(null):[];else{let r=Object.create(null);tS(e,(e,t)=>{"__children"!==t&&(e&&"object"==typeof e&&!Array.isArray(e)?r[t]=td(e):Array.isArray(e)?e.length&&"object"==typeof e[0]&&!Array.isArray(e[0])?r[t]=[td(e[0])]:r[t]=[]:r[t]=null)}),t=r}return t}function tu(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function tc(e,t,r){let n=Array.isArray(r);return tS(t,(t,o)=>{"__proto__"!==o&&"constructor"!==o&&"prototype"!==o&&(!1===n||r.includes(o))&&(e[o]=t)}),e}function tg(e,t){tS(t,(r,n)=>{if("__proto__"===n||"constructor"===n||"prototype"===n)return;let o=t[n];o&&"object"==typeof o?(e[n]||(Array.isArray(o)?e[n]=[]:"[object Date]"===Object.prototype.toString.call(o)?e[n]=o:e[n]={}),tg(e[n],o)):e[n]=o})}function tp(e){if(Array.isArray(e))return e.map(e=>tp(e));if(e instanceof Date)return new Date(e);if("object"==typeof e&&null!==e){let t={};for(let[r,n]of Object.entries(e))"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=tp(n));return t}return e}function tm(e){let t={};return tS(e,(e,r)=>{t[r]=e}),t}function tf(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=[]),J(r,t=>{e.MIXINS.push(t.MIXIN_NAME),tS(t,(t,r)=>{if(void 0!==e.prototype[r]&&th(`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)||ty(e))&&(e=tp(e)),e)),this[n]}),set:(o=`_${r}`,function(e){this[o]=e}),configurable:!0})}})}),e}function tb(e,t){let r=e=>{if(void 0===e)return"undefined";if(Array.isArray(e))return`[${e.map(r).join(",")}]`;if(e instanceof Date)return JSON.stringify(e);if(null!==e&&"object"==typeof e){let t=Object.entries(e).sort((e,t)=>{let[r]=e,[n]=t;return r.localeCompare(n)}).map(e=>{let[t,n]=e;return`${JSON.stringify(t)}:${r(n)}`});return`{${t.join(",")}}`}return JSON.stringify(e)};return r(e)===r(t)}function tC(e){return ty(e)}function ty(e){return"[object Object]"===Object.prototype.toString.call(e)}function tw(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 tS(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 tv(e,t){let r=t.split("."),n=e;for(let e of r)if(void 0===(n=n[e]))return;return n}function tR(e,t,r){if("string"!=typeof t||null===e||"object"!=typeof e)return;let n=t.split("."),o=e;for(let e=0;e<n.length;e+=1){let t=n[e];if("__proto__"===t||"constructor"===t||"prototype"===t)return;if(e!==n.length-1){tA(o,t)||(o[t]={});let e=o[t];if(!ty(e))return;o=e}else Object.defineProperty(o,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}}function tE(e){if(!ty(e))return 0;let t=function(e){let r=0;return ty(e)?tS(e,(e,n)=>{"__children"!==n&&(r+=t(e))}):r+=1,r};return t(e)}function tT(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r=`_${t}`,n={_touched:!1,[r]:e,isTouched(){return!!this._touched},value:void 0};return Object.defineProperty(n,t,{get(){return this[r]},set(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),n}function tA(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function tM(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=>{let o=t[n],i=e[n];ty(o)?r[n]=tM(ty(i)?i:{},o):r[n]=tA(e,n)&&void 0!==i?i:o}),Object.keys(e).forEach(t=>{tA(r,t)||(r[t]=e[t])}),r}function tI(){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];ty(n)&&ty(o)?r[e]=tI(o,n):r[e]=n}),r}function tx(e){return ty(e)&&eU(e.key)&&eU(e.value)}function tN(e){return window.requestAnimationFrame(e)}function tO(e){window.cancelAnimationFrame(e)}function tk(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return"function"==typeof window.requestIdleCallback?window.requestIdleCallback(()=>e(),{timeout:t}):window.requestAnimationFrame(e)}function tH(e){"function"==typeof window.cancelIdleCallback?window.cancelIdleCallback(e):window.cancelAnimationFrame(e)}function t_(){return"ontouchstart"in window}function tL(){return"u">typeof window}function tP(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 tD=e=>{let t={value:!1,test(r,n){t.value=e(r,n)}};return t},tF={chrome:tD((e,t)=>/Chrome/.test(e)&&/Google/.test(t??"")),chromeWebKit:tD(e=>/CriOS/.test(e)),edge:tD(e=>/Edge/.test(e)),edgeWebKit:tD(e=>/EdgiOS/.test(e)),firefox:tD(e=>/Firefox/.test(e)),firefoxWebKit:tD(e=>/FxiOS/.test(e)),mobile:tD(e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)),safari:tD((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t??"")),safariBefore261:tD((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})},tB={mac:tD(e=>/^Mac/.test(e)),win:tD(e=>/^Win/.test(e)),linux:tD(e=>/^Linux/.test(e)),ios:tD(e=>/iPhone|iPad|iPod/i.test(e))};function tV(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tS(tF,r=>{let{test:n}=r;return n(e,t)})}function tU(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tS(tB,t=>{let{test:r}=t;return r(e)})}function tz(){return tF.chrome.value}function tW(){return tF.chromeWebKit.value}function tG(){return tF.firefox.value}function t$(){return tF.firefoxWebKit.value}function tY(){return tF.safari.value}function tj(){return tF.safariBefore261.value}function tq(){return tF.edge.value}function tK(){return tF.edgeWebKit.value}function tX(){return tF.mobile.value}function tQ(){return tB.ios.value}function tZ(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return(e??0)>2&&tB.mac.value}function tJ(){return tB.win.value}function t0(){return tB.mac.value}function t1(){return tB.linux.value}function t2(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]?"":String(t[r]))}function t3(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];eU(console)&&console.log(...t)}function t6(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];eU(console)&&console.warn(...t)}tL()&&(tV(),tU());let t5=new WeakMap;function t4(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];let i=t5.get(e);void 0===i&&(i=new Set,t5.set(e,i)),i.has(t)||(i.add(t),t6(...n))}let t9=new Set;function t7(e,t){t9.has(e)||eU(console)&&(t9.add(e),console.warn(t))}function t8(e,t){t7(e,`Deprecated: ${t}`)}function re(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];eU(console)&&console.error(...t)}function rt(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=na(o)?o:null;break}nd(o)?o=o.host:(r+=1,o=o.parentNode)}return n}function rr(e,t){let r=e.closest(".handsontable");return!!r&&(r.parentNode===t||r===t)}function rn(e){return e.target}function ro(e){let{frameElement:t}=e;return e.parent&&Object.getPrototypeOf(e.parent)&&t instanceof HTMLIFrameElement?t:null}function ri(e){return ro(e)?e.parent:null}function rs(e){return!!Object.getPrototypeOf(e.parent)}function ra(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&&na(i)&&(t.includes(r)||t.includes(i)))return i;i=nd(i)?i.host:i.parentNode}return null}function rl(e,t,r){let n=[],o=na(e)?e:null;for(;o&&(o=ra(o,t,r))&&(!r||r.contains(o));)if(n.push(o),nd(o)){let{host:e}=o;o=na(e)?e:null}else o=o.parentElement;let i=n.length;return i?n[i-1]:null}function rh(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 rd(e,t){let r=e.parentNode,n=[];for("string"==typeof t?n=e instanceof Document?Array.from(e.querySelectorAll(t)):Array.from(e.ownerDocument.querySelectorAll(t)):n.push(t);null!==r;){if(n.indexOf(r)>-1)return!0;r=r.parentNode}return!1}function ru(e){let t=0,r=e;if(r.previousSibling)for(;r=r.previousSibling;)t+=1;return t}function rc(e,t,r){let n=r.parentElement?.querySelector(`.ht_clone_${e}`);return!!n&&n.contains(t)}function rg(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(t?r.indexOf(t):-1)+(Number.parseInt(e.getAttribute("rowspan")??"",10)||1)>=r.length}function rp(e){return e&&e.length?e.filter(e=>!!e):[]}function rm(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 rf(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)}function rb(e,t){"string"==typeof t&&(t=t.split(" ")),(t=rp(t)).length>0&&e.classList.add(...t)}function rC(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:n}=rm(t,!0);(r=rp(r)).length>0&&e.classList.remove(...r),n.forEach(t=>{e.classList.forEach(r=>{t.test(r)&&e.classList.remove(r)})})}function ry(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[0],String(t[1]))})}function rw(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}=rm(t,!0);if(r.forEach(t=>{""!==t&&e.removeAttribute(t)}),n.length>0){let t=e.getAttributeNames();for(let r=0;r<t.length;r++){let o=t[r];for(let t=0;t<n.length;t++)if(n[t].test(o)){e.removeAttribute(o);break}}}}function rS(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--)rS(t[e])}}function rv(e){let t;for(;t=e.lastChild;)e.removeChild(t)}let rR=/(<([^>]*)>|&([^;]*);)/,rE="sanitizer";function rT(e){return`HTML content is being written to the DOM ("${e}") without a sanitizer. Configure the "sanitizer" option to prevent XSS vulnerabilities.`}let rA={};function rM(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"innerHTML",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:rA;if(rR.test(t)){let i;"function"==typeof r?i=r(t,n)??"":(!1!==r&&t4(o,rE,rT(n)),i=t),e.innerHTML=i}else rI(e,t)}function rI(e,t){let r=e.firstChild;r&&3===r.nodeType&&null===r.nextSibling?r.textContent=t:(rv(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function rx(e){if("function"==typeof e.checkVisibility)return e.checkVisibility();let t=e.ownerDocument.documentElement,r=e.ownerDocument.defaultView,n=e;for(;n!==t;){if(null===n)return!1;if(nd(n)){let e=n.host;if(e.impl)return rx(e.impl);return rx(e)}if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;else if(n.nodeType===Node.ELEMENT_NODE&&na(n)&&r?.getComputedStyle(n).display==="none")return!1;n=n.parentNode}return!0}function rN(e){let t=e.ownerDocument.defaultView,r=e;for(;r.parentElement;){if("0px"===r.style.height||"0"===r.style.height){let e=t?.getComputedStyle(r).getPropertyValue("overflow");return"hidden"===e||"clip"===e}r=r.parentElement}return!1}function rO(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=na(a.offsetParent)?a.offsetParent:null)&&a!==o.body&&"offsetLeft"in a;)t+=a.offsetLeft,r+=a.offsetTop,n=a;return n&&"fixed"===n.style.position&&(t+=(i?.pageXOffset??0)||s.scrollLeft,r+=(i?.pageYOffset??0)||s.scrollTop),{left:t,top:r}}function rk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollY}function rH(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollX}function r_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e instanceof Window?rk(t):e.scrollTop}function rL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e instanceof Window?rH(t):e.scrollLeft}function rP(e){let t=e.ownerDocument,r=t.defaultView,n=["auto","scroll"],o=e.parentElement;for(;o&&o.style&&t.body!==o;){let{overflow:e,overflowX:t,overflowY:i}=o.style;if([e,t,i].includes("scroll")||(r&&({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.parentElement}return r??t.documentElement}function rD(e){return e.scrollHeight-e.clientHeight}function rF(e){return e.scrollWidth-e.clientWidth}let rB=["scroll","hidden","auto","clip"],rV=["visible","clip","hidden","scroll","auto","overlay"];function rU(e,t){return rB.includes(e)&&("clip"!==e||"visible"!==t&&""!==t)}function rz(e){let t=e.ownerDocument,r=t.defaultView,n=e.parentElement;for(;n&&n.style&&t.body!==n;){if(r){let{x:e,y:t}=function(e,t){let[r="",n=r]=e.style.overflow.split(/\s+/).filter(Boolean),o=(e,r,n)=>{let o=e||r;return rV.includes(o)?o:t.getPropertyValue(n)};return{x:o(e.style.overflowX,r,"overflow-x"),y:o(e.style.overflowY,n,"overflow-y")}}(n,r.getComputedStyle(n));if(rU(e,t)||rU(t,e))return n}else if("visible"!==n.style.overflow&&""!==n.style.overflow)return n;n=n.parentElement}return r??t.documentElement}function rW(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e instanceof Window)return"width"===t?`${e.innerWidth}px`:"height"===t?`${e.innerHeight}px`:void 0;let n=e.style.getPropertyValue(t)||e.style[t];if(""!==n&&void 0!==n)return n;let o=r.getComputedStyle(e),i=o.getPropertyValue(t)||o[t];if(""!==i&&void 0!==i)return i}function rG(e,t){let r=!1;return t instanceof CSSStyleRule&&t.selectorText&&("msMatchesSelector"in e&&"function"==typeof e.msMatchesSelector?r=e.msMatchesSelector(t.selectorText):e.matches&&(r=e.matches(t.selectorText))),r}function r$(e){return e.offsetWidth}function rY(e){return e.offsetHeight}function rj(e){return e instanceof Window?e.innerHeight:e.clientHeight}function rq(e){return e instanceof Window?e.innerWidth:e.clientWidth}function rK(e,t,r){e.addEventListener(t,r,!1)}function rX(e,t,r){e.removeEventListener(t,r,!1)}function rQ(e){return e.selectionStart?e.selectionStart:0}function rZ(e){return e.selectionEnd?e.selectionEnd:0}function rJ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.document,r="";return e.getSelection?r=e.getSelection()?.toString()??"":"selection"in t&&t.selection&&"Control"!==t.selection.type&&(r=t.selection.createRange().text),r}function r0(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;if(e.getSelection){let t=e.getSelection();t?.empty?t.empty():t?.removeAllRanges&&t.removeAllRanges()}}function r1(e,t,r){if(void 0===r&&(r=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,r)}catch(o){let n=e.parentElement;if(n){let o=n.style.display;n.style.display="block",e.setSelectionRange(t,r),n.style.display=o}}}}function r2(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return tJ()?2*!Number.isInteger(e.defaultView?.devicePixelRatio||1):0}function r3(){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&&tj()&&!tX()&&!tZ()?t(!0):r}(e)),t}function r6(e){return e instanceof Window?e.document.body.scrollHeight>e.innerHeight:e.offsetWidth!==e.clientWidth}function r5(e){return e instanceof Window?e.document.body.scrollWidth>e.innerWidth:e.offsetHeight!==e.clientHeight}function r4(e,t,r){e.style.transform=`translate3d(${t},${r},0)`}function r9(e){let t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:-1}function r7(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")}function r8(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function ne(e){return r8(e)&&"hotInput"in e.dataset==!1}function nt(e){let t=nc(e.ownerDocument);na(t)&&!ne(t)&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&e.select()}function nr(e){return!e.parentNode}function nn(e,t){let r=new IntersectionObserver((e,r)=>{e.forEach(e=>{e.isIntersecting&&(t(),r.disconnect())})});return r.observe(e),r}function no(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();if(ry(e,"contenteditable",!0),r){let t=_();ry(e,t[0],t[1])}t&&rb(e,"invisibleSelection"),o.selectNodeContents(e),i?.removeAllRanges(),i?.addRange(o)}function ni(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&&rC(e,"invisibleSelection"),e.removeAttribute("contenteditable")}function ns(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];no(e,r),t(),ni(e,r)}function na(e){if("object"!=typeof e||null===e)return!1;let t=e.ownerDocument?.defaultView?.Element;return!!(t&&e instanceof t)}function nl(e){return na(e)&&("TD"===e.tagName||"TH"===e.tagName)}function nh(e){return"INPUT"===e.tagName}function nd(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function nu(e){let t=[],r=e.getRootNode();for(;nd(r);){let{host:e}=r;if(!na(e))break;t.push(e),r=e.getRootNode()}return t}function nc(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function ng(e,t){return e.childNodes[t]||null}function np(e){return"function"==typeof e}function nm(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=null},d)),n}}function nf(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=nm(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 nb(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 nC(){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 X(o,(e,t)=>t(e),n.apply(this,t))}}function ny(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 nw(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 nS(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 nv(e,t,r,n,o,i,s,a){if(eU(a))return e.call(t,r,n,o,i,s,a);if(eU(s))return e.call(t,r,n,o,i,s);if(eU(i))return e.call(t,r,n,o,i);if(eU(o))return e.call(t,r,n,o);if(eU(n))return e.call(t,r,n);else if(eU(r))return e.call(t,r);return e.call(t)}let nR={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:tG()?182:174,AUDIO_MUTE:tG()?181:173,AUDIO_UP:tG()?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},nE=[nR.ALT,nR.ARROW_DOWN,nR.ARROW_LEFT,nR.ARROW_RIGHT,nR.ARROW_UP,nR.AUDIO_DOWN,nR.AUDIO_MUTE,nR.AUDIO_UP,nR.BACKSPACE,nR.CAPS_LOCK,nR.DELETE,nR.END,nR.ENTER,nR.ESCAPE,nR.F1,nR.F2,nR.F3,nR.F4,nR.F5,nR.F6,nR.F7,nR.F8,nR.F9,nR.F10,nR.F11,nR.F12,nR.F13,nR.F14,nR.F15,nR.F16,nR.F17,nR.F18,nR.F19,nR.HOME,nR.INSERT,nR.MEDIA_NEXT,nR.MEDIA_PLAY_PAUSE,nR.MEDIA_PREV,nR.MEDIA_STOP,nR.NULL,nR.NUM_LOCK,nR.PAGE_DOWN,nR.PAGE_UP,nR.PAUSE,nR.SCROLL_LOCK,nR.SHIFT,nR.TAB];function nT(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 nA(e){return nE.includes(e)}function nM(e){let t=[];return t0()?t.push(nR.COMMAND_LEFT,nR.COMMAND_RIGHT,nR.COMMAND_FIREFOX):t.push(nR.CONTROL),t.includes(e)}function nI(e){return[nR.CONTROL,nR.COMMAND_LEFT,nR.COMMAND_RIGHT,nR.COMMAND_FIREFOX].includes(e)}function nx(e,t){let r=t.split("|"),n=!1;return J(r,t=>{if(e===nR[t])return n=!0,!1}),n}function nN(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function nO(e){return!1===e.isImmediatePropagationEnabled}function nk(e){return 2===e.button}function nH(e){return 0===e.button}function n_(e){return 1===e.button}function nL(e){return"u">typeof TouchEvent&&e instanceof TouchEvent}function nP(e){return"touches"in e&&"changedTouches"in e}function nD(e){if(!nP(e)||0===e.changedTouches.length)return null;let{identifier:t,clientX:r,clientY:n}=e.changedTouches[0];return{identifier:t,clientX:r,clientY:n}}function nF(e,t){if(!nP(e))return null;for(let r=0;r<e.touches.length;r++){let n=e.touches[r];if(n.identifier===t)return{identifier:n.identifier,clientX:n.clientX,clientY:n.clientY}}return null}function nB(e,t){let r={x:e.offsetX,y:e.offsetY},n=rn(e);if(!na(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 nV=["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","afterOnSelectionHandleMouseDown","afterOnSelectionEdgeMouseDown","beforeMoveCells","afterMoveCells","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterOnCellMouseOverOutside","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","beforeOnCellMouseOverOutside","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","afterCustomBordersUpdate","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowCollapse","afterRowCollapse","beforeRowExpand","afterRowExpand","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","modifySinglePassLayout","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"],nU=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"],["persistentStateSave","17.0.0"],["persistentStateLoad","17.0.0"],["persistentStateReset","17.0.0"]]),nz=new Map([]);class nW{#e=new Map;constructor(){nV.forEach(e=>this.#t(e))}getList(e){return this.#e.get(e)??null}getHooks(e){let t=this.#e.get(e),r=[];if(t){let e=t.head;for(;e;)r.push(e),e=e.next}return r}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.#e.get(e);n||(n=this.#t(e),nV.push(e));for(let e=n.head;null!==e;e=e.next)if(e.callback===t)return;let o=Number.isInteger(r.orderIndex)?r.orderIndex??0:0,i=!!r.runOnce,s=!!r.initialHook;if(s){for(let e=n.head;null!==e;e=e.next)if(e.initialHook){e.callback=t;return}}this.#r(n,{callback:t,orderIndex:o,runOnce:i,initialHook:s,next:null})}has(e){let t=this.#e.get(e);return!!t&&null!==t.head}remove(e,t){let r=this.#e.get(e);if(!r)return!1;let n=null,o=r.head;for(;null!==o;){if(o.callback===t)return n?n.next=o.next:r.head=o.next,o===r.tail&&(r.tail=n),!0;n=o,o=o.next}return!1}destroy(){this.#e.clear()}#r(e,t){if(null===e.head){e.head=t,e.tail=t;return}if(t.orderIndex>=e.tail.orderIndex){e.tail.next=t,e.tail=t;return}let r=null,n=e.head;for(;null!==n&&n.orderIndex<=t.orderIndex;)r=n,n=n.next;null===r?(t.next=e.head,e.head=t):(t.next=n,r.next=t)}#t(e){let t={head:null,tail:null};return this.#e.set(e,t),t}}let nG=ec`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
72
+ at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.`}},te=Object.freeze(["trial_hard_stop","invalid","missing"]);function tt(e){return -1!==te.indexOf(e)}function tr(e){return"string"==typeof e?e.trim():e}function tn(e){let t,{className:r,key:n,element:o,releaseDate:i}=e;if(ef(n=tr(n)))return function(e){let{className:t,key:r,element:n,releaseDate:o}=e;if(eZ())return null;let{lifecycle:i,channels:s}=ta(r,o),{state:a}=i,l={daysRemaining:i.daysRemaining,licensedUntil:i.licensedUntil??void 0,hotVersion:"18.1.2"};if(s.console&&!e0.has(r??"")){let e="invalid"===a?{severity:"warn",message:()=>e1.invalid({})}:e7[a];e&&(console[e.severity](e.message(l)),e0.add(r??""))}if(!s.ui||!n||tt(a))return null;let h=e8[a];if(!h)return null;let d=n.ownerDocument,u=d.createElement("div"),c=d.createElement("div");return u.className=`handsontable ${t}`,c.className=`${t}_inner`,c.innerHTML=h(l),u.appendChild(c),n.appendChild(u),u}({className:r,key:n,element:o,releaseDate:i});let s=!eW(n),a="string"==typeof n&&("non-commercial-and-evaluation"===n.toLowerCase()||"ht68e-1f2b7-47158-70b05-0842f"===n.toLowerCase()),l="18.1.2",h="invalid",d="invalid",u=tl(n=eX(n||""));if(a)h="non_commercial",d="valid";else if(s||u)if(u){let[e,r,o]=(i??"07/10/2026"??"").split("/").map(Number),s=Math.floor(Date.UTC(o,r-1,e)/864e5),a=eQ(n);t=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",timeZone:"UTC"}).format((a+1)*864e5),s>a?(h="expired",d="expired"):(h="valid",d="valid")}else h="invalid",d="invalid";else h="missing",d="missing";if(eZ()&&(h="valid",d="valid"),eJ||"valid"===h||(e1[h]({keyValidityDate:t,hotVersion:l})&&console["non_commercial"===h?"info":"warn"](e1[h]({keyValidityDate:t,hotVersion:l})),eJ=!0),"valid"!==d&&!tt(d)&&o&&e2[d]({keyValidityDate:t,hotVersion:l})){let e=document.createElement("div"),n=document.createElement("div");return e.className=`handsontable ${r}`,n.className=`${r}_inner`,n.innerHTML=e2[d]({keyValidityDate:t,hotVersion:l}),e.appendChild(n),o.appendChild(e),e}return null}function to(e){return new Date(e).toISOString().slice(0,10)}let ti=Object.freeze({console:!0,ui:!0});function ts(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{state:e,isTrial:!1,daysRemaining:null,licensedUntil:t}}function ta(e,t){let r,n=tr(e);if(eZ())return{lifecycle:ts("legacy_valid"),channels:ti,grants:eD};if(!ef(n))return{lifecycle:function(e,t){if("string"==typeof e&&("non-commercial-and-evaluation"===e.toLowerCase()||"ht68e-1f2b7-47158-70b05-0842f"===e.toLowerCase()))return ts("non_commercial");if(eW(e))return ts("missing");let r=eX(e||"");if(!tl(r))return ts("invalid");let[n,o,i]=(t??"07/10/2026"??"").split("/").map(Number),s=Math.floor(Date.UTC(i,o-1,n)/864e5),a=eQ(r);return s>a?ts("legacy_expired",to((a+1)*864e5)):ts("legacy_valid")}(n,t),channels:ti,grants:eD};let o=function(e){if("string"!=typeof e)return null;if(e!==e_){let t=function(e){let t,r,n=e.lastIndexOf("[");if(-1===n)return null;let o=e.indexOf("]",n);if(-1===o)return null;let i=eM(e.slice(n+1,o));if(i.length<=128)return null;let s=i.slice(0,-128),a=i.slice(-128);if(!eR.test(s)||!eE.test(a)||ew(eS(s))!==a)return null;let l=null===(r=function(e){let t=`${e}`.replace(/-/g,"+").replace(/_/g,"/").replace(/=+$/,"");if(!/^[A-Za-z0-9+/]*$/.test(t)||t.length%4==1)return null;let r=[];for(let e=0;e<t.length;e+=4){let n=[0,1,2,3].map(r=>{let n=t.charAt(e+r);return""===n?-1:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(n)});r.push(n[0]<<2|n[1]>>4),-1!==n[2]&&r.push((15&n[1])<<4|n[2]>>2),-1!==n[3]&&r.push((3&n[2])<<6|n[3])}return r}(s))?null:function(e){let t="",r=0;for(;r<e.length;){let n,o=e[r];o<128?(n=o,r+=1):o<224?(n=(31&o)<<6|63&e[r+1],r+=2):o<240?(n=(15&o)<<12|(63&e[r+1])<<6|63&e[r+2],r+=3):(n=(7&o)<<18|(63&e[r+1])<<12|(63&e[r+2])<<6|63&e[r+3],r+=4),n>=65536?(n-=65536,t+=String.fromCharCode(55296+(n>>10),56320+(1023&n))):t+=String.fromCharCode(n)}return t}(r);if(null===l)return null;try{t=JSON.parse(l)}catch(e){return null}if(!eN(t)||!eN(t.products))return null;let h=ex(p=t,"v")?!eO(p.v)||p.v<2?null:p.v:1;if(null===h||h>=2&&!function(e,t,r){if(""!==eI(r))return!1;let n=eI(t);return""!==n&&ex(e,"prose")&&"string"==typeof e.prose&&ew(eS(n)).slice(0,64)===e.prose}(t,e.slice(0,n),e.slice(o+1)))return null;let d={},u=t.products,c=!1;if(Object.keys(u).forEach(e=>{let t=function(e){if(!eN(e)||!ek(e.capabilities))return null;let t=eb.filter(t=>void 0!==e[t]);if(1!==t.length||null===ev(e[t[0]])||!eO(e.notice)||!eO(e.grace)||void 0!==e.flags&&!ek(e.flags))return null;let r={};return Object.keys(e).forEach(t=>eH(r,t,e[t])),eH(r,"capabilities",e.capabilities.slice()),eH(r,"notice",e.notice),eH(r,"grace",e.grace),eH(r,"flags",void 0===e.flags?[]:e.flags.slice()),eH(r,t[0],e[t[0]]),r}(u[e]);if(null===t){c=!0;return}eH(d,e,t)}),c)return null;var g,p,m={version:h,products:d};let f=[m];for(;f.length>0;){let e=f.pop();null===(g=e)||"object"!=typeof g||Object.isFrozen(g)||(Object.freeze(e),Object.keys(e).forEach(t=>f.push(e[t])))}return m}(e);e_=e,eL=t}return eL}(n),i=null===o?null:eP(o,"handsontable");if(null===o||null===i)return{lifecycle:ts("invalid"),channels:ti,grants:eD};let s=t||"07/10/2026";return{lifecycle:function(e,t){let r=-1!==e.flags.indexOf("trial");if(void 0!==e.release_until){let n=e.release_until;return{state:n>=t.buildDate||null===ev(t.buildDate)?"release_valid":"release_expired",isTrial:r,daysRemaining:null,licensedUntil:n}}let n=`${e.usage_until}`,o=ev(n)??eF(t.now),i=function(e,t,r){let n=e+864e5;if(r>=n)return r<n+864e5*t.grace?"soft_stop":"hard_stop";let o=eB(e,r);return t.notice>0&&o<=t.notice?"notice":"valid"}(o,e,t.now);return{state:`${r?"trial":"usage"}_${i}`,isTrial:r,daysRemaining:eB(o,t.now),licensedUntil:n}}(i,{now:Date.now(),buildDate:function(e){let[t,r,n]=`${e}`.split("/");return t&&r&&n?`${n}-${r.padStart(2,"0")}-${t.padStart(2,"0")}`:""}(s)}),channels:{console:-1===i.flags.indexOf("no-console-warns"),ui:-1===i.flags.indexOf("no-ui-warns")},grants:(r={},Object.keys(o.products).forEach(e=>{let t=eP(o,e);null!==t&&eH(r,e,{capabilities:t.capabilities.slice()})}),{unrestricted:!1,products:r})}}function tl(e){let t=[][e$],r=t;if(e[e$]!==eK("Z"))return!1;for(let t="",n="B<H4P+".split(""),o=eK(n.shift()??"A");o;o=eK(n.shift()??"A"))--o<""[e$]?r|=(ej(`${ej(eY(t)+(eY(eq(e,Math.abs(o),2))+String([])).padStart(2,"0"))}`)%97||2)>>1:t=eq(e,o,o?1===n[e$]?9:8:6);return r===t}function th(e){let t=Error(e);throw t.cause={handsontable:!0},t}function td(e){let t;if(Array.isArray(e))t=e.length?Array(e.length).fill(null):[];else{let r=Object.create(null);tS(e,(e,t)=>{"__children"!==t&&(e&&"object"==typeof e&&!Array.isArray(e)?r[t]=td(e):Array.isArray(e)?e.length&&"object"==typeof e[0]&&!Array.isArray(e[0])?r[t]=[td(e[0])]:r[t]=[]:r[t]=null)}),t=r}return t}function tu(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function tc(e,t,r){let n=Array.isArray(r);return tS(t,(t,o)=>{"__proto__"!==o&&"constructor"!==o&&"prototype"!==o&&(!1===n||r.includes(o))&&(e[o]=t)}),e}function tg(e,t){tS(t,(r,n)=>{if("__proto__"===n||"constructor"===n||"prototype"===n)return;let o=t[n];o&&"object"==typeof o?(e[n]||(Array.isArray(o)?e[n]=[]:"[object Date]"===Object.prototype.toString.call(o)?e[n]=o:e[n]={}),tg(e[n],o)):e[n]=o})}function tp(e){if(Array.isArray(e))return e.map(e=>tp(e));if(e instanceof Date)return new Date(e);if("object"==typeof e&&null!==e){let t={};for(let[r,n]of Object.entries(e))"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=tp(n));return t}return e}function tm(e){let t={};return tS(e,(e,r)=>{t[r]=e}),t}function tf(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=[]),J(r,t=>{e.MIXINS.push(t.MIXIN_NAME),tS(t,(t,r)=>{if(void 0!==e.prototype[r]&&th(`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)||ty(e))&&(e=tp(e)),e)),this[n]}),set:(o=`_${r}`,function(e){this[o]=e}),configurable:!0})}})}),e}function tb(e,t){let r=e=>{if(void 0===e)return"undefined";if(Array.isArray(e))return`[${e.map(r).join(",")}]`;if(e instanceof Date)return JSON.stringify(e);if(null!==e&&"object"==typeof e){let t=Object.entries(e).sort((e,t)=>{let[r]=e,[n]=t;return r.localeCompare(n)}).map(e=>{let[t,n]=e;return`${JSON.stringify(t)}:${r(n)}`});return`{${t.join(",")}}`}return JSON.stringify(e)};return r(e)===r(t)}function tC(e){return ty(e)}function ty(e){return"[object Object]"===Object.prototype.toString.call(e)}function tw(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 tS(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 tv(e,t){let r=t.split("."),n=e;for(let e of r)if(void 0===(n=n[e]))return;return n}function tR(e,t,r){if("string"!=typeof t||null===e||"object"!=typeof e)return;let n=t.split("."),o=e;for(let e=0;e<n.length;e+=1){let t=n[e];if("__proto__"===t||"constructor"===t||"prototype"===t)return;if(e!==n.length-1){tA(o,t)||(o[t]={});let e=o[t];if(!ty(e))return;o=e}else Object.defineProperty(o,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}}function tE(e){if(!ty(e))return 0;let t=function(e){let r=0;return ty(e)?tS(e,(e,n)=>{"__children"!==n&&(r+=t(e))}):r+=1,r};return t(e)}function tT(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r=`_${t}`,n={_touched:!1,[r]:e,isTouched(){return!!this._touched},value:void 0};return Object.defineProperty(n,t,{get(){return this[r]},set(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),n}function tA(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function tM(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=>{let o=t[n],i=e[n];ty(o)?r[n]=tM(ty(i)?i:{},o):r[n]=tA(e,n)&&void 0!==i?i:o}),Object.keys(e).forEach(t=>{tA(r,t)||(r[t]=e[t])}),r}function tI(){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];ty(n)&&ty(o)?r[e]=tI(o,n):r[e]=n}),r}function tx(e){return ty(e)&&eU(e.key)&&eU(e.value)}function tN(e){return window.requestAnimationFrame(e)}function tO(e){window.cancelAnimationFrame(e)}function tk(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return"function"==typeof window.requestIdleCallback?window.requestIdleCallback(()=>e(),{timeout:t}):window.requestAnimationFrame(e)}function tH(e){"function"==typeof window.cancelIdleCallback?window.cancelIdleCallback(e):window.cancelAnimationFrame(e)}function t_(){return"ontouchstart"in window}function tL(){return"u">typeof window}function tP(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 tD=e=>{let t={value:!1,test(r,n){t.value=e(r,n)}};return t},tF={chrome:tD((e,t)=>/Chrome/.test(e)&&/Google/.test(t??"")),chromeWebKit:tD(e=>/CriOS/.test(e)),edge:tD(e=>/Edge/.test(e)),edgeWebKit:tD(e=>/EdgiOS/.test(e)),firefox:tD(e=>/Firefox/.test(e)),firefoxWebKit:tD(e=>/FxiOS/.test(e)),mobile:tD(e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)),safari:tD((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t??"")),safariBefore261:tD((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})},tB={mac:tD(e=>/^Mac/.test(e)),win:tD(e=>/^Win/.test(e)),linux:tD(e=>/^Linux/.test(e)),ios:tD(e=>/iPhone|iPad|iPod/i.test(e))};function tV(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tS(tF,r=>{let{test:n}=r;return n(e,t)})}function tU(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tS(tB,t=>{let{test:r}=t;return r(e)})}function tz(){return tF.chrome.value}function tW(){return tF.chromeWebKit.value}function tG(){return tF.firefox.value}function t$(){return tF.firefoxWebKit.value}function tY(){return tF.safari.value}function tj(){return tF.safariBefore261.value}function tq(){return tF.edge.value}function tK(){return tF.edgeWebKit.value}function tX(){return tF.mobile.value}function tQ(){return tB.ios.value}function tZ(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return(e??0)>2&&tB.mac.value}function tJ(){return tB.win.value}function t0(){return tB.mac.value}function t1(){return tB.linux.value}function t2(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]?"":String(t[r]))}function t3(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];eU(console)&&console.log(...t)}function t6(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];eU(console)&&console.warn(...t)}tL()&&(tV(),tU());let t5=new WeakMap;function t4(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];let i=t5.get(e);void 0===i&&(i=new Set,t5.set(e,i)),i.has(t)||(i.add(t),t6(...n))}let t9=new Set;function t7(e,t){t9.has(e)||eU(console)&&(t9.add(e),console.warn(t))}function t8(e,t){t7(e,`Deprecated: ${t}`)}function re(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];eU(console)&&console.error(...t)}function rt(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=na(o)?o:null;break}nd(o)?o=o.host:(r+=1,o=o.parentNode)}return n}function rr(e,t){let r=e.closest(".handsontable");return!!r&&(r.parentNode===t||r===t)}function rn(e){return e.target}function ro(e){let{frameElement:t}=e;return e.parent&&Object.getPrototypeOf(e.parent)&&t instanceof HTMLIFrameElement?t:null}function ri(e){return ro(e)?e.parent:null}function rs(e){return!!Object.getPrototypeOf(e.parent)}function ra(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&&na(i)&&(t.includes(r)||t.includes(i)))return i;i=nd(i)?i.host:i.parentNode}return null}function rl(e,t,r){let n=[],o=na(e)?e:null;for(;o&&(o=ra(o,t,r))&&(!r||r.contains(o));)if(n.push(o),nd(o)){let{host:e}=o;o=na(e)?e:null}else o=o.parentElement;let i=n.length;return i?n[i-1]:null}function rh(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 rd(e,t){let r=e.parentNode,n=[];for("string"==typeof t?n=e instanceof Document?Array.from(e.querySelectorAll(t)):Array.from(e.ownerDocument.querySelectorAll(t)):n.push(t);null!==r;){if(n.indexOf(r)>-1)return!0;r=r.parentNode}return!1}function ru(e){let t=0,r=e;if(r.previousSibling)for(;r=r.previousSibling;)t+=1;return t}function rc(e,t,r){let n=r.parentElement?.querySelector(`.ht_clone_${e}`);return!!n&&n.contains(t)}function rg(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(t?r.indexOf(t):-1)+(Number.parseInt(e.getAttribute("rowspan")??"",10)||1)>=r.length}function rp(e){return e&&e.length?e.filter(e=>!!e):[]}function rm(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 rf(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)}function rb(e,t){"string"==typeof t&&(t=t.split(" ")),(t=rp(t)).length>0&&e.classList.add(...t)}function rC(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:n}=rm(t,!0);(r=rp(r)).length>0&&e.classList.remove(...r),n.forEach(t=>{e.classList.forEach(r=>{t.test(r)&&e.classList.remove(r)})})}function ry(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[0],String(t[1]))})}function rw(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}=rm(t,!0);if(r.forEach(t=>{""!==t&&e.removeAttribute(t)}),n.length>0){let t=e.getAttributeNames();for(let r=0;r<t.length;r++){let o=t[r];for(let t=0;t<n.length;t++)if(n[t].test(o)){e.removeAttribute(o);break}}}}function rS(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--)rS(t[e])}}function rv(e){let t;for(;t=e.lastChild;)e.removeChild(t)}let rR=/(<([^>]*)>|&([^;]*);)/,rE="sanitizer";function rT(e){return`HTML content is being written to the DOM ("${e}") without a sanitizer. Configure the "sanitizer" option to prevent XSS vulnerabilities.`}let rA={};function rM(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"innerHTML",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:rA;if(rR.test(t)){let i;"function"==typeof r?i=r(t,n)??"":(!1!==r&&t4(o,rE,rT(n)),i=t),e.innerHTML=i}else rI(e,t)}function rI(e,t){let r=e.firstChild;r&&3===r.nodeType&&null===r.nextSibling?r.textContent=t:(rv(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function rx(e){if("function"==typeof e.checkVisibility)return e.checkVisibility();let t=e.ownerDocument.documentElement,r=e.ownerDocument.defaultView,n=e;for(;n!==t;){if(null===n)return!1;if(nd(n)){let e=n.host;if(e.impl)return rx(e.impl);return rx(e)}if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;else if(n.nodeType===Node.ELEMENT_NODE&&na(n)&&r?.getComputedStyle(n).display==="none")return!1;n=n.parentNode}return!0}function rN(e){let t=e.ownerDocument.defaultView,r=e;for(;r.parentElement;){if("0px"===r.style.height||"0"===r.style.height){let e=t?.getComputedStyle(r).getPropertyValue("overflow");return"hidden"===e||"clip"===e}r=r.parentElement}return!1}function rO(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=na(a.offsetParent)?a.offsetParent:null)&&a!==o.body&&"offsetLeft"in a;)t+=a.offsetLeft,r+=a.offsetTop,n=a;return n&&"fixed"===n.style.position&&(t+=(i?.pageXOffset??0)||s.scrollLeft,r+=(i?.pageYOffset??0)||s.scrollTop),{left:t,top:r}}function rk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollY}function rH(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollX}function r_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e instanceof Window?rk(t):e.scrollTop}function rL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e instanceof Window?rH(t):e.scrollLeft}function rP(e){let t=e.ownerDocument,r=t.defaultView,n=["auto","scroll"],o=e.parentElement;for(;o&&o.style&&t.body!==o;){let{overflow:e,overflowX:t,overflowY:i}=o.style;if([e,t,i].includes("scroll")||(r&&({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.parentElement}return r??t.documentElement}function rD(e){return e.scrollHeight-e.clientHeight}function rF(e){return e.scrollWidth-e.clientWidth}let rB=["scroll","hidden","auto","clip"],rV=["visible","clip","hidden","scroll","auto","overlay"];function rU(e,t){return rB.includes(e)&&("clip"!==e||"visible"!==t&&""!==t)}function rz(e){let t=e.ownerDocument,r=t.defaultView,n=e.parentElement;for(;n&&n.style&&t.body!==n;){if(r){let{x:e,y:t}=function(e,t){let[r="",n=r]=e.style.overflow.split(/\s+/).filter(Boolean),o=(e,r,n)=>{let o=e||r;return rV.includes(o)?o:t.getPropertyValue(n)};return{x:o(e.style.overflowX,r,"overflow-x"),y:o(e.style.overflowY,n,"overflow-y")}}(n,r.getComputedStyle(n));if(rU(e,t)||rU(t,e))return n}else if("visible"!==n.style.overflow&&""!==n.style.overflow)return n;n=n.parentElement}return r??t.documentElement}function rW(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e instanceof Window)return"width"===t?`${e.innerWidth}px`:"height"===t?`${e.innerHeight}px`:void 0;let n=e.style.getPropertyValue(t)||e.style[t];if(""!==n&&void 0!==n)return n;let o=r.getComputedStyle(e),i=o.getPropertyValue(t)||o[t];if(""!==i&&void 0!==i)return i}function rG(e,t){let r=!1;return t instanceof CSSStyleRule&&t.selectorText&&("msMatchesSelector"in e&&"function"==typeof e.msMatchesSelector?r=e.msMatchesSelector(t.selectorText):e.matches&&(r=e.matches(t.selectorText))),r}function r$(e){return e.offsetWidth}function rY(e){return e.offsetHeight}function rj(e){return e instanceof Window?e.innerHeight:e.clientHeight}function rq(e){return e instanceof Window?e.innerWidth:e.clientWidth}function rK(e,t,r){e.addEventListener(t,r,!1)}function rX(e,t,r){e.removeEventListener(t,r,!1)}function rQ(e){return e.selectionStart?e.selectionStart:0}function rZ(e){return e.selectionEnd?e.selectionEnd:0}function rJ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.document,r="";return e.getSelection?r=e.getSelection()?.toString()??"":"selection"in t&&t.selection&&"Control"!==t.selection.type&&(r=t.selection.createRange().text),r}function r0(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;if(e.getSelection){let t=e.getSelection();t?.empty?t.empty():t?.removeAllRanges&&t.removeAllRanges()}}function r1(e,t,r){if(void 0===r&&(r=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,r)}catch(o){let n=e.parentElement;if(n){let o=n.style.display;n.style.display="block",e.setSelectionRange(t,r),n.style.display=o}}}}function r2(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return tJ()?2*!Number.isInteger(e.defaultView?.devicePixelRatio||1):0}function r3(){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&&tj()&&!tX()&&!tZ()?t(!0):r}(e)),t}function r6(e){return e instanceof Window?e.document.body.scrollHeight>e.innerHeight:e.offsetWidth!==e.clientWidth}function r5(e){return e instanceof Window?e.document.body.scrollWidth>e.innerWidth:e.offsetHeight!==e.clientHeight}function r4(e,t,r){e.style.transform=`translate3d(${t},${r},0)`}function r9(e){let t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:-1}function r7(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")}function r8(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function ne(e){return r8(e)&&"hotInput"in e.dataset==!1}function nt(e){let t=nc(e.ownerDocument);na(t)&&!ne(t)&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&e.select()}function nr(e){return!e.parentNode}function nn(e,t){let r=new IntersectionObserver((e,r)=>{e.forEach(e=>{e.isIntersecting&&(t(),r.disconnect())})});return r.observe(e),r}function no(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();if(ry(e,"contenteditable",!0),r){let t=_();ry(e,t[0],t[1])}t&&rb(e,"invisibleSelection"),o.selectNodeContents(e),i?.removeAllRanges(),i?.addRange(o)}function ni(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&&rC(e,"invisibleSelection"),e.removeAttribute("contenteditable")}function ns(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];no(e,r),t(),ni(e,r)}function na(e){if("object"!=typeof e||null===e)return!1;let t=e.ownerDocument?.defaultView?.Element;return!!(t&&e instanceof t)}function nl(e){return na(e)&&("TD"===e.tagName||"TH"===e.tagName)}function nh(e){return"INPUT"===e.tagName}function nd(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function nu(e){let t=[],r=e.getRootNode();for(;nd(r);){let{host:e}=r;if(!na(e))break;t.push(e),r=e.getRootNode()}return t}function nc(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function ng(e,t){return e.childNodes[t]||null}function np(e){return"function"==typeof e}function nm(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=null},d)),n}}function nf(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=nm(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 nb(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 nC(){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 X(o,(e,t)=>t(e),n.apply(this,t))}}function ny(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 nw(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 nS(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 nv(e,t,r,n,o,i,s,a){if(eU(a))return e.call(t,r,n,o,i,s,a);if(eU(s))return e.call(t,r,n,o,i,s);if(eU(i))return e.call(t,r,n,o,i);if(eU(o))return e.call(t,r,n,o);if(eU(n))return e.call(t,r,n);else if(eU(r))return e.call(t,r);return e.call(t)}let nR={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:tG()?182:174,AUDIO_MUTE:tG()?181:173,AUDIO_UP:tG()?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},nE=[nR.ALT,nR.ARROW_DOWN,nR.ARROW_LEFT,nR.ARROW_RIGHT,nR.ARROW_UP,nR.AUDIO_DOWN,nR.AUDIO_MUTE,nR.AUDIO_UP,nR.BACKSPACE,nR.CAPS_LOCK,nR.DELETE,nR.END,nR.ENTER,nR.ESCAPE,nR.F1,nR.F2,nR.F3,nR.F4,nR.F5,nR.F6,nR.F7,nR.F8,nR.F9,nR.F10,nR.F11,nR.F12,nR.F13,nR.F14,nR.F15,nR.F16,nR.F17,nR.F18,nR.F19,nR.HOME,nR.INSERT,nR.MEDIA_NEXT,nR.MEDIA_PLAY_PAUSE,nR.MEDIA_PREV,nR.MEDIA_STOP,nR.NULL,nR.NUM_LOCK,nR.PAGE_DOWN,nR.PAGE_UP,nR.PAUSE,nR.SCROLL_LOCK,nR.SHIFT,nR.TAB];function nT(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 nA(e){return nE.includes(e)}function nM(e){let t=[];return t0()?t.push(nR.COMMAND_LEFT,nR.COMMAND_RIGHT,nR.COMMAND_FIREFOX):t.push(nR.CONTROL),t.includes(e)}function nI(e){return[nR.CONTROL,nR.COMMAND_LEFT,nR.COMMAND_RIGHT,nR.COMMAND_FIREFOX].includes(e)}function nx(e,t){let r=t.split("|"),n=!1;return J(r,t=>{if(e===nR[t])return n=!0,!1}),n}function nN(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function nO(e){return!1===e.isImmediatePropagationEnabled}function nk(e){return 2===e.button}function nH(e){return 0===e.button}function n_(e){return 1===e.button}function nL(e){return"u">typeof TouchEvent&&e instanceof TouchEvent}function nP(e){return"touches"in e&&"changedTouches"in e}function nD(e){if(!nP(e)||0===e.changedTouches.length)return null;let{identifier:t,clientX:r,clientY:n}=e.changedTouches[0];return{identifier:t,clientX:r,clientY:n}}function nF(e,t){if(!nP(e))return null;for(let r=0;r<e.touches.length;r++){let n=e.touches[r];if(n.identifier===t)return{identifier:n.identifier,clientX:n.clientX,clientY:n.clientY}}return null}function nB(e,t){let r={x:e.offsetX,y:e.offsetY},n=rn(e);if(!na(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 nV=["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","afterOnSelectionHandleMouseDown","afterOnSelectionEdgeMouseDown","beforeMoveCells","afterMoveCells","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterOnCellMouseOverOutside","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","beforeOnCellMouseOverOutside","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","afterCustomBordersUpdate","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowCollapse","afterRowCollapse","beforeRowExpand","afterRowExpand","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","modifySinglePassLayout","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"],nU=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"],["persistentStateSave","17.0.0"],["persistentStateLoad","17.0.0"],["persistentStateReset","17.0.0"]]),nz=new Map([]);class nW{#e=new Map;constructor(){nV.forEach(e=>this.#t(e))}getList(e){return this.#e.get(e)??null}getHooks(e){let t=this.#e.get(e),r=[];if(t){let e=t.head;for(;e;)r.push(e),e=e.next}return r}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.#e.get(e);n||(n=this.#t(e),nV.push(e));for(let e=n.head;null!==e;e=e.next)if(e.callback===t)return;let o=Number.isInteger(r.orderIndex)?r.orderIndex??0:0,i=!!r.runOnce,s=!!r.initialHook;if(s){for(let e=n.head;null!==e;e=e.next)if(e.initialHook){e.callback=t;return}}this.#r(n,{callback:t,orderIndex:o,runOnce:i,initialHook:s,next:null})}has(e){let t=this.#e.get(e);return!!t&&null!==t.head}remove(e,t){let r=this.#e.get(e);if(!r)return!1;let n=null,o=r.head;for(;null!==o;){if(o.callback===t)return n?n.next=o.next:r.head=o.next,o===r.tail&&(r.tail=n),!0;n=o,o=o.next}return!1}destroy(){this.#e.clear()}#r(e,t){if(null===e.head){e.head=t,e.tail=t;return}if(t.orderIndex>=e.tail.orderIndex){e.tail.next=t,e.tail=t;return}let r=null,n=e.head;for(;null!==n&&n.orderIndex<=t.orderIndex;)r=n,n=n.next;null===r?(t.next=e.head,e.head=t):(t.next=n,r.next=t)}#t(e){let t={head:null,tail:null};return this.#e.set(e,t),t}}let nG=ec`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
73
73
  Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
74
74
  learn about the migration path.`;class n${static getSingleton(){return nY}globalBucket=new nW;getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=new nW),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)?J(t,t=>this.add(e,t,r)):(nU.has(e)&&t6(t2(nG,{hookName:e,removedInVersion:nU.get(e)})),nz.has(e)&&t6(nz.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)?J(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)?J(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){return r=this.#n(this.getBucket().getList(t),e,t,null,r,n,o,i,s,a),r=this.#n(this.getBucket(e).getList(t),e,t,e,r,n,o,i,s,a)}#n(e,t,r,n,o,i,s,a,l,h){if(null===e||null===e.head)return o;let d=e.head,u=e.tail;for(;null!==d;){let e=nv(d.callback,t,o,i,s,a,l,h);if(void 0!==e&&(o=e),d.runOnce&&this.remove(r,d.callback,n),d===u)break;d=d.next}return o}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getBucket(e).destroy()}register(e){this.isRegistered(e)||nV.push(e)}deregister(e){this.isRegistered(e)&&nV.splice(nV.indexOf(e),1)}isDeprecated(e){return nz.has(e)||nU.has(e)}isRegistered(e){return nV.indexOf(e)>=0}getRegistered(){return nV}}let nY=new n$,nj=new Map;function nq(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";nj.has(e)||nj.set(e,new Map);let t=nj.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(){nj.delete(e),t.clear()}}}let{register:nK,getItem:nX,hasItem:nQ,getNames:nZ,getValues:nJ}=nq("editors");class n0{#o;#i={};constructor(e){this.#o=e;const t=this.#i;n$.getSingleton().add("afterDestroy",function(){t[this.guid]=null})}getConstructor(){return this.#o}getInstance(e){return e.guid in this.#i||(this.#i[e.guid]=new this.#o(e)),this.#i[e.guid]}}let n1=new WeakMap;function n2(e){return"function"==typeof e}function n3(e){return n2(e)||th("Editor class must be a constructor function."),e}function n6(e){return"string"!=typeof e?n3(e):(nQ(e)||th(`No registered editor found under "${e}" name`),nX(e).getConstructor())}function n5(e,t){let r="string"==typeof e?e:null,n=t;e&&n2(e)&&(n=e,r=e.EDITOR_TYPE??null),n||th("Editor class is required to register an editor.");let o=n3(n),i=new n0(o);null!==r&&nK(r,i),n1.set(o,i)}let n4={_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){J(this._hooksStorage[e]||[],t=>{this.hot.removeHook(e,t)})},clearHooks(){tS(this._hooksStorage,(e,t)=>this.removeHooksByKey(t)),this._hooksStorage={}}};function n9(e,t){let{instance:r,visualRow:n,visualCol:o,valueSetter:i}=t;return np(i)?i.call(r,e,n,o,t):e}function n7(e,t){let{instance:r,visualRow:n,visualCol:o,valueGetter:i}=t;return np(i)?i.call(r,e,n,o,t):e}tw(n4,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});let n8=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class oe{static get EDITOR_TYPE(){return"base"}state=n8.VIRGIN;_opened=!1;_fullEditMode=!1;_closeCallback=null;_closeAfterDataChange=!0;TD=null;row=null;col=null;prop=null;originalValue=null;constructor(e){this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){th("Editor getValue() method unimplemented")}setValue(e){th("Editor setValue() method unimplemented")}open(e){th("Editor open() method unimplemented")}close(){th("Editor close() method unimplemented")}focus(){th("Editor focus() 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:n8.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??this.row,n=t?.col??this.col,o=s?.row??this.row,i=s?.col??this.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!==n8.VIRGIN)return;if(null===this.row||null===this.col)return void t6("Editor opened without valid cell coordinates.");let r=this.hot,n=r.rowIndexMapper.getRenderableFromVisualIndex(this.row),o=r.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(null!==n&&null!==o&&r.view.scrollViewport({row:n,col:o}),this.state=n8.EDITING,this.isInFullEditMode()){let t=n7(this.originalValue,this.hot.getCellMeta(this.row,this.col)),r="string"==typeof e?e:eV(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===n8.VIRGIN)return void this.hot._registerTimeout(()=>{this._fireCallbacks(!0)});if(this.state===n8.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=n8.WAITING,this.saveValue([[r]],t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",e=>{this.state=n8.FINISHED,this.discardEditor(e)}):(this.state=n8.FINISHED,this.discardEditor(!0))}}}cancelChanges(){this.state=n8.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===n8.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid){if(null===this.row||null===this.col)return;this.hot.selectCell(this.row,this.col),this.focus(),this.state=n8.EDITING,this._fireCallbacks(!1)}else this.close(),this._opened=!1,this._fullEditMode=!1,this.state=n8.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===n8.WAITING}getEditedCellRect(){let e=this.getEditedCell();if(!e)return;let{wtOverlays:t,wtViewport:r}=this.hot.view._wt,n=this.hot.rootWindow,o=rO(e),i=r$(e),s=rO(this.hot.rootElement),a=r$(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,b=+(o.top!==s.top),C=o.top-s.top-b-m,y=0;y=this.hot.isRtl()?n.innerWidth-o.left-i-c-1+f:o.left-s.left-1-f,["top","top_inline_start_corner"].includes(p)&&(C+=t.topOverlay?.getOverlayOffset()??0),["inline_start","top_inline_start_corner"].includes(p)&&(y+=Math.abs(t.inlineStartOverlay?.getOverlayOffset()??0));let w=this.hot.hasColHeaders(),S=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row??0),v=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col??0),R=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(w&&(S??0)<=0||S===R)&&(C+=1),(v??0)<=0&&(y+=1);let E=r.rowsRenderCalculator?.startPosition??0,T=r.columnsRenderCalculator?.startPosition??0,A=Math.abs(t.inlineStartOverlay?.getScrollPosition()??0),M=t.topOverlay?.getScrollPosition()??0,I=r3(this.hot.rootDocument),x=this.#s(e,p,E,M,I),N=this.#a(e,p,g,i,T,A),O=n.getComputedStyle(e),k=Number.parseInt(O[this.hot.isRtl()?"borderRightWidth":"borderLeftWidth"],10)>0?0:1,H=Number.parseInt(O.borderTopWidth,10)>0?0:1,_=r$(e)+k,L=rY(e)+H,P=l&&r6(l)?I:0,D=h&&r5(h)?I:0,F=this.hot.view.maximumVisibleElementWidth(N)-P+k;return{top:C,start:y,height:L,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(x??0)-D+H,this.hot.stylesHandler.getDefaultRowHeight()??0),width:_,maxWidth:F}}#s(e,t,r,n,o){let i=e.offsetTop,{wtOverlays:s}=this.hot.view._wt;if(["inline_start","master"].includes(t)&&(i+=r-n),["bottom","bottom_inline_start_corner"].includes(t)&&s.bottomOverlay?.clone){let{wtViewport:e,wtTable:t}=s.bottomOverlay.clone;i+=e.getWorkspaceHeight()-t.getHeight()-o}return i}#a(e,t,r,n,o,i){let s=e.offsetLeft;return this.hot.isRtl()?s=(s>=0?r.getWidth()-e.offsetLeft:Math.abs(s))+(o-i-n):["top","master","bottom"].includes(t)&&(s+=o-i),s}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 null===this.row||null===this.col?null:this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){if(null===this.row||null===this.col)return"";let e=this.hot.countRows(),t=this.hot.getSettings(),r="";return this.row<(t.fixedRowsTop??0)?r=this.col<(t.fixedColumnsStart??0)?"top-inline-start-corner":"top":t.fixedRowsBottom&&this.row>=e-t.fixedRowsBottom?r=this.col<(t.fixedColumnsStart??0)?"bottom-inline-start-corner":"bottom":this.col<(t.fixedColumnsStart??0)&&(r="inline-start"),r}}tf(oe,n4);let ot=0,or=class{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];if(!this.context)return()=>{};function o(e){var t;let n;r.call(this,(n=(t=e).stopImmediatePropagation,t.stopImmediatePropagation=function(){n.apply(this),nN(this)},t))}return this.context.eventListeners.push({element:e,event:t,callback:r,callbackProxy:o,options:n,eventManager:this}),e.addEventListener(t,o,n),ot+=1,()=>{this.removeEventListener(e,t,r)}}removeEventListener(e,t,r){let n,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!this.context)return;let 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),ot-=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),ot-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let r,n="document"in e?e.document:void 0,o="window"in e?e:void 0;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 on{destroyed=!1;#l=!1;constructor(e,t,r){this.hot=e,this.tableMeta=t,this.selection=r,this.eventManager=new or(e),this.hot.addHook("afterDocumentKeyDown",e=>this.#h(e)),this.hot.addHook("beforeCompositionStart",e=>this.#h(e)),this.hot.addHook("afterRowSequenceCacheUpdate",()=>this.#d()),this.hot.addHook("afterColumnSequenceCacheUpdate",()=>this.#d()),this.hot.view._wt.update("onCellDblClick",(e,t,r)=>this.#u(e,t))}getActiveEditor(){return this.activeEditor}prepareEditor(){if(this.#l=!1,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){var a;let e,n=this.hot.getCellEditor(this.cellProperties),l=this.hot.colToProp(i),h=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(o),i);this.activeEditor=(a=this.hot,n2(n)?(n1.get(n)||n5(null,n),e=n1.get(n)):"string"==typeof n?e=nX(n):th('Only strings and functions can be passed as "editor" parameter'),e||th(`No editor registered under name "${n}"`),e.getInstance(a)),this.activeEditor.prepare(t,r,l,s,h,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(){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?arguments[2]:void 0;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;return!(null===r||null===n||this.cellProperties.readOnly||!t||this.#c(r,n))}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??0),t.col=-(t.col??0)),this.hot.selection.isMultiple()?this.selection.transformFocus(t.row??0,t.col??0):this.selection.transformStart(t.row??0,t.col??0,!0)}#c(e,t){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))||this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(t))}#d(e){let t=this.activeEditor??e;if(t&&null!==t.row&&null!==t.col&&this.#c(t.row,t.col)){if(t.isWaiting()){this.#l||(this.#l=!0,this.hot.addHookOnce("postAfterValidate",()=>{this.#l=!1,this.hot._registerTimeout(()=>this.#d(t),0)}));return}t.state!==n8.EDITING||this.#l||(this.#l=!0,this.hot._registerTimeout(()=>{this.#l=!1,!this.destroyed&&t.state===n8.EDITING&&null!==t.row&&null!==t.col&&this.#c(t.row,t.col)&&t.finishEditing(!1,!1,e=>{e||t.finishEditing(!0)})},0))}}#h(e){let t=this.hot.getSelectedRangeActive();if(!this.hot.isListening()||!t||t.highlight.isHeader()||nO(e))return;let{keyCode:r}=e,n=(e.ctrlKey||e.metaKey)&&!e.altKey;this.activeEditor&&(!this.activeEditor||this.activeEditor.isWaiting())||nA(r)||nI(r)||n||this.isEditorOpened()||this.openEditor("",e)}#u(e,t){t?.isCell()&&(this.hot.getShortcutManager().isCtrlPressed()?this.clearActiveEditor():this.openEditor(null,e,!0))}destroy(){this.destroyed=!0,this.eventManager.destroy()}}let oo=new WeakMap;on.getInstance=function(e,t,r){let n=oo.get(e);return n||(n=new on(e,t,r),oo.set(e,n)),n};let oi={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},os=RegExp(Object.keys(oi).map(e=>`(${e})`).join("|"),"gi");function oa(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.getCellMetaTransient(n-u,t-d);if(!i){let e=[];if(s&&e.push(`rowspan="${s}"`),a&&e.push(`colspan="${a}"`),eW(r))l=`<td ${e.join(" ")}></td>`;else{let t=String(r).replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");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 ol(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=eW(t)?"":t.toString().replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,e=>`<span style="mso-spacerun: yes">${"&nbsp;".repeat(e.length-1)} </span>`).replace(/\t/gi,"&#9;");s.push(`<td>${r}</td>`)}r.push("<tr>",...s,"</tr>"),n+1===t&&r.push("</tbody>")}return r.push("</table>"),r.join("")}let oh=/<td\b[^>]*>/i,od=/<\/\s*td\s*>/i,ou=/<p.*?>/g;function oc(e){let t=[],r=0;for(;r<e.length;){let n,o=e.substring(r).match(oh);if(!o){t.push(e.substring(r));break}let i=r+(o.index??0),s=o[0],a=i+s.length;t.push(e.substring(r,i));let l=function(e,t){let r=1,n=t;for(;r>0;){let t=e.substring(n),o=t.match(oh),i=t.match(od);if(!i)break;let s=n+(i.index??0),a=i[0].length,l=o?n+(o.index??0):e.length;if(l<s)r+=1,n=l+(o?.[0].length??0);else{if(0==(r-=1))return{start:s,length:a};n=s+a}}return null}(e,a);if(!l){t.push(e.substring(i));break}let h=e.substring(i,l.start+l.length),d=l.start-i,u=h.substring(s.length,d).trim().replaceAll(/\n\s+/g," ").replaceAll(ou,"\n").replace(/^\n+/,"").replaceAll(/<\/(.*)>\s+$/mg,"</$1>");do n=u,u=u.replace(/<(?!br\b)[^>]+>/gi,"");while(u!==n);u=u.replaceAll(/^&nbsp;$/mg,""),t.push(`${s}${u}</td>`),r=l.start+l.length}return t.join("")}function og(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n={},o=e,i=null;if("string"==typeof o){let e=oc(o);o=(i=new(r.defaultView?.DOMParser??DOMParser)().parseFromString(e,"text/html")).querySelector("table")}if(!o||"TABLE"!==((t=o)&&t.nodeName||""))return;let s=o,a=i?.querySelector('meta[name$="enerator"]')??null,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],b=Array.from({length:m=f.length},()=>Array.from({length:d})),C=[],y=[];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=b[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++)b[t][e]=null;let t=r.getAttribute("style");t&&t.includes("mso-ignore:colspan")||C.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"),b[e][h]=t.replace(os,e=>oi[e])}else y.push(i)}}return C.length&&(n.mergeCells=C),y.length&&(n.rowHeaders=y),b.length&&(n.data=b),n}function op(e){return e[0].toUpperCase()+e.substr(1)}function om(){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=eV(t[o-=1]).toLowerCase();-1===n.indexOf(e)&&n.push(e)}return 1===n.length}function of(){let e=new Uint16Array(4);return globalThis.crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(4,"0")).join("")}function ob(e){if("string"!=typeof e)return!1;try{let t=JSON.parse(e);return"object"==typeof t&&null!==t}catch{return!1}}function oC(e){return/^(?:\d\d?%|100%)$/.test(e)}function oy(e){let t=String(e),r="",n=0,o=!1,i="";for(let e=0;e<t.length;e++){let s=t[e];n>0&&!o&&('"'===s||"'"===s)?(o=!0,i=s):o&&s===i?o=!1:o||"<"!==s?!o&&">"===s&&n>0?n-=1:0===n&&(r+=s):n+=1}return r}let ow={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function oS(e){return String(e).replace(/[&<>"']/g,e=>ow[e])}function ov(e){return t8("helper.sanitize","`sanitize()` is deprecated and will be removed in Handsontable 19.0.0. It returns its input unchanged. Use the `sanitizer` option to supply your own sanitizer."),e}function oR(e){return"string"!=typeof e?e:e.replace(/([A-Z])/g,"-$1").replaceAll("_","-").toLowerCase()}let oE="Iİ\xcc\xcdĨ",oT=oE.toLowerCase(),oA=new Map;function oM(e,t){return!function(e){let t,r=oA.get(e);if(void 0!==r)return r;try{t=oE.toLocaleLowerCase(e)!==oT}catch{t=!1}return oA.set(e,t),t}(t)?e.toLowerCase():e.toLocaleLowerCase(t)}function oI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if("number"==typeof e)return!isNaN(e)&&isFinite(e);if("string"==typeof e){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"==typeof e&&null!==e&&"number"==typeof e.valueOf()&&!(e instanceof Date)}function ox(e){return oI(e,[","])}function oN(e,t){return"."===t&&"string"==typeof e&&/^[+-]?[1-9]\d{0,2}(,\d{3})+$/.test(e.trim())}function oO(e,t){return","===t&&"string"==typeof e&&/^[+-]?[1-9]\d{0,2}(\.\d{3})+$/.test(e.trim())}function ok(e,t){return","===t&&"string"==typeof e&&/^[+-]?[1-9]\d{0,2}(\.\d{3})+,\d+$/.test(e.trim())}function oH(e,t,r){let n,o,i;for("function"==typeof t?(n=-1,o=e,i=t):(n=e-1,o=t,i=r);++n<=o&&!1!==i(n););}function o_(e,t,r){let n,o,i=e+1;for("function"==typeof t?(o=t,n=0):(o=r,n=t);--i>=n&&!1!==o(i););}function oL(e,t){return Number.parseInt(String(e*(t=isNaN(t=Number.parseInt(t.toString().replace("%",""),10))?0:t)/100),10)}function oP(e,t,r){return Math.min(e,t)===e?t:Math.max(e,r)===e?r:e}function oD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{decimalSeparator:r}=t,n=e.trim();if(oN(e,r))return Number.parseFloat(n.replaceAll(",",""));if(oO(e,r))return Number.parseFloat(n.replaceAll(".",""));if(ok(e,r))return Number.parseFloat(n.replaceAll(".","").replace(",","."));let o=n.replace(",",".");return!1===isNaN(Number.parseFloat(o))?Number.parseFloat(o):null}function oF(e){let t=/^([+-]?)(\d*)(?:\.(\d*))?(?:e([+-]?\d+))?$/i.exec(e.trim());if(null===t||""===t[2]&&(t[3]??"")==="")return e.trim();let r="-"===t[1]?"-":"",n=t[2],o=t[3]??"",i=Number.parseInt(t[4]??"0",10);if(Math.abs(i)>1e3)return e.trim();let s=`${n}${o}`,a=n.length+i;a>s.length&&(s=s.padEnd(a,"0")),a<1&&(s=`${"0".repeat(1-a)}${s}`,a=1);let l=s.slice(0,a).replace(/^0+(?=\d)/,""),h=s.slice(a);return`${r}${l}${h.length>0?`.${h}`:""}`}function oB(e,t){let r=Object.is(t,-0)?"-0":String(t);return oF(e.replace(",","."))!==oF(r)}function oV(e){return Number.isInteger(e)&&"number"==typeof e&&e>=0}let oU=new Map([["asc",[-1,1]],["desc",[1,-1]]]),oz=e=>`The priority '${e}' is already declared in a map.`,oW=e=>`The priority '${e}' is not a number.`,oG=e=>`The id '${e}' is already declared in a map.`;function o$(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new Map,r=np(e)?e:oG;function n(){return[...t]}function o(e){return t.has(e)}return{addItem:function(e,n){o(e)&&th(String(r(e))),t.set(e,n)},clear:function(){t.clear()},getId:function(e){let[t]=n().find(t=>{let[r,n]=t;return e===n&&r})||[null];return t},getItem:function(e){return t.get(e)},getItems:n,getValues:function(){return[...t.values()]},hasItem:o,removeItem:function(e){return t.delete(e)}}}let oY=e=>`'${e}' value is already declared in a unique set.`,oj=e=>`There is already registered "${e}" plugin.`,oq=function(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=new Map,n=np(e)?e:oz,o=np(t)?t:oW;return{addItem:function(e,t){oI(e)||th(String(o(e))),r.has(e)&&th(String(n(e))),r.set(e,t)},getItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"asc",[t,n]=oU.get(e)||oU.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.`}),oK=function(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new Set,r=np(e)?e:oY;return{addItem:function(e){t.has(e)&&th(String(r(e))),t.add(e)},clear:function(){t.clear()},getItems:function(){return[...t]}}}({errorItemExists:oj}),oX=o$({errorIdExists:oj});function oQ(){return[...oq.getItems(),...oK.getItems()]}function oZ(e){let t=op(e);return oX.getItem(t)}function oJ(e,t,r){var n,o,i,s,a,l;let h,[d,u,c]=(n=e,o=t,i=r,"function"==typeof n&&(n=(o=n).PLUGIN_KEY,i=o.PLUGIN_PRIORITY),[n,o,i]);void 0===oZ(d)&&(s=d,a=u,l=c,h=op(s),oX.hasItem(h)&&th(oj(h)),void 0===l?oK.addItem(h):oq.addItem(l,h),oX.addItem(h,a))}let{register:o0,getItem:o1,hasItem:o2,getNames:o3,getValues:o6}=nq("renderers");function o5(e){return"function"==typeof e?e:(o2(e)||th(`No registered renderer found under "${e}" name`),o1(e))}function o4(e,t){"string"!=typeof e&&(t=e,e=e.RENDERER_TYPE),o0(e,t)}let{register:o9,getItem:o7,hasItem:o8,getNames:ie,getValues:it}=nq("validators");function ir(e){return"function"==typeof e?e:(o8(e)||th(`No registered validator found under "${e}" name`),o7(e))}function io(e,t){"string"!=typeof e&&(t=e,e=e.VALIDATOR_TYPE),o9(e,t)}function ii(e,t,r){return"function"==typeof t.valueFormatter?t.valueFormatter(e,t):"function"==typeof r&&"function"==typeof r.valueFormatter?r.valueFormatter.call(t,e,t):e}function is(e,t){let[r]=t,n=t[6];try{e(...t),n._isBaseRendererCalled||r.getCellRenderer({renderer:"base"})(...t)}finally{n._isBaseRendererCalled=!1}}class ia{rowHeights=new Map;columnHeaderHeights=new Map;measure(e){if(this.rowHeights.clear(),this.columnHeaderHeights.clear(),!e?.wtTable)return;let t=e.wtSettings.getSetting("stylesHandler").areCellsBorderBox();this.#g(e.wtTable,t),[e.wtOverlays?.topOverlay?.clone,e.wtOverlays?.bottomOverlay?.clone].forEach(e=>{e?.wtTable&&this.#g(e.wtTable,t)}),this.#p(e.wtTable)}hasColumnHeaderTallerThan(e){for(let t of this.columnHeaderHeights.values())if(t>e)return!0;return!1}#g(e,t){let{TBODY:r,rowFilter:n}=e;if(!r||!n)return;let o=t?rY:rj,i=+!t,s=r.childNodes.length;for(;s;){let e;s-=1;let a=n.renderedToSource(s),l=r.childNodes[s],h=l.querySelector("th");e=h?o(h):o(l)-i,t||(e+=1),this.rowHeights.set(a,e)}}#p(e){let{THEAD:t}=e;if(!t)return;let r=t.childNodes;for(let e=0,t=r.length;e<t;e++){let t,n=r[e].childNodes;for(let e=0;e<n.length;e++){let r=n[e];if(r instanceof HTMLTableCellElement&&r.rowSpan<=1){let e=rj(r);(void 0===t||e>t)&&(t=e)}}void 0!==t&&this.columnHeaderHeights.set(e,t)}}}function il(e){if("sourceCapabilities"in e&&e.sourceCapabilities)return!0===e.sourceCapabilities.firesTouchEvents}function ih(e,t,r,n,o){let i=0;for(let s=r;s<=n;s++){let r=e.getCell({row:t,col:s},!0);if(!na(r))continue;let n=e.domBindings.geometryReader.offsetWidth(r);if(o<i+n)return s;i+=n}return null}function id(e,t,r,n,o){let i=0;for(let s=r;s<=n;s++){let r=e.getCell({row:s,col:t},!0);if(!na(r))continue;let n=e.domBindings.geometryReader.offsetHeight(r);if(o<i+n)return s;i+=n}return null}function iu(e){return{facadeGetter:e.getFacade(),rootDocument:e.rootDocument,rootWindow:e.rootWindow,geometryReader:e.geometryReader,wtSettings:e.wtSettings,eventManager:e.makeEventManager(),wtTable:e.getWtTable(),selectionManager:e.getSelectionManager()}}let ic=class{#m;#f;#b=null;#C=[null,null];#y=[null,null];#w=null;#S=0;#v=null;#R=!1;#E=null;#T=!1;#A=null;#M=0;#I=!1;#x=!1;#N=null;constructor(e,t=null){this.#m=e,this.#f=t,this.registerEvents()}registerEvents(){this.#m.eventManager.addEventListener(this.#m.wtTable.holder,"contextmenu",e=>this.onContextMenu(e)),this.#m.eventManager.addEventListener(this.#m.wtTable.TABLE,"mouseover",e=>this.onMouseOver(e)),this.#m.eventManager.addEventListener(this.#m.wtTable.TABLE,"mouseout",e=>this.onMouseOut(e)),this.#m.wtTable.isMaster&&(this.#m.eventManager.addEventListener(this.#m.rootDocument,"mousemove",e=>this.onMouseMove(e)),this.#m.eventManager.addEventListener(this.#m.rootDocument,"mouseup",()=>{this.#x=!1,this.#N=null}));let e=()=>{this.#m.eventManager.addEventListener(this.#m.wtTable.holder,"touchstart",e=>this.onTouchStart(e)),this.#m.eventManager.addEventListener(this.#m.wtTable.holder,"touchend",e=>this.onTouchEnd(e)),this.#m.eventManager.addEventListener(this.#m.wtTable.holder,"touchmove",e=>this.onTouchMove(e)),this.#m.eventManager.addEventListener(this.#m.wtTable.holder,"touchcancel",()=>this.onTouchCancel()),this.#m.eventManager.addEventListener(this.#m.wtTable.holder,"scroll",()=>this.onHolderScroll())},t=()=>{this.#m.eventManager.addEventListener(this.#m.wtTable.holder,"mouseup",e=>{this.#O(e)||this.onMouseUp(e)}),this.#m.eventManager.addEventListener(this.#m.wtTable.holder,"mousedown",e=>{this.#O(e)||this.onMouseDown(e)})};tX()?e():(t_()&&e(),t())}selectedCellWasTouched(e){let t=this.parentCell(e).coords;if(this.#b&&t){let[e,r]=[t.row,this.#b.from.row],[n,o]=[t.col,this.#b.from.col];return e===r&&n===o}return!1}parentCell(e){let t={coords:null,TD:null},r=rl(e,["TD","TH"],this.#m.wtTable.TABLE);if(r)t.coords=this.#m.wtTable.getCoords(r),t.TD=r;else if(rf(e,"wtBorder")&&rf(e,"current")){let e=this.#m.selectionManager.getFocusSelection()?.cellRange;e&&(t.coords=e.highlight,t.TD=this.#m.wtTable.getCell(t.coords))}else if(rf(e,"wtBorder")&&rf(e,"area")){let e=this.#m.selectionManager.getAreaSelection()?.cellRange;e&&(t.coords=e.to,t.TD=this.#m.wtTable.getCell(t.coords))}return t}#O(e){if(!1===il(e))return!1;let t=Date.now()-this.#M<500;return this.#I&&t?("mouseup"===e.type&&(this.#I=!1),!0):(this.#I=!1,!1)}onMouseDown(e){let t=nc(this.#m.rootDocument),r=rn(e),n=rn(e);if(t&&!["TD","TH"].includes(t.nodeName)&&(n===t||rt(r,0)===t||rt(r,1)===t))return;let o=this.parentCell(n);rf(n,"corner")?this.#m.wtSettings.getSetting("onCellCornerMouseDown",e,n):o.TD&&(this.#x=!0,this.#N=null,this.#m.wtSettings.has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,o.coords,o.TD)),!this.touchApplied&&0===e.button&&o.TD&&(this.#y[0]=o.TD,null!==this.#C[0]&&clearTimeout(this.#C[0]),this.#C[0]=setTimeout(()=>{this.#y[0]=null},1e3))}onContextMenu(e){if(this.#k(),this.#m.wtSettings.has("onCellContextMenu")){let t=this.parentCell(rn(e));t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!this.#m.wtSettings.has("onCellMouseOver"))return;let t=this.#m.wtTable.TABLE,r=rl(rn(e),["TD","TH"],t),n=this.#f||this;if(r&&r!==n.lastMouseOver&&rd(r,t)){n.lastMouseOver=r;let t=this.#m.wtTable.getCoords(r);t&&this.callListener("onCellMouseOver",e,t,r)}}onMouseMove(e){if(!this.#x)return;let{coords:t,isOutside:r}=this.#H(e.clientX,e.clientY);if(r){let r=this.#N;if(!r||r.row!==t.row||r.col!==t.col){let r=this.#m.wtTable.getCell(t);r instanceof HTMLElement&&(this.#N={row:t.row,col:t.col},this.callListener("onCellMouseOverOutside",e,t,r))}}else this.#N=null}#H(e,t){return function(e,t,r){let n=e.wtSettings.getSetting("rtlMode"),o=e.facadeGetter(),i=e.wtSettings.getSetting("fixedColumnsStart"),s=e.wtSettings.getSetting("fixedRowsTop"),a=e.wtSettings.getSetting("fixedRowsBottom"),l=o.wtScroll.getFirstPartiallyVisibleRow(),h=o.wtScroll.getLastPartiallyVisibleRow(),d=o.wtScroll.getFirstPartiallyVisibleColumn(),u=o.wtScroll.getLastPartiallyVisibleColumn(),c=e.geometryReader.getBoundingClientRect(e.wtTable.wtRootElement),g=e.wtSettings.getSetting("columnHeaders").length>0?o.wtViewport.getColumnHeaderHeight():0,p=e.wtSettings.getSetting("rowHeaders").length>0?o.wtViewport.getRowHeaderWidth():0,m=e.rootWindow,f=o.wtViewport.isHorizontallyScrollableByWindow()?Math.min(0,c.left):c.left,b=o.wtViewport.isVerticallyScrollableByWindow()?Math.min(0,c.top):c.top,C=o.wtViewport.isHorizontallyScrollableByWindow()?m.innerWidth:c.left+o.wtViewport.getViewportWidth()+p,y=o.wtViewport.isVerticallyScrollableByWindow()?m.innerHeight:c.top+o.wtViewport.getViewportHeight()+g,w=oP(t,f,C),S=oP(r,b,y),v=null;if(i>0){let t=o.getCell({row:l,col:0},!0);if(na(t)){let r=e.geometryReader.getBoundingClientRect(t);v=ih(o,l,0,i-1,n?r.right-w:w-r.left)}}if(null===v){let t=o.getCell({row:l,col:d},!0);if(na(t)){let r=e.geometryReader.getBoundingClientRect(t),i=n?r.right-w:w-r.left;null===(v=ih(o,l,d,u,i))&&(v=i<0?d:u)}else v=d}let R=null;if(s>0){let t=o.getCell({row:0,col:d},!0);na(t)&&(R=id(o,d,0,s-1,S-e.geometryReader.getBoundingClientRect(t).top))}if(null===R&&a>0){let t=e.wtSettings.getSetting("totalRows"),r=t-a,n=t-1,i=o.getCell({row:r,col:d},!0);if(na(i)){let t=S-e.geometryReader.getBoundingClientRect(i).top;t>=0&&null===(R=id(o,d,r,n,t))&&(R=n)}}if(null===R){let t=o.getCell({row:l,col:d},!0);na(t)?null===(R=id(o,d,l,h,S-e.geometryReader.getBoundingClientRect(t).top))&&(R=h):R=l}return{coords:o.createCellCoords(R,v),isOutside:t<f||t>C||r<b||r>y}}(this.#m,e,t)}onMouseOut(e){if(!this.#m.wtSettings.has("onCellMouseOut"))return;let t=this.#m.wtTable.TABLE,r=rl(rn(e),["TD","TH"],t),n=rl(e.relatedTarget,["TD","TH"],t),o=this.#f||this;if(r&&r!==n&&rd(r,t)){let t=this.#m.wtTable.getCoords(r);t&&this.callListener("onCellMouseOut",e,t,r),null===n&&(o.lastMouseOver=null)}}onMouseUp(e){this.#x=!1,this.#N=null;let t=this.parentCell(rn(e));(t.TD&&this.#m.wtSettings.has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,t.coords,t.TD),this.touchApplied)?this.#_(e,t):0===e.button&&(t.TD&&t.TD===this.#y[0]&&t.TD===this.#y[1]?(this.#L(e,t),this.#y[0]=null,this.#y[1]=null):t.TD&&t.TD===this.#y[0]&&(this.#y[1]=t.TD,null!==this.#C[1]&&clearTimeout(this.#C[1]),this.#C[1]=setTimeout(()=>{this.#y[1]=null},500)))}#_(e,t){if(this.#R||!t.TD||!t.coords){this.#w=null;return}let r=Date.now();if(null!==this.#w&&this.#w.row===t.coords.row&&this.#w.col===t.coords.col&&r-this.#S<1e3){this.#L(e,t),this.#w=null;return}this.#w=t.coords.clone(),this.#S=r}#L(e,t){rf(rn(e),"corner")?this.callListener("onCellCornerDblClick",e,t.coords,t.TD):this.callListener("onCellDblClick",e,t.coords,t.TD)}onTouchStart(e){this.#b=this.#m.selectionManager.getFocusSelection()?.cellRange??null,this.touchApplied=!0,this.#T=!1,this.#R=!1,this.#A=e,this.#P(e)}onTouchEnd(e){let t=this.#T,r=!t&&!this.#R&&null!==this.#A,n=this.#A;this.#k(),this.#A=null,r&&null!==n&&this.onMouseDown(n);let o=rn(e),i=this.parentCell(o)?.coords,s=null!=i&&(i.row??-1)>=0&&(i.col??-1)>=0;e.cancelable&&s&&this.#m.wtSettings.getSetting("isDataViewInstance")&&(tQ()&&(tW()||t$())&&this.selectedCellWasTouched(o)&&!["A","BUTTON","INPUT"].includes(o.tagName)?e.preventDefault():this.selectedCellWasTouched(o)||"INPUT"===o.tagName&&"checkbox"===o.type||e.preventDefault()),!t||this.#R?(this.onMouseUp(e),this.#M=Date.now(),this.#I=!0):(this.#w=null,this.#I=!1),this.touchApplied=!1,this.#T=!1,this.#R=!1}onTouchCancel(){this.#k(),this.touchApplied=!1,this.#x=!1,this.#T=!1,this.#R=!1,this.#A=null,this.#w=null,this.#I=!1}#P(e){this.#k();let t=e.touches[0];t&&(this.#E={x:t.clientX,y:t.clientY},this.#v=setTimeout(()=>{this.#v=null,this.#R=!0,this.#E=null,this.onMouseDown(e),this.#y[0]=null,this.#y[1]=null,this.#w=null,null!==this.#C[0]&&clearTimeout(this.#C[0]),null!==this.#C[1]&&clearTimeout(this.#C[1]);let r=e.target;if(!r)return;let n=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY,screenX:t.screenX,screenY:t.screenY});r.dispatchEvent(n)},500))}onHolderScroll(){this.momentumScrolling||(this.momentumScrolling={}),this.touchApplied&&(this.#T=!0),this.#k(),clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||this.#m.wtSettings.getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout(()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,this.#m.wtSettings.getSetting("onAfterMomentumScroll"))},200)}#k(){null!==this.#v&&(clearTimeout(this.#v),this.#v=null),this.#E=null}onTouchMove(e){if(null===this.#E)return;let t=e.touches[0];if(!t){this.#T=!0,this.#k();return}let r=Math.abs(t.clientX-this.#E.x),n=Math.abs(t.clientY-this.#E.y);(r>10||n>10)&&(this.#T=!0,this.#k())}callListener(e,t,r,n){let o=this.#m.wtSettings.getSettingPure(e);o&&o(t,r,n,this.#m.facadeGetter())}destroy(){null!==this.#C[0]&&clearTimeout(this.#C[0]),null!==this.#C[1]&&clearTimeout(this.#C[1]),this.#k(),this.momentumScrolling&&clearTimeout(this.momentumScrolling._timeout),this.#m.eventManager.destroy()}},ig="bottom",ip="inline_start",im="top_inline_start_corner",ib="bottom_inline_start_corner",iC=["top",ig,ip,im,ib],iy=new Map([["top","ht_clone_top"],[ig,`ht_clone_${ig}`],[ip,`ht_clone_${ip} ht_clone_left`],[im,`ht_clone_${im} ht_clone_top_left_corner`],[ib,`ht_clone_${ib} ht_clone_bottom_left_corner`]]),iw={getCell(e){if(null===e.row||null===e.col)return -5;let t=e.row,r=e.col,n=this.wtSettings.getSetting("onModifyGetCellCoords",t,r,!this.isMaster,"render");if(n&&Array.isArray(n)&&([t,r]=n),this.isRowBeforeRenderedRows(t))return -1;if(this.isRowAfterRenderedRows(t))return -2;if(this.isColumnBeforeRenderedColumns(r))return -3;if(this.isColumnAfterRenderedColumns(r))return -4;let o=this.getRow(t);!o&&t>=0&&th("TR was expected to be rendered but is not");let i=(!1!==o?o:null)?.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(r)];return!i&&r>=0&&th("TD or TH was expected to be rendered but is not"),i},getRow(e){let t=null,r=null;if((e<0?(t=this.rowFilter?.sourceRowToVisibleColHeadedRow(e),r=this.THEAD):(t=this.rowFilter?.sourceToRendered(e),r=this.TBODY),null!=t&&null!==r)&&!(r.childNodes.length<t+1))return r.childNodes[t];return!1},getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.THEAD.childNodes[t],n=r?.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)];return na(n)?n:void 0},getColumnHeaders(e){let t=[],r=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach(e=>{let n=e.childNodes[r];nl(n)&&t.push(n)}),t},getRowHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>=this.wtSettings.getSetting("rowHeaders").length)return;let r=this.rowFilter.sourceToRendered(e),n=r<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):r,o=r<0?this.THEAD:this.TBODY,i=o?.childNodes[n],s=i?.childNodes[t];return na(s)?s:void 0},getRowHeaders(e){let t=[],r=this.wtSettings.getSetting("rowHeaders").length;for(let n=0;n<r;n++){let r=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],o=r?.childNodes[n];o&&t.push(o)}return t},getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=ra(t,["TD","TH"])),null===t)return null;let r=t.parentNode;if(!r)return null;let n=r.parentNode;if(!n)return null;let o=na(r)?ru(r):0,i=nl(t)?t.cellIndex:0;rc(im,t,this.wtRootElement)||rc("top",t,this.wtRootElement)?"THEAD"===n.nodeName&&(o-=n.childNodes.length):rc(ib,t,this.wtRootElement)||rc("bottom",t,this.wtRootElement)?o=this.wtSettings.getSetting("totalRows")-n.childNodes.length+o:n===this.THEAD?o=this.rowFilter.visibleColHeadedRowToSourceRow(o):this.rowFilter&&(o=this.rowFilter.renderedToSource(o)),rc(im,t,this.wtRootElement)||rc(ip,t,this.wtRootElement)||rc(ib,t,this.wtRootElement)?i=this.columnFilter.offsettedTH(i):this.columnFilter&&(i=this.columnFilter.visibleRowHeadedColumnToSourceColumn(i));let s=this.wtSettings.getSetting("onModifyGetCoordsElement",o,i);return s&&Array.isArray(s)&&([o,i]=s),this.wot.createCellCoords(o,i)},getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}};tw(iw,"MIXIN_NAME","cellAccess",{writable:!1,enumerable:!1});let iS={fixTableDomTree(){let e=this.deps.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))},createSpreader(e){let t,r=e.parentNode;return r&&r.nodeType===Node.ELEMENT_NODE&&na(r)&&rf(r,"wtHolder")||((t=this.deps.rootDocument.createElement("div")).className="wtSpreader",r&&e.before(t),t.appendChild(e)),t&&(t.style.position="relative",this.wtSettings.getSetting("ariaTags")&&ry(t,[R()])),t},createHider(e){let t,r=e.parentNode;return r&&r.nodeType===Node.ELEMENT_NODE&&na(r)&&rf(r,"wtHolder")||((t=this.deps.rootDocument.createElement("div")).className="wtHider",r&&e.before(t),t.appendChild(e)),t&&this.wtSettings.getSetting("ariaTags")&&ry(t,[R()]),t},createHolder(e){let t,r=e.parentNode;if(!r||r.nodeType!==Node.ELEMENT_NODE||!na(r)||!rf(r,"wtHolder")){if((t=this.deps.rootDocument.createElement("div")).style.position="relative",t.className="wtHolder",this.isMaster&&ry(t,[v(-1)]),r&&e.before(t),this.isMaster){let e=t.parentNode;na(e)&&(e.className+="ht_master handsontable",e.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&ry(e,[R()]))}t.appendChild(e)}return t&&this.wtSettings.getSetting("ariaTags")&&ry(t,[R()]),t}};tw(iS,"MIXIN_NAME","domScaffold",{writable:!1,enumerable:!1});class iv{nextSize=0;nextOffset=0;setSize(e){this.nextSize=e}setOffset(e){this.nextOffset=e}}class iR{size=new iv;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 iE{rootNode;nodesPool;sizeSet=new iR;collectedNodes=[];childNodeType;visualIndex=0;constructor(e,t,r){this.rootNode=e,this.nodesPool=t,this.childNodeType="string"==typeof r?r.toUpperCase():r}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}getRenderedChildCount(){let{rootNode:e,sizeSet:t}=this,r=0;if(this.isSharedViewSet()){let n=e.firstElementChild;for(;n;){if(n.tagName===this.childNodeType)r+=1;else if(t.isPlaceOn(1))break;n=n.nextElementSibling}}else r=e.childElementCount;return r}start(){this.collectedNodes.length=0,this.visualIndex=0;let{rootNode:e,sizeSet:t}=this,r=this.isSharedViewSet(),{nextSize:n}=t.getViewSize(),o=this.getRenderedChildCount();for(;o<n;){let n=this.nodesPool();!r||t.isPlaceOn(2)?e.appendChild(n):e.insertBefore(n,e.firstChild),o+=1}let i=r&&t.isPlaceOn(1);for(;o>n;){let t=i?e.firstChild:e.lastChild;t&&e.removeChild(t),o-=1}}render(){let{rootNode:e,sizeSet:t}=this,r=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(2)&&t.sharedSize&&(r+=t.sharedSize.nextSize);let n=e.children[r];if(n){if(n.tagName!==this.childNodeType){let e=this.nodesPool();n.replaceWith(e),n=e}}else n=this.nodesPool(),e.appendChild(n);this.collectedNodes.push(n),this.visualIndex+=1}end(){}}class iT extends iE{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 iA{nodeType;constructor(e){this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(e,t){return this.rootDocument.createElement(this.nodeType)}}class iM{nodesPool=null;renderedNodes=0;constructor(e,t){this.nodesPool="string"==typeof e?new iA(e):null,this.nodeType=e,void 0!==t&&(this.rootNode=t)}setTable(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}render(){}}class iI extends iM{orderViews=new WeakMap;constructor(){super("TH")}obtainOrderView(e){return this.orderViews.has(e)||this.orderViews.set(e,new iT(e,()=>this.nodesPool.obtain(),this.nodeType)),this.orderViews.get(e)}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);if(!s)continue;let a=this.obtainOrderView(s),l=o.obtainOrderView(s);a.appendView(l).setSize(r).setOffset(0).start();for(let n=0;n<r;n++){a.render();let r=a.getCurrentNode();r&&(r.className="",r.removeAttribute("style"),rw(r,[/aria-(.*)/,/role/]),this.table.isAriaEnabled()&&ry(r,[A(),k(),V(n+1),v(-1)]),t[n](e,r,n))}a.end()}}}class ix extends iM{orderView;constructor(e){super("TR",e),this.orderView=new iE(e,()=>this.nodesPool.obtain(),this.nodeType)}getRenderedNode(e){return this.orderView.getNode(e)}render(){let{columnHeadersCount:e}=this.table;this.table.isAriaEnabled()&&ry(this.rootNode,[M()]),this.orderView.setSize(e).setOffset(0).start();for(let t=0;t<e;t++){this.orderView.render();let e=this.orderView.getCurrentNode();e&&this.table.isAriaEnabled()&&ry(e,[x(),B(t+1)])}this.orderView.end()}}class iN extends iM{orderViews=new WeakMap;constructor(){super("TH")}obtainOrderView(e){return this.orderViews.has(e)||this.orderViews.set(e,new iE(e,()=>this.nodesPool.obtain(),this.nodeType)),this.orderViews.get(e)}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);if(!e)continue;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&&(a.className="",a.removeAttribute("style"),rw(a,[/aria-(.*)/,/role/]),this.table.isAriaEnabled()&&ry(a,[V(e+1),v(-1),I(),...o>=0?[O()]:[T(),H("Select whole grid")]]),t[r](i,a,r))}s.end(),this.#D(e)}}#D(e){let{children:t}=e,r=null;for(let e=t.length-1;e>=0;e--){let n=t[e];null!==r||rf(n,"hiddenHeader")?rf(n,"htLastVisibleHeader")&&rC(n,"htLastVisibleHeader"):(r=n,rf(n,"htLastVisibleHeader")||rb(n,"htLastVisibleHeader"))}}}let iO=!1;class ik extends iM{orderView;constructor(e){super("COL",e),this.orderView=new iE(e,()=>this.nodesPool.obtain(),this.nodeType)}render(){let{columnsToRender:e,rowHeadersCount:t}=this.table,r=e+t;!iO&&e>1e3&&(iO=!0,t6(ec`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
75
75
  Consider limiting the number of rendered columns by specifying the table width and/or\x20
@@ -82,7 +82,7 @@
82
82
  Cell type must be an object or a string mapped to an object registered by
83
83
  "Handsontable.cellTypes.registerCellType" method`),dg(e)}function dC(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);let{editor:r,renderer:n,validator:o}=t;r&&n5(e,r),n&&o4(e,n),o&&io(e,o),dc(e,t)}function dy(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,n="string"==typeof t.type?db(t.type):t.type;if(e._automaticallyAssignedMetaProps&&tS(t,(t,r)=>{e._automaticallyAssignedMetaProps.delete(r)}),!ty(n))return;r!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);let o={};tS(n,(t,n)=>{"CELL_TYPE"!==n&&(r._automaticallyAssignedMetaProps?.has(n)||!tA(r,n))&&(o[n]=t,e._automaticallyAssignedMetaProps?.add(n))}),tc(e,o)}let dw=()=>({_automaticallyAssignedMetaProps:void 0,_userDefinedMetaProps:void 0,_persistedMetaProps: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,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,customBordersProgressive:!1,data:void 0,dataProvider:void 0,dataDotNotation:!0,dataSchema:void 0,dateFormat:{year:"numeric",month:"2-digit",day:"2-digit"},timeFormat:{hour:"2-digit",minute:"2-digit"},dateTimeFormat:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1},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,hashLength:void 0,hashRevealDelay:void 0,hashSymbol:"*",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=!!this.getSettings().dataSchema,o=this.getSchema(),i=this.colToProp(e),s=this.countRows();for(t=0;t<s;t++)if(!1===eW(r=this.getDataAtCell(t,e))){if("object"==typeof r){if(!1===tb(o[i],r))return!1;continue}if(n&&o[i]===r)continue;return!1}return!0},isEmptyRow(e){let t,r,n=!!this.getSettings().dataSchema,o=this.getSchema(),i=this.countCols();for(t=0;t<i;t++)if(!1===eW(r=this.getDataAtCell(e,t))){let e=this.colToProp(t);if("object"==typeof r){if(!1===tb(o[e],r))return!1;continue}if(n&&o[e]===r)continue;return!1}return!0},label:void 0,language:"en-US",layoutDirection:"inherit",layout:void 0,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,preserveNumericLiteral:!1,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",selectionHandles:!1,moveCells:!1,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,colorScheme:void 0,density: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 dS{metaCtor=class{};constructor(e){this.meta=this.metaCtor.prototype,tc(this.meta,dw()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){tc(this.meta,e),dy(this.meta,{...e,type:e.type??this.meta.type},e)}}class dv{constructor(e){const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){tc(this.meta,e),dy(this.meta,e,e)}}function dR(e){oV(e)||null==e||th("Assertion failed: Expecting an unsigned number or null/undefined argument.")}class dE{#rS=new Map;#tV=0;#rv=[];#rR=0;#rE=-1;#rT=!0;#rA=!1;constructor(e){this.valueFactory=e}obtain(e){oV(e)||th("Assertion failed: Expecting an unsigned number.");let t=e;this.#rv.length>0&&-1===(t=this.#rM(e))&&(this.#rI(),t=e);let r=this.#rS.get(t);if(void 0===r){r=this.valueFactory(e),this.#rS.set(t,r),e>=this.#tV&&(this.#tV=e+1);let n=t>e?t:e;n>=this.#rR&&(this.#rR=n+1),t>this.#rE?this.#rE=t:this.#rT=!1}return r}has(e){return void 0!==this.getIfExists(e)}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;dR(e);let r=null==e?this.#tV:e;this.#tV+=t,r>=this.#rR||(this.#rR+=t,this.#rx({start:r,amount:t,isInsert:!0}))}remove(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(dR(e),null==e){let e=this.#tV-r;t=e<0?Math.max(this.#tV+e,0):e}else t=e;let n=Math.max(Math.min(this.#tV-t,r),0),o=t>=this.#rR;this.#tV-=n,this.#rR>this.#tV&&(this.#rR=this.#tV),o||this.#rx({start:t,amount:r,isInsert:!1})}size(){return this.#rv.length>0&&this.#rI(),this.#rS.size}values(){return this.#rv.length>0&&this.#rI(),this.#rA=!0,this.#rS.values()}entries(){return this.#rv.length>0&&this.#rI(),this.#rA=!0,this.#rS.entries()}evict(e){if(this.#rv.length>0){let t=this.#rM(e);-1!==t&&this.#rS.delete(t);return}this.#rS.delete(e)}getIfExists(e){if(this.#rv.length>0){let t=this.#rM(e);return -1===t?void 0:this.#rS.get(t)}return this.#rS.get(e)}clear(){this.#rS.clear(),this.#rv=[],this.#tV=0,this.#rR=0,this.#rE=-1,this.#rT=!0,this.#rA=!1}#rx(e){let t=this.#rv,r=t.length>0?t[t.length-1]:void 0;!(void 0!==r&&r.isInsert===e.isInsert&&this.#rN(r,e))&&(t.push(e),t.length>=1024&&this.#rI())}#rN(e,t){return t.isInsert?t.start>=e.start&&t.start<=e.start+e.amount&&(e.amount+=t.amount,!0):t.start===e.start?(e.amount+=t.amount,!0):t.start+t.amount===e.start&&(e.start=t.start,e.amount+=t.amount,!0)}#rM(e){let t=this.#rv,r=e;for(let e=t.length-1;e>=0;e--){let{start:n,amount:o,isInsert:i}=t[e];if(i){if(r>=n+o)r-=o;else if(r>=n)return -1}else r>=n&&(r+=o)}return r}#rI(){let e=this.#rv;if(this.#rv=[],1===e.length&&!e[0].isInsert&&!this.#rA&&this.#rT&&this.#rE===this.#rS.size-1)return void this.#rO(e[0].start,e[0].amount);let t=Array(e.length),r=1/0;for(let n=e.length-1;n>=0;n--)e[n].start<r&&(r=e[n].start),t[n]=r;let n=!1;for(let e of this.#rS.keys())if(e>=r){n=!0;break}if(!n)return;let o=new Map,i=-1,s=!0,a=-1;for(let[r,n]of this.#rS){let l=this.#rk(r,e,t);-1!==l&&(o.set(l,n),l>i&&(i=l),l<=a&&(s=!1),a=l)}this.#rS=o,this.#rA=!1,this.#rR=i+1,this.#rE=i,this.#rT=s}#rO(e,t){let r=this.#rS,n=r.size,o=Math.max(n-t,e);for(let n=e;n<o;n++)r.set(n,r.get(n+t));for(let e=o;e<n;e++)r.delete(e);this.#rE=o-1,this.#rR=o}#rk(e,t,r){let n=e;for(let e=0;e<t.length&&!(n<r[e]);e++){let{start:r,amount:o,isInsert:i}=t[e];if(i)n>=r&&(n+=o);else if(n>=r+o)n-=o;else if(n>=r)return -1}return n}[Symbol.iterator](){return this.entries()}}let dT=["data","width"];class dA{metas=new dE(()=>this._createMeta());constructor(e){this.globalMeta=e,this.metas=new dE(()=>this._createMeta())}updateMeta(e,t){let r=this.getMeta(e);tc(r,t),dy(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(){}tu(r,e);for(let e=0;e<t.length;e++)r.prototype[t[e]]=void 0;return r}(this.globalMeta.getMetaConstructor(),dT).prototype}}class dM{metas=new dE(()=>this._createRow());#rH=0;constructor(e){this.columnMeta=e}enableUserDefinedMetaRecording(){this.#rH>0&&(this.#rH-=1)}disableUserDefinedMetaRecording(){this.#rH+=1}updateMeta(e,t,r){let n=this.getMeta(e,t);tc(n,r),dy(n,r)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let[,r]of this.metas)r.insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let[,r]of this.metas)r.remove(e,t)}getMeta(e,t,r){let n=this.metas.obtain(e).obtain(t);return void 0===r?n:n[r]}hasMeta(e,t){return this.metas.has(e)&&this.metas.obtain(e).has(t)}getMetaIfExists(e,t){return this.metas.getIfExists(e)?.getIfExists(t)}createTransientMeta(e){return this._createMeta(e)}setMeta(e,t,r,n){let o=this.metas.obtain(e).obtain(t);o._automaticallyAssignedMetaProps?.delete(r),o[r]=n,void 0===o._persistedMetaProps&&(o._persistedMetaProps=new Set),o._persistedMetaProps.add(r),0===this.#rH?(void 0===o._userDefinedMetaProps&&(o._userDefinedMetaProps=new Set),o._userDefinedMetaProps.add(r)):o._userDefinedMetaProps?.delete(r)}removeMeta(e,t,r){let n=this.metas.getIfExists(e)?.getIfExists(t);void 0!==n&&(delete n[r],n._userDefinedMetaProps?.delete(r),n._persistedMetaProps?.delete(r))}getMetas(){let e=[],t=Array.from(this.metas.values());for(let r=0;r<t.length;r++)eU(t[r])&&e.push(...Array.from(t[r].values()));return e}getMetasAtRow(e){oV(e)||th("Assertion failed: Expecting an unsigned number.");let t=this.metas.getIfExists(e);return void 0===t?[]:Array.from(t).sort((e,t)=>{let[r]=e,[n]=t;return r-n}).map(e=>{let[,t]=e;return t})}getUserDefinedMetas(){let e=[];for(let[t,r]of this.metas)for(let[n,o]of r){let r=o._userDefinedMetaProps;void 0!==r&&r.forEach(r=>{tA(o,r)&&e.push({physicalRow:t,physicalColumn:n,key:r,value:o[r]})})}return e}evictRow(e){let t=this.metas.getIfExists(e);if(void 0===t)return[];let r=!1,n=[];for(let[e,o]of t){let i=o._persistedMetaProps,s=void 0!==i&&i.size>0,a=!1===o.valid;s||a?r=!0:(t.evict(e),n.push(e))}return r||this.metas.evict(e),n}clearCache(){this.metas.clear()}_createRow(){return new dE(e=>this._createMeta(e))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}class dI{constructor(e,t={},r=[]){this.hot=e,this.globalMeta=new dS(e),this.tableMeta=new dv(this.globalMeta),this.columnMeta=new dA(this.globalMeta),this.cellMeta=new dM(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}getCellMetaUncached(e,t,r){let n=this.cellMeta.getMetaIfExists(e,t)??this.cellMeta.createTransientMeta(t);return n.visualRow=r.visualRow,n.visualCol=r.visualColumn,n.row=e,n.col=t,n}getCellMetaTransient(e,t,r){let n=this.cellMeta.getMetaIfExists(e,t);if(void 0!==n)return n.visualRow=r.visualRow,n.visualCol=r.visualColumn,n.row=e,n.col=t,this.runLocalHooks("afterGetCellMeta",n),n;let o=this.cellMeta.createTransientMeta(t);return o.visualRow=r.visualRow,o.visualCol=r.visualColumn,o.row=e,o.col=t,this.runLocalHooks("extendTransientCellMeta",o),o}getCellMetaKeyValue(e,t,r){return"string"!=typeof r&&th("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)}getUserDefinedCellMetas(){return this.cellMeta.getUserDefinedMetas()}enableUserDefinedMetaRecording(){this.cellMeta.enableUserDefinedMetaRecording()}disableUserDefinedMetaRecording(){this.cellMeta.disableUserDefinedMetaRecording()}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()}}tf(dI,aE);class dx{metaSyncMemo=new Map;#r_=0;#rL=0;#rP=!1;constructor(e){this.metaManager=e,e.addLocalHook("afterGetCellMeta",e=>{this.extendCellMeta(e)}),e.addLocalHook("extendTransientCellMeta",e=>{this.extendTransientCellMeta(e)}),n$.getSingleton().add("beforeRender",e=>{e&&this.metaSyncMemo.clear()},this.metaManager.hot);const t=()=>this.#rD();n$.getSingleton().add("afterScrollVertically",t,this.metaManager.hot),n$.getSingleton().add("afterViewRender",t,this.metaManager.hot)}extendCellMeta(e){let t=e.row,r=e.col;if(this.metaSyncMemo.get(t)?.has(r))return;this.#rF(e,e=>{this.metaManager.updateCellMeta(t,r,e)});let n=this.metaSyncMemo.get(t);void 0===n&&(n=new Set,this.metaSyncMemo.set(t,n)),n.add(r)}extendTransientCellMeta(e){this.#rF(e,t=>{tc(e,t),dy(e,t)})}#rF(e,t){let r=e.row,n=e.col,o=e.visualRow,i=e.visualCol,s=this.metaManager.hot,a=s.colToProp(i);e.prop=a,s.runHooks("beforeGetCellMeta",o,i,e);let l=tA(e,"type")?e.type:null,h=np(e.cells)?e.cells(r,n,a):null;l&&(h?h.type=h.type??l:h={type:l}),h&&t(h),s.runHooks("afterGetCellMeta",o,i,e)}#rD(){let e=this.metaManager.hot,t=e.getFirstRenderedVisibleRow(),r=e.getLastRenderedVisibleRow();if(!Number.isInteger(t)||!Number.isInteger(r)||r<t)return;let n=r-t+1,o=t-n,i=r+n,s=this.#r_,a=this.#rL;this.#rP&&(this.#rB(s,Math.min(a,o-1)),this.#rB(Math.max(s,i+1),a)),this.#r_=o,this.#rL=i,this.#rP=!0}#rB(e,t){if(e>t)return;let r=this.metaManager.hot,n=r.getSelectedRangeLast(),o=n?n.highlight.row:null;for(let n=e;n<=t;n++){let e=r.toPhysicalRow(n);n!==o&&Number.isInteger(e)&&this.#rV(e)}}#rV(e){let t=this.metaManager.cellMeta.evictRow(e);if(0===t.length)return;let r=this.metaSyncMemo.get(e);if(void 0!==r){for(let e=0;e<t.length;e++)r.delete(t[e]);0===r.size&&this.metaSyncMemo.delete(e)}}}class dN{metaManager;usageTracker=new Set;propDescriptors=new Map([["ariaTags",{initOnly:!0}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e&&th("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`."),this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart")&&th("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]]);constructor(e){this.metaManager=e,this.extendMetaProps()}#rU=(e,t,r)=>{r||th(`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.#rU),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(t))})}installPropWatcher(e,t,r){let{usageTracker:n}=this,o=r.bind(this);Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(r){let i=!n.has(e);n.add(e),o(e,r,i),this[t]=r},enumerable:!0,configurable:!0})}}let dO=class{dataType="array";colToProp=e=>void 0;propToCol=e=>void 0;countCachedColumns;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?.length?e||this.hot.hasHook("modifySourceData")||this.hot.hasHook("modifyRowData")?this.getByRange(null,null,e):this.data.map(aR):this.data}setData(e){this.data=e}getAtColumn(e){let t=[];return J(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)}):oH(t,r,r=>{a[r-t]=this.getAtPhysicalCell(e,r,s)});else if(ty(s)||np(s))if(a=n?[]:{},!o||n){let o=this.countFirstRowKeys()-1;oH(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?null!==a&&tR(a,h,t):a[h]=t}})}else tS(s,(t,r)=>{let n=this.getAtPhysicalCell(e,r,s);i?null!==a&&tR(a,r,n):a[r]=n});return a}setAtCell(e,t,r){let n;if("string"==typeof e){let t=Number(e);if(Number.isNaN(t)||!Number.isInteger(t)||t<0)return;n=t}else{if("number"!=typeof e||!Number.isInteger(e)||e<0)return;n=e}if(n>=this.countRows()||"number"==typeof t&&t>=this.countFirstRowKeys())return;if(this.hot.hasHook("modifySourceData")){let e=tT(r);this.hot.runHooks("modifySourceData",n,t,e,"set"),e.isTouched()&&(r=e.value)}let o=this.modifyRowData(n);if(Number.isInteger(t))Array.isArray(o)?o[t]=r:ty(o)&&tR(o,String(t),r);else if(Array.isArray(o)){let e=Number(t);!Number.isNaN(e)&&Number.isInteger(e)&&e>=0&&e<this.countFirstRowKeys()&&(o[e]=r)}else ty(o)&&tR(o,String(t),r)}getAtPhysicalCell(e,t,r){let n=null;if(r)if("string"==typeof t){let{dataDotNotation:e}=this.hot.getSettings();n=e?tv(r,t):r[t]}else n="function"==typeof t?t(r):r[t];if(this.hot.hasHook("modifySourceData")){let r=tT(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 oH(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"number"==typeof r&&this.hot.getCellMetaTransient(e,r).copyable?this.getAtCell(this.hot.toPhysicalRow(e),r):""}countRows(){if(this.hot.hasHook("modifySourceLength")){let e=this.hot.runHooks("modifySourceLength");if("number"==typeof e&&Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return aw(this.data??[])}destroy(){this.data=null,this.hot=null}},dk=/^(\r\n|\n\r|\r|\n)/,dH=/^[^\t\r\n]+/,d_=/^\t/;function dL(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.replaceAll('"','""')}"`:s+=i:null==i?s+="":s+=i;t!==r-1&&(s+="\n")}return s}class dP{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}tableMeta;constructor(e,t,r){this.hot=e,this.metaManager=r,this.tableMeta=r.getTableMeta(),this.dataSource=t,this.colToPropCache=[],this.propToColCache=new Map,this.refreshDuckSchema(),this.createMap()}createMap(){let e=this.getSchema();void 0===e&&th("trying to create `columns` definition but you didn't provide `schema` nor `data`");let t=this.tableMeta.columns;this.colToPropCache=[],this.propToColCache=new Map,t?this.#rz(t,e):this.recursiveDuckColumns(e)}#rz(e,t){let r=0,n=0,o="function"==typeof e;if(o){let e=tE(t);r=e>0?e:this.countFirstRowKeys()}else r=Math.min(this.tableMeta.maxCols??1/0,e.length);for(let t=0;t<r;t++){let r=o?e(t):e[t];if(ty(r)){if(void 0!==r.data){let e=o?n:t,i=r.data;this.colToPropCache[e]=i,this.propToColCache.set(i,e)}n+=1}}}countFirstRowKeys(){return aw(this.dataSource??[])}recursiveDuckColumns(e,t,r){let n,o=t??0,i=r??"";return"object"!=typeof e||null===e||Array.isArray(e)||tS(e,(e,t)=>{null===e?(n=i+t,this.colToPropCache.push(n),this.propToColCache.set(n,o),o+=1):"object"==typeof e&&null!==e&&(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&&eU(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){let t=this.propToColCache.get(e);if(void 0!==t)return this.hot.toVisualColumn(t);if("number"!=typeof e)return e;let r=this.hot.toVisualColumn(e);return null!==r?r:e}getSchema(){let e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?td(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??1/0);){let e=null;if("array"===this.hot.dataType)this.tableMeta.dataSchema?e=tp(this.getSchema()):(e=[],oH(h-1,()=>e.push(null)));else if("function"===this.hot.dataType){let t=this.tableMeta.dataSchema;"function"!=typeof t&&th("`dataSchema` must be a function when `dataType` is `function`"),e=t(a+s)}else tg(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()||th("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=Math.max(0,Math.min(t,(i??1/0)-a));return this.#rW(o,u,h,a,l,c),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}}#rW(e,t,r,n,o,i){if(i<=0)return;let s=i;"number"==typeof r&&(s=Math.max(0,Math.min(i,r-n+1)));let a=i-s;if(s>0)if(o>0)for(let t=0;t<o;t++){void 0===e[t]&&(e[t]=[]);for(let r=0;r<s;r++)e[t].push(null)}else for(let t=0;t<s;t++)e.push([null]);if(a>0)for(let r=0;r<o;r++)ei(e[r],t+s,a,null)}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.countRows();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=eU(this.tableMeta.columns)||eU(this.tableMeta.dataSchema)||this.tableMeta.colHeaders;0!==this.hot.rowIndexMapper.getNotTrimmedIndexesLength()||e||this.hot.columnIndexMapper.setIndexesSequence([])}let a=o.slice(0).sort((e,t)=>t-e);return this.#rG(a,(e,t)=>{this.metaManager.removeRow(e,t)}),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)&&th("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);return this.#r$(l,s,o,i,t),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}#r$(e,t,r,n,o){if(t)for(let t=0,n=this.hot.countSourceRows();t<n;t++)e[t].splice(r[0],o),0===t&&this.metaManager.removeColumn(r[0],o);else{let t=new Set(r),o=this.hot.countSourceRows();for(let r=0;r<o;r++)eo(e[r],t);o>0&&this.#rG(n,(e,t)=>{this.metaManager.removeColumn(e,t)})}}#rG(e,t){let r=0;for(let n=0;n<e.length;n++)(n+1>=e.length||e[n+1]!==e[n]-1)&&(t(e[n],n-r+1),r=n+1)}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);q(o,s.slice(t+r));let l=0;for(;l<r;)o.push(null),l+=1;return j(o),this.hot.populateFromArray(t,e,o,void 0,void 0,"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);q(o,s.slice(t+r));let l=0;for(;l<r;)o.push(null),l+=1;return this.hot.populateFromArray(e,t,[o],void 0,void 0,"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);Array.isArray(n)?(this.dataSource.length=0,n.forEach(e=>{this.dataSource.push(e)})):eo(this.dataSource,new Set(r))}get(e,t){let r=this.hot.toPhysicalRow(e),n=this.dataSource[r],o=this.hot.runHooks("modifyRowData",r);n="number"!=typeof o?o:n;let{dataDotNotation:i}=this.hot.getSettings(),s=null;if(n&&tA(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="number"==typeof a?this.hot.toPhysicalColumn(a):null;if("number"==typeof a&&oV(r)&&oV(l)&&(s=n7(s,this.metaManager.getCellMetaUncached(r,l,{visualRow:e,visualColumn:a}))),this.hot.hasHook("modifyData")){let t=tT(s);this.hot.runHooks("modifyData",e,a,t,"get"),t.isTouched()&&(s=t.value)}return s}getCopyable(e,t){let r=this.propToCol(t);return"number"==typeof r&&this.hot.getCellMetaTransient(e,r).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="number"!=typeof s?s:i,this.hot.hasHook("modifyData")){let r=tT(o);this.hot.runHooks("modifyData",e,this.propToCol(t),r,"set"),r.isTouched()&&(o=r.value)}let{dataDotNotation:a}=this.hot.getSettings();if(i&&tA(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.countRows(),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||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,dP.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===dP.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,d=Math.min(Math.max((a??1/0)-1,0),Math.max(e.row,t.row)),u=Math.min(Math.max((l??1/0)-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 dL(this.getRange(e,t,dP.DESTINATION_RENDERER))}getCopyableText(e,t){return dL(this.getRange(e,t,dP.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 dD(e,t,r,n,o,i,s){let a=e.sourceDataValidator;if(!np(a)||!0===a(t,e,s))return;!1===e.allowInvalid&&o.setAtCell(r,n,null);let l=e.sourceDataWarningMessage;if(l){let e=i.get(l)??[];e.push({row:r,col:n,value:t,message:l}),i.set(l,e)}}function dF(e,t){let r=e.countSourceRows(),n=e.countSourceCols();if(0===r||0===n)return;let o=e.getSettings(),i=e._getDataSource(),s=new Map,{fullScan:a,columns:l}=function(e,t){let r=e._getMetaManager(),n=[];for(let o=0;o<t;o+=1){let t=e.columnIndexMapper.getVisualFromPhysicalIndex(o);if(null===t)continue;let i=r.getCellMetaUncached(0,o,{visualRow:0,visualColumn:t}),s=i.sourceDataValidator;if(np(s)){if(!0!==s.rowIndependent)return{fullScan:!0,columns:[]};n.push({physicalColumn:o,cellMeta:i})}}return{fullScan:!1,columns:n}}(e,n),h=Array.isArray(o.cell)&&o.cell.length>0||e._getMetaManager().getUserDefinedCellMetas().length>0;(a||0!==l.length||h)&&(a||h?function(e,t,r,n,o,i){let{rowIndexMapper:s,columnIndexMapper:a}=e,l=e._getMetaManager();for(let e=0;e<r;e+=1)for(let r=0;r<n;r+=1){let n=s.getVisualFromPhysicalIndex(e),h=a.getVisualFromPhysicalIndex(r);if(null===n||null===h)continue;let d=l.getCellMetaUncached(e,r,{visualRow:n,visualColumn:h});np(d.sourceDataValidator)&&dD(d,t.getAtCell(e,r),e,r,t,o,i)}}(e,i,r,n,s,t):function(e,t,r,n,o,i){for(let s=0;s<r;s+=1)if(null!==n(s))for(let r=0;r<e.length;r+=1){let{physicalColumn:n,cellMeta:a}=e[r];dD(a,t.getAtCell(s,n),s,n,t,o,i)}}(l,i,r,t=>e.rowIndexMapper.getVisualFromPhysicalIndex(t),s,t),s.forEach((e,t)=>{dB(t,e)}))}function dB(e,t){!function(){let{logFunction:e=t3,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(t2(t,{itemsCount:`${i} cell${i>1?"s":""}`,affectedCells:["Affected cells:",...s,...a?[a]:[]].join("\n")}))}({logFunction:t6,message:e,items:t,itemFormatter:e=>{let{row:t,col:r,value:n}=e,o=eV(n),i=o.length>64?`${o.slice(0,64)}...`:o;return`row ${t}, col ${r}, value: "${i}"`}})}function dV(e,t,r,n){let{hotInstance:o,dataMap:i,dataSource:s,internalSource:a,source:l,metaManager:h,firstRun:d}=n,u=op(a),c=o.getSettings();Array.isArray(c.dataSchema)?o.dataType="array":np(c.dataSchema)?o.dataType="function":o.dataType="object",i&&i.destroy(),e=o.runHooks(`before${u}`,e,d,l);let g=new dP(o,e,h);t(g),"object"==typeof e&&null!==e?e.push&&e.splice||(e=[e]):null===e?e=function(e,t,r){let n=t.getSchema(),o=[];for(let t=0,i=r.startRows;t<i;t++){let t;if(("object"===e.dataType||"function"===e.dataType)&&r.dataSchema)t=tp(n);else if("array"===e.dataType)t=tp(n[0]);else{t=[];for(let e=0,n=r.startCols;e<n;e++)t.push(null)}o.push(t)}return o}(o,g,c):th(`${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=e=>g.colToProp(e),s.propToCol=e=>g.propToCol(e),s.countCachedColumns=g.countCachedColumns.bind(g),r(g),d||dF(o,a),o.runHooks(`after${u}`,e,d,l),d||(o.runHooks("afterChange",null,a),o.view.adjustElementsSize(),o.render()),o.getSettings().ariaTags&&ry(o.rootElement,[D(-1),F(o.countCols()+(o.view?o.countRowHeaders():0))])}class dU{#rY;#rj;constructor({rowIndexMapper:e,columnIndexMapper:t}){this.#rY=e,this.#rj=t}toRenderable(e){let t="N-S"===e.getVerticalDirection()?1:-1,r="W-E"===e.getHorizontalDirection()?1:-1,n=this.#rq(e.from,t,r);if(null===n)return null;let o=this.#rq(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}#rq(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(null===e.row||null===e.col)return null;let n=this.#rK(this.#rY,e.row,t);if(null===n)return null;let o=this.#rK(this.#rj,e.col,r);return null===o?null:e.clone().assign({row:n,col:o})}#rK(e,t,r){return t<0?t:e.getNearestNotHiddenIndex(t,r)}}function dz(e){na(e)&&e.scrollIntoView({block:"nearest",inline:"nearest"})}function dW(e){let{selection:t,view:r}=e,n=e.getSelectedRangeActive(),o=t.getSelectionSource(),i=r.getFirstFullyVisibleColumn()??-1,s=r.getLastFullyVisibleColumn()??-1,a=n?.getTopStartCorner().col??-1,l=n?.getBottomEndCorner().col??-1,h=a<=i,d=l>=s,u=r.getFirstFullyVisibleRow()??-1,c=r.getLastFullyVisibleRow()??-1,g=n?.getTopStartCorner().row??-1,p=n?.getBottomEndCorner().row??-1,m=g<=u,f=p>=c;return{getComputedColumnTarget:e=>"mouse"===o||"keyboard"===o?e.col??-1:h&&d?n?.highlight.col??-1:h?a:d?l:e.col??-1,getComputedRowTarget:e=>"mouse"===o||"keyboard"===o?e.row??-1:m&&f?n?.highlight.row??-1:m?g:f?p:e.row??-1}}let dG=Object.freeze({CELL:"cell",MIXED:"mixed"});class d${#rX;#rQ=null;#rZ=!1;#rJ;#r0=1;#r1=null;#r2=new Map;#r3=!1;#r6=!1;constructor(e){this.#rX=e}init(){var e=this;let t=this.#rX.getSettings();this.#rJ=t.imeFastEdit?dG.MIXED:dG.CELL,this.#rX.addHook("afterUpdateSettings",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#r5(r[0])}),this.#rX.addHook("afterSelection",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#r4()}),this.#rX.addHook("afterSelectionFocusSet",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#r4()}),this.#rX.addHook("afterSelectionEnd",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#r9()}),this.#rX.addHook("afterRender",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.#r7()}),this.#rQ=new or(this.#rX);let r=[this.#rX.rootWrapperElement??this.#rX.rootElement,this.#rX.rootPortalElement].filter(e=>na(e));r.forEach(e=>{this.#rQ.addEventListener(e,"focusin",()=>{this.#rZ=!0}),this.#rQ.addEventListener(e,"focusout",e=>{let t=e.relatedTarget;this.#rZ=na(t)&&r.some(e=>e.contains(t))})})}hasBrowserFocus(){return this.#rZ}isForeignFocusTarget(e){let{rootElement:t,rootWrapperElement:r,rootPortalElement:n,rootDocument:o}=this.#rX,i=!!r&&r.contains(e)&&!t.contains(e);return!(null===e||e===o.body||e===o.documentElement||rr(e,t)||i||n&&n.contains(e))&&!nu(t).includes(e)}getFocusMode(){return this.#rJ}setFocusMode(e){Object.values(dG).includes(e)?this.#rJ=e:t6(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return this.#r0}setRefocusDelay(e){this.#r0=e}setRefocusElementGetter(e){this.#r1=e}suspend(){this.#r6=!0}resume(){this.#r6=!1}getRefocusElement(){return"function"==typeof this.#r1?this.#r1():this.#rX.getActiveEditor()?.TEXTAREA}focusElement(e,t){return!!na(e)&&!!e.isConnected&&(e.focus(t),!0)}focusOnHighlightedCell(e){let t=e=>{let t=this.#rX.getSelectedRangeActive()?.highlight;if(!t)return;let r=this.#rX.runHooks("modifyFocusedElement",t.row,t.col,e);na(r)||(r=e),r&&!this.#rX.getActiveEditor()?.isOpened?.()&&this.focusElement(r,{preventScroll:!0})};e?t(e):this.#r8(e=>t(e))}refocusToEditorTextarea(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.#r0;this.#rX.getSettings().imeFastEdit&&!this.#rX.getActiveEditor()?.isOpened?.()&&(this.#rX.getActiveEditor()?.refreshValue?.(),this.#r2.has(e)||this.#r2.set(e,nb(()=>{this.#rX.isDestroyed||this.getRefocusElement()?.select()},e)),this.#r2.get(e)())}#r8(e){let t=this.#rX.getSelectedRangeActive()?.highlight;if(!t||!this.#rX.selection.isCellVisible(t)||null===t.row||null===t.col)return void e(null);let{row:r,col:n}=t,o=this.#rX.getCell(r,n,!0);null===o?this.#rX.addHookOnce("afterScroll",()=>{e(this.#rX.getCell(r,n,!0))}):e(o)}#ne(){let e=this.#r6;this.#r8(t=>{let r=nc(this.#rX.rootDocument),n=na(r)?r:null;e&&n&&ne(n)||(n&&ne(n)&&n.blur(),this.focusOnHighlightedCell(t))})}#r9(){if(this.#r6){let e=nc(this.#rX.rootDocument),t=na(e)?e:null;if(t&&ne(t))return}this.#r8(e=>{this.getFocusMode()===dG.MIXED&&e?.nodeName==="TD"&&this.refocusToEditorTextarea()})}#r4(){this.#r3=!0}#r7(){this.#r3&&(this.#r3=!1,this.#ne())}#r5(e){"boolean"==typeof e.imeFastEdit&&this.setFocusMode(e.imeFastEdit?dG.MIXED:dG.CELL)}}let dY=Object.freeze({INLINE:"inline",MODAL:"modal"}),dj=Object.freeze({UNKNOWN:"unknown",CLICK:"click",TAB_FROM_ABOVE:"tab_from_above",TAB_FROM_BELOW:"tab_from_below"});function dq(e,t){let r=e.rootDocument.createElement("div");return r.style.display="none",r.classList.add("htFocusCatcher"),r.dataset.htFocusSource=t,r}function dK(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,s=0===o?t.getVisualFromRenderableIndex(o):o,a=0===i?r.getVisualFromRenderableIndex(i):i;return null===s||null===a?null:e._createCellCoords(s,a)}function dX(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 dQ="gridDefault",dZ="grid.tabNavigation",dJ="editorManager.handlingEditor";function d0(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=dK(e),i=dX(e);return null===o||null===i?null:(t.row=oP(t.row,o.row??t.row,i.row??t.row),t.col=oP(t.col,o.col??t.col,i.col??t.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});let s=e.getShortcutManager().getContext("grid");s?.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:dQ,group:dZ,position:"before",callback(){let{tabNavigation:t}=e.getSettings();e.getSelectedRangeActive()&&!t&&(o=!1)}},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:dQ,group:dZ,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?dK(e):dX(e)),n.wrapped=!1,n.flipped=!1)},position:"after"}]);let a=e.rootGridContentElement??e.rootElement;e.getFocusScopeManager().registerScope("grid",a,{contains:t=>!!(a===t||a.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)??dK(e);if(n){let t=e.runHooks("modifyFocusOnTabNavigation","from_above",n),{row:r,col:o}=n;!1!==t&&null!==r&&null!==o&&(e.selectCell(r,o),e.getFocusManager().focusOnHighlightedCell())}}else if("tab_from_below"===n){let n=r(t)??dX(e);if(n){let t=e.runHooks("modifyFocusOnTabNavigation","from_below",n),{row:r,col:o}=n;!1!==t&&null!==r&&null!==o&&e.selectCell(r,o)}}}})}let d1=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"]]),d2=e=>e.map(e=>{let t=e.toLowerCase();return d1.has(t)?d1.get(t)??t:t}).sort((e,t)=>e.localeCompare(t)).join("+"),d3=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"]]),d6=e=>{let{which:t,key:r}=e;if(d3.has(t))return d3.get(t)??r.toLowerCase();let n=String.fromCharCode(t).toLowerCase();return/^[a-z0-9]$/.test(n)?n:r.toLowerCase()},d5=["meta","alt","shift","control"],d4=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},d9=Symbol("shortcut-context");function d7(e){return ty(e)&&e.__kindOf===d9}let d8=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"table",r=o$({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]:{};ez(n)&&th("You need to define the shortcut's group."),!1===np(t)&&th("The shortcut's callback needs to be a function."),!1===Array.isArray(e)&&th(ec`Pass the shortcut\'s keys as an array of arrays,\x20
84
84
  using the KeyboardEvent.key properties:\x20
85
- declare 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};eU(l)&&(u.relativeToGroup=l,u.position=h),d7(d)&&(u.forwardToContext=d),e.forEach(e=>{let t=d2(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=d2(e);r.removeItem(t)};return{__kindOf:d9,scope:t,addShortcut:n,addShortcuts:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach(e=>{tS(t,(r,n)=>{!1===Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])}),n(e)})},getShortcuts:e=>{let t=d2(e),n=r.getItem(t);return eU(n)?n.slice():[]},hasShortcut:e=>{let t=d2(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))})}}},ue=(o=new Set,{press(e){o.add(e)},release(e){o.delete(e)},releaseAll(){o.clear()},isPressed:e=>o.has(e)}),ut=new WeakMap,ur=e=>{if("string"==typeof e.key){let t=d6(e);d5.includes(t)&&ue.press(t)}},un=e=>{if("string"==typeof e.key){let t=d6(e);d5.includes(t)&&ue.release(t)}},uo=[{name:"editorCloseAndSave",callback(e){e._getEditorManager().closeEditorAndSaveChanges()}},{name:"editorCloseAndSaveByArrowKeys",callback(e,t,r){let n=e._getEditorManager(),o=n.getActiveEditor();o?.isInFullEditMode()&&o?.state===n8.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 r=e.getSelectedRangeActive()?.highlight;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(),a=s?.highlight;if((i?.some(e=>n.isMultiple(e))||(i?.length??0)>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??0),-(i?.col??0)):n.transformFocus(i?.row??0,i?.col??0);return}a?.isHeader()||(e.getSettings().enterBeginsEditing?o.cellProperties.readOnly?o.moveSelectionAfterEnter(t):o.openEditor(null,t,!0):o.moveSelectionAfterEnter(t),nN(t))}},{name:"extendCellsSelectionDown",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight;!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,n=e.getSelectedRangeActive();if(!n)return;let{to:o}=n,i=o.row??0,s=Math.min(i+e.countVisibleRows(),e.countRows()-1),a=r.getNearestNotHiddenIndex(s,-1);if(null!==a){let r=e._createCellCoords(a,o.col??0),n=i-(e.getFirstFullyVisibleRow()??0),s=Math.min((r.row??0)-n,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,r=e.getSelectedRangeActive()?.highlight;!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,r=e.getSelectedRangeActive()?.highlight;!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,r=e.getSelectedRangeActive();if(!r)return;let{highlight:n,from:o,to:i}=r;t.markSource("keyboard"),t.isSelectedByRowHeader()?t.selectAll(!0,!0):e.selectColumns(o.col??0,i.col??0,n),t.markEndSource()}},{name:"extendCellsSelectionToMostBottom",callback(e){let{selection:t,rowIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByRowHeader();if(o.isCell()||a){let n=r.getNearestNotHiddenIndex(e.countRows()-1,-1),l=i.clone();l.row=o.row,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(n??0,s.col??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineEnd",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n;if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&o.isCell()){let n=r.getNearestNotHiddenIndex(e.countCols()-1,-1),a=i.clone();a.col=o.col,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,o.clone()),t.setRangeEnd(e._createCellCoords(s.row??0,n??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n;if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&o.isCell()){let n=Number(e.getSettings().fixedColumnsStart)||0,a=r.getNearestNotHiddenIndex(n,1),l=i.clone();l.col=o.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),t.setRangeEnd(e._createCellCoords(s.row??0,a??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByColumnHeader();if(o.isCell()||a){let n=e.isRtl()?r.getNearestNotHiddenIndex(e.countCols()-1,-1):r.getNearestNotHiddenIndex(0,1),l=i.clone();l.col=o.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row??0,n??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostRight",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByColumnHeader();if(o.isCell()||a){let n=e.isRtl()?r.getNearestNotHiddenIndex(0,1):r.getNearestNotHiddenIndex(e.countCols()-1,-1),l=i.clone();l.col=o.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row??0,n??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostTop",callback(e){let{selection:t,rowIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByRowHeader();if(o.isCell()||a){let n=r.getNearestNotHiddenIndex(0,1),l=i.clone();l.row=o.row,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(n??0,s.col??0)),t.markEndSource()}}},{name:"extendCellsSelectionToRows",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive();if(!r)return void t.markEndSource();let{highlight:n,from:o,to:i}=r;t.markSource("keyboard"),t.isSelectedByColumnHeader()?t.selectAll(!0,!0):e.selectRows(o.row??0,i.row??0,n),t.markEndSource()}},{name:"extendCellsSelectionUp",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight;!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,n=e.getSelectedRangeActive();if(!n)return;let{to:o}=n,i=o.row??0,s=Math.max(i-e.countVisibleRows(),0),a=r.getNearestNotHiddenIndex(s,1);if(null!==a){let r=e._createCellCoords(a,o.col??0),n=i-(e.getFirstFullyVisibleRow()??0),s=Math.max((r.row??0)-n,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,o=e.getSelectedRangeActive()?.highlight.row??0,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();let s=e.getSettings().fixedRowsBottom??0,a=e.countRows(),l=e.getSelectedRangeActive()?.highlight.row??0;l<0?e.scrollViewportTo({row:0}):s>0&&l>=a-s&&e.scrollViewportTo({row:a-s-1,verticalSnap:"bottom"})}},{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??0)>1)&&!i?.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?r.transformFocus(-(s?.row??0),-(s?.col??0)):r.transformStart(-(s?.row??0),-(s?.col??0)),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??0)>1)&&!i?.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?r.transformFocus(s?.row??0,s?.col??0):r.transformStart(s?.row??0,s?.col??0),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,r=e.getSelectedRangeActive()?.highlight.col??0,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=Number(e.getSettings().fixedRowsBottom)||0,i=r.getNearestNotHiddenIndex(e.countRows()-o-1,-1),s=n.getNearestNotHiddenIndex(e.countCols()-1,-1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(i??-1,s??-1)),t.markEndSource()}},{name:"moveCellSelectionToMostInlineEnd",callback(e){let{selection:t,columnIndexMapper:r}=e;t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(e.getSelectedRangeActive()?.highlight.row??0,r.getNearestNotHiddenIndex(e.countCols()-1,-1)??0)),t.markEndSource()}},{name:"moveCellSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,n=Number(e.getSettings().fixedColumnsStart)||0,o=e.getSelectedRangeActive()?.highlight.row??0,i=r.getNearestNotHiddenIndex(n,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(o,i??0)),t.markEndSource()}},{name:"moveCellSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive()?.highlight.row??0,o=e.isRtl()?r.getNearestNotHiddenIndex(e.countCols()-1,-1):r.getNearestNotHiddenIndex(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,n=e.getSelectedRangeActive()?.highlight.row??0,o=e.isRtl()?r.getNearestNotHiddenIndex(0,1):r.getNearestNotHiddenIndex(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,r=e.getSelectedRangeActive()?.highlight.col??0,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=Number(e.getSettings().fixedRowsTop)||0,i=Number(e.getSettings().fixedColumnsStart)||0,s=r.getNearestNotHiddenIndex(o,1),a=n.getNearestNotHiddenIndex(i,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(s??0,a??0)),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,o=e.getSelectedRangeActive()?.highlight.row??0,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();let s=e.getSettings().fixedRowsTop??0;(e.getSelectedRangeActive()?.highlight.row??0)<s&&e.scrollViewportTo({row:s,verticalSnap:"top"})}},{name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}},{name:"scrollToFocusedCell",callback(e){let t=e.getSelectedRangeActive()?.highlight;if(!t)return;let 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??-1)>=0||(t.col??-1)>=0)){let r={};if((t.col??-1)>=0){let n=Math.floor(e.countVisibleCols()/2);r.col=Math.max((t.col??0)-n,0)}if((t.row??-1)>=0){let n=Math.floor(e.countVisibleRows()/2);r.row=Math.max((t.row??0)-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();if(!t)return;let r=t[t.length-1].highlight.normalize(),n=r.row??0,o=r.col??0,i=e.getDataAtCell(n,o),s=new Map;for(let r=0;r<t.length;r++)t[r].forAll((t,r)=>{if(t>=0&&r>=0&&(t!==n||r!==o)){let{readOnly:n}=e.getCellMetaTransient(t,r);n||s.set(`${t}x${r}`,[t,r,i])}});e.setDataAtCell(Array.from(s.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 ui(e){let t={};return uo.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 us(e){let t=e.getShortcutManager().addContext("editor"),r=ui(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:dJ})}function ua(e){let t=e.getShortcutManager().addContext("grid"),r=ui(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:dJ,runOnlyIf:()=>eU(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>r.selectAllCells(),runOnlyIf:()=>eU(e.getSelected())&&!e.getSelectedRangeActive()?.highlight.isHeader()},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>!!(eU(e.getSelected())&&e.getSelectedRangeActive()?.highlight.isHeader()),preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>r.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>r.populateSelectedCellsData(),runOnlyIf:()=>eU(e.getSelected())&&!e.getSelectedRangeActive()?.highlight.isHeader()&&(e.getSelectedRangeActive()?.getCellsCount()??0)>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:()=>eU(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:()=>eU(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:()=>eU(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:()=>eU(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>eU(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>eU(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>eU(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>eU(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 eU(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:dQ});let n=r.tabNavigation();t.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:dQ,group:dZ,position:"before",callback:e=>n.before(e)},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:dQ,group:dZ,callback:e=>n.after(e),position:"after"}])}function ul(e){let{classNames:t}=rh(e,/ht-theme-[a-zA-Z0-9_-]+/);return t.pop()}let uh="handsontable-core-styles";class ud{#rX;#nt;#nr;#nn=null;#no=!1;#ni;#ns={};#na={};#nl;constructor({hot:e,rootElement:t,rootDocument:r,onThemeChange:n=e=>{},injectCoreCss:o=!0}){this.#rX=e,this.#nr=t,this.#ni=r,this.#nl=n,o&&this.#nh()}getCSSVariableValue(e){if(this.#ns[`--ht-${e}`])return this.#ns[`--ht-${e}`];let t=this.#nd(`--ht-${e}`)??this.#nu(`--ht-${e}`);if(null!==t)return this.#ns[`--ht-${e}`]=t,t}getStyleForTD(e){return this.#na?.td?.[e]}getDefaultRowHeight(e){let t=this.#nc();return void 0!==e&&e===this.#rX.view.getFirstRenderedVisibleRow()?(t??0)+1:t}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(e){"string"==typeof e&&/ht-theme-.*/.test(e)?(this.#ng(),e!==this.#nt&&(this.#nt=e),this.#nl(this.#nt),this.#np()):t6(`${e} isn't a valid theme name. Please ensure it follows the format ht-theme-<theme-name>.`)}getThemeName(){return this.#nt}#nh(){if(!this.#rX||!this.#ni||!this.#ni.head)return;let e=this.#ni.getElementById(uh);if(e&&e instanceof HTMLStyleElement)return;let t=this.#ni.createElement("style");t.id=uh,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 67,200.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: 18.1.2-rc2\n * Release date: 07/10/2026 (built at 07/10/2026 09:25:10)\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}.ht-root-wrapper.ht-shadow-dom{isolation:isolate}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-top-filled .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-top-filled .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .wtHolder{background-color:var(--ht-background-color);box-shadow:inset 0 0 0 1px var(--ht-border-color)}.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;position:relative}.ht-grid-content{height:100%}.ht-slot-top,.ht-slot-bottom{flex:none;overflow-x:auto}.ht-slot-element{box-sizing:border-box;border:1px solid var(--ht-border-color);width:100%}.ht-slot-top>.ht-slot-element:not(:first-of-type){border-top-width:0}.ht-slot-top>.ht-slot-element:last-of-type,.ht-slot-bottom>.ht-slot-element:not(:last-of-type){border-bottom-width:0}.ht-slot-bottom>.ht-slot-element:first-of-type{border-top-width: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{width:100%;height:100%}.handsontable.ht-wrapper:not(.htFirstDatasetColumnNotRendered) :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-of-type{border-inline-start-width:1px}.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:not(.htHorizontallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollY .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollY .ht_master .wtHolder{background-color:var(--ht-background-color);box-shadow:inset 0 0 0 1px var(--ht-border-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_even>th{background-color:var(--ht-row-header-even-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_even>td{background-color:var(--ht-row-cell-even-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_odd>th{background-color:var(--ht-row-header-odd-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_odd>td{background-color:var(--ht-row-cell-odd-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th,.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>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 :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.invisibleSelection,.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td.invisibleSelection{outline:none}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.invisibleSelection::selection,.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td.invisibleSelection::selection{background:0 0}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>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 :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:last-child{border-inline-width:0 1px;border-bottom-width:1px;border-inline-end-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:last-child.ht__active_highlight{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child,.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:nth-child(2){border-inline-start-width:1px}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.current{box-shadow:inset 0 0 0 1px var(--ht-cell-selection-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.active{color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__highlight{color:var(--ht-header-highlighted-foreground-color);background-color:var(--ht-header-highlighted-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>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 :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__active_highlight-prev,.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__active_highlight-seam{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr.ht__row_odd>th.ht__highlight,.handsontable :where(table.htCore,.htGhostTable>table)>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 :where(table.htCore,.htGhostTable>table)>tbody>tr.ht__row_odd>th.ht__active_highlight,.handsontable :where(table.htCore,.htGhostTable>table)>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 :where(table.htCore,.htGhostTable>table)>tbody>tr:first-of-type>th:first-child:empty:after,.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr:first-of-type>td:first-child:empty:after{content:"";min-height:var(--ht-line-height);display:block}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th{color:var(--ht-header-row-foreground-color);background-color:var(--ht-header-row-background-color);padding:0}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);min-height:100%}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>td:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>td:last-child{border-inline-end-color:var(--ht-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th.ht__active_highlight-prev-row{border-bottom-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr>th{padding:0}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr>th.ht__active_highlight{box-shadow:-1px 0 0 0 var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>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 :where(table.htCore,.htGhostTable>table)>thead>tr>th .relative .colHeader{text-overflow:ellipsis;vertical-align:top;flex:auto;min-width:0;overflow:hidden}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td{border-top-color:var(--ht-border-color);border-top-width:1px}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th.ht__active_highlight-row-seam-bottom,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td.ht__active_highlight-row-seam-bottom{border-top-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td{border-bottom-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th.ht__active_highlight-row-seam-top,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td.ht__active_highlight-row-seam-top{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] :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-of-type{border-inline-start-width:1px}.handsontable :where(table.htCore,.htGhostTable>table)>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.htCore,.handsontable:where(.htGhostTable)>table,.handsontable :where(table.htCore,.htGhostTable>table)>thead,.handsontable :where(table.htCore,.htGhostTable>table)>tbody,.handsontable input:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable textarea:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable div:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){box-sizing:content-box}.handsontable input:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable textarea:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){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 :where(table.htCore,.htGhostTable>table)>colgroup>col,.handsontable :where(table.htCore,.htGhostTable>table)>colgroup>col.rowHeader{width:64px}.handsontable :where(table.htCore,.htGhostTable>table)>colgroup>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 :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden>td,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden>th{display:none}.handsontable a:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){color:var(--ht-link-color)}.handsontable a:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))):hover{color:var(--ht-link-hover-color)}.handsontable .ht_clone_top :where(table.htCore>thead>tr)>th:nth-child(2),.handsontable .ht_clone_top_inline_start_corner :where(table.htCore>thead>tr)>th:nth-child(2){border-inline-width:0 1px}.handsontable.htRowHeaders :where(table.htCore)>thead>tr>th:nth-child(2){border-inline-start-width:1px}.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) :where(table.htCore)>tbody>tr>th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) :where(table.htCore)>thead>tr>th:first-child,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.htGhostTable) :where(table.htCore)>tbody>tr>th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.ht_clone_top):not(.htGhostTable) :where(table.htCore)>thead>tr>th:first-child{border-inline-width:1px 0}.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) :where(table.htCore)>thead>tr:last-child>th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable :where(table.htCore)>thead>tr:last-child>th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) :where(table.htCore)>thead>tr.lastChild>th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable :where(table.htCore)>thead>tr.lastChild>th{border-bottom-width:0}.handsontable.htAutoRowSize .ht_master.innerBorderTop :where(table.htCore)>tbody>tr:first-child>th,.handsontable.htAutoRowSize .ht_master.innerBorderTop :where(table.htCore)>tbody>tr:first-child>td,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start :where(table.htCore)>tbody>tr:first-child>th,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start :where(table.htCore)>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 :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td[dir=ltr]{border-inline-width:1px 0}[dir=rtl].handsontable :where(table.htCore,.htGhostTable>table)>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{border-radius:var(--ht-border-radius)}.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-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-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-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-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-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-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-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-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-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-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-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-border-radius)}.handsontable.ht-wrapper .ht_master .wtHolder,.handsontable.ht-wrapper .ht_master .htCore{border-radius:var(--ht-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-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-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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-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-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-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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-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-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-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-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-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-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-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-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-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-border-radius);border-top-right-radius:var(--ht-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-border-radius);border-top-left-radius:var(--ht-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-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-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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-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-border-radius);border-bottom-left-radius:var(--ht-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-border-radius);border-bottom-right-radius:var(--ht-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-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-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-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-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-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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore>:where(thead,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_bottom_inline_start_corner .htCore>:where(thead,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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore>:where(thead,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_bottom_inline_start_corner .htCore>:where(thead,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-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-border-radius);border-bottom-left-radius:var(--ht-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-border-radius);border-bottom-right-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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_bottom .htCore>:where(thead,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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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_bottom .htCore>:where(thead,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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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)),.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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)),.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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-border-radius)}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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:0}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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:0}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.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)){border-top-right-radius:0}.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}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.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)){border-top-left-radius:0}.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}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.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)){border-bottom-right-radius:0}.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}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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>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:0}.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}.ht-root-wrapper{border-radius:var(--ht-border-radius)}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper: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-root-wrapper.ht-slot-bottom-filled .ht_master .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)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper: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}.ht-root-wrapper.ht-slot-bottom-filled .ht_master .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)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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(.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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(.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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}.ht-root-wrapper.ht-slot-bottom-filled .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.ht-root-wrapper.ht-slot-bottom-filled .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:0}.ht-root-wrapper.ht-slot-bottom-filled .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}.ht-root-wrapper.ht-slot-bottom-filled .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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-root-wrapper.ht-slot-bottom-filled .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:0}.ht-root-wrapper.ht-slot-bottom-filled .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-root-wrapper.ht-slot-top-filled .ht-wrapper: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-root-wrapper.ht-slot-top-filled .ht_master .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)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper.ht-slot-top-filled .ht-wrapper: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-root-wrapper.ht-slot-top-filled .ht_master .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)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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-top-right-radius:0}:is(.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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}:is(.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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}.ht-root-wrapper.ht-slot-top-filled .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.ht-root-wrapper.ht-slot-top-filled .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:0}.ht-root-wrapper.ht-slot-top-filled .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}.ht-root-wrapper.ht-slot-top-filled .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.ht-root-wrapper.ht-slot-top-filled .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:0}.ht-root-wrapper.ht-slot-top-filled .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}.ht-root-wrapper .ht-slot-element{border-radius:var(--ht-border-radius)}.ht-root-wrapper .ht-slot-bottom>.ht-slot-element:not(:last-of-type){border-radius:0}.ht-root-wrapper .ht-slot-bottom>.ht-slot-element:last-of-type: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-root-wrapper .ht-slot-bottom>.ht-slot-element:last-of-type: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-root-wrapper .ht-slot-top>.ht-slot-element:not(:first-of-type){border-radius:0}.ht-root-wrapper .ht-slot-top>.ht-slot-element:first-of-type: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-root-wrapper .ht-slot-top>.ht-slot-element:first-of-type: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.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 .wtSelectionHandle{box-sizing:border-box;z-index:115;background:var(--ht-cell-selection-handle-background-color);border:var(--ht-cell-selection-handle-border-width)solid var(--ht-cell-selection-handle-border-color);border-radius:var(--ht-cell-selection-handle-border-radius);animation:ht-selection-handle-fade-in var(--ht-table-transition)ease-in-out backwards;position:absolute}.handsontable .wtSelectionHandle:hover{background:color-mix(in srgb,var(--ht-cell-selection-handle-border-color)30%,var(--ht-cell-selection-handle-background-color))}@media (prefers-reduced-motion:reduce){.handsontable .wtSelectionHandle{animation:none}}.handsontable .wtSelectionHandle--top,.handsontable .wtSelectionHandle--bottom{width:var(--ht-cell-selection-handle-length);height:var(--ht-cell-selection-handle-size);cursor:ns-resize}.handsontable .wtSelectionHandle--start,.handsontable .wtSelectionHandle--end{width:var(--ht-cell-selection-handle-size);height:var(--ht-cell-selection-handle-length);cursor:ew-resize}.handsontable.ht__resizing-selection--top .wtSelectionHandle:not(.wtSelectionHandle--top),.handsontable.ht__resizing-selection--bottom .wtSelectionHandle:not(.wtSelectionHandle--bottom),.handsontable.ht__resizing-selection--start .wtSelectionHandle:not(.wtSelectionHandle--start),.handsontable.ht__resizing-selection--end .wtSelectionHandle:not(.wtSelectionHandle--end){display:none!important}.handsontable.ht__resizing-selection--top,.handsontable.ht__resizing-selection--top *,.handsontable.ht__resizing-selection--bottom,.handsontable.ht__resizing-selection--bottom *{cursor:ns-resize!important}.handsontable.ht__resizing-selection--start,.handsontable.ht__resizing-selection--start *,.handsontable.ht__resizing-selection--end,.handsontable.ht__resizing-selection--end *{cursor:ew-resize!important}.handsontable.ht__resizing-selection--top .wtSelectionHandle--top,.handsontable.ht__resizing-selection--bottom .wtSelectionHandle--bottom,.handsontable.ht__resizing-selection--start .wtSelectionHandle--start,.handsontable.ht__resizing-selection--end .wtSelectionHandle--end{background:color-mix(in srgb,var(--ht-cell-selection-handle-border-color)30%,var(--ht-cell-selection-handle-background-color))}.handsontable .wtMoveZone{cursor:grab}.handsontable .wtMoveZone:active,.handsontable.ht__moving{cursor:grabbing}.handsontable.ht__moving *{cursor:grabbing!important}.handsontable.ht__moving .wtBorder.area,.handsontable.ht__moving .wtBorder.current{display:none!important}.handsontable.ht__moving .wtSelectionHandle,.handsontable.ht__moving .wtMoveZone{visibility:hidden!important}.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:110;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}@keyframes ht-selection-handle-fade-in{0%{opacity:0}to{opacity:1}}.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;min-width:300px}.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)}.ht-license-badge-wrapper{z-index:1050;pointer-events:none;position:absolute;inset:0;overflow:hidden}.ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:after{content:"";inline-size:min(var(--ht-license-badge-size,16px),100%);block-size:min(var(--ht-license-badge-size,16px),100%);background-color:var(--ht-license-badge-color,var(--ht-disabled-color,#a3a3a3));pointer-events:none;margin:auto;position:absolute;inset:0;inset-inline-start:clamp(0px,100% - var(--ht-license-badge-size,16px),6px);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2714.8626%27 height=%2716%27 viewBox=%270 0 14.8626 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M0 0H3.28665V4.35577H7.03576V0H10.306V11.407H7.03576V6.90834H3.28665V11.407H0V0Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M11.0991 12.236H14.8633V16.0001H11.0991V12.236Z%27 fill=%27%23000%27/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2714.8626%27 height=%2716%27 viewBox=%270 0 14.8626 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M0 0H3.28665V4.35577H7.03576V0H10.306V11.407H7.03576V6.90834H3.28665V11.407H0V0Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M11.0991 12.236H14.8633V16.0001H11.0991V12.236Z%27 fill=%27%23000%27/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:hover:after{background-color:var(--ht-license-badge-hover-color,var(--ht-read-only-color,#68696c))}[dir=rtl] .ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:after{inset-inline-start:0;inset-inline-end:clamp(0px,100% - var(--ht-license-badge-size,16px),6px)}.ht-license-badge{clip-path:inset(50%);white-space:nowrap;color:#0000;background:0 0;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}.ht-license-popover{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;z-index:1051;inline-size:auto;max-inline-size:min(var(--ht-license-popover-width,320px),100vw - 32px);border-radius:var(--ht-border-radius,8px);background-color:var(--ht-license-popover-background-color,#16171a);max-block-size:100%;color:var(--ht-license-popover-foreground-color,#fff);font-size:var(--ht-font-size-small,12px);line-height:var(--ht-line-height-small,18px);text-align:start;pointer-events:auto;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);flex-direction:column;padding:16px;display:none;position:absolute;inset-block-start:0;inset-inline-start:var(--ht-license-badge-area-width,50px);inset-inline-end:0;overflow:visible}.ht-license-popover: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}.ht-license-popover: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}.ht-license-popover:before{content:"";border-block-start:var(--ht-license-popover-tail-size,5px)solid var(--ht-license-popover-background-color,#16171a);border-inline-start:var(--ht-license-popover-tail-size,5px)solid #0000;block-size:0;inline-size:0;position:absolute;inset-block-start:0;inset-inline-end:100%}.ht-license-popover__content{min-block-size:0;overflow-y:auto}.ht-license-badge-wrapper.is-corner-hover:not(.is-dismissed) .ht-license-popover,.ht-license-badge-wrapper:not(.is-dismissed):hover .ht-license-popover,.ht-license-popover.is-open{display:flex}.ht-license-badge-wrapper.is-cornerless .ht-license-badge{display:none}.ht-license-badge-wrapper.is-cornerless .ht-license-popover{inset-inline-start:0}.ht-license-badge-wrapper.is-cornerless .ht-license-popover: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-border-radius,8px)}.ht-license-badge-wrapper.is-cornerless .ht-license-popover: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-border-radius,8px)}.ht-license-badge-wrapper.is-cornerless .ht-license-popover:before{display:none}.ht-license-popover__title{margin-block-end:8px;padding-inline-end:16px;font-weight:700}.ht-license-popover__body{color:var(--ht-license-popover-body-color,#d5d6d8);margin:0 0 12px}.ht-license-popover__link{color:var(--ht-license-popover-link-color,#3ba0ff);text-decoration:none}.ht-license-popover__link:hover{text-decoration:underline}.ht-license-popover__close{block-size:20px;inline-size:20px;color:inherit;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;line-height:1;display:flex;position:absolute;inset-block-start:12px;inset-inline-end:12px}.ht-license-popover__close:before{content:"✕";font-size:14px}.ht-dialog.ht-license-lock{z-index:1070}.ht-dialog.ht-license-lock:before{content:"";block-size:calc(var(--ht-line-height,20px) + var(--ht-density-cell-vertical,4px)*2);background-color:var(--ht-header-background-color);border-block-end:1px solid var(--ht-cell-horizontal-border-color,var(--ht-border-color));position:absolute;inset-block-start:0;inset-inline:0}.ht-dialog.ht-license-lock:after{content:"";inline-size:var(--ht-license-badge-size,16px);block-size:var(--ht-license-badge-size,16px);background-color:var(--ht-license-badge-color,var(--ht-disabled-color,#a3a3a3));position:absolute;inset-block-start:calc(var(--ht-density-cell-vertical,4px) + (var(--ht-line-height,20px) - var(--ht-license-badge-size,16px))/2);inset-inline-start:var(--ht-cell-horizontal-padding,8px);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2714.8626%27 height=%2716%27 viewBox=%270 0 14.8626 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M0 0H3.28665V4.35577H7.03576V0H10.306V11.407H7.03576V6.90834H3.28665V11.407H0V0Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M11.0991 12.236H14.8633V16.0001H11.0991V12.236Z%27 fill=%27%23000%27/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2714.8626%27 height=%2716%27 viewBox=%270 0 14.8626 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M0 0H3.28665V4.35577H7.03576V0H10.306V11.407H7.03576V6.90834H3.28665V11.407H0V0Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M11.0991 12.236H14.8633V16.0001H11.0991V12.236Z%27 fill=%27%23000%27/%3E%3C/svg%3E");-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.ht-dialog.ht-license-lock .ht-dialog__content-wrapper{padding-block-start:calc(var(--ht-line-height,20px) + var(--ht-density-cell-vertical,4px)*2)}.ht-dialog.ht-license-lock .ht-dialog__content-wrapper-inner,.ht-dialog.ht-license-lock .ht-dialog__content{min-inline-size:0}.ht-dialog.ht-license-lock a.ht-button{text-decoration:none;display:inline-block}.ht-dialog.ht-license-lock .ht-dialog__title,.ht-dialog.ht-license-lock .ht-dialog__description{word-break:break-word;overflow-wrap:break-word}.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}.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 :where(table.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:0}.handsontable.htRowHeaders.htHasRowspanHeaders :where(table.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: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;box-shadow:none!important;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);--ht-cell-vertical-padding:4px;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:var(--ht-cell-vertical-padding)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 td a.ht-hyperlink{color:var(--ht-link-color);text-decoration:underline}.handsontable td a.ht-hyperlink:hover{color:var(--ht-link-hover-color)}.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 .colHeader.columnSorting.sortAction{box-sizing:border-box;min-width:min(var(--ht-icon-size,16px) + 8px,100%);flex-grow:0;max-width:100%;margin-inline:auto;position:static}.handsontable .colHeader.columnSorting.sortAction:before,.handsontable .colHeader.columnSorting.sortAction:after{margin-inline:var(--ht-sort-indicator-offset);margin-inline-end:var(--ht-sort-indicator-offset-end)}.handsontable .htLeft .colHeader.columnSorting.sortAction{margin-left:0;margin-right:auto}.handsontable .htRight .colHeader.columnSorting.sortAction{margin-left:auto;margin-right:0}.handsontable th .relative{--ht-sort-indicator-offset:var(--ht-cell-horizontal-padding);--ht-sort-indicator-offset-end:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve-end:var(--ht-sort-indicator-reserve);--ht-header-button-slot:calc(var(--ht-icon-size,16px) + 2px)}.handsontable .relative.has-header-button{--ht-sort-indicator-offset-end:calc(var(--ht-cell-horizontal-padding) + var(--ht-icon-size,16px) + (var(--ht-icon-button-hit-area-size,24px) - var(--ht-icon-size,16px))*.5);--ht-sort-indicator-reserve-end:var(--ht-cell-horizontal-padding)}.handsontable .relative.has-sort-indicator.has-header-button{column-gap:calc(2px + var(--ht-header-button-slot))}.handsontable .relative.has-sort-indicator{--ht-sort-indicator-reserve:calc(var(--ht-cell-horizontal-padding) + var(--ht-icon-size,16px) + 2px);padding-inline-end:var(--ht-sort-indicator-reserve-end)}.handsontable .relative.htRight.has-sort-indicator,.handsontable .htRight .relative.has-sort-indicator{--ht-header-button-slot:0px;padding-inline-start:var(--ht-sort-indicator-reserve);padding-inline-end:var(--ht-cell-horizontal-padding)}.handsontable .columnSorting:not(.indicatorDisabled){position:relative}.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:before{text-align:left;left:2px;right:auto}[dir=rtl] .handsontable .relative.htRight.has-sort-indicator,[dir=rtl] .handsontable .htRight .relative.has-sort-indicator{--ht-header-button-slot:calc(var(--ht-icon-size,16px) + 2px);padding-inline-start:var(--ht-cell-horizontal-padding);padding-inline-end:var(--ht-sort-indicator-reserve-end)}[dir=rtl] .handsontable .relative.htLeft.has-sort-indicator,[dir=rtl] .handsontable .htLeft .relative.has-sort-indicator{--ht-header-button-slot:0px;padding-inline-start:var(--ht-sort-indicator-reserve);padding-inline-end:var(--ht-cell-horizontal-padding)}[dir=rtl] .handsontable .columnSorting.sortAction:before{text-align:left;left:2px;right:auto}[dir=rtl] .handsontable .htLeft .columnSorting.sortAction:before{text-align:right;left:auto;right:2px}.htGhostTable .htCore .relative{--ht-sort-indicator-offset:0px;--ht-sort-indicator-offset-end:0px;--ht-header-button-slot:0px}.htGhostTable .htCore .relative.has-header-button{--ht-sort-indicator-reserve:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve-end:var(--ht-cell-horizontal-padding)}.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 :where(table.htCore>thead>tr)>th:nth-child(2),.handsontable .htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_inline_start :where(table.htCore>tbody>tr)>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__active_highlight,.handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__highlight,.handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__active_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-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-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-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-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-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{width:100%;color:var(--ht-pagination-bar-foreground-color);background:var(--ht-pagination-bar-background-color);font-size:var(--ht-font-size);line-height:var(--ht-line-height);box-sizing:border-box;overflow-x:auto}.handsontable.ht-pagination:not(.ht-slot-element){border:1px solid var(--ht-border-color);border-radius:var(--ht-border-radius)}.handsontable.ht-pagination .ht-pagination__inner{justify-content:space-between;align-items:center;gap:calc(var(--ht-gap-size)*4);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}.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-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-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-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}.ht-empty-data-state--disable-bottom-border{border-bottom-width:0}.ht-empty-data-state--disable-bottom-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-bottom-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-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper.ht-slot-bottom-filled .ht-empty-data-state: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-root-wrapper.ht-slot-bottom-filled .ht-empty-data-state: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.#ni.head.appendChild(t)}#nc(){let e=this.getCSSVariableValue("line-height"),t=this.getCSSVariableValue("cell-vertical-padding"),r=Math.round(Number.parseFloat(this.getStyleForTD("border-bottom-width")??""));return null===e||null===t||isNaN(r)?null:e+2*t+r}#np(){this.#no=!this.#nm(),this.#nn=getComputedStyle(this.#nr);let e=this.#nf(["box-sizing","border-bottom-width"]);this.#na.td={...this.#na.td,...{"box-sizing":e["box-sizing"],"border-bottom-width":e["border-bottom-width"]}}}#nf(e){let t=this.#ni,r=this.#nr,n=t.createElement("table"),o=t.createElement("tbody"),i=t.createElement("tr"),s=t.createElement("tr"),a=t.createElement("td");n.className="htCore",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}#nd(e){let t=Math.ceil(Number.parseFloat(this.#nu(e)??""));return Number.isNaN(t)?null:t}#nu(e){let t=this.#nn?.getPropertyValue(e)??null;return""===t?null:t}#ng(){this.#na={},this.#ns={}}#nm(){if(!this.#nr.isConnected)return!1;let e=this.#nr.ownerDocument.defaultView;return null!==e&&""!==e.getComputedStyle(this.#nr).display}recacheValuesMeasuredWithoutStyles(){return!!this.#no&&!!this.#nm()&&(this.clearCache(),!0)}clearCache(){this.#ng(),this.#np()}}let uu=null,uc=0,ug={TOP:"top",BOTTOM:"bottom"},up="ht-slot-element";class um{#f;#nb=new Map;#nC=0;#ny=[];#nw;#nS;constructor(e,{itemClass:t="",onContentChange:r=()=>{}}={}){this.#f=e,this.#nw=t,this.#nS=r}getElement(){return this.#f}has(e){return this.#nb.has(e)}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=this.#nb.get(e),o=n?n.seq:this.#nC;n&&n.element.remove(),this.#nw&&t.classList.add(this.#nw),this.#nb.set(e,{element:t,weight:r,seq:o}),n||(this.#nC+=1),this.#nv(),this.#nS()}remove(e){let t=this.#nb.get(e);t&&(this.#nw&&t.element.classList.remove(this.#nw),t.element.remove(),this.#nb.delete(e),this.#nS())}setOrder(e){this.#ny=Array.isArray(e)?e.slice():[],this.#nv()}getOrder(){return this.#nR()}clear(){this.#nb.forEach(e=>e.element.remove()),this.#nb.clear(),this.#nS()}#nR(){let e=this.#ny;return Array.from(this.#nb.keys()).sort((t,r)=>{let n=e.indexOf(t),o=e.indexOf(r);if(-1!==n||-1!==o)return(-1===n?1/0:n)-(-1===o?1/0:o);let i=this.#nb.get(t),s=this.#nb.get(r);return i.weight!==s.weight?i.weight-s.weight:i.seq-s.seq})}#nv(){let e=this.#f.firstChild;this.#nR().forEach(t=>{let r=this.#nb.get(t).element;r===e?e=e.nextSibling:this.#f.insertBefore(r,e)})}}function uf(e,t){let r=t.parentElement;if(!r)return;let n=null!==t.querySelector(`:scope > .${up}`);r.classList.toggle(`ht-slot-${e}-filled`,n)}class ub{#nE;constructor(e){this.#nE=new Map(Object.keys(e).map(t=>[t,new um(e[t],{itemClass:up,onContentChange:()=>uf(t,e[t])})]))}getSlot(e){let t=this.#nE.get(e);return t||th(`Unknown layout slot "${e}".`),t}register(e,t,r){let{side:n,weight:o=0}=r;this.getSlot(n).add(e,t,o)}unregister(e,t){this.getSlot(t).remove(e)}applyConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(ug).forEach(t=>this.getSlot(t).setOrder(e?.[t]??[]))}destroy(){this.#nE.forEach(e=>e.clear())}}let uC="licenseNotification",uy=`plugin:${uC}`,uw="hot-display-license-info";function uS(e){return e.rootSlotBottomElement?.querySelector(`.${uw}`)??null}let uv="mailto:sales@handsontable.com",uR="mailto:support@handsontable.com",uE="https://handsontable.com/docs/tutorial-license-key.html",uT={trial_valid:{title:"Handsontable Trial",body:e=>{let{daysRemaining:t}=e;return`Your Handsontable license key ${e3(t)}. ${e4}`},linkText:"Contact Sales",linkHref:uv,dismissible:!1},trial_notice:{title:"Handsontable Trial",body:e=>{let{daysRemaining:t}=e;return`Your Handsontable license key ${e3(t)}. ${e4}`},linkText:"Contact Sales",linkHref:uv,dismissible:!1},trial_soft_stop:{title:"Handsontable Trial Expired",body:()=>`${e5} ${e4}`,linkText:"Contact Sales",linkHref:uv,dismissible:!0}},uA={trial_hard_stop:e=>{let{licensedUntil:t}=e;return{title:`Your Handsontable trial license key expired on ${t}.`,description:"You may no longer use Handsontable under the trial license. To continue using the software, contact sales@handsontable.com to purchase a valid license.",action:{text:"Contact Sales",href:uv}}},invalid:()=>({title:"The license key for Handsontable is invalid.",description:"",action:{text:"Contact Support",href:uR},docsLink:{text:"Read more",href:uE,trailingText:" on how to install it properly, or contact us at support@handsontable.com."}}),missing:()=>({title:"The license key for Handsontable is missing.",description:"Use your purchased key to activate the product. Alternatively, you can activate Handsontable to use for non-commercial purposes by passing the key: 'non-commercial-and-evaluation'. ",action:{text:"Contact Support",href:uR},docsLink:{text:"Read more",href:uE,trailingText:" about it in the documentation, or contact us at support@handsontable.com."}})},uM="ht-license-popover",uI="is-open",ux="is-dismissed",uN="is-corner-hover",uO="is-cornerless";function uk(e){let t=e.view?.getOverlayByName(im),r=t?.clone?.wtTable;return r?.TABLE?{table:r.TABLE,thead:r.THEAD??null}:null}let uH="ht-dialog",u_="licenseLock",uL=`plugin:${u_}`,uP=(e,t)=>`width: var(--ht-icon-size);
85
+ declare 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};eU(l)&&(u.relativeToGroup=l,u.position=h),d7(d)&&(u.forwardToContext=d),e.forEach(e=>{let t=d2(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=d2(e);r.removeItem(t)};return{__kindOf:d9,scope:t,addShortcut:n,addShortcuts:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach(e=>{tS(t,(r,n)=>{!1===Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])}),n(e)})},getShortcuts:e=>{let t=d2(e),n=r.getItem(t);return eU(n)?n.slice():[]},hasShortcut:e=>{let t=d2(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))})}}},ue=(o=new Set,{press(e){o.add(e)},release(e){o.delete(e)},releaseAll(){o.clear()},isPressed:e=>o.has(e)}),ut=new WeakMap,ur=e=>{if("string"==typeof e.key){let t=d6(e);d5.includes(t)&&ue.press(t)}},un=e=>{if("string"==typeof e.key){let t=d6(e);d5.includes(t)&&ue.release(t)}},uo=[{name:"editorCloseAndSave",callback(e){e._getEditorManager().closeEditorAndSaveChanges()}},{name:"editorCloseAndSaveByArrowKeys",callback(e,t,r){let n=e._getEditorManager(),o=n.getActiveEditor();o?.isInFullEditMode()&&o?.state===n8.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 r=e.getSelectedRangeActive()?.highlight;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(),a=s?.highlight;if((i?.some(e=>n.isMultiple(e))||(i?.length??0)>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??0),-(i?.col??0)):n.transformFocus(i?.row??0,i?.col??0);return}a?.isHeader()||(e.getSettings().enterBeginsEditing?o.cellProperties.readOnly?o.moveSelectionAfterEnter(t):o.openEditor(null,t,!0):o.moveSelectionAfterEnter(t),nN(t))}},{name:"extendCellsSelectionDown",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight;!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,n=e.getSelectedRangeActive();if(!n)return;let{to:o}=n,i=o.row??0,s=Math.min(i+e.countVisibleRows(),e.countRows()-1),a=r.getNearestNotHiddenIndex(s,-1);if(null!==a){let r=e._createCellCoords(a,o.col??0),n=i-(e.getFirstFullyVisibleRow()??0),s=Math.min((r.row??0)-n,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,r=e.getSelectedRangeActive()?.highlight;!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,r=e.getSelectedRangeActive()?.highlight;!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,r=e.getSelectedRangeActive();if(!r)return;let{highlight:n,from:o,to:i}=r;t.markSource("keyboard"),t.isSelectedByRowHeader()?t.selectAll(!0,!0):e.selectColumns(o.col??0,i.col??0,n),t.markEndSource()}},{name:"extendCellsSelectionToMostBottom",callback(e){let{selection:t,rowIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByRowHeader();if(o.isCell()||a){let n=r.getNearestNotHiddenIndex(e.countRows()-1,-1),l=i.clone();l.row=o.row,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(n??0,s.col??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineEnd",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n;if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&o.isCell()){let n=r.getNearestNotHiddenIndex(e.countCols()-1,-1),a=i.clone();a.col=o.col,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,o.clone()),t.setRangeEnd(e._createCellCoords(s.row??0,n??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n;if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&o.isCell()){let n=Number(e.getSettings().fixedColumnsStart)||0,a=r.getNearestNotHiddenIndex(n,1),l=i.clone();l.col=o.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),t.setRangeEnd(e._createCellCoords(s.row??0,a??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByColumnHeader();if(o.isCell()||a){let n=e.isRtl()?r.getNearestNotHiddenIndex(e.countCols()-1,-1):r.getNearestNotHiddenIndex(0,1),l=i.clone();l.col=o.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row??0,n??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostRight",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByColumnHeader();if(o.isCell()||a){let n=e.isRtl()?r.getNearestNotHiddenIndex(0,1):r.getNearestNotHiddenIndex(e.countCols()-1,-1),l=i.clone();l.col=o.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row??0,n??0)),t.markEndSource()}}},{name:"extendCellsSelectionToMostTop",callback(e){let{selection:t,rowIndexMapper:r}=e,n=e.getSelectedRangeActive();if(!n)return;let{highlight:o,from:i,to:s}=n,a=o.isHeader()&&t.isSelectedByRowHeader();if(o.isCell()||a){let n=r.getNearestNotHiddenIndex(0,1),l=i.clone();l.row=o.row,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,o.clone()),a&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(n??0,s.col??0)),t.markEndSource()}}},{name:"extendCellsSelectionToRows",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive();if(!r)return void t.markEndSource();let{highlight:n,from:o,to:i}=r;t.markSource("keyboard"),t.isSelectedByColumnHeader()?t.selectAll(!0,!0):e.selectRows(o.row??0,i.row??0,n),t.markEndSource()}},{name:"extendCellsSelectionUp",callback(e){let{selection:t}=e,r=e.getSelectedRangeActive()?.highlight;!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,n=e.getSelectedRangeActive();if(!n)return;let{to:o}=n,i=o.row??0,s=Math.max(i-e.countVisibleRows(),0),a=r.getNearestNotHiddenIndex(s,1);if(null!==a){let r=e._createCellCoords(a,o.col??0),n=i-(e.getFirstFullyVisibleRow()??0),s=Math.max((r.row??0)-n,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,o=e.getSelectedRangeActive()?.highlight.row??0,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();let s=e.getSettings().fixedRowsBottom??0,a=e.countRows(),l=e.getSelectedRangeActive()?.highlight.row??0;l<0?e.scrollViewportTo({row:0}):s>0&&l>=a-s&&e.scrollViewportTo({row:a-s-1,verticalSnap:"bottom"})}},{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??0)>1)&&!i?.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?r.transformFocus(-(s?.row??0),-(s?.col??0)):r.transformStart(-(s?.row??0),-(s?.col??0)),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??0)>1)&&!i?.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?r.transformFocus(s?.row??0,s?.col??0):r.transformStart(s?.row??0,s?.col??0),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,r=e.getSelectedRangeActive()?.highlight.col??0,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=Number(e.getSettings().fixedRowsBottom)||0,i=r.getNearestNotHiddenIndex(e.countRows()-o-1,-1),s=n.getNearestNotHiddenIndex(e.countCols()-1,-1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(i??-1,s??-1)),t.markEndSource()}},{name:"moveCellSelectionToMostInlineEnd",callback(e){let{selection:t,columnIndexMapper:r}=e;t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(e.getSelectedRangeActive()?.highlight.row??0,r.getNearestNotHiddenIndex(e.countCols()-1,-1)??0)),t.markEndSource()}},{name:"moveCellSelectionToMostInlineStart",callback(e){let{selection:t,columnIndexMapper:r}=e,n=Number(e.getSettings().fixedColumnsStart)||0,o=e.getSelectedRangeActive()?.highlight.row??0,i=r.getNearestNotHiddenIndex(n,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(o,i??0)),t.markEndSource()}},{name:"moveCellSelectionToMostLeft",callback(e){let{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeActive()?.highlight.row??0,o=e.isRtl()?r.getNearestNotHiddenIndex(e.countCols()-1,-1):r.getNearestNotHiddenIndex(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,n=e.getSelectedRangeActive()?.highlight.row??0,o=e.isRtl()?r.getNearestNotHiddenIndex(0,1):r.getNearestNotHiddenIndex(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,r=e.getSelectedRangeActive()?.highlight.col??0,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=Number(e.getSettings().fixedRowsTop)||0,i=Number(e.getSettings().fixedColumnsStart)||0,s=r.getNearestNotHiddenIndex(o,1),a=n.getNearestNotHiddenIndex(i,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(s??0,a??0)),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,o=e.getSelectedRangeActive()?.highlight.row??0,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();let s=e.getSettings().fixedRowsTop??0;(e.getSelectedRangeActive()?.highlight.row??0)<s&&e.scrollViewportTo({row:s,verticalSnap:"top"})}},{name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}},{name:"scrollToFocusedCell",callback(e){let t=e.getSelectedRangeActive()?.highlight;if(!t)return;let 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??-1)>=0||(t.col??-1)>=0)){let r={};if((t.col??-1)>=0){let n=Math.floor(e.countVisibleCols()/2);r.col=Math.max((t.col??0)-n,0)}if((t.row??-1)>=0){let n=Math.floor(e.countVisibleRows()/2);r.row=Math.max((t.row??0)-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();if(!t)return;let r=t[t.length-1].highlight.normalize(),n=r.row??0,o=r.col??0,i=e.getDataAtCell(n,o),s=new Map;for(let r=0;r<t.length;r++)t[r].forAll((t,r)=>{if(t>=0&&r>=0&&(t!==n||r!==o)){let{readOnly:n}=e.getCellMetaTransient(t,r);n||s.set(`${t}x${r}`,[t,r,i])}});e.setDataAtCell(Array.from(s.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 ui(e){let t={};return uo.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 us(e){let t=e.getShortcutManager().addContext("editor"),r=ui(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:dJ})}function ua(e){let t=e.getShortcutManager().addContext("grid"),r=ui(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:dJ,runOnlyIf:()=>eU(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>r.selectAllCells(),runOnlyIf:()=>eU(e.getSelected())&&!e.getSelectedRangeActive()?.highlight.isHeader()},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>!!(eU(e.getSelected())&&e.getSelectedRangeActive()?.highlight.isHeader()),preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>r.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>r.populateSelectedCellsData(),runOnlyIf:()=>eU(e.getSelected())&&!e.getSelectedRangeActive()?.highlight.isHeader()&&(e.getSelectedRangeActive()?.getCellsCount()??0)>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:()=>eU(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:()=>eU(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:()=>eU(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:()=>eU(e.getSelected())&&!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>eU(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>eU(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>eU(e.getSelected())&&e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>eU(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 eU(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:dQ});let n=r.tabNavigation();t.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:dQ,group:dZ,position:"before",callback:e=>n.before(e)},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:dQ,group:dZ,callback:e=>n.after(e),position:"after"}])}function ul(e){let{classNames:t}=rh(e,/ht-theme-[a-zA-Z0-9_-]+/);return t.pop()}let uh="handsontable-core-styles";class ud{#rX;#nt;#nr;#nn=null;#no=!1;#ni;#ns={};#na={};#nl;constructor({hot:e,rootElement:t,rootDocument:r,onThemeChange:n=e=>{},injectCoreCss:o=!0}){this.#rX=e,this.#nr=t,this.#ni=r,this.#nl=n,o&&this.#nh()}getCSSVariableValue(e){if(this.#ns[`--ht-${e}`])return this.#ns[`--ht-${e}`];let t=this.#nd(`--ht-${e}`)??this.#nu(`--ht-${e}`);if(null!==t)return this.#ns[`--ht-${e}`]=t,t}getStyleForTD(e){return this.#na?.td?.[e]}getDefaultRowHeight(e){let t=this.#nc();return void 0!==e&&e===this.#rX.view.getFirstRenderedVisibleRow()?(t??0)+1:t}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(e){"string"==typeof e&&/ht-theme-.*/.test(e)?(this.#ng(),e!==this.#nt&&(this.#nt=e),this.#nl(this.#nt),this.#np()):t6(`${e} isn't a valid theme name. Please ensure it follows the format ht-theme-<theme-name>.`)}getThemeName(){return this.#nt}#nh(){if(!this.#rX||!this.#ni||!this.#ni.head)return;let e=this.#ni.getElementById(uh);if(e&&e instanceof HTMLStyleElement)return;let t=this.#ni.createElement("style");t.id=uh,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 67,200.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: 18.1.2\n * Release date: 07/10/2026 (built at 07/10/2026 10:00:18)\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}.ht-root-wrapper.ht-shadow-dom{isolation:isolate}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-top-filled .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-top-filled .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .wtHolder{background-color:var(--ht-background-color);box-shadow:inset 0 0 0 1px var(--ht-border-color)}.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;position:relative}.ht-grid-content{height:100%}.ht-slot-top,.ht-slot-bottom{flex:none;overflow-x:auto}.ht-slot-element{box-sizing:border-box;border:1px solid var(--ht-border-color);width:100%}.ht-slot-top>.ht-slot-element:not(:first-of-type){border-top-width:0}.ht-slot-top>.ht-slot-element:last-of-type,.ht-slot-bottom>.ht-slot-element:not(:last-of-type){border-bottom-width:0}.ht-slot-bottom>.ht-slot-element:first-of-type{border-top-width: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{width:100%;height:100%}.handsontable.ht-wrapper:not(.htFirstDatasetColumnNotRendered) :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-of-type{border-inline-start-width:1px}.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:not(.htHorizontallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollY .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollY .ht_master .wtHolder{background-color:var(--ht-background-color);box-shadow:inset 0 0 0 1px var(--ht-border-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_even>th{background-color:var(--ht-row-header-even-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_even>td{background-color:var(--ht-row-cell-even-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_odd>th{background-color:var(--ht-row-header-odd-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_odd>td{background-color:var(--ht-row-cell-odd-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th,.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>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 :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.invisibleSelection,.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td.invisibleSelection{outline:none}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.invisibleSelection::selection,.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td.invisibleSelection::selection{background:0 0}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>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 :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:last-child{border-inline-width:0 1px;border-bottom-width:1px;border-inline-end-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:last-child.ht__active_highlight{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child,.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:nth-child(2){border-inline-start-width:1px}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.current{box-shadow:inset 0 0 0 1px var(--ht-cell-selection-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.active{color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__highlight{color:var(--ht-header-highlighted-foreground-color);background-color:var(--ht-header-highlighted-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>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 :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__active_highlight-prev,.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__active_highlight-seam{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr.ht__row_odd>th.ht__highlight,.handsontable :where(table.htCore,.htGhostTable>table)>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 :where(table.htCore,.htGhostTable>table)>tbody>tr.ht__row_odd>th.ht__active_highlight,.handsontable :where(table.htCore,.htGhostTable>table)>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 :where(table.htCore,.htGhostTable>table)>tbody>tr:first-of-type>th:first-child:empty:after,.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr:first-of-type>td:first-child:empty:after{content:"";min-height:var(--ht-line-height);display:block}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th{color:var(--ht-header-row-foreground-color);background-color:var(--ht-header-row-background-color);padding:0}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);min-height:100%}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>td:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>td:last-child{border-inline-end-color:var(--ht-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th.ht__active_highlight-prev-row{border-bottom-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr>th{padding:0}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr>th.ht__active_highlight{box-shadow:-1px 0 0 0 var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>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 :where(table.htCore,.htGhostTable>table)>thead>tr>th .relative .colHeader{text-overflow:ellipsis;vertical-align:top;flex:auto;min-width:0;overflow:hidden}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td{border-top-color:var(--ht-border-color);border-top-width:1px}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th.ht__active_highlight-row-seam-bottom,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td.ht__active_highlight-row-seam-bottom{border-top-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td{border-bottom-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th.ht__active_highlight-row-seam-top,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td.ht__active_highlight-row-seam-top{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] :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-of-type{border-inline-start-width:1px}.handsontable :where(table.htCore,.htGhostTable>table)>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.htCore,.handsontable:where(.htGhostTable)>table,.handsontable :where(table.htCore,.htGhostTable>table)>thead,.handsontable :where(table.htCore,.htGhostTable>table)>tbody,.handsontable input:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable textarea:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable div:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){box-sizing:content-box}.handsontable input:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable textarea:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){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 :where(table.htCore,.htGhostTable>table)>colgroup>col,.handsontable :where(table.htCore,.htGhostTable>table)>colgroup>col.rowHeader{width:64px}.handsontable :where(table.htCore,.htGhostTable>table)>colgroup>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 :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden>td,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden>th{display:none}.handsontable a:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){color:var(--ht-link-color)}.handsontable a:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))):hover{color:var(--ht-link-hover-color)}.handsontable .ht_clone_top :where(table.htCore>thead>tr)>th:nth-child(2),.handsontable .ht_clone_top_inline_start_corner :where(table.htCore>thead>tr)>th:nth-child(2){border-inline-width:0 1px}.handsontable.htRowHeaders :where(table.htCore)>thead>tr>th:nth-child(2){border-inline-start-width:1px}.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) :where(table.htCore)>tbody>tr>th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) :where(table.htCore)>thead>tr>th:first-child,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.htGhostTable) :where(table.htCore)>tbody>tr>th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.ht_clone_top):not(.htGhostTable) :where(table.htCore)>thead>tr>th:first-child{border-inline-width:1px 0}.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) :where(table.htCore)>thead>tr:last-child>th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable :where(table.htCore)>thead>tr:last-child>th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) :where(table.htCore)>thead>tr.lastChild>th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable :where(table.htCore)>thead>tr.lastChild>th{border-bottom-width:0}.handsontable.htAutoRowSize .ht_master.innerBorderTop :where(table.htCore)>tbody>tr:first-child>th,.handsontable.htAutoRowSize .ht_master.innerBorderTop :where(table.htCore)>tbody>tr:first-child>td,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start :where(table.htCore)>tbody>tr:first-child>th,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start :where(table.htCore)>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 :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td[dir=ltr]{border-inline-width:1px 0}[dir=rtl].handsontable :where(table.htCore,.htGhostTable>table)>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{border-radius:var(--ht-border-radius)}.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-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-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-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-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-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-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-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-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-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-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-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-border-radius)}.handsontable.ht-wrapper .ht_master .wtHolder,.handsontable.ht-wrapper .ht_master .htCore{border-radius:var(--ht-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-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-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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-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-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-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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-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-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-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-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-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-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-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-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-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-border-radius);border-top-right-radius:var(--ht-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-border-radius);border-top-left-radius:var(--ht-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-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-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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-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-border-radius);border-bottom-left-radius:var(--ht-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-border-radius);border-bottom-right-radius:var(--ht-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-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-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-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-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-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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore>:where(thead,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_bottom_inline_start_corner .htCore>:where(thead,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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore>:where(thead,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_bottom_inline_start_corner .htCore>:where(thead,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-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-border-radius);border-bottom-left-radius:var(--ht-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-border-radius);border-bottom-right-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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_bottom .htCore>:where(thead,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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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_bottom .htCore>:where(thead,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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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)),.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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)),.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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-border-radius)}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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:0}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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:0}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.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)){border-top-right-radius:0}.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}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.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)){border-top-left-radius:0}.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}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.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)){border-bottom-right-radius:0}.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}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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>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:0}.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}.ht-root-wrapper{border-radius:var(--ht-border-radius)}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper: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-root-wrapper.ht-slot-bottom-filled .ht_master .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)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper: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}.ht-root-wrapper.ht-slot-bottom-filled .ht_master .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)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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(.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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(.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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}.ht-root-wrapper.ht-slot-bottom-filled .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.ht-root-wrapper.ht-slot-bottom-filled .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:0}.ht-root-wrapper.ht-slot-bottom-filled .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}.ht-root-wrapper.ht-slot-bottom-filled .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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-root-wrapper.ht-slot-bottom-filled .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:0}.ht-root-wrapper.ht-slot-bottom-filled .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-root-wrapper.ht-slot-top-filled .ht-wrapper: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-root-wrapper.ht-slot-top-filled .ht_master .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)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper.ht-slot-top-filled .ht-wrapper: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-root-wrapper.ht-slot-top-filled .ht_master .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)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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-top-right-radius:0}:is(.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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}:is(.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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}.ht-root-wrapper.ht-slot-top-filled .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.ht-root-wrapper.ht-slot-top-filled .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:0}.ht-root-wrapper.ht-slot-top-filled .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}.ht-root-wrapper.ht-slot-top-filled .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.ht-root-wrapper.ht-slot-top-filled .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:0}.ht-root-wrapper.ht-slot-top-filled .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}.ht-root-wrapper .ht-slot-element{border-radius:var(--ht-border-radius)}.ht-root-wrapper .ht-slot-bottom>.ht-slot-element:not(:last-of-type){border-radius:0}.ht-root-wrapper .ht-slot-bottom>.ht-slot-element:last-of-type: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-root-wrapper .ht-slot-bottom>.ht-slot-element:last-of-type: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-root-wrapper .ht-slot-top>.ht-slot-element:not(:first-of-type){border-radius:0}.ht-root-wrapper .ht-slot-top>.ht-slot-element:first-of-type: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-root-wrapper .ht-slot-top>.ht-slot-element:first-of-type: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.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 .wtSelectionHandle{box-sizing:border-box;z-index:115;background:var(--ht-cell-selection-handle-background-color);border:var(--ht-cell-selection-handle-border-width)solid var(--ht-cell-selection-handle-border-color);border-radius:var(--ht-cell-selection-handle-border-radius);animation:ht-selection-handle-fade-in var(--ht-table-transition)ease-in-out backwards;position:absolute}.handsontable .wtSelectionHandle:hover{background:color-mix(in srgb,var(--ht-cell-selection-handle-border-color)30%,var(--ht-cell-selection-handle-background-color))}@media (prefers-reduced-motion:reduce){.handsontable .wtSelectionHandle{animation:none}}.handsontable .wtSelectionHandle--top,.handsontable .wtSelectionHandle--bottom{width:var(--ht-cell-selection-handle-length);height:var(--ht-cell-selection-handle-size);cursor:ns-resize}.handsontable .wtSelectionHandle--start,.handsontable .wtSelectionHandle--end{width:var(--ht-cell-selection-handle-size);height:var(--ht-cell-selection-handle-length);cursor:ew-resize}.handsontable.ht__resizing-selection--top .wtSelectionHandle:not(.wtSelectionHandle--top),.handsontable.ht__resizing-selection--bottom .wtSelectionHandle:not(.wtSelectionHandle--bottom),.handsontable.ht__resizing-selection--start .wtSelectionHandle:not(.wtSelectionHandle--start),.handsontable.ht__resizing-selection--end .wtSelectionHandle:not(.wtSelectionHandle--end){display:none!important}.handsontable.ht__resizing-selection--top,.handsontable.ht__resizing-selection--top *,.handsontable.ht__resizing-selection--bottom,.handsontable.ht__resizing-selection--bottom *{cursor:ns-resize!important}.handsontable.ht__resizing-selection--start,.handsontable.ht__resizing-selection--start *,.handsontable.ht__resizing-selection--end,.handsontable.ht__resizing-selection--end *{cursor:ew-resize!important}.handsontable.ht__resizing-selection--top .wtSelectionHandle--top,.handsontable.ht__resizing-selection--bottom .wtSelectionHandle--bottom,.handsontable.ht__resizing-selection--start .wtSelectionHandle--start,.handsontable.ht__resizing-selection--end .wtSelectionHandle--end{background:color-mix(in srgb,var(--ht-cell-selection-handle-border-color)30%,var(--ht-cell-selection-handle-background-color))}.handsontable .wtMoveZone{cursor:grab}.handsontable .wtMoveZone:active,.handsontable.ht__moving{cursor:grabbing}.handsontable.ht__moving *{cursor:grabbing!important}.handsontable.ht__moving .wtBorder.area,.handsontable.ht__moving .wtBorder.current{display:none!important}.handsontable.ht__moving .wtSelectionHandle,.handsontable.ht__moving .wtMoveZone{visibility:hidden!important}.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:110;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}@keyframes ht-selection-handle-fade-in{0%{opacity:0}to{opacity:1}}.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;min-width:300px}.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)}.ht-license-badge-wrapper{z-index:1050;pointer-events:none;position:absolute;inset:0;overflow:hidden}.ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:after{content:"";inline-size:min(var(--ht-license-badge-size,16px),100%);block-size:min(var(--ht-license-badge-size,16px),100%);background-color:var(--ht-license-badge-color,var(--ht-disabled-color,#a3a3a3));pointer-events:none;margin:auto;position:absolute;inset:0;inset-inline-start:clamp(0px,100% - var(--ht-license-badge-size,16px),6px);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2714.8626%27 height=%2716%27 viewBox=%270 0 14.8626 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M0 0H3.28665V4.35577H7.03576V0H10.306V11.407H7.03576V6.90834H3.28665V11.407H0V0Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M11.0991 12.236H14.8633V16.0001H11.0991V12.236Z%27 fill=%27%23000%27/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2714.8626%27 height=%2716%27 viewBox=%270 0 14.8626 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M0 0H3.28665V4.35577H7.03576V0H10.306V11.407H7.03576V6.90834H3.28665V11.407H0V0Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M11.0991 12.236H14.8633V16.0001H11.0991V12.236Z%27 fill=%27%23000%27/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:hover:after{background-color:var(--ht-license-badge-hover-color,var(--ht-read-only-color,#68696c))}[dir=rtl] .ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:after{inset-inline-start:0;inset-inline-end:clamp(0px,100% - var(--ht-license-badge-size,16px),6px)}.ht-license-badge{clip-path:inset(50%);white-space:nowrap;color:#0000;background:0 0;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}.ht-license-popover{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;z-index:1051;inline-size:auto;max-inline-size:min(var(--ht-license-popover-width,320px),100vw - 32px);border-radius:var(--ht-border-radius,8px);background-color:var(--ht-license-popover-background-color,#16171a);max-block-size:100%;color:var(--ht-license-popover-foreground-color,#fff);font-size:var(--ht-font-size-small,12px);line-height:var(--ht-line-height-small,18px);text-align:start;pointer-events:auto;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);flex-direction:column;padding:16px;display:none;position:absolute;inset-block-start:0;inset-inline-start:var(--ht-license-badge-area-width,50px);inset-inline-end:0;overflow:visible}.ht-license-popover: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}.ht-license-popover: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}.ht-license-popover:before{content:"";border-block-start:var(--ht-license-popover-tail-size,5px)solid var(--ht-license-popover-background-color,#16171a);border-inline-start:var(--ht-license-popover-tail-size,5px)solid #0000;block-size:0;inline-size:0;position:absolute;inset-block-start:0;inset-inline-end:100%}.ht-license-popover__content{min-block-size:0;overflow-y:auto}.ht-license-badge-wrapper.is-corner-hover:not(.is-dismissed) .ht-license-popover,.ht-license-badge-wrapper:not(.is-dismissed):hover .ht-license-popover,.ht-license-popover.is-open{display:flex}.ht-license-badge-wrapper.is-cornerless .ht-license-badge{display:none}.ht-license-badge-wrapper.is-cornerless .ht-license-popover{inset-inline-start:0}.ht-license-badge-wrapper.is-cornerless .ht-license-popover: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-border-radius,8px)}.ht-license-badge-wrapper.is-cornerless .ht-license-popover: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-border-radius,8px)}.ht-license-badge-wrapper.is-cornerless .ht-license-popover:before{display:none}.ht-license-popover__title{margin-block-end:8px;padding-inline-end:16px;font-weight:700}.ht-license-popover__body{color:var(--ht-license-popover-body-color,#d5d6d8);margin:0 0 12px}.ht-license-popover__link{color:var(--ht-license-popover-link-color,#3ba0ff);text-decoration:none}.ht-license-popover__link:hover{text-decoration:underline}.ht-license-popover__close{block-size:20px;inline-size:20px;color:inherit;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;line-height:1;display:flex;position:absolute;inset-block-start:12px;inset-inline-end:12px}.ht-license-popover__close:before{content:"✕";font-size:14px}.ht-dialog.ht-license-lock{z-index:1070}.ht-dialog.ht-license-lock:before{content:"";block-size:calc(var(--ht-line-height,20px) + var(--ht-density-cell-vertical,4px)*2);background-color:var(--ht-header-background-color);border-block-end:1px solid var(--ht-cell-horizontal-border-color,var(--ht-border-color));position:absolute;inset-block-start:0;inset-inline:0}.ht-dialog.ht-license-lock:after{content:"";inline-size:var(--ht-license-badge-size,16px);block-size:var(--ht-license-badge-size,16px);background-color:var(--ht-license-badge-color,var(--ht-disabled-color,#a3a3a3));position:absolute;inset-block-start:calc(var(--ht-density-cell-vertical,4px) + (var(--ht-line-height,20px) - var(--ht-license-badge-size,16px))/2);inset-inline-start:var(--ht-cell-horizontal-padding,8px);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2714.8626%27 height=%2716%27 viewBox=%270 0 14.8626 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M0 0H3.28665V4.35577H7.03576V0H10.306V11.407H7.03576V6.90834H3.28665V11.407H0V0Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M11.0991 12.236H14.8633V16.0001H11.0991V12.236Z%27 fill=%27%23000%27/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2714.8626%27 height=%2716%27 viewBox=%270 0 14.8626 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M0 0H3.28665V4.35577H7.03576V0H10.306V11.407H7.03576V6.90834H3.28665V11.407H0V0Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M11.0991 12.236H14.8633V16.0001H11.0991V12.236Z%27 fill=%27%23000%27/%3E%3C/svg%3E");-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.ht-dialog.ht-license-lock .ht-dialog__content-wrapper{padding-block-start:calc(var(--ht-line-height,20px) + var(--ht-density-cell-vertical,4px)*2)}.ht-dialog.ht-license-lock .ht-dialog__content-wrapper-inner,.ht-dialog.ht-license-lock .ht-dialog__content{min-inline-size:0}.ht-dialog.ht-license-lock a.ht-button{text-decoration:none;display:inline-block}.ht-dialog.ht-license-lock .ht-dialog__title,.ht-dialog.ht-license-lock .ht-dialog__description{word-break:break-word;overflow-wrap:break-word}.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}.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 :where(table.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:0}.handsontable.htRowHeaders.htHasRowspanHeaders :where(table.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: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;box-shadow:none!important;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);--ht-cell-vertical-padding:4px;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:var(--ht-cell-vertical-padding)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 td a.ht-hyperlink{color:var(--ht-link-color);text-decoration:underline}.handsontable td a.ht-hyperlink:hover{color:var(--ht-link-hover-color)}.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 .colHeader.columnSorting.sortAction{box-sizing:border-box;min-width:min(var(--ht-icon-size,16px) + 8px,100%);flex-grow:0;max-width:100%;margin-inline:auto;position:static}.handsontable .colHeader.columnSorting.sortAction:before,.handsontable .colHeader.columnSorting.sortAction:after{margin-inline:var(--ht-sort-indicator-offset);margin-inline-end:var(--ht-sort-indicator-offset-end)}.handsontable .htLeft .colHeader.columnSorting.sortAction{margin-left:0;margin-right:auto}.handsontable .htRight .colHeader.columnSorting.sortAction{margin-left:auto;margin-right:0}.handsontable th .relative{--ht-sort-indicator-offset:var(--ht-cell-horizontal-padding);--ht-sort-indicator-offset-end:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve-end:var(--ht-sort-indicator-reserve);--ht-header-button-slot:calc(var(--ht-icon-size,16px) + 2px)}.handsontable .relative.has-header-button{--ht-sort-indicator-offset-end:calc(var(--ht-cell-horizontal-padding) + var(--ht-icon-size,16px) + (var(--ht-icon-button-hit-area-size,24px) - var(--ht-icon-size,16px))*.5);--ht-sort-indicator-reserve-end:var(--ht-cell-horizontal-padding)}.handsontable .relative.has-sort-indicator.has-header-button{column-gap:calc(2px + var(--ht-header-button-slot))}.handsontable .relative.has-sort-indicator{--ht-sort-indicator-reserve:calc(var(--ht-cell-horizontal-padding) + var(--ht-icon-size,16px) + 2px);padding-inline-end:var(--ht-sort-indicator-reserve-end)}.handsontable .relative.htRight.has-sort-indicator,.handsontable .htRight .relative.has-sort-indicator{--ht-header-button-slot:0px;padding-inline-start:var(--ht-sort-indicator-reserve);padding-inline-end:var(--ht-cell-horizontal-padding)}.handsontable .columnSorting:not(.indicatorDisabled){position:relative}.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:before{text-align:left;left:2px;right:auto}[dir=rtl] .handsontable .relative.htRight.has-sort-indicator,[dir=rtl] .handsontable .htRight .relative.has-sort-indicator{--ht-header-button-slot:calc(var(--ht-icon-size,16px) + 2px);padding-inline-start:var(--ht-cell-horizontal-padding);padding-inline-end:var(--ht-sort-indicator-reserve-end)}[dir=rtl] .handsontable .relative.htLeft.has-sort-indicator,[dir=rtl] .handsontable .htLeft .relative.has-sort-indicator{--ht-header-button-slot:0px;padding-inline-start:var(--ht-sort-indicator-reserve);padding-inline-end:var(--ht-cell-horizontal-padding)}[dir=rtl] .handsontable .columnSorting.sortAction:before{text-align:left;left:2px;right:auto}[dir=rtl] .handsontable .htLeft .columnSorting.sortAction:before{text-align:right;left:auto;right:2px}.htGhostTable .htCore .relative{--ht-sort-indicator-offset:0px;--ht-sort-indicator-offset-end:0px;--ht-header-button-slot:0px}.htGhostTable .htCore .relative.has-header-button{--ht-sort-indicator-reserve:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve-end:var(--ht-cell-horizontal-padding)}.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 :where(table.htCore>thead>tr)>th:nth-child(2),.handsontable .htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_inline_start :where(table.htCore>tbody>tr)>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__active_highlight,.handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__highlight,.handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__active_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-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-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-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-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-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{width:100%;color:var(--ht-pagination-bar-foreground-color);background:var(--ht-pagination-bar-background-color);font-size:var(--ht-font-size);line-height:var(--ht-line-height);box-sizing:border-box;overflow-x:auto}.handsontable.ht-pagination:not(.ht-slot-element){border:1px solid var(--ht-border-color);border-radius:var(--ht-border-radius)}.handsontable.ht-pagination .ht-pagination__inner{justify-content:space-between;align-items:center;gap:calc(var(--ht-gap-size)*4);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}.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-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-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-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}.ht-empty-data-state--disable-bottom-border{border-bottom-width:0}.ht-empty-data-state--disable-bottom-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-bottom-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-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper.ht-slot-bottom-filled .ht-empty-data-state: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-root-wrapper.ht-slot-bottom-filled .ht-empty-data-state: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.#ni.head.appendChild(t)}#nc(){let e=this.getCSSVariableValue("line-height"),t=this.getCSSVariableValue("cell-vertical-padding"),r=Math.round(Number.parseFloat(this.getStyleForTD("border-bottom-width")??""));return null===e||null===t||isNaN(r)?null:e+2*t+r}#np(){this.#no=!this.#nm(),this.#nn=getComputedStyle(this.#nr);let e=this.#nf(["box-sizing","border-bottom-width"]);this.#na.td={...this.#na.td,...{"box-sizing":e["box-sizing"],"border-bottom-width":e["border-bottom-width"]}}}#nf(e){let t=this.#ni,r=this.#nr,n=t.createElement("table"),o=t.createElement("tbody"),i=t.createElement("tr"),s=t.createElement("tr"),a=t.createElement("td");n.className="htCore",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}#nd(e){let t=Math.ceil(Number.parseFloat(this.#nu(e)??""));return Number.isNaN(t)?null:t}#nu(e){let t=this.#nn?.getPropertyValue(e)??null;return""===t?null:t}#ng(){this.#na={},this.#ns={}}#nm(){if(!this.#nr.isConnected)return!1;let e=this.#nr.ownerDocument.defaultView;return null!==e&&""!==e.getComputedStyle(this.#nr).display}recacheValuesMeasuredWithoutStyles(){return!!this.#no&&!!this.#nm()&&(this.clearCache(),!0)}clearCache(){this.#ng(),this.#np()}}let uu=null,uc=0,ug={TOP:"top",BOTTOM:"bottom"},up="ht-slot-element";class um{#f;#nb=new Map;#nC=0;#ny=[];#nw;#nS;constructor(e,{itemClass:t="",onContentChange:r=()=>{}}={}){this.#f=e,this.#nw=t,this.#nS=r}getElement(){return this.#f}has(e){return this.#nb.has(e)}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=this.#nb.get(e),o=n?n.seq:this.#nC;n&&n.element.remove(),this.#nw&&t.classList.add(this.#nw),this.#nb.set(e,{element:t,weight:r,seq:o}),n||(this.#nC+=1),this.#nv(),this.#nS()}remove(e){let t=this.#nb.get(e);t&&(this.#nw&&t.element.classList.remove(this.#nw),t.element.remove(),this.#nb.delete(e),this.#nS())}setOrder(e){this.#ny=Array.isArray(e)?e.slice():[],this.#nv()}getOrder(){return this.#nR()}clear(){this.#nb.forEach(e=>e.element.remove()),this.#nb.clear(),this.#nS()}#nR(){let e=this.#ny;return Array.from(this.#nb.keys()).sort((t,r)=>{let n=e.indexOf(t),o=e.indexOf(r);if(-1!==n||-1!==o)return(-1===n?1/0:n)-(-1===o?1/0:o);let i=this.#nb.get(t),s=this.#nb.get(r);return i.weight!==s.weight?i.weight-s.weight:i.seq-s.seq})}#nv(){let e=this.#f.firstChild;this.#nR().forEach(t=>{let r=this.#nb.get(t).element;r===e?e=e.nextSibling:this.#f.insertBefore(r,e)})}}function uf(e,t){let r=t.parentElement;if(!r)return;let n=null!==t.querySelector(`:scope > .${up}`);r.classList.toggle(`ht-slot-${e}-filled`,n)}class ub{#nE;constructor(e){this.#nE=new Map(Object.keys(e).map(t=>[t,new um(e[t],{itemClass:up,onContentChange:()=>uf(t,e[t])})]))}getSlot(e){let t=this.#nE.get(e);return t||th(`Unknown layout slot "${e}".`),t}register(e,t,r){let{side:n,weight:o=0}=r;this.getSlot(n).add(e,t,o)}unregister(e,t){this.getSlot(t).remove(e)}applyConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(ug).forEach(t=>this.getSlot(t).setOrder(e?.[t]??[]))}destroy(){this.#nE.forEach(e=>e.clear())}}let uC="licenseNotification",uy=`plugin:${uC}`,uw="hot-display-license-info";function uS(e){return e.rootSlotBottomElement?.querySelector(`.${uw}`)??null}let uv="mailto:sales@handsontable.com",uR="mailto:support@handsontable.com",uE="https://handsontable.com/docs/tutorial-license-key.html",uT={trial_valid:{title:"Handsontable Trial",body:e=>{let{daysRemaining:t}=e;return`Your Handsontable license key ${e3(t)}. ${e4}`},linkText:"Contact Sales",linkHref:uv,dismissible:!1},trial_notice:{title:"Handsontable Trial",body:e=>{let{daysRemaining:t}=e;return`Your Handsontable license key ${e3(t)}. ${e4}`},linkText:"Contact Sales",linkHref:uv,dismissible:!1},trial_soft_stop:{title:"Handsontable Trial Expired",body:()=>`${e5} ${e4}`,linkText:"Contact Sales",linkHref:uv,dismissible:!0}},uA={trial_hard_stop:e=>{let{licensedUntil:t}=e;return{title:`Your Handsontable trial license key expired on ${t}.`,description:"You may no longer use Handsontable under the trial license. To continue using the software, contact sales@handsontable.com to purchase a valid license.",action:{text:"Contact Sales",href:uv}}},invalid:()=>({title:"The license key for Handsontable is invalid.",description:"",action:{text:"Contact Support",href:uR},docsLink:{text:"Read more",href:uE,trailingText:" on how to install it properly, or contact us at support@handsontable.com."}}),missing:()=>({title:"The license key for Handsontable is missing.",description:"Use your purchased key to activate the product. Alternatively, you can activate Handsontable to use for non-commercial purposes by passing the key: 'non-commercial-and-evaluation'. ",action:{text:"Contact Support",href:uR},docsLink:{text:"Read more",href:uE,trailingText:" about it in the documentation, or contact us at support@handsontable.com."}})},uM="ht-license-popover",uI="is-open",ux="is-dismissed",uN="is-corner-hover",uO="is-cornerless";function uk(e){let t=e.view?.getOverlayByName(im),r=t?.clone?.wtTable;return r?.TABLE?{table:r.TABLE,thead:r.THEAD??null}:null}let uH="ht-dialog",u_="licenseLock",uL=`plugin:${u_}`,uP=(e,t)=>`width: var(--ht-icon-size);
86
86
  height: var(--ht-icon-size);
87
87
  -webkit-mask-size: contain;
88
88
  -webkit-mask-image: url("${e[t]}");
@@ -248,7 +248,7 @@ color-scheme: ${n};
248
248
  </div>
249
249
  </div>
250
250
  `,l=a.wrapper,h=a.badge,d=()=>e.hasRowHeaders()&&e.hasColHeaders(),u=()=>{let t=d();l.classList.toggle(uO,!t),e.rootElement?.classList.toggle("ht-license-badge-on",t),uk(e)?.table.classList.toggle("ht-license-badge-corner",t)};u(),e.addHook("afterRender",()=>u());let c=0,g=()=>{let t=uk(e);if(!t||!d())return;let r=t.table.offsetWidth;r>0&&Math.abs(r-c)>1&&(c=r,l.style.setProperty("--ht-license-badge-area-width",`${r}px`))},p=e.rootWindow;if("function"==typeof p.ResizeObserver){let t=new p.ResizeObserver(()=>g()),r=null,n=()=>{let n=uk(e)?.table??null;n!==r&&(t.disconnect(),r=n,n&&t.observe(n))};n(),e.addHook("afterRender",()=>n()),e.addHook("afterDestroy",()=>t.disconnect())}else g(),e.addHook("afterRender",()=>g());h.tabIndex=-1;let m=a.popover;a.popoverTitle.textContent=o.title,a.popoverBody.textContent=o.body(t),a.popoverLink.href=o.linkHref,a.popoverLink.textContent=o.linkText,a.popoverLink.tabIndex=-1;let f=!1;m.addEventListener("mouseenter",()=>{f=!0}),m.addEventListener("mouseleave",()=>{f=!1}),r=()=>{f||l.classList.contains(uN)||l.classList.remove(ux)},(n=e.rootElement)&&(n.addEventListener("mouseover",t=>{let n=t.target instanceof e.rootWindow.Element?t.target:null,o=uk(e)?.thead??null,i=!l.classList.contains(uO)&&null!==n&&null!==o&&o.contains(n);l.classList.toggle(uN,i),r()}),n.addEventListener("mouseleave",()=>{l.classList.remove(uN),r()})),o.dismissible&&(m.classList.add(uI),a.closeButton.tabIndex=-1,a.closeButton.addEventListener("click",()=>{m.classList.remove(uI),l.classList.add(ux)})),i.appendChild(l)}(e,r)}(n=g,ta(n.getSettings().licenseKey,"07/10/2026"));let t={top:-1,bottom:-1};this.addHook("afterRender",()=>{if(g.isDestroyed)return;let{view:e}=g;if(!e)return;let r=e.isHorizontallyScrollableByWindow()?e.getTotalTableWidth():e.getWorkspaceWidth();0===r&&g.rootWrapperElement&&(r=g.rootWrapperElement.offsetWidth),g.rootSlotBottomElement&&r!==t.bottom&&(t.bottom=r,g.rootSlotBottomElement.style.width=`${r}px`),g.rootSlotTopElement&&r!==t.top&&(t.top=r,g.rootSlotTopElement.style.width=`${r}px`)})}g.runHooks("init"),this.render(),m&&null===g.rootElement.offsetParent&&(b=nn(g.rootElement,()=>{g&&!g.isDestroyed&&g.view&&(g.view._wt.wtOverlays.updateLastSpreaderSize(),g.view.adjustElementsSize(),g.render())})),"object"==typeof m&&(g.runHooks("afterChange",m[0],m[1]),m=!1),g.runHooks("afterInit")},this._createCellCoords=function(e,t){return g.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,r){return g.view._wt.createCellRange(e,t,r)},this.validateCell=function(e,t,r,n){var o;let i=g.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=g.getCell(i,o,!0);if(s&&"TH"!==s.nodeName){let e=g.rowIndexMapper.getRenderableFromVisualIndex(i),t=g.columnIndexMapper.getRenderableFromVisualIndex(o);g.view._wt.getSetting("cellRenderer",e,t,s)}r(e)}if(eG(i)&&(o=i,i=function(e,t){t(o.test(e))}),np(i)){let r=np(t.prop)?t.visualCol:t.prop;e=g.runHooks("beforeValidate",e,t.visualRow,r,n),g._registerMicrotask(()=>{i.call(t,e,o=>{g&&(o=g.runHooks("afterValidate",o,e,t.visualRow,r,n),t.valid=o,s(o),g.runHooks("postAfterValidate",o,e,t.visualRow,r,n))})})}else g._registerMicrotask(()=>{t.valid=!0,s(t.valid,!1)})},this.setDataAtCell=function(e,t,r,n){let o,i,l,h=D(e,t,r),d=[],u=n;for(o=0,i=h.length;o<i;o++){let[e,t,r]=h[o];"object"!=typeof h[o]&&th("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter"),"number"!=typeof h[o][1]&&th("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");let n="number"==typeof t?t:0;l=n>=this.countCols()?n:s.colToProp(n),d.push([e,l,a.getAtCell(this.toPhysicalRow(e),t),r])}u||"object"!=typeof e||(u=t);let c=F(d,u);g.runHooks("afterSetDataAtCell",c,u),L(c,u,()=>{P(c,u)})},this.setDataAtRowProp=function(e,t,r,n){let o,i,s=D(e,t,r),l=[],h=n;for(o=0,i=s.length;o<i;o++){let[e,t,r]=s[o];l.push([e,t,a.getAtCell(this.toPhysicalRow(e),t),r])}h||"object"!=typeof e||(h=t);let d=F(l,h);g.runHooks("afterSetDataAtRowProp",d,h),L(d,h,()=>{P(d,h)})},this.listen=function(){g&&!g.isListening()&&(ch.forEach(e=>{g!==e&&e.unlisten()}),ca=g.guid,g.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(ca=null,g.runHooks("afterUnlisten"))},this.isListening=function(){return ca===g.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];h.closeEditor(e),g.view.render(),t&&M.isSelected()&&h.prepareEditor()},this.populateFromArray=function(e,t,r,n,o,i,s){("object"!=typeof r||"object"!=typeof r[0])&&th("populateFromArray parameter `input` must be an array of arrays");let a="number"==typeof n?g._createCellCoords(n,o):void 0;return l.populateFromArray(g._createCellCoords(e,t),r,a,i,s)},this.spliceCol=function(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];return s.spliceCol(e,t,r,...o)},this.spliceRow=function(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];return s.spliceRow(e,t,r,...o)},this.getSelected=function(){if(M.isSelected())return Z(M.getSelectedRange().ranges,e=>{let{from:t,to:r}=e;return[t.row,t.col,r.row,r.col]})},this.getSelectedLast=function(){let e,t=g.getSelected();return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedActive=function(){let e=g.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=g.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=[];J(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);if(o>i||s>a)return;let l=e=>{oH(s,a,r=>{this.getCellMetaTransient(e,r).readOnly||t.push([e,r,null])})};oH(o,i,l)}),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||g.view.render()},this.render=function(){this.view&&(this.forceFullRender=!0,this.isRenderSuspended()||g.view.render())},this.batchRender=function(e){g.suspendRender();let t=e();return g.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];g.suspendExecution();let r=e();return g.resumeExecution(t),r},this.batch=function(e){g.suspendRender(),g.suspendExecution();let t=e();return g.resumeExecution(),g.resumeRender(),t},this.refreshDimensions=function(){if(!g.view)return;let e=g.view,{width:t,height:r}=e.getLastSize(),{width:n,height:o}=g.rootElement.getBoundingClientRect(),i=n!==t||o!==r;!1!==g.runHooks("beforeRefreshDimensions",{width:t,height:r},{width:n,height:o},i)&&((i||e._wt.wtOverlays.scrollableElement===g.rootWindow)&&(e.setLastSize(n,o),e.adjustElementsSize(),g.render()),g.runHooks("afterRefreshDimensions",{width:t,height:r},{width:n,height:o},i))},this.updateData=function(e,t){dV(e,e=>{s=e},e=>{s=e,g.columnIndexMapper.fitToLength(this.getInitialColumnCount()),g.rowIndexMapper.fitToLength(this.countSourceRows()),l.adjustRowsAndCols(),M.markSource("updateData"),M.refresh(),M.markEndSource()},{hotInstance:g,dataMap:s,dataSource:a,internalSource:"updateData",source:t,metaManager:v,firstRun:m})},this.loadData=function(e,t){dV(e,e=>{s=e},()=>{v.clearCellsCache(),g.initIndexMappers(),l.adjustRowsAndCols(),M.markSource("loadData"),M.refresh(),M.markEndSource(),m&&(m=[null,"loadData"])},{hotInstance:g,dataMap:s,dataSource:a,internalSource:"loadData",source:t,metaManager:v,firstRun:m})},this.getInitialColumnCount=function(){let e=R.columns,t=0;if(Array.isArray(e))t=e.length;else if(np(e))if("array"===g.dataType){let r=g.countSourceCols();for(let n=0;n<r;n+=1)e(n)&&(t+=1)}else("object"===g.dataType||"function"===g.dataType)&&(t=s.colToPropCache.length);else if(eU(R.dataSchema)){let e=s.getSchema();t=Array.isArray(e)?e.length:tE(e)}else t=g.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,r,n){return ez(e)?s.getAll():s.getRange(g._createCellCoords(e,t),g._createCellCoords(r,n),dP.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,r,n){return s.getCopyableText(g._createCellCoords(e,t),g._createCellCoords(r,n))},this.getCopyableData=function(e,t){return s.getCopyable(e,s.colToProp(t))},this.getCopyableSourceData=function(e,t){return a.getCopyable(e,s.colToProp(t))},this.getSchema=function(){return s.getSchema()},this.updateSettings=function(e){var t,r;let n,o,i,a,h,d,u,c=arguments.length>1&&void 0!==arguments[1]&&arguments[1],p=(m?g.loadData:g.updateData).bind(this);for(d in eU(e.rows)&&th('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?'),eU(e.cols)&&th('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?'),eU(e.ganttChart)&&th('Since 8.0.0 the "ganttChart" setting is no longer supported.'),o=Array.isArray((t=e).columns)?t.columns:[],i=Array.isArray(t.cell)?t.cell:[],a=[t,...o,...i],cd.forEach(e=>{let{name:t,version:r,migrationUrl:n}=e;a.some(e=>ty(e)&&eU(e[t]))&&t7(`Core.removedOption.${t}`,`The "${t}" setting was removed in Handsontable ${r} and is ignored. See ${n} for the migration path.`)}),B=null,eU(e.rowHeights)&&eU(e.minRowHeights)&&t6("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"===d||"language"===d);else if("className"===d)x("className",e.className);else if("tableClassName"===d&&g.table)x("tableClassName",e.tableClassName),g.view._wt.wtOverlays.syncOverlayTableClassNames();else if(n$.getSingleton().isRegistered(d)||n$.getSingleton().isDeprecated(d)){let t=e[d];np(t)?(n$.getSingleton().addAsFixed(d,t,g),R[d]=t):Array.isArray(t)&&(n$.getSingleton().add(d,t,g),R[d]=t)}else!c&&tA(e,d)&&(E[d]=e[d]);let b=ul(g.rootContainer),C=tA(e,"themeName"),y=tA(e,"theme");if(C&&y&&t6("Both `theme` and `themeName` are defined in your configuration. These options are aliases and cannot be used together. The `themeName` option will be ignored."),c){let t;y&&"string"==typeof e.theme?t=e.theme:C&&"string"==typeof e.themeName&&e.themeName&&!y?(t=e.themeName,R.theme=e.themeName,R.themeName=void 0):b?t=b:g.themeManager&&(t=g.themeManager.getClassName()),g.useTheme(t??null)}else{let t=g.getCurrentThemeName();if(y&&"string"==typeof e.theme&&t!==e.theme)g.themeManager?.destroy(),g.useTheme(e.theme);else if(C&&!y&&t!==e.themeName)g.themeManager?.destroy(),R.theme=e.themeName,R.themeName=void 0,g.useTheme(e.themeName);else if(as(g)&&!b&&ty(e.theme))if(null===g.themeManager)k(e.theme,O()),g.useTheme(g.themeManager.getClassName());else{let t;t="function"!=typeof e.theme.getThemeConfig?co(e.theme):e.theme,g.themeManager.update(t),g.useTheme(g.themeManager.getClassName())}}let w=(!!tA(h=N(e),"colorScheme")||!!tA(h,"density"))&&(g.themeManager?!!g.themeManager.setOverrides(h)&&!c&&(g.stylesHandler.clearCache(),!0):(uX(h.colorScheme)&&uX(h.density)||f||(f=!0,t6("The `colorScheme` and `density` options require the theme engine, so they have no effect when the theme is enabled by a CSS class name. Pass a theme config object or a `ThemeBuilder` instance to the `theme` option, or remove the `ht-theme-*` class from the container element to use the default theme.")),!1));!0===g.runHooks("hasExternalDataSource")?(e.data&&t6('The "data" setting is ignored when "hasExternalDataSource" returns `true`.'),c||tA(e,"data")||tA(e,"dataProvider")?p([],"updateSettings"):void 0!==e.columns&&(s.createMap(),g.initIndexMappers())):void 0===e.data&&void 0===R.data?p(null,"updateSettings"):void 0!==e.data?p(e.data,"updateSettings"):void 0!==e.columns&&(s.createMap(),g.initIndexMappers()),!m&&e.language&&(hj(n=a$(r=e.language))?(g.runHooks("beforeLanguageChange",n),E.language=n,g.runHooks("afterLanguageChange",n)):aY(r));let S=g.countCols(),T=R.columns;if(void 0!==e.cell||void 0!==e.cells||void 0!==e.columns){let e=v.getUserDefinedCellMetas();v.clearCache(),e.forEach(e=>{let{physicalRow:t,physicalColumn:r,key:n,value:o}=e;v.setCellMeta(t,r,n,o)})}if(S>0)for(d=0,u=0;d<S;d++){if(T){let e=np(T)?T(d):T[u];e&&v.updateColumnMeta(u,e)}u+=1}if(eU(e.cell)){v.disableUserDefinedMetaRecording();try{e.cell.forEach(e=>{g.setCellMetaObject(e.row,e.col,e)})}finally{v.enableUserDefinedMetaRecording()}}g.runHooks("afterCellMetaReset"),m&&dF(g,"init");let A=g.rootElement.style.height;""!==A&&(A=parseInt(g.rootElement.style.height,10)),c&&g.rootElement.getAttribute("style")&&(g.rootElement.dataset.initialstyle=g.rootElement.getAttribute("style")??"");let I=e.height;if(void 0!==e.height)if(np(I)&&(I=I()),null===(I=g.runHooks("beforeHeightChange",I))){let e=g.rootElement.dataset.initialstyle;e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?g.rootElement.setAttribute("style",e):(g.rootElement.style.height="",g.rootElement.style.overflow="")}else void 0!==I&&(g.rootElement.style.height=isNaN(I)?`${I}`:`${I}px`,g.rootElement.style.overflow="clip");if(void 0!==e.width){let t=e.width;np(t)&&(t=t()),t=g.runHooks("beforeWidthChange",t),g.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}if(void 0!==e.height||void 0!==e.width){let e=g.rootElement.style.height,t=g.rootElement.style.width,r=/%|v(?:w|h|min|max)/i.test(t),n=""!==t&&"auto"!==t&&!r;if(!e){let e=g.rootElement.style.overflowX;(""===e||"clip"===e)&&(g.rootElement.style.overflowX=n?"clip":"")}}c||(g.view&&(g.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),g.view._wt.exportSettingsAsClassNames(),g.view.invalidateIndexSizesCache()),M.updateHighlightClassNames(),g.runHooks("afterUpdateSettings",e)),l.adjustRowsAndCols(),g.view&&!m&&(g.render(),g.view._wt.wtOverlays.adjustElementsSize()),w&&g.themeManager&&g.runHooks("afterSetTheme",g.themeManager.getClassName(),!1),!c&&g.view&&(""===A||""===I||void 0===I)&&A!==I&&g.view._wt.wtOverlays.updateMainScrollableElements(),as(g)&&W?.applyConfig(R.layout)},this.getValue=function(){let e=g.getSelectedRangeActive();if(R.getValue){if(np(R.getValue))return R.getValue.call(g);else if(e&&"string"==typeof R.getValue){let t=e.highlight.row??0;return g.getData()[t][R.getValue]}}else if(e)return g.getDataAtCell(e.highlight.row,e.highlight.col);return null},this.getSettings=function(){return R},this.clear=function(){this.selectAll(),this.emptySelectedCells(),this.deselectCell()},this.alter=function(e,t,r,n,o){l.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(g.columnIndexMapper.isHidden(g.toPhysicalColumn(t)))return null;n=g.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(g.rowIndexMapper.isHidden(g.toPhysicalRow(e)))return null;o=g.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===o||null===n||void 0===o||void 0===n?null:g.view.getCellAtCoords(g._createCellCoords(o,n),r)},this.getCoords=function(e){let t=g.view._wt.wtTable.getCoords(e);if(null===t)return null;let{row:r,col:n}=t,o=r,i=n;return null!==r&&r>=0&&(o=g.rowIndexMapper.getVisualFromRenderableIndex(r)),null!==n&&n>=0&&(i=g.columnIndexMapper.getVisualFromRenderableIndex(n)),g._createCellCoords(o,i)},this.colToProp=function(e){return s.colToProp(e)},this.propToCol=function(e){return s.propToCol(e)},this.toVisualRow=e=>g.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>g.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>g.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>g.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return s.get(e,s.colToProp(t))},this.getDataAtRowProp=function(e,t){return s.get(e,t)},this.getDataAtCol=function(e){let t=[],r=s.getRange(g._createCellCoords(0,e),g._createCellCoords(R.data.length-1,e),dP.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=s.getRange(g._createCellCoords(0,s.propToCol(e)),g._createCellCoords(R.data.length-1,s.propToCol(e)),dP.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?a.getData():a.getByRange(g._createCellCoords(e,t??null),g._createCellCoords(r??null,n??null))},this.getSourceDataArray=function(e,t,r,n){return void 0===e?a.getData(!0):a.getByRange(g._createCellCoords(e,t??null),g._createCellCoords(r??null,n??null),!0)},this.getSourceDataAtCol=function(e){return a.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,r,n){let o=D(e,t,r),i=g.hasHook("afterSetSourceDataAtCell"),s=[],l=(e,t)=>{let r=g.toVisualRow(e),n=g.toVisualColumn(t);return Number.isInteger(n)?g.getCellMetaTransient(r,n):{...Object.getPrototypeOf(R),...R}};i&&J(o,e=>{let[t,r,n]=e,o=n9(n,l(t,r));s.push([t,r,a.getAtCell(t,r),o])}),J(o,e=>{let[t,r,o]=e,i=l(t,r),s=n9(o,i);(function(e,t,r){let n=t.sourceDataValidator;if(!np(n)||!0===n(e,t,r))return!0;let{row:o,col:i,sourceDataWarningMessage:s,allowInvalid:a}=t;return s&&dB(s,[{row:o,col:i,value:e}]),!0===a})(s,i,n??"setSourceDataAtCell")&&a.setAtCell(t,r,s)}),i&&this.runHooks("afterSetSourceDataAtCell",s,n),this.render();let h=g.getActiveEditor();h&&eU(h.refreshValue)&&h.refreshValue()},this.getSourceDataAtRow=function(e){return a.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return a.getAtCell(e,t)},this.getDataAtRow=function(e){return s.getRange(g._createCellCoords(e,0),g._createCellCoords(e,this.countCols()-1),dP.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,r,n){let o=void 0===e?[0,0,g.countRows(),g.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 oH(Math.max(Math.min(i,a),0),Math.max(i,a),e=>{let t=!0;return oH(Math.max(Math.min(s,l),0),Math.max(s,l),r=>(d=g.getCellMetaTransient(e,r).type??null,h?t=h===d:h=d,t)),u=t?d??"mixed":"mixed",t}),u},this.removeCellMeta=function(e,t,r){let[n,o]=[g.toPhysicalRow(e),g.toPhysicalColumn(t)],i=v.getCellMetaKeyValue(n,o,r);!1!==g.runHooks("beforeRemoveCellMeta",e,t,r,i)&&(v.removeCellMeta(n,o,r),g.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])&&th("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array."),t>0&&v.removeRow(g.toPhysicalRow(e),t),n.length>0&&J(n.reverse(),t=>{v.createRow(g.toPhysicalRow(e)),J(t,(t,r)=>{this.setCellMetaObject(e,r,t)})}),g.render()},this.setCellMetaObject=function(e,t,r){"object"==typeof r&&tS(r,(r,n)=>{this.setCellMeta(e,t,n,r)})},this._setCellMetaDeclarative=function(e,t,r,n){let o=e,i=t;e<g.countRows()&&(o=g.toPhysicalRow(e)),t<g.countCols()&&(i=g.toPhysicalColumn(t)),v.disableUserDefinedMetaRecording();try{v.setCellMeta(o,i,r,n)}finally{v.enableUserDefinedMetaRecording()}},this.setCellMeta=function(e,t,r,n){if(!1===g.runHooks("beforeSetCellMeta",e,t,r,n))return;let o=e,i=t;e<g.countRows()&&(o=g.toPhysicalRow(e)),t<g.countCols()&&(i=g.toPhysicalColumn(t)),v.setCellMeta(o,i,r,n),g.runHooks("afterSetCellMeta",e,t,r,n)},this.getCellsMeta=function(){return v.getCellsMeta()},this.getCellMeta=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{skipMetaExtension:!1},n=g.toPhysicalRow(e),o=g.toPhysicalColumn(t);return null===n&&(n=e),null===o&&(o=t),v.getCellMeta(n,o,{visualRow:e,visualColumn:t,...r})},this.getCellMetaTransient=function(e,t){let r=g.toPhysicalRow(e),n=g.toPhysicalColumn(t);return null===r&&(r=e),null===n&&(n=t),v.getCellMetaTransient(r,n,{visualRow:e,visualColumn:t})},this.getColumnMeta=function(e){return v.getColumnMeta(g.toPhysicalColumn(e))},this.getCellMetaAtRow=function(e){return v.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===g.dataType||R.columns)},this.getCellRenderer=function(e,t){let r="number"==typeof e?g.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof r?o5(r):ez(r)?o5("text"):r},this.getCellEditor=function(e,t){let r="number"==typeof e?g.getCellMeta(e,t).editor:e.editor;return"string"==typeof r?n6(r):ez(r)?n6("text"):r},this.getCellValidator=function(e,t){let r="number"==typeof e?g.getCellMeta(e,t).validator:e.validator;return"string"==typeof r?ir(r):r},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){Array.isArray(e)||th("validateRows parameter `rows` must be an array"),this._validateCells(t,e)},this.validateColumns=function(e,t){Array.isArray(e)||th("validateColumns parameter `columns` must be an array"),this._validateCells(t,void 0,e)},this._validateCells=function(e,t,r){let n=H();e&&(n.onQueueEmpty=e);let o=g.countRows()-1;for(;o>=0;){if(void 0!==t&&-1===t.indexOf(o)){o-=1;continue}let e=g.countCols()-1;for(;e>=0;){if(void 0!==r&&-1===r.indexOf(e)){e-=1;continue}n.addValidatorToQueue();let t=o,i=e,s=g.getCellMetaTransient(t,i);g.validateCell(g.getDataAtCell(t,i),s,e=>{"boolean"!=typeof e&&th("Validation error: result is not boolean"),!1===e&&(n.valid=!1,g.getCellMeta(t,i,{skipMetaExtension:!0}).valid=!1),n.removeValidatorFormQueue()},"validateCells"),e-=1}o-=1}n.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=R.rowHeaders,r=e;if(void 0!==r&&(r=g.runHooks("modifyRowHeader",r)),void 0===r){let e=[];oH(g.countRows()-1,t=>{e.push(g.getRowHeader(t))}),t=e}else Array.isArray(t)&&void 0!==t[r]?t=t[r]:np(t)?t=t(r):t&&"string"!=typeof t&&"number"!=typeof t&&(t=r+1);return 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=g.countCols();e<t;e++)if(g.getColHeader(e))return!0;return!1};let B=null;this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,r=g.runHooks("modifyColHeader",e);if(void 0===r){let e=[],t=g.countCols();for(let r=0;r<t;r++)e.push(g.getColHeader(r));return e}let n=R.colHeaders,o=R.columns,i="function"==typeof o?o:null,s=g.toPhysicalColumn(r),a=null;if(null!==i){let e=g.countCols();if(null===B||B.columns!==i||B.columnsLen!==e){let t=[];for(let r=0;r<e;r++)i(r)&&t.push(r);B={columns:i,columnsLen:e,indexes:t}}a=i(B.indexes[s])??null}return!1===R.colHeaders?n=null:a&&a.title?n=a.title:o&&!np(o)&&o[s]&&o[s].title?n=o[s].title:Array.isArray(R.colHeaders)&&void 0!==R.colHeaders[s]?n=R.colHeaders[s]:np(R.colHeaders)?n=R.colHeaders(s):R.colHeaders&&"string"!=typeof R.colHeaders&&"number"!=typeof R.colHeaders&&(n=ag(r)),n=g.runHooks("modifyColumnHeaderValue",n,e,t)},this._getColWidthFromSettings=function(e){let t;if(e>=0&&(t=g.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=g._getColWidthFromSettings(e);return void 0===(r=g.runHooks("modifyColWidth",r,e,t))&&(r=50),r},this._getRowHeightFromSettings=function(e){let t=g.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))}let n=r;return null!=n&&null!==t&&n<t?t:n},this.getRowHeight=function(e,t){let r=g._getRowHeightFromSettings(e);return g.runHooks("modifyRowHeight",r,e,t)},this.countSourceRows=function(){return a.countRows()},this.countSourceCols=function(){return a.countFirstRowKeys()},this.countRows=function(){return s.getLength()},this.countCols=function(){return Math.min(R.maxCols,g.columnIndexMapper.getNotTrimmedIndexesLength())},this.countRenderedRows=function(){let e=g.view;return e?._wt.drawn?e._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){let e=g.view;return e?._wt.drawn?e._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){let e=g.view;return e?._wt.drawn?e._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){let e=g.view;return e?._wt.drawn?e._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){let e=g.view;return e?e.getRowHeadersCount():0},this.countColHeaders=function(){let e=g.view;return e?e.getColumnHeadersCount():0},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return o_(g.countRows()-1,r=>{if(g.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 o_(g.countCols()-1,r=>{if(g.isEmptyCol(r))t+=1;else if(!0===e)return!1}),t},this.isEmptyRow=function(e){return R.isEmptyRow.call(g,e)},this.isEmptyCol=function(e){return R.isEmptyCol.call(g,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];if(ez(e)||ez(t))return!1;let s=[[null==e||Number.isNaN(Number(e))?0:Number(e),null==t||"number"==typeof t&&Number.isNaN(t)?0:t,ez(r)?void 0:r,ez(n)?void 0:n]];return g.selectCells(s,o,i)},this.selectCells=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],r=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];!1===r&&u.suspend(),!1===n&&d.suspend();try{e=M.selectCells(t)}finally{u.resume(),d.resume()}return e&&n&&g.listen(),e},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;u.skipNextScrollCycle(),M.selectAll(e,t,r)};let V=(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(np(t)&&this.addHookOnce("afterScroll",t),void 0===o||o){var a,l;let e,t,o,h,d=(a=r,l=n,e=void 0!==a&&Number.isInteger(a)&&a>=0,t=void 0!==l&&Number.isInteger(l)&&l>=0,o=e?V(g.rowIndexMapper,a):void 0,h=t?V(g.columnIndexMapper,l):void 0,null!==o&&null!==h&&{renderableRow:e?g.rowIndexMapper.getRenderableFromVisualIndex(o)??void 0:a,renderableColumn:t?g.columnIndexMapper.getRenderableFromVisualIndex(h)??void 0:l});if(!1===d)return!1;i=d.renderableRow,s=d.renderableColumn}let h=Number.isInteger(i),d=Number.isInteger(s),u=!1;return h&&i>=0&&d&&s>=0?u=g.view.scrollViewport(g._createCellCoords(i,s),e.horizontalSnap,e.verticalSnap):h&&i>=0&&(d&&s<0||!d)?u=g.view.scrollViewportVertically(i,e.verticalSnap):d&&s>=0&&(h&&i<0||!h)&&(u=g.view.scrollViewportHorizontally(s,e.horizontalSnap)),np(t)&&(u?this.view.render():(this.removeHook("afterScroll",t),this._registerMicrotask(()=>t()))),u},this.scrollToFocusedCell=function(e){if(!g.selection.isSelected())return!1;np(e)&&g.addHookOnce("afterScroll",e);let{highlight:t}=g.getSelectedRangeActive(),r=g.scrollViewportTo(t.toObject());return r?g.view.render():np(e)&&(g.removeHook("afterScroll",e),g._registerMicrotask(()=>e())),r},this.destroy=function(){g._clearTimeouts(),g._clearMicrotasks(),b?.disconnect(),b=null,g.view&&g.view.destroy(),a&&a.destroy(),a=null,as(this)&&(0!==uc&&(1===uc&&(uu.remove(),uu=null),uc-=1),this.getFocusScopeManager().destroy(),W?.destroy(),g.themeManager?.destroy()),this.getShortcutManager().destroy(),A.clear(),v.clearCache(),ch.delete(this.guid),p.destroy(),h&&h.destroy(),g.rootContainer&&rv(g.rootContainer),g.rootPortalElement&&g.rootPortalElement.remove(),g.batchExecution(()=>{g.rowIndexMapper.destroy(),g.columnIndexMapper.destroy(),T.getItems().forEach(e=>{let[,t]=e;t.destroy()}),T.clear(),g.runHooks("afterDestroy")},!0),n$.getSingleton().destroy(g),tS(g,(e,t,r)=>{var n;np(e)?r[t]=(n=t,()=>{th(`The "${n}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(r[t]=null)}),g.isDestroyed=!0,s&&s.destroy(),s=null,l=null,M=null,h=null,g=null},this.getActiveEditor=function(){return h?.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return g.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return g.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return g.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return g.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return g.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return g.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return g.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return g.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return g.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return g.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return g.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return g.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(e){return T.getItem(op(e))},this.getPluginName=function(e){return T.getId(e)},this.getInstance=function(){return g},this.addHook=function(e,t,r){n$.getSingleton().add(e,t,g,r)},this.hasHook=function(e){return n$.getSingleton().has(e,g)||n$.getSingleton().has(e)},this.addHookOnce=function(e,t,r){n$.getSingleton().once(e,t,g,r)},this.removeHook=function(e,t){n$.getSingleton().remove(e,t,g)},this.runHooks=function(e,t,r,n,o,i,s){return n$.getSingleton().run(g,e,t,r,n,o,i,s)},this.getTranslatedPhrase=function(e,t){return hQ(R.language,e,t)},this.toHTML=()=>oa(this),this.toTableElement=()=>{let e=g.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",oa(g)),e.firstElementChild},this.timeouts=[],this.useTheme=e=>{let t=!!m;this.stylesHandler.useTheme(e??void 0);let r=this.stylesHandler.getThemeName();!t&&r&&(ul(this.rootContainer)&&(rC(this.rootContainer,/ht-theme-.*/g),rb(this.rootContainer,r)),g.render(),g.scrollViewportTo(0,0)),this.runHooks("afterSetTheme",r,t)},this.getCurrentThemeName=()=>g.stylesHandler.getThemeName()??null,this.getTableHeight=()=>g.rootElement.offsetHeight,this.getTableWidth=()=>g.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(){J(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(){J(this.microtasks,e=>{e.cancelled=!0}),this.microtasks.length=0},this._getEditorManager=function(){return h},this._getDataSource=function(){return a},this._getMetaManager=function(){return v};let U=(e=>{let{ownerWindow:t,handleEvent:r,beforeKeyDown:n,afterKeyDown:o}=e,i=o$({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=d8(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=d7(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(s?.(e)===!0){if(d=h??!1,o=!1===n(e,t),d=!1,a&&e.preventDefault(),l&&(nN(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||nO(e))return;let t=d6(e),i=[];d5.includes(t)||(i=d4(e));let s=o(e,[t].concat(i));!s&&(t0()&&i.includes("meta")||!t0()&&i.includes("control"))&&(s=o(e,[t].concat(d4(e,!0)))),n(e);return}if(!1===np(i)||229===e.keyCode||"string"!=typeof e.key||nO(e))return;let s=d6(e),a=[];d5.includes(s)||(a=d4(e));let l=i(e,[s].concat(a));!l&&(t0()&&a.includes("meta")||!t0()&&a.includes("control"))&&(l=i(e,[s].concat(d4(e,!0)))),n(e)},a=()=>{ue.releaseAll()};return{mount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document,r=ut.get(e)??0;0===r&&(e.addEventListener("keydown",ur),e.addEventListener("keyup",un)),ut.set(e,r+1),e.addEventListener("keydown",s),e.addEventListener("blur",a),t=ri(t)}},unmount:()=>{let t=e;for(;t;){let{documentElement:e}=t.document,r=ut.get(e)??0;r<=1?(e.removeEventListener("keydown",ur),e.removeEventListener("keyup",un),ut.delete(e)):ut.set(e,r-1),e.removeEventListener("keydown",s),e.removeEventListener("blur",a),t=ri(t)}},isPressed:e=>ue.isPressed(e),releasePressedKeys:()=>ue.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)||th(ec`You've tried to activate the "${e}" shortcut context\x20
251
- 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=d6(e),n=d5.includes(r),o=n?[]:d4(e),i=[[r].concat(o)];return!n&&("function"==typeof t&&t()?o.includes("meta"):o.includes("control"))&&i.push([r].concat(d4(e,!0))),i})(t,t0).some(e=>r.hasShortcut(e))},isCtrlPressed:()=>!d&&(c.isPressed("control")||c.isPressed("meta")),releasePressedKeys:()=>c.releasePressedKeys(),destroy:()=>c.unmount()}})({handleEvent:(e,t)=>"global"===t||g.isListening(),beforeKeyDown:e=>g.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||g.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",e=>{!1===e.ctrlKey&&!1===e.metaKey&&U.releasePressedKeys()}),this.getShortcutManager=function(){return U},d=new d$(g);let z=as(this)?function(e){let t=o$({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]:dj.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(nc(e.rootDocument))?t.deactivateFocusCatchers():t.activateFocusCatchers():t.runOnlyIf()?t.activateFocusCatchers():t.deactivateFocusCatchers()})}function a(r,s){if(!r.isConnected||!rx(r))return;let a=t.getValues().filter(e=>e.runOnlyIf()),l=!1;a.forEach(t=>{!l&&t.contains(r)&&(l=!0,s!==dj.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=ri(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=ri(t)}}}}(e.rootWindow,{onFocus:e=>{a(rn(e),rn(e).dataset.htFocusSource??dj.UNKNOWN)},onClick:e=>{a(rn(e),dj.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)&&th(`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:dY.INLINE,contains:e=>e===t||t.contains(e),runOnlyIf:()=>!0,enableFocusCatchers:!0,...o},s=!1===i.enableFocusCatchers?null:(r=dq(e,dj.TAB_FROM_ABOVE),n=dq(e,dj.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]:dj.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)||th(`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]:dj.UNKNOWN;t.hasItem(e)||th(`Scope with id "${e}" not found`);let n=r??dj.UNKNOWN;o(t.getItem(e),n)})(e,r),deactivateScope:e=>{!t.hasItem(e)&&th(`Scope with id "${e}" not found`),i(t.getItem(e))},destroy:()=>l.unmount()}}(g):null,W=as(this)?new ub({top:g.rootSlotTopElement,bottom:g.rootSlotBottomElement}):null;this.getFocusManager=function(){return d},this.getFocusScopeManager=function(){return as(g)||th("The FocusScopeManager is only available for the main Handsontable instance."),z},this.getLayoutManager=function(){return as(g)||th("The LayoutManager is only available for the main Handsontable instance."),W};let G=C.theme,$=C.themeName,Y=ul(g.rootContainer);as(g)&&!Y&&(ty(G)||!G&&!$)&&k(G,N(C)),oQ().forEach(e=>{let t=oZ(e);t&&T.addItem(e,new t(this))}),r=g,[ua,us].forEach(e=>e(r)),as(this)&&(n=g,[d0].forEach(e=>e(n))),U.setActiveContextName("grid"),n$.getSingleton().run(g,"construct")};dC(cS),o4(cu);let cR=function(e,t){let r=new cv(e,t||{},ai);return r.init(),r};cR.editors={BaseEditor:oe,TextEditor:cy},cR.dom={empty:rv},cR.helper={},cR.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new cv(e,t,ai)},cR.DefaultSettings=dw(),cR.hooks=n$.getSingleton(),cR.CellCoords=i7,cR.CellRange=i8,cR.packageName="handsontable",cR.buildDate="07/10/2026 09:25:11",cR.version="18.1.2-rc2",cR.languages={dictionaryKeys:w,getLanguageDictionary:hX,getLanguagesDictionaries:function(){return hq()},registerLanguageDictionary:hK,getTranslatedPhrase:hQ},cR.themes={hasTheme:u8,getTheme:ce,getThemeNames:ct,getThemes:cr,registerTheme:co,reinitTheme:ci};let cE="handsontableEditor";class cT extends cy{static get EDITOR_TYPE(){return"handsontable"}isFlippedVertically=!1;isFlippedHorizontally=!1;open(){super.open();let e=this.htContainer.style;this.htEditor&&(this.htEditor.rootPortalElement=null,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.rootPortalElement=this.hot.rootPortalElement,this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),r1(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{hot:s}=this,a=this.setValue.bind(this),l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,themeName:this.hot.getCurrentThemeName(),afterOnCellMouseDown(e,t){if(t.row<0||t.col<0)return;let r=this.getDataAtCell(t.row,t.col);void 0!==r&&a(r),s.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&tc(l,i.handsontable),this.htOptions=l}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();if(!t)return{isFlipped:!1,spaceAbove:0,spaceBelow:0};let 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();if(!t)return{isFlipped:!1,spaceInlineStart:0,spaceInlineEnd:0};let r=t.start+t.width,n=e.getWorkspaceWidth();e.isHorizontallyScrollableByWindow()&&(r=Math.max(r+(e.getTableOffset().left-this.hot.rootWindow.scrollX),0),n=this.hot.rootDocument.documentElement.clientWidth);let o=this.getDropdownWidth(),i=n-r+t.width,s=o>i&&r>i;return s?this.flipDropdownHorizontally():this.unflipDropdownHorizontally(),{isFlipped:s,spaceInlineStart:r,spaceInlineEnd:i}}flipDropdownHorizontally(){let e=this.htEditor.rootElement.style,{width:t}=this.getEditedCellRect()??{width:0};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&&(this.htEditor.rootPortalElement=null,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(),nN(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{let r,n=this.htEditor;if(!n.getSelectedActive()&&this.isFlippedVertically)r=n.countRows()-1;else if(n.getSelectedActive()){let e=n.getSelectedActive();r=this.isFlippedVertically?Math.max(0,e[0]-1):e[0]-1}return t(r,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{let r,n=this.htEditor;if(n.getSelectedActive()||this.isFlippedVertically){if(n.getSelectedActive()){let e=n.getSelectedActive();this.isFlippedVertically?r=e[0]+1:this.isFlippedVertically||(r=Math.min(n.countRows()-1,e[0]+1))}}else r=0;return t(r,e)},preventDefault:!1}],{group:cE,relativeToGroup:dJ,position:"before"})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(cE)}}class cA extends cT{static get EDITOR_TYPE(){return"autocomplete"}query=null;strippedChoices=[];rawChoices=[];#nW=this.hot.guid.slice(0,9);getValue(){let e=this.rawChoices.find(e=>{let t=this.stripValueIfNeeded(e);return(this.#nG(t)?t.value:t)===this.TEXTAREA.value});return eU(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),rb(this.htContainer,"autocompleteEditor"),rb(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&ry(this.TEXTAREA,[["type","text"],["role","combobox"],P("listbox"),["aria-autocomplete","list"]])}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i),this.hot.getSettings().ariaTags&&ry(this.TEXTAREA,[U("false"),["aria-controls",`${this.#nW}-listbox-${e}-${t}`]]),this.htOptions={...this.htOptions,valueGetter:e=>this.#nG(e)?e.value:e}}open(){super.open();let e=this.cellProperties.trimDropdown,t=void 0===e||e,r=this.hot.getSettings().ariaTags,n=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,o=n?.length,{row:i,col:s}=this;if(this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",e=>this.onBeforeKeyDown(e)),this.htEditor.addHook("afterScroll",this.#n$),this.htEditor.updateSettings({colWidths:t?[r$(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,modifyColWidth:t?void 0:e=>Math.max(e??0,r$(this.TEXTAREA)-2),renderer:(e,t,i,s,a,l,h)=>{cw(e,t,i,s,a,l,h);let{filteringCaseSensitive:d,allowHtml:u}=this.cellProperties,c=this.cellProperties.locale,g=this.query,p=eV(l);if(u)rM(t,p,!1,"html",this.hot.rootElement);else if(p&&g&&g.length>0){let r=!0===d?p.indexOf(g):oM(p,c).indexOf(oM(g,c));if(-1!==r){let n=p.slice(r,r+g.length),{rootDocument:o}=e;t.innerHTML="",t.appendChild(o.createTextNode(p.slice(0,r)));let i=o.createElement("strong");i.textContent=n,t.appendChild(i),t.appendChild(o.createTextNode(p.slice(r+g.length)))}}r&&ry(t,[["role","option"],...n?[["aria-setsize",o??0]]:[],...n?[["aria-posinset",n.indexOf(l)+1]]:[],["id",`${this.htEditor.rootElement.id}_${i}-${s}`]])},afterSelectionEnd:(e,t)=>{if(r){let r=e=>{ry(e,[$()]),ry(this.TEXTAREA,"aria-activedescendant",e.id)},n=this.htEditor.getCell(e,t,!0);null!==n?r(n):this.htEditor.addHookOnce("afterScrollVertically",()=>{let n=this.htEditor.getCell(e,t,!0);null!==n&&r(n)})}}}),r){let e=R();ry(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,e[0],e[1]),ry(this.htEditor.rootElement,[N(),["aria-live","polite"],["aria-relevant","text"],["id",`${this.#nW}-listbox-${i}-${s}`]]),ry(this.TEXTAREA,...U("true"))}this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)})}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&ry(this.TEXTAREA,[U("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=rQ(this.TEXTAREA),r=rZ(this.TEXTAREA),n=this.cellProperties.sortByRelevance,o=this.cellProperties.filter,i=this.stripValueIfNeeded(this.getValue()),s=this.#nG(i)?i.value:i,a=null,l=e;n||(l=[...l].sort((e,t)=>eV(e).localeCompare(eV(t))));let h=[],d=this.cellProperties.locale,u=this.cellProperties.filteringCaseSensitive,c=u?s:oM(String(s),d);for(let e=0;e<l.length;e++){let t=this.#nG(l[e])?oy(eV(l[e].value)):oy(eV(l[e]));if(-1!==(u?t:oM(t,d)).indexOf(String(c))&&(h.push(e),!1===o))break}!1===o?String(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(K([l])),l.length>0&&(this.updateDropdownDimensions(),this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a??void 0)),this.hot.listen(),r1(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=this.htEditor.stylesHandler.getDefaultRowHeight()??0;if(0===r)return;let n=Math.max(Math.ceil(e/r)-1,1)*r;this.isFlippedVertically&&(this.htEditor.rootElement.style.top=`${parseInt(this.htEditor.rootElement.style.top,10)+t-n}px`),this.setDropdownHeight(n)}}updateDropdownDimensions(){let e=r2(),t=this.getTargetEditorWidth()+e,r=this.getTargetEditorHeight()+e;this.htEditor.updateSettings({width:t,height:r}),this.#nY(),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e}),this.#nY(),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.htContainer.querySelector(".htCore");if(t){let r=this.hot.rootWindow.getComputedStyle(t);e=parseInt(r.borderTopWidth,10)+parseInt(r.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)+ +(0===t)),0)+e}getTargetEditorWidth(){let e=0;if(!this.hot.getCurrentThemeName()){let t=this.htContainer.querySelector(".htCore");if(t){let r=this.hot.rootWindow.getComputedStyle(t);e=parseInt(r.borderInlineStartWidth,10)+parseInt(r.borderInlineEndWidth,10)}}return this.htEditor.getColWidth(0)+e}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){let{allowHtml:t}=this.cellProperties,r=e=>eV(t?e:oy(String(e)));return e.every(e=>tx(e))?e.map(e=>({key:r(e.key),value:r(e.value)})):e.map(e=>r(e))}#n$=nb(()=>{this.focus()},100);#nY(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getTargetEditorWidth()+r3(this.hot.rootDocument)})}#nG(e){return ty(e)&&eU(e.key)&&eU(e.value)}onBeforeKeyDown(e){if(nT(e.keyCode)||e.keyCode===nR.BACKSPACE||e.keyCode===nR.DELETE||e.keyCode===nR.INSERT){let t=10;e.keyCode===nR.C&&(e.ctrlKey||e.metaKey)||(this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)},t))}}}class cM extends oe{static get EDITOR_TYPE(){return"checkbox"}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===rn(t).nodeName){let e=this.TD.querySelector('input[type="checkbox"]');rf(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}let cI=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;function cx(e){let t=new Date(e);return Number.isNaN(new Date(`${e}T00:00`).getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}function cN(e){if(eW(e))return null;if("string"==typeof e&&cI.test(e)){let[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)}return null}let cO=[31,28,31,30,31,30,31,31,30,31,30,31];function ck(e){return e%4==0&&e%100!=0||e%400==0}function cH(e){if("string"!=typeof e||!cI.test(e))return!1;let t=+e.slice(0,4),r=+e.slice(5,7);return+e.slice(8,10)<=(2===r&&ck(t)?29:cO[r-1])}let c_=/^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?$/;function cL(e){if(eW(e)||"string"!=typeof e)return null;let t=c_.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 cP(e){return"string"==typeof e&&c_.test(e)}let cD=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(?:[T ]([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?)?$/;function cF(e){if(eW(e)||"string"!=typeof e)return null;let t=cD.exec(e);if(!t)return null;let[r]=e.split(/[T ]/),[n,o,i]=r.split("-").map(Number);return new Date(n,o-1,i,void 0!==t[3]?Number(t[3]):0,void 0!==t[4]?Number(t[4]):0,void 0!==t[5]?Number(t[5]):0,void 0!==t[6]?Number(t[6].padEnd(3,"0").slice(0,3)):0)}function cB(e){if("string"!=typeof e)return!1;let t=cD.exec(e);if(!t)return!1;let r=+e.slice(0,4),n=+t[1];return+t[2]<=(2===n&&ck(r)?29:cO[n-1])}function cV(){let e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function cU(e){let t=cV();return t.setDate(t.getDate()+e),t}function cz(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}class cW extends cy{static get EDITOR_TYPE(){return"date"}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i),void 0!==i.datePickerConfig&&t4(this.hot.rootElement,"datePickerConfig",'The "datePickerConfig" option is not supported. The native date input is used instead of Pikaday.');let s=this.hot.toPhysicalRow(e);this.originalValue=this.hot.getSourceDataAtCell(s,t)}createElements(e){super.createElements("input"),this.TEXTAREA.setAttribute("type","date")}setValue(e){if(eW(e)&&(e=this.cellProperties.defaultDate),!cH(e)){t6(ec`DateEditor: value must be in ISO date format ("YYYY-MM-DD")\x20
251
+ 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=d6(e),n=d5.includes(r),o=n?[]:d4(e),i=[[r].concat(o)];return!n&&("function"==typeof t&&t()?o.includes("meta"):o.includes("control"))&&i.push([r].concat(d4(e,!0))),i})(t,t0).some(e=>r.hasShortcut(e))},isCtrlPressed:()=>!d&&(c.isPressed("control")||c.isPressed("meta")),releasePressedKeys:()=>c.releasePressedKeys(),destroy:()=>c.unmount()}})({handleEvent:(e,t)=>"global"===t||g.isListening(),beforeKeyDown:e=>g.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||g.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",e=>{!1===e.ctrlKey&&!1===e.metaKey&&U.releasePressedKeys()}),this.getShortcutManager=function(){return U},d=new d$(g);let z=as(this)?function(e){let t=o$({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]:dj.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(nc(e.rootDocument))?t.deactivateFocusCatchers():t.activateFocusCatchers():t.runOnlyIf()?t.activateFocusCatchers():t.deactivateFocusCatchers()})}function a(r,s){if(!r.isConnected||!rx(r))return;let a=t.getValues().filter(e=>e.runOnlyIf()),l=!1;a.forEach(t=>{!l&&t.contains(r)&&(l=!0,s!==dj.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=ri(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=ri(t)}}}}(e.rootWindow,{onFocus:e=>{a(rn(e),rn(e).dataset.htFocusSource??dj.UNKNOWN)},onClick:e=>{a(rn(e),dj.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)&&th(`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:dY.INLINE,contains:e=>e===t||t.contains(e),runOnlyIf:()=>!0,enableFocusCatchers:!0,...o},s=!1===i.enableFocusCatchers?null:(r=dq(e,dj.TAB_FROM_ABOVE),n=dq(e,dj.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]:dj.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)||th(`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]:dj.UNKNOWN;t.hasItem(e)||th(`Scope with id "${e}" not found`);let n=r??dj.UNKNOWN;o(t.getItem(e),n)})(e,r),deactivateScope:e=>{!t.hasItem(e)&&th(`Scope with id "${e}" not found`),i(t.getItem(e))},destroy:()=>l.unmount()}}(g):null,W=as(this)?new ub({top:g.rootSlotTopElement,bottom:g.rootSlotBottomElement}):null;this.getFocusManager=function(){return d},this.getFocusScopeManager=function(){return as(g)||th("The FocusScopeManager is only available for the main Handsontable instance."),z},this.getLayoutManager=function(){return as(g)||th("The LayoutManager is only available for the main Handsontable instance."),W};let G=C.theme,$=C.themeName,Y=ul(g.rootContainer);as(g)&&!Y&&(ty(G)||!G&&!$)&&k(G,N(C)),oQ().forEach(e=>{let t=oZ(e);t&&T.addItem(e,new t(this))}),r=g,[ua,us].forEach(e=>e(r)),as(this)&&(n=g,[d0].forEach(e=>e(n))),U.setActiveContextName("grid"),n$.getSingleton().run(g,"construct")};dC(cS),o4(cu);let cR=function(e,t){let r=new cv(e,t||{},ai);return r.init(),r};cR.editors={BaseEditor:oe,TextEditor:cy},cR.dom={empty:rv},cR.helper={},cR.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new cv(e,t,ai)},cR.DefaultSettings=dw(),cR.hooks=n$.getSingleton(),cR.CellCoords=i7,cR.CellRange=i8,cR.packageName="handsontable",cR.buildDate="07/10/2026 10:00:20",cR.version="18.1.2",cR.languages={dictionaryKeys:w,getLanguageDictionary:hX,getLanguagesDictionaries:function(){return hq()},registerLanguageDictionary:hK,getTranslatedPhrase:hQ},cR.themes={hasTheme:u8,getTheme:ce,getThemeNames:ct,getThemes:cr,registerTheme:co,reinitTheme:ci};let cE="handsontableEditor";class cT extends cy{static get EDITOR_TYPE(){return"handsontable"}isFlippedVertically=!1;isFlippedHorizontally=!1;open(){super.open();let e=this.htContainer.style;this.htEditor&&(this.htEditor.rootPortalElement=null,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.rootPortalElement=this.hot.rootPortalElement,this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),r1(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{hot:s}=this,a=this.setValue.bind(this),l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,themeName:this.hot.getCurrentThemeName(),afterOnCellMouseDown(e,t){if(t.row<0||t.col<0)return;let r=this.getDataAtCell(t.row,t.col);void 0!==r&&a(r),s.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&tc(l,i.handsontable),this.htOptions=l}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();if(!t)return{isFlipped:!1,spaceAbove:0,spaceBelow:0};let 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();if(!t)return{isFlipped:!1,spaceInlineStart:0,spaceInlineEnd:0};let r=t.start+t.width,n=e.getWorkspaceWidth();e.isHorizontallyScrollableByWindow()&&(r=Math.max(r+(e.getTableOffset().left-this.hot.rootWindow.scrollX),0),n=this.hot.rootDocument.documentElement.clientWidth);let o=this.getDropdownWidth(),i=n-r+t.width,s=o>i&&r>i;return s?this.flipDropdownHorizontally():this.unflipDropdownHorizontally(),{isFlipped:s,spaceInlineStart:r,spaceInlineEnd:i}}flipDropdownHorizontally(){let e=this.htEditor.rootElement.style,{width:t}=this.getEditedCellRect()??{width:0};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&&(this.htEditor.rootPortalElement=null,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(),nN(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{let r,n=this.htEditor;if(!n.getSelectedActive()&&this.isFlippedVertically)r=n.countRows()-1;else if(n.getSelectedActive()){let e=n.getSelectedActive();r=this.isFlippedVertically?Math.max(0,e[0]-1):e[0]-1}return t(r,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{let r,n=this.htEditor;if(n.getSelectedActive()||this.isFlippedVertically){if(n.getSelectedActive()){let e=n.getSelectedActive();this.isFlippedVertically?r=e[0]+1:this.isFlippedVertically||(r=Math.min(n.countRows()-1,e[0]+1))}}else r=0;return t(r,e)},preventDefault:!1}],{group:cE,relativeToGroup:dJ,position:"before"})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(cE)}}class cA extends cT{static get EDITOR_TYPE(){return"autocomplete"}query=null;strippedChoices=[];rawChoices=[];#nW=this.hot.guid.slice(0,9);getValue(){let e=this.rawChoices.find(e=>{let t=this.stripValueIfNeeded(e);return(this.#nG(t)?t.value:t)===this.TEXTAREA.value});return eU(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),rb(this.htContainer,"autocompleteEditor"),rb(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&ry(this.TEXTAREA,[["type","text"],["role","combobox"],P("listbox"),["aria-autocomplete","list"]])}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i),this.hot.getSettings().ariaTags&&ry(this.TEXTAREA,[U("false"),["aria-controls",`${this.#nW}-listbox-${e}-${t}`]]),this.htOptions={...this.htOptions,valueGetter:e=>this.#nG(e)?e.value:e}}open(){super.open();let e=this.cellProperties.trimDropdown,t=void 0===e||e,r=this.hot.getSettings().ariaTags,n=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,o=n?.length,{row:i,col:s}=this;if(this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",e=>this.onBeforeKeyDown(e)),this.htEditor.addHook("afterScroll",this.#n$),this.htEditor.updateSettings({colWidths:t?[r$(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,modifyColWidth:t?void 0:e=>Math.max(e??0,r$(this.TEXTAREA)-2),renderer:(e,t,i,s,a,l,h)=>{cw(e,t,i,s,a,l,h);let{filteringCaseSensitive:d,allowHtml:u}=this.cellProperties,c=this.cellProperties.locale,g=this.query,p=eV(l);if(u)rM(t,p,!1,"html",this.hot.rootElement);else if(p&&g&&g.length>0){let r=!0===d?p.indexOf(g):oM(p,c).indexOf(oM(g,c));if(-1!==r){let n=p.slice(r,r+g.length),{rootDocument:o}=e;t.innerHTML="",t.appendChild(o.createTextNode(p.slice(0,r)));let i=o.createElement("strong");i.textContent=n,t.appendChild(i),t.appendChild(o.createTextNode(p.slice(r+g.length)))}}r&&ry(t,[["role","option"],...n?[["aria-setsize",o??0]]:[],...n?[["aria-posinset",n.indexOf(l)+1]]:[],["id",`${this.htEditor.rootElement.id}_${i}-${s}`]])},afterSelectionEnd:(e,t)=>{if(r){let r=e=>{ry(e,[$()]),ry(this.TEXTAREA,"aria-activedescendant",e.id)},n=this.htEditor.getCell(e,t,!0);null!==n?r(n):this.htEditor.addHookOnce("afterScrollVertically",()=>{let n=this.htEditor.getCell(e,t,!0);null!==n&&r(n)})}}}),r){let e=R();ry(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,e[0],e[1]),ry(this.htEditor.rootElement,[N(),["aria-live","polite"],["aria-relevant","text"],["id",`${this.#nW}-listbox-${i}-${s}`]]),ry(this.TEXTAREA,...U("true"))}this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)})}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&ry(this.TEXTAREA,[U("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=rQ(this.TEXTAREA),r=rZ(this.TEXTAREA),n=this.cellProperties.sortByRelevance,o=this.cellProperties.filter,i=this.stripValueIfNeeded(this.getValue()),s=this.#nG(i)?i.value:i,a=null,l=e;n||(l=[...l].sort((e,t)=>eV(e).localeCompare(eV(t))));let h=[],d=this.cellProperties.locale,u=this.cellProperties.filteringCaseSensitive,c=u?s:oM(String(s),d);for(let e=0;e<l.length;e++){let t=this.#nG(l[e])?oy(eV(l[e].value)):oy(eV(l[e]));if(-1!==(u?t:oM(t,d)).indexOf(String(c))&&(h.push(e),!1===o))break}!1===o?String(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(K([l])),l.length>0&&(this.updateDropdownDimensions(),this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a??void 0)),this.hot.listen(),r1(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=this.htEditor.stylesHandler.getDefaultRowHeight()??0;if(0===r)return;let n=Math.max(Math.ceil(e/r)-1,1)*r;this.isFlippedVertically&&(this.htEditor.rootElement.style.top=`${parseInt(this.htEditor.rootElement.style.top,10)+t-n}px`),this.setDropdownHeight(n)}}updateDropdownDimensions(){let e=r2(),t=this.getTargetEditorWidth()+e,r=this.getTargetEditorHeight()+e;this.htEditor.updateSettings({width:t,height:r}),this.#nY(),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e}),this.#nY(),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.htContainer.querySelector(".htCore");if(t){let r=this.hot.rootWindow.getComputedStyle(t);e=parseInt(r.borderTopWidth,10)+parseInt(r.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)+ +(0===t)),0)+e}getTargetEditorWidth(){let e=0;if(!this.hot.getCurrentThemeName()){let t=this.htContainer.querySelector(".htCore");if(t){let r=this.hot.rootWindow.getComputedStyle(t);e=parseInt(r.borderInlineStartWidth,10)+parseInt(r.borderInlineEndWidth,10)}}return this.htEditor.getColWidth(0)+e}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){let{allowHtml:t}=this.cellProperties,r=e=>eV(t?e:oy(String(e)));return e.every(e=>tx(e))?e.map(e=>({key:r(e.key),value:r(e.value)})):e.map(e=>r(e))}#n$=nb(()=>{this.focus()},100);#nY(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getTargetEditorWidth()+r3(this.hot.rootDocument)})}#nG(e){return ty(e)&&eU(e.key)&&eU(e.value)}onBeforeKeyDown(e){if(nT(e.keyCode)||e.keyCode===nR.BACKSPACE||e.keyCode===nR.DELETE||e.keyCode===nR.INSERT){let t=10;e.keyCode===nR.C&&(e.ctrlKey||e.metaKey)||(this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)},t))}}}class cM extends oe{static get EDITOR_TYPE(){return"checkbox"}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===rn(t).nodeName){let e=this.TD.querySelector('input[type="checkbox"]');rf(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}let cI=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;function cx(e){let t=new Date(e);return Number.isNaN(new Date(`${e}T00:00`).getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}function cN(e){if(eW(e))return null;if("string"==typeof e&&cI.test(e)){let[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)}return null}let cO=[31,28,31,30,31,30,31,31,30,31,30,31];function ck(e){return e%4==0&&e%100!=0||e%400==0}function cH(e){if("string"!=typeof e||!cI.test(e))return!1;let t=+e.slice(0,4),r=+e.slice(5,7);return+e.slice(8,10)<=(2===r&&ck(t)?29:cO[r-1])}let c_=/^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?$/;function cL(e){if(eW(e)||"string"!=typeof e)return null;let t=c_.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 cP(e){return"string"==typeof e&&c_.test(e)}let cD=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(?:[T ]([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?)?$/;function cF(e){if(eW(e)||"string"!=typeof e)return null;let t=cD.exec(e);if(!t)return null;let[r]=e.split(/[T ]/),[n,o,i]=r.split("-").map(Number);return new Date(n,o-1,i,void 0!==t[3]?Number(t[3]):0,void 0!==t[4]?Number(t[4]):0,void 0!==t[5]?Number(t[5]):0,void 0!==t[6]?Number(t[6].padEnd(3,"0").slice(0,3)):0)}function cB(e){if("string"!=typeof e)return!1;let t=cD.exec(e);if(!t)return!1;let r=+e.slice(0,4),n=+t[1];return+t[2]<=(2===n&&ck(r)?29:cO[n-1])}function cV(){let e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function cU(e){let t=cV();return t.setDate(t.getDate()+e),t}function cz(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}class cW extends cy{static get EDITOR_TYPE(){return"date"}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i),void 0!==i.datePickerConfig&&t4(this.hot.rootElement,"datePickerConfig",'The "datePickerConfig" option is not supported. The native date input is used instead of Pikaday.');let s=this.hot.toPhysicalRow(e);this.originalValue=this.hot.getSourceDataAtCell(s,t)}createElements(e){super.createElements("input"),this.TEXTAREA.setAttribute("type","date")}setValue(e){if(eW(e)&&(e=this.cellProperties.defaultDate),!cH(e)){t6(ec`DateEditor: value must be in ISO date format ("YYYY-MM-DD")\x20
252
252
  required by the native date input. Received:`,e),super.setValue("");return}super.setValue(e)}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}class cG extends cA{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();(ez(t)||eU(t)&&!t.includes(this.hot._createCellCoords(this.row,this.col)))&&(e=!0)}super.finishEditing(e,t,r)}}class c$ extends cW{static get EDITOR_TYPE(){return"intl-date"}}let cY=/^\d{4}-\d{2}-\d{2}$/,cj=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/;class cq extends cy{static get EDITOR_TYPE(){return"intl-datetime"}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i);let s=this.hot.toPhysicalRow(e);this.originalValue=this.hot.getSourceDataAtCell(s,t)}createElements(e){super.createElements("input"),this.TEXTAREA.setAttribute("type","datetime-local"),this.TEXTAREA.setAttribute("step","1"),this.TEXTAREA.setAttribute("dir","ltr")}setValue(e){if(eW(e))return void super.setValue("");if(!cB(e)){t6(ec`IntlDatetimeEditor: value must be in ISO date-time format ("YYYY-MM-DDTHH:mm:ss")\x20
253
253
  required by the native datetime-local input. Received:`,e),super.setValue("");return}let t=String(e).replace(" ","T").replace(/\.\d+$/,"");cY.test(t)?t+="T00:00:00":cj.test(t)&&(t+=":00"),super.setValue(t)}getValue(){let e=super.getValue();return e&&cj.test(e)?`${e}:00`:e}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}class cK extends cy{static get EDITOR_TYPE(){return"time"}init(){super.init(),this.hot.addHook("afterSetTheme",(e,t)=>{t||this.close()})}createElements(e){super.createElements("input"),this.TEXTAREA.setAttribute("type","time"),this.TEXTAREA.setAttribute("dir","ltr")}setValue(e){if(!cP(e)){t6(ec`TimeEditor: value must be in 24-hour time format ("HH:mm", "HH:mm:ss" or "HH:mm:ss.SSS")\x20
254
254
  required by the native time input. Received:`,e),super.setValue("");return}super.setValue(e)}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}class cX extends cK{static get EDITOR_TYPE(){return"intl-time"}}class cQ extends cy{static get EDITOR_TYPE(){return"numeric"}}class cZ extends cy{autoResize=cm(this.hot.rootDocument,{textContent:e=>"•".repeat(e.value.length)});#nj="";#nq=null;#nK=null;#nX=!1;static get EDITOR_TYPE(){return"password"}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.dataset.hotInput="",this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width="0",this.textareaStyle.height="0",rv(this.TEXTAREA_PARENT);let e=v(-1);this.TEXTAREA.setAttribute(e[0],String(e[1])),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}open(){super.open();let e=this.cellProperties.hashRevealDelay,t=String(this.cellProperties.hashSymbol||"*");if(e>0){this.#nX=!0;let r=t[0];this.TEXTAREA.setAttribute("type","text"),this.TEXTAREA.setAttribute("autocomplete","off"),this.TEXTAREA.setAttribute("spellcheck","false"),this.TEXTAREA.setAttribute("autocapitalize","off"),this.TEXTAREA.setAttribute("autocorrect","off"),this.TEXTAREA.value=r.repeat(this.#nj.length),this.#nK=t=>this.#nQ(t,r,e),this.TEXTAREA.addEventListener("input",this.#nK)}}close(){this.#nK&&(this.TEXTAREA.removeEventListener("input",this.#nK),this.#nK=null),null!==this.#nq&&(clearTimeout(this.#nq),this.#nq=null),this.#nX=!1,this.#nj="",this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.removeAttribute("autocomplete"),this.TEXTAREA.removeAttribute("spellcheck"),this.TEXTAREA.removeAttribute("autocapitalize"),this.TEXTAREA.removeAttribute("autocorrect"),super.close()}getValue(){return this.#nX?this.#nj:super.getValue()}setValue(e){if(this.#nX){this.#nj=e??"";let t=String(this.cellProperties.hashSymbol||"*")[0];this.TEXTAREA.value=t.repeat(this.#nj.length)}else this.cellProperties?.hashRevealDelay>0?this.#nj=e??"":super.setValue(e)}#nQ(e,t,r){let{inputType:n,data:o}=e;if(o&&("insertText"===n||"insertFromPaste"===n||"insertFromDrop"===n||"insertReplacementText"===n||"insertCompositionText"===n)){let e=this.TEXTAREA.selectionStart??0,n=e-o.length,i=this.TEXTAREA.value.length-e;this.#nj=this.#nj.slice(0,n)+o+this.#nj.slice(this.#nj.length-i),this.TEXTAREA.value=t.repeat(n)+o+t.repeat(i),this.TEXTAREA.setSelectionRange(e,e),null!==this.#nq&&clearTimeout(this.#nq),this.#nq=this.hot._registerTimeout(()=>{let e=this.TEXTAREA.selectionStart;this.TEXTAREA.value=t.repeat(this.#nj.length),this.TEXTAREA.setSelectionRange(e,e),this.#nq=null},r)}else if(n?.startsWith("delete")){let e=this.#nj.length,r=this.TEXTAREA.selectionStart??0,n=e-this.TEXTAREA.value.length;this.#nj=this.#nj.slice(0,r)+this.#nj.slice(r+n),this.TEXTAREA.value=t.repeat(this.#nj.length),this.TEXTAREA.setSelectionRange(r,r),null!==this.#nq&&(clearTimeout(this.#nq),this.#nq=null)}else{let e=this.#nj.length,n=this.TEXTAREA.value;if(n.length>e){let o=n.slice(e);this.#nj+=o,this.TEXTAREA.value=t.repeat(e)+o,null!==this.#nq&&clearTimeout(this.#nq),this.#nq=this.hot._registerTimeout(()=>{this.TEXTAREA.value=t.repeat(this.#nj.length),this.#nq=null},r)}else this.#nj=this.#nj.slice(0,n.length),this.TEXTAREA.value=t.repeat(this.#nj.length),null!==this.#nq&&(clearTimeout(this.#nq),this.#nq=null)}}}let cJ="ht_editor_visible",c0="selectEditor";class c1 extends oe{static get EDITOR_TYPE(){return"select"}init(){this.selectWrapper=this.hot.rootDocument.createElement("div"),this.select=this.hot.rootDocument.createElement("select"),this.select.dataset.hotInput="true",this.selectWrapper.style.display="none";let e=this.hot.rootDocument.createElement("DIV"),t=this.hot.getSettings().ariaTags;e.className="htAutocompleteArrow",t&&e.setAttribute(..._()),e.appendChild(this.hot.rootDocument.createTextNode(String.fromCharCode(9660))),rb(this.selectWrapper,"htSelectEditor"),this.selectWrapper.appendChild(this.select),this.selectWrapper.insertBefore(e,this.selectWrapper.firstChild),this.hot.rootElement.appendChild(this.selectWrapper),this.registerHooks(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}getValue(){return this.select.value}setValue(e){this.select.value=null==e?"":String(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",rf(this.selectWrapper,cJ)&&rC(this.selectWrapper,cJ),this.unregisterShortcuts(),this.removeHooksByKey("beforeDialogShow")}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),rv(this.select);let l=aa(this.hot);if(Array.isArray(s))for(let e=0;e<s.length;e++){let t=this.hot.rootDocument.createElement("OPTION");t.value=String(s[e]),rM(t,String(s[e]),l,"selectEditor",this.hot.rootElement),this.select.appendChild(t)}else tS(s,(e,t)=>{let r=this.hot.rootDocument.createElement("OPTION");r.value=t,rM(r,String(e),l,"selectEditor",this.hot.rootElement),this.select.appendChild(r)})}prepareOptions(e){return Array.isArray(e)||"object"==typeof e?e:{}}refreshValue(){let e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==n8.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();let e=this.getEditedCellRect();if(!e)return;let{top:t,start:r,width:n,height:o}=e,i=this.selectWrapper.style;i.height=`${o}px`,i.width=`${n}px`,i.top=`${t}px`,i[this.hot.isRtl()?"right":"left"]=`${r}px`,i.margin="0px",rb(this.selectWrapper,cJ)}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:c0})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(c0)}destroy(){this.clearHooks()}}function c2(e){return e.querySelector('input[type="checkbox"]')}function c3(e,t){return tx(t)?Array.isArray(e)&&e.some(e=>tx(e)?tb(e,t):e===t):e.includes(t)}class c6{input;eventManager;enabled;onInput=this._onInput.bind(this);constructor({input:e,eventManager:t}){this.input=e,this.eventManager=t,this.enabled=!0}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.#nZ(this.input.value)}#nZ(e){this.runLocalHooks("triggerFilter",e)}}tf(c6,aE);let c5="ht-multi-select-editor",c4=`${c5}-search-input-wrapper`,c9=`${c5}-search-icon`,c7=`${c5}-search-input`,c8=`${c5}-separator`,ge=`${c5}-item-`,gt=`${c5}-item-selected`;function gr(e){let t=c2(e);rb(e,gt),t&&!t.checked&&(t.checked=!0)}function gn(e){let t=c2(e);rC(e,gt),t&&t.checked&&(t.checked=!1)}function go(e){let{dropdownListElement:t,index:r}=e,n=t.children[r];if(n){let e=c2(n);e&&e.blur()}}class gi{#nJ=null;#n0=null;#n1=null;#n2=null;#n3=null;#n6=null;#n5=null;#ni=null;#rQ=new or(this);#n4={visibleRowsNumberSetting:null,entriesCount:0,flippedVertically:!1,currentlySelectedItemIndex:0,checkboxChangeListeners:new Map,areCheckboxesDisabled:!1,sourceSortFunction:null};constructor(e,t){this.#n0=e,this.#ni=this.#n0.ownerDocument,this.#nJ=t,this.init()}init(){if(!this.#ni||!this.#n0)return;this.#n1=function(e){let{root:t}=e;return t.createElement("ul")}({root:this.#ni}),this.#n2=function(e){let{root:t}=e,r=t.createElement("input");return ry(r,[H("Search options"),["type","text"],["size",3],["placeholder","Search..."],["id",c7]]),rb(r,c7),r}({root:this.#ni});let e=function(e){let{root:t}=e,r=t.createElement("div");return rb(r,c9),ry(r,[_()]),r}({root:this.#ni});this.#n6=function(e){let{root:t}=e,r=t.createElement("div");return r.className=c4,r}({root:this.#ni}),this.#n3=function(e){let{root:t}=e,r=t.createElement("div");return r.className=c8,r}({root:this.#ni}),this.#n6.appendChild(e),this.#n6.appendChild(this.#n2),this.#n0.appendChild(this.#n6),this.#n0.appendChild(this.#n3),this.#n0.appendChild(this.#n1),this.#n5=new c6({input:this.#n2,eventManager:this.#rQ})}setVisibleRowsNumberSetting(e){this.#n4.visibleRowsNumberSetting=e}setSourceSortFunction(e){this.#n4.sourceSortFunction=e??null}setSearchInputVisibility(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.#n6&&this.#n3&&this.#n5&&(this.#n6.style.display=e?"":"none",this.#n3.style.display=e?"":"none",this.#n5.toggle(e))}fillDropdown(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.removeAllDropdownItems(),this.#n4.currentlySelectedItemIndex=0,Array.isArray(t)||(t=[]);let r=e;this.#n4.sourceSortFunction&&(r=this.#n4.sourceSortFunction(e.slice())),this.#ni&&this.#n1&&null!==this.#nJ&&(r.forEach((e,r)=>{let n="object"==typeof e&&null!==e&&"value"in e?e.value:e;this.#n9({rootDocument:this.#ni,itemKey:"object"==typeof e&&null!==e&&"key"in e?e.key:void 0,itemValue:String(n??e),indexWithinList:r,checked:c3(t,e),disabled:this.#n4.areCheckboxesDisabled})}),this.#n4.entriesCount=r.length,this.runLocalHooks("afterDropdownFill"))}updateDimensions(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.#n7(),n=this.#n8(e),o=n?e.spaceAbove:e.spaceBelow;if(!t&&n&&(this.#n4.flippedVertically=!0),this.#n4.entriesCount>0&&o<this.getHeight(!0)){let e=Math.max(Math.floor((o-this.#oe())/r)-1,1);this.#n4.actualRenderedItemsCount=this.#n4.visibleRowsNumberSetting?Math.min(e,this.#n4.visibleRowsNumberSetting):e}else this.#n4.actualRenderedItemsCount=Math.min(this.#n4.entriesCount,this.#n4.visibleRowsNumberSetting??this.#n4.entriesCount);this.#n0&&(this.#n4.actualRenderedItemsCount&&this.#n4.entriesCount>this.#n4.actualRenderedItemsCount?this.#n0.style.height=`${this.getHeight()}px`:this.#n0.style.height="",this.#ot(e),this.#n0.scrollTop=0)}getDropdownWidth(){return this.#n1?function(e){let{dropdownListElement:t}=e;return t.offsetWidth}({dropdownListElement:this.#n1}):0}deselectAllItems(){this.#n1&&function(e){let{dropdownListElement:t}=e;t.querySelectorAll(`.${gt}`).forEach(e=>gn(e))}({dropdownListElement:this.#n1})}focusFirstItem(){this.#n4.entriesCount>0&&this.#or(0)}focusItem(e){this.#or(e)}focusPreviousItem(){if(this.#n1){if(0===this.#n4.currentlySelectedItemIndex)return void this.focusSearchInput();go({dropdownListElement:this.#n1,index:this.#n4.currentlySelectedItemIndex}),this.#or(this.#n4.currentlySelectedItemIndex-1)}}focusNextItem(){this.#n1&&this.#n4.currentlySelectedItemIndex!==this.#n4.entriesCount-1&&(go({dropdownListElement:this.#n1,index:this.#n4.currentlySelectedItemIndex}),this.#or(this.#n4.currentlySelectedItemIndex+1))}focusSearchInput(){this.#n2&&this.#n2.focus()}reset(){this.removeAllDropdownItems(),this.#on(),this.#n2&&(this.#n2.value=""),this.#n0&&(this.#n0.style.position="",this.#n0.style.top="",this.#n0.style.height="",this.#n0.scrollTop=0)}isFlippedVertically(){return this.#n4.flippedVertically}getHeight(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.#ni||!this.#n0)return 0;let r=this.#ni.defaultView.getComputedStyle(this.#n0);return this.#oo(e)+this.#oe()+(!0===t?2*parseInt(r.getPropertyValue("--ht-menu-vertical-padding"),10):0)}getInputController(){return this.#n5}removeAllDropdownItems(){this.#n1&&(Array.from(this.#n1.children).forEach(e=>this.#oi(e)),this.#n4.checkboxChangeListeners.clear(),this.#n1.innerHTML="")}disableCheckboxes(){this.#n4.areCheckboxesDisabled=!0,this.#n1&&function(e){let{dropdownListElement:t}=e;t.querySelectorAll('input[type="checkbox"]:not(:checked)').forEach(e=>{e.dataset.disabled="true"})}({dropdownListElement:this.#n1})}enableCheckboxes(){this.#n4.areCheckboxesDisabled=!1,this.#n1&&function(e){let{dropdownListElement:t}=e;t.querySelectorAll('input[type="checkbox"]').forEach(e=>{e.dataset.disabled="false"})}({dropdownListElement:this.#n1})}#or(e){this.#n4.currentlySelectedItemIndex=e,this.#n1&&function(e){let{dropdownListElement:t,index:r}=e,n=t.children[r];if(n){let e=c2(n);e&&e.focus()}}({dropdownListElement:this.#n1,index:e})}#n8(e){let{spaceAbove:t,spaceBelow:r,cellHeight:n}=e;return this.getHeight(!0)>r&&t>r+n}#ot(e){if(!this.#n0)return;let{cellHeight:t}=e;this.#n4.flippedVertically?(this.#n0.style.position="absolute",this.#n0.style.top=`${-this.getHeight(!1,!0)-t-2}px`):(this.#n0.style.position="",this.#n0.style.top="")}#n7(){if(!this.#ni||!this.#n0)return 0;let e=this.#ni.defaultView.getComputedStyle(this.#n0);return 2*parseInt(e.getPropertyValue("--ht-menu-item-vertical-padding"),10)+parseInt(e.getPropertyValue("--ht-line-height"),10)}#oo(e){let t=this.#n4.entriesCount;return(e?t:this.#n4.actualRenderedItemsCount??t)*this.#n7()}#oe(){if(!this.#n5?.enabled||!this.#n6||!this.#n3||!this.#ni||!this.#n0)return 0;let e=this.#ni.defaultView.getComputedStyle(this.#n0);return this.#n6.offsetHeight+(this.#n3.offsetHeight+2*parseInt(e.getPropertyValue("--ht-menu-vertical-padding"),10))}#n9(e){let{rootDocument:t,itemKey:r,itemValue:n,indexWithinList:o,checked:i=!1,disabled:s=!1}=e;if(!this.#n1||null===this.#nJ)return;let 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}-${ge}${i}`,d.type="checkbox",d.dataset.value=o,d.dataset.index=String(i),d.dataset.disabled=a&&!s?"true":"false",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.#nJ,itemKey:r,itemValue:n,indexWithinList:o,checked:i,disabled:s});i&&gr(a),this.#os(a),this.#n1.appendChild(a)}#os(e){let t=c2(e);if(!t||!this.#n1)return;let r=()=>{if("true"===t.dataset.disabled&&t.checked){t.checked=!1;return}t.checked?(gr(e),this.runLocalHooks("afterDropdownItemChecked",t.dataset.key,t.dataset.value)):(gn(e),this.runLocalHooks("afterDropdownItemUnchecked",t.dataset.key,t.dataset.value))},n=e=>{let r=rn(e);r!==t&&"true"!==t.dataset.disabled&&"LABEL"!==r.tagName&&(t.checked=!t.checked,t.dispatchEvent(new Event("change")))};this.#n4.checkboxChangeListeners.set(t,{change:r,click:n}),this.#rQ.addEventListener(t,"change",r),this.#rQ.addEventListener(e,"click",n)}#oi(e){let t=c2(e);if(!t)return;let r=this.#n4.checkboxChangeListeners.get(t);r&&(this.#rQ.removeEventListener(t,"change",r.change),this.#rQ.removeEventListener(e,"click",r.click),this.#n4.checkboxChangeListeners.delete(t))}#on(){this.#n4.visibleRowsNumberSetting=null,this.#n4.entriesCount=0,this.#n4.flippedVertically=!1,this.#n4.currentlySelectedItemIndex=0,this.#n4.checkboxChangeListeners.clear(),this.#n4.areCheckboxesDisabled=!1,this.#n4.sourceSortFunction=null}}tf(gi,aE);class gs{selectedItems;maxSelectionsCount;constructor(e){Array.isArray(e)?this.selectedItems=new Set(e):this.selectedItems=new Set,this.maxSelectionsCount=1/0}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(!tx(e))return this.selectedItems.delete(e);{let t=Array.from(this.selectedItems).find(t=>tb(t,e));if(void 0!==t)return this.selectedItems.delete(t),!0}return!1}has(e){return c3(this.getItemsArray(),e)}clear(){this.selectedItems.clear()}getSize(){return this.selectedItems.size}getItemsArray(){return Array.from(this.selectedItems)}}let ga="multiselect",gl="multiselectEditor";class gh extends oe{_closeAfterDataChange=!1;#oa=new gs;#ol=null;dropdownContainerElement=null;dropdownController=null;static get EDITOR_TYPE(){return ga}constructor(e){super(e),this.eventManager=new or(this),this.createElements(),this.bindEvents()}createElements(){let{rootDocument:e}=this.hot;this.#ol=e.createElement("div"),this.#ol.style.display="none",rb(this.#ol,"handsontableEditor"),this.dropdownContainerElement=this.hot.rootDocument.createElement("div"),rb(this.dropdownContainerElement,"ht-multi-select-editor handsontableEditor"),ry(this.dropdownContainerElement,[H("Select options"),["role","group"]]),this.#ol.appendChild(this.dropdownContainerElement),this.hot.rootElement.appendChild(this.#ol),this.dropdownController=new gi(this.dropdownContainerElement,this.hot.guid)}prepare(e,t,r,n,o,i){super.prepare(e,t,r,n,o,i);let s="string"==typeof o&&ob(o)?JSON.parse(o):o,a=el(Array.isArray(s)?s:[s],this.#oh(),(e,t)=>JSON.stringify(e)===JSON.stringify(t));this.dropdownController.reset(),a.length>=this.#od("maxSelections")&&this.#ou(),this.#oc(a),this.dropdownController.setSourceSortFunction(this.#od("sourceSortFunction")??null),this.dropdownController.fillDropdown(this.#oh(),a),this.dropdownController.setVisibleRowsNumberSetting(this.#od("visibleRows")),this.dropdownController.setSearchInputVisibility(this.#od("searchInput")),void 0!==i.maxSelections&&this.#oa.setMaxSelectionCount(this.#od("maxSelections"))}finishEditing(e,t,r){super.finishEditing(e,t,r)}bindEvents(){this.dropdownController.addLocalHook("afterDropdownItemChecked",(e,t)=>{this.#og(e,t),this.#oa.getSize()>=this.#od("maxSelections")&&this.#ou()}),this.dropdownController.addLocalHook("afterDropdownItemUnchecked",(e,t)=>{this.#op(e,t),this.#oa.getSize()<this.#od("maxSelections")&&this.#om()}),this.addHook("afterDestroy",()=>this.destroy()),this.addHook("afterChange",(e,t)=>this.#of(e,t)),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.dropdownController.getInputController().addLocalHook("triggerFilter",e=>this.#ob(e))}open(e){let t=e&&"keyCode"in e?e.keyCode:0,r=e&&"key"in e?e.key:"";if(t&&nT(t)){let n=1===r.length?r:String.fromCharCode(t);this.dropdownController.getInputController().enabled&&(this.dropdownController.getInputController().setValue(n),this.#ob(n)),e?.preventDefault(),this.enableFullEditMode()}this.#oC(),this.refreshDimensions(),this.hot.getShortcutManager().setActiveContextName("editor"),this.#oy(),this.dropdownController.getInputController().listen(),this.dropdownController.updateDimensions(this.#ow())}close(){this.#oS(),this.#ov(),this.dropdownController.getInputController().unlisten()}getValue(){return this.#oa.getItemsArray()}setValue(){}refreshDimensions(){if(!this.getEditedCell())return void this.close();let{top:e,start:t,height:r}=this.getEditedCellRect(),n=this.#ol.style;n.top=`${e+r}px`,n[this.hot.isRtl()?"right":"left"]=`${t}px`,rb(this.#ol,"ht_editor_visible")}focus(){!1===this.#od("searchInput")?this.dropdownController.focusFirstItem():this.dropdownController.focusSearchInput()}getInputElement(){return this.dropdownController.getInputController().getInputElement()}destroy(){this.close(),this.dropdownController.reset()}#oh(){return this.cellProperties.source??[]}#oy(){let e=this.hot.getShortcutManager().getContext("editor");e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.dropdownController.focusPreviousItem()}},{keys:[["ArrowDown"]],callback:()=>{nc(this.hot.rootDocument)===this.getInputElement()?this.dropdownController.focusFirstItem():this.dropdownController.focusNextItem()}}],{group:gl}),e.addShortcuts([{keys:[["enter"],["shift","enter"],["control/meta","enter"],["control/meta","shift","enter"]],runOnlyIf:()=>!this.#od("enterCommits"),callback:e=>{let t=nc(this.hot.rootDocument);return t instanceof HTMLInputElement&&"checkbox"===t.type&&(t.checked=!t.checked,t.dispatchEvent(new Event("change"))),e.preventDefault(),!1}},{keys:[["space"]],runOnlyIf:()=>!this.#od("enterCommits"),callback:e=>{e.preventDefault()}}],{group:gl,relativeToGroup:dJ,position:"before"})}#ov(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(gl)}#oC(){this.#ol.style.display=""}#oS(){this.#ol.style.display="none"}#ou(){this.dropdownController.disableCheckboxes()}#om(){this.dropdownController.enableCheckboxes()}#ob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.#od("filterSelectedItems")??!0,r=this.cellProperties.locale,n=this.#oh().filter(n=>{let o="object"==typeof n&&null!==n&&"value"in n?n.value:n;return!!(!t&&this.#oa.has(n))||(this.cellProperties.filteringCaseSensitive?String(o).includes(e):oM(String(o),r).includes(oM(e,r)))});this.dropdownController.fillDropdown(n,this.#oa.getItemsArray()),this.dropdownController.updateDimensions(this.#ow(),!0)}#ow(){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}}#oR(){let e=this.#oa.getItemsArray();this.saveValue([[e]])}#og(e,t){e?this.#oa.add({key:e,value:t}):this.#oa.add(t),this.#oR(),this.refreshDimensions()}#op(e,t){e?this.#oa.remove({key:e,value:t}):this.#oa.remove(t),this.#oR(),this.refreshDimensions()}#oc(e){e.length>0?this.#oa=new gs(e):this.#oa=new gs}#od(e){return this.cellProperties[e]}#of(e,t){this.isOpened()&&t===`${ga}-renderer`&&Array.isArray(e)&&e.length>0&&e[0][0]===this.cellProperties.visualRow&&this.hot.propToCol(e[0][1])===this.cellProperties.visualCol&&(this.#oc(e[0][3]),this.dropdownController.fillDropdown(this.#oh(),this.#oa.getItemsArray()),this.dropdownController.focusItem(0),this.#oa.getSize()>=this.#od("maxSelections")?this.#ou():this.#om())}}function gd(e,t,r,n,o,i,s){rM(t,null==i?"":i,!1)}function gu(e,t,r,n,o,i,s){let{rootDocument:a}=e,l=s.allowHtml?gd:cw,h=a.createElement("DIV"),d=e.getSettings().ariaTags;if(h.className="htAutocompleteArrow",d&&h.setAttribute(..._()),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),rb(t,"htAutocomplete"),!e.acArrowListener){let o=new or(e);e.acArrowListener=function(o){rf(rn(o),"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 gc(e,t,r,n,o,i,s){gu.apply(this,[e,t,r,n,o,i,s])}gd.RENDERER_TYPE="html",gu.RENDERER_TYPE="autocomplete",gc.RENDERER_TYPE="dropdown";let gg="#bad-value#",gp="ht-loading",gm=new WeakMap,gf=new WeakMap,gb="data-row",gC="data-col",gy="checkbox";function gw(e,t,r,n,o,i,s){let a,l,{rootDocument:h}=e,d=e.getSettings().ariaTags;!function(e){let t=gf.get(e);if(!t){let{rootElement:r}=e;(t=new or(e)).addEventListener(r,"click",t=>(function(e,t){let r=rn(e);if(!gS(r)||!r.hasAttribute(gb)||!r.hasAttribute(gC))return;let n=Number.parseInt(r.getAttribute(gb),10),o=Number.parseInt(r.getAttribute(gC),10);t.getCellMetaTransient(n,o).readOnly&&e.preventDefault()})(t,e)),t.addEventListener(r,"mouseup",t=>{var r,n;let o;return r=t,n=e,void(!gS(o=rn(r))||o.hasAttribute(gb)&&o.hasAttribute(gC)&&setTimeout(n.listen,10))}),t.addEventListener(r,"change",t=>(function(e,t){let r=rn(e);if(!gS(r)||!r.hasAttribute(gb)||!r.hasAttribute(gC))return;let n=Number.parseInt(r.getAttribute(gb),10),o=Number.parseInt(r.getAttribute(gC),10),i=t.getCellMetaTransient(n,o);if(!i.readOnly){let e=null;e=r.checked?void 0===i.uncheckedTemplate||i.checkedTemplate:void 0!==i.uncheckedTemplate&&i.uncheckedTemplate,t.setDataAtCell(n,o,e)}})(t,e)),gf.set(e,t)}}(e);let u=((a=h.createElement("input")).className="htCheckboxRendererInput",a.type="checkbox",a.setAttribute("tabindex","-1"),a.cloneNode(!1)),c=u,g=s.label,p=!1;void 0===s.checkedTemplate&&(s.checkedTemplate=!0),void 0===s.uncheckedTemplate&&(s.uncheckedTemplate=!1),rv(t);let m=s.locale;i===s.checkedTemplate||oM(eV(i),m)===oM(eV(s.checkedTemplate),m)?u.checked=!0:i===s.uncheckedTemplate||oM(eV(i),m)===oM(eV(s.uncheckedTemplate),m)?u.checked=!1:eW(i)?rb(u,"noValue"):(u.style.display="none",rb(u,"htBadValue"),p=!0),ry(u,[[gb,r],[gC,n]]),d&&ry(u,[H(u.checked?e.getTranslatedPhrase(hw):e.getTranslatedPhrase(hS)),G(u.checked),["role","checkbox"]]),function(){if(!p&&g){let s="";if(g.value){let e=g.value;s="function"==typeof g.value?String(e(r,n,o,i)):String(g.value)}else if(g.property){let t=e.getDataAtRowProp(r,String(g.property));s=null!==t?String(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)}(h,s,!0!==g.separated);"before"===g.position?g.separated?(t.appendChild(a),t.appendChild(u)):(a.appendChild(u),c=a):g.position&&"after"!==g.position||(g.separated?(t.appendChild(u),t.appendChild(a)):(a.insertBefore(u,a.firstChild),c=a))}}();function f(){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();if(null!==l&&null!==h&&null!==d&&null!==u){for(let r=l;r<=d;r+=1)for(let a=h;a<=u;a+=1){let l=e.getCellMetaTransient(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,String(l.checkedTemplate)].includes(d)?i.push([r,a,l.uncheckedTemplate,h]):[l.uncheckedTemplate,String(l.uncheckedTemplate),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 b(){let t=e.getSelectedRange();if(t){for(let r=0;r<t.length;r++){let n=t[r].getTopStartCorner(),o=t[r].getBottomEndCorner();if(null!==n.row&&null!==n.col&&null!==o.row&&null!==o.col)for(let t=n.row;t<=o.row;t++)for(let r=n.col;r<=o.col;r++){if(e.getCellMetaTransient(t,r).readOnly)continue;let n=e.getCell(t,r);if(na(n)&&n.querySelectorAll("input[type=checkbox]").length>0)return!0}}return!1}}g&&(!g||g.separated)||t.appendChild(c),p&&t.appendChild(h.createTextNode(gg)),gm.has(e)||(gm.set(e,!0),l=e.getShortcutManager().getContext("grid"),l?.addShortcuts([{keys:[["space"]],callback:()=>(f(),!b()),runOnlyIf:()=>!!e.getSelectedRangeActive()?.highlight.isCell()},{keys:[["enter"]],callback:()=>(f(),!b()),runOnlyIf:()=>{let t=e.getSelectedRangeActive();return!!(e.getSettings().enterBeginsEditing&&t?.highlight.isCell()&&!e.selection.isMultiple())}},{keys:[["delete"],["backspace"]],callback:()=>(f(!0),!b()),runOnlyIf:()=>!!e.getSelectedRangeActive()?.highlight.isCell()}],{group:"checkboxRenderer",relativeToGroup:dJ,position:"before"}))}function gS(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}function gv(e,t,r,n,o,i,s){gu.apply(this,[e,t,r,n,o,i,s])}n$.getSingleton().add("modifyAutoColumnSizeSeed",function(e,t,r){let{label:n,type:o,row:i,column:s,prop:a}=t;if(o!==gy||!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,String(h));d=null!==e?e:r}return`${eV(d).length}`}),gw.RENDERER_TYPE=gy,gv.RENDERER_TYPE="handsontable";let gR={year:"numeric",month:"2-digit",day:"2-digit"},gE=new WeakSet;function gT(e,t){let{dateFormat:r,locale:n,allowEmpty:o,instance:i}=t;if(eW(e))return o?e:gg;if("string"==typeof r)return i&&!gE.has(i)&&(gE.add(i),t6("The dateFormat option as a string is not supported. Use an Intl.DateTimeFormatOptions object instead.")),e;let s=cN(e);if(null===s)return gg;let a=ty(r)?r:gR;return new Intl.DateTimeFormat(n,a).format(s)}function gA(e,t,r,n,o,i,s){cw.apply(this,[e,t,r,n,o,i,s])}function gM(e,t,r,n,o,i,s){gA.apply(this,[e,t,r,n,o,i,s])}gA.valueFormatter=gT,gA.RENDERER_TYPE="date",gM.valueFormatter=gT,gM.RENDERER_TYPE="intl-date";let gI={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1},gx=new WeakSet;function gN(e,t){let{dateTimeFormat:r,locale:n,allowEmpty:o,instance:i}=t;if(eW(e))return o?e:gg;if("string"==typeof r)return i&&!gx.has(i)&&(gx.add(i),t6("The dateTimeFormat option as a string is not supported. Use an Intl.DateTimeFormatOptions object instead.")),e;let s=cF(e);if(null===s)return gg;let a=ty(r)?r:gI;return new Intl.DateTimeFormat(n,a).format(s)}function gO(e,t,r,n,o,i,s){cw.apply(this,[e,t,r,n,o,i,s])}gO.valueFormatter=gN,gO.RENDERER_TYPE="intl-datetime";let gk={hour:"numeric",minute:"2-digit"},gH=new WeakSet;function g_(e,t){let{timeFormat:r,locale:n,allowEmpty:o,instance:i}=t;if(eW(e))return o?e:gg;let s=cL(e);if(null===s)return gg;"string"==typeof r&&i&&!gH.has(i)&&(gH.add(i),t6("The timeFormat option as a string is not supported. Use an Intl.DateTimeFormatOptions object instead."));let a=ty(r)?r:gk;return new Intl.DateTimeFormat(n,a).format(s)}function gL(e,t,r,n,o,i,s){cw.apply(this,[e,t,r,n,o,i,s]),t.dir="ltr"}function gP(e,t,r,n,o,i,s){gL.apply(this,[e,t,r,n,o,i,s])}gL.valueFormatter=g_,gL.RENDERER_TYPE="time",gP.RENDERER_TYPE="intl-time";let gD={useGrouping:!1,maximumFractionDigits:20},gF=new Map,gB=new WeakSet;function gV(e,t){return oI(e)&&(e=function(e,t){let{numericFormat:r,locale:n}=t,o=r??gD,i=`${n??""}:${JSON.stringify(o)}`,s=gF.get(i);return void 0===s&&(s=new Intl.NumberFormat(n,o),gF.set(i,s)),s.format(e)}(e,t)),e}function gU(e,t,r,n,o,i,s){let a=s.numericFormat;if(a?.pattern!==void 0||a?.culture!==void 0){let e=s.instance;gB.has(e)||(gB.add(e),t6("The numericFormat.pattern and numericFormat.culture options are not supported. Use Intl.NumberFormat options instead (numericFormat: { style, currency, ... })."))}if(oI(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"}cw.apply(this,[e,t,r,n,o,i,s])}function gz(e,t,r,n,o,i){rM(t,i,aa(e),"password",e.rootElement)}function gW(e,t,r,n,o,i,s){cw.apply(this,[e,t,r,n,o,i,s])}function gG(e,t){let r=e=>{let t;return ty(t=e)&&eU(t.key)&&eU(t.value)?r(e.key)&&r(e.value):null==e},n=e;(r(n)&&(n=""),""===n)?t(!!this.allowEmpty):this.strict&&this.source?"function"==typeof this.source?this.source(n,g$(n,t)):g$(n,t)(this.source):t(!0)}function g$(e,t){return function(r){let n=!1;for(let t=0,o=r.length;t<o;t++)if(tb(e,r[t])){n=!0;break}t(n)}}function gY(e,t){return!!(t.allowEmpty&&eW(e)||"string"==typeof e&&e.startsWith("="))||cH(e)}function gj(e,t){t(!!(this.allowEmpty&&eW(e))||cH(e))}function gq(e,t){gG.apply(this,[e,t])}function gK(e,t){gj.call(this,e,t)}function gX(e,t){return!!(t.allowEmpty&&eW(e)||"string"==typeof e&&e.startsWith("="))||cB(e)}function gQ(e,t){t(!!(this.allowEmpty&&eW(e))||cB(e))}function gZ(e,t){return!!(t.allowEmpty&&eW(e)||"string"==typeof e&&e.startsWith("="))||cP(e)}function gJ(e,t){t(!!(this.allowEmpty&&eW(e))||cP(e))}function g0(e,t){gJ.call(this,e,t)}function g1(e,t){let r=e;(null==r&&(r=""),this.allowEmpty&&""===r)?t(!0):(this.allowEmpty||""!==r)&&Array.isArray(r)?0===r.length?t(!0):this.source?"function"==typeof this.source?this.source(r,g2(r,t)):g2(r,t)(this.source):t(!0):t(!1)}function g2(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(tx(e[t])&&!tx(r[n])||!tx(e[t])&&tx(r[n])){o=!1;break}else tx(e[t])&&tx(r[n])&&tb(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 g3(e,t){let r=e;null==r&&(r=""),t(!!this.allowEmpty&&""===r||""!==r&&oI(e))}function g6(e){return ty(e)&&void 0!==e.value?e.value:e}function g5(e,t,r){return tx(this.getSourceDataAtCell(this.toPhysicalRow(t),this.toPhysicalColumn(r)))?tx(e)?e:{key:e,value:e}:e}gU.valueFormatter=gV,gU.RENDERER_TYPE="numeric",gz.valueFormatter=function(e,t){let r=t.hashLength||eV(e).length,n=String(t.hashSymbol??"*"),o="";for(let e=0;e<r;e++)o+=n;return o},gz.RENDERER_TYPE="password",gW.RENDERER_TYPE="select",gG.VALIDATOR_TYPE="autocomplete",gY.rowIndependent=!0,gj.VALIDATOR_TYPE="date",gq.VALIDATOR_TYPE="dropdown",gK.VALIDATOR_TYPE="intl-date",gX.rowIndependent=!0,gQ.VALIDATOR_TYPE="intl-datetime",gZ.rowIndependent=!0,gJ.VALIDATOR_TYPE="time",g0.VALIDATOR_TYPE="intl-time",g1.VALIDATOR_TYPE="multiselect",g3.VALIDATOR_TYPE="numeric";let g4="ht-multi-select",g9=`${g4}-chip`,g7=`${g4}-chip-remove`,g8=`${g4}-chip-label`,pe=`${g4}-overflow`,pt=new WeakSet,pr=new WeakMap,pn=new WeakMap;function po(e,t){return tx(e)?e[t]:e}function pi(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]}function ps(e){return Array.isArray(e)?eu(e.map(e=>tx(e)?e.value:e),", "):e}let pa={CELL_TYPE:"multiselect",_complexDataFormat:!0,editor:gh,renderer:function(e,t,r,n,o,i,s){cu(e,t,r,n,o,i,s);let a=i;if(eW(a)&&s.placeholder)return void rI(t,a=eV(a=s.placeholder));let{rootDocument:l}=e,h=e.getSettings().ariaTags,d=e.toPhysicalRow(r),u=pi(e.getSourceDataAtCell(d,n));if(rv(t),rb(t,"ht-multi-select-renderer"),0===u.length)return void t.appendChild(l.createTextNode(""));let c=l.createElement("div");c.className="ht-multi-select-chips-container",u.forEach(e=>{var t;let i,s,a,d,u=(t=h??!1,i=l.createElement("span"),s=po(e,"value"),rb(i,g9),i.dataset.row=String(r),i.dataset.col=String(n),i.dataset.prop=String(o),i.title=s,rb(a=l.createElement("span"),g8),a.textContent=s,i.appendChild(a),rb(d=l.createElement("span"),g7),t&&d.setAttribute(..._()),i.dataset.key=po(e,"key"),i.appendChild(d),i);c.appendChild(u)}),t.appendChild(c),pn.has(e)||(pn.set(e,new or(e)),pn.get(e).addEventListener(e.rootElement,"click",t=>{var r,n;if(!rf(rn(t),g7))return;t.preventDefault(),t.stopPropagation();let o=rn(t).closest(`.${g9}`);if(!o)return;let i=Number(o.dataset.row??0),s=Number(o.dataset.col??0),a=e.toPhysicalRow(i),l=e.getSourceDataAtCell(a,s),h=o.dataset.key,d=(r=pi(l),n=h,r.filter(e=>po(e,"key")!==n));e.setDataAtCell(i,s,d,"multiselect-renderer")}),e.addHook("beforeOnCellMouseDown",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let n=t[0];rf(rn(n),g7)&&nN(n)})),function(e,t,r){let n=t.querySelectorAll(`.${g9}`);for(let e=0;e<n.length;e++)n[e].style.display="";if(null===e||0===n.length)return;let o=t.querySelector(`.${pe}`);if(o)o.style.display="",o.style.visibility="hidden";else{var i;let e;i=n.length,rb(e=r.createElement("span"),pe),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"}(function(e,t){let r=e.getColWidth(t);if(pr.has(e)){let n=pr.get(e);n[t]?.width!==r&&pr.set(e,{...n,[t]:{width:r}})}else pr.set(e,{[t]:{width:r}});return pt.has(e)||(e.addHook("beforeColumnResize",function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];let o=r[0],i=r[1],s=pr.get(e);s?.[i]?.width!==o&&pr.set(e,{...s,[i]:{width:o}})}),pt.add(e)),pr.get(e)?.[t]?.width??r}(e,n),c,l)},validator:g1,valueGetter:ps,valueSetter:function(e,t,r){if(Array.isArray(e)){let n=this.getSourceDataAtCell(this.toPhysicalRow(t),r);if(Array.isArray(n)&&n.length>0&&tx(n[0]))return e.map(e=>tx(e)?e:{key:e,value:e})}return e},parsePastedValue:!0},pl=[];function ph(e,t){if(Array.isArray(e)){"string"!=typeof t&&th("registerConflict(blockedTargetKeys[], incompatibleSettingKeys) expects incompatibleSettingKeys to be a string.");for(let r=0;r<e.length;r+=1)pl.push({blockedKey:e[r],incompatibleSettingKey:t});return}if("string"!=typeof e&&th("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&&th("registerConflict(blockedTargetKey, incompatibleSettingKeys) expects incompatibleSettingKeys to be a string array."),pl.push({blockedKey:e,incompatibleSettingKey:n})}return}"string"==typeof t?pl.push({blockedKey:e,incompatibleSettingKey:t}):th("Invalid registerConflict arguments.")}let pd=new Map([["plugin",function(e){return!!oZ(e)}],["cell-type",dp],["editor",nQ],["renderer",o2],["validator",o8]]),pu=Symbol("mainSetting"),pc=[],pg=null;class pp{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}static PLUGIN_DEPS;#oE=null;eventManager=new or(this);pluginName=null;pluginsInitializedCallbacks=[];isPluginsReady=!1;enabled=!1;initialized=!1;#e={};constructor(e){tw(this,"hot",e,{writable:!1}),pg=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(":");pd.has(r)||th(`Unknown plugin dependency type "${r}" was found.`),pd.get(r)(n)||e.push(` - ${n} (${r})`)}),e.length>0){let t=`The ${this.pluginName} plugin requires the following modules: