handsontable 0.0.0-next-7b93b7d-20231107 → 0.0.0-next-5f253b5-20231108

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

Files changed (42) hide show
  1. package/3rdparty/walkontable/src/cell/coords.js +7 -5
  2. package/3rdparty/walkontable/src/cell/coords.mjs +7 -5
  3. package/base.js +2 -2
  4. package/base.mjs +2 -2
  5. package/dist/handsontable.css +2 -2
  6. package/dist/handsontable.full.css +2 -2
  7. package/dist/handsontable.full.js +102 -51
  8. package/dist/handsontable.full.min.css +2 -2
  9. package/dist/handsontable.full.min.js +10 -10
  10. package/dist/handsontable.js +102 -51
  11. package/dist/handsontable.min.css +2 -2
  12. package/dist/handsontable.min.js +10 -10
  13. package/helpers/mixed.js +1 -1
  14. package/helpers/mixed.mjs +1 -1
  15. package/package.json +1 -1
  16. package/plugins/autofill/autofill.d.ts +0 -1
  17. package/plugins/autofill/autofill.js +1 -0
  18. package/plugins/autofill/autofill.mjs +1 -0
  19. package/plugins/base/base.js +4 -6
  20. package/plugins/base/base.mjs +4 -6
  21. package/plugins/columnSorting/columnSorting.js +2 -1
  22. package/plugins/columnSorting/columnSorting.mjs +2 -1
  23. package/plugins/contextMenu/contextMenu.js +5 -1
  24. package/plugins/contextMenu/contextMenu.mjs +5 -1
  25. package/plugins/contextMenu/predefinedItems/removeColumn.js +1 -1
  26. package/plugins/contextMenu/predefinedItems/removeColumn.mjs +1 -1
  27. package/plugins/contextMenu/predefinedItems/removeRow.js +1 -1
  28. package/plugins/contextMenu/predefinedItems/removeRow.mjs +1 -1
  29. package/plugins/customBorders/customBorders.js +8 -2
  30. package/plugins/customBorders/customBorders.mjs +8 -2
  31. package/plugins/dropdownMenu/dropdownMenu.js +4 -2
  32. package/plugins/dropdownMenu/dropdownMenu.mjs +4 -2
  33. package/plugins/multiColumnSorting/multiColumnSorting.js +2 -1
  34. package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -1
  35. package/plugins/nestedRows/nestedRows.js +12 -4
  36. package/plugins/nestedRows/nestedRows.mjs +12 -4
  37. package/selection/selection.js +25 -7
  38. package/selection/selection.mjs +25 -7
  39. package/selection/utils.js +24 -14
  40. package/selection/utils.mjs +25 -15
  41. package/shortcuts/manager.js +1 -1
  42. package/shortcuts/manager.mjs +1 -1
@@ -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: 0.0.0-next-7b93b7d-20231107
29
- * Release date: 31/08/2023 (built at 07/11/2023 14:25:18)
28
+ * Version: 0.0.0-next-5f253b5-20231108
29
+ * Release date: 31/08/2023 (built at 08/11/2023 12:10:54)
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()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={40436:(e,t,r)=>{"use strict";r.d(t,{uJ:()=>lt,ZP:()=>iu});var n,s,o={};r.r(o),r.d(o,{AbsPlugin:()=>Ko,AddressPlugin:()=>zo,ArrayPlugin:()=>$o,BitShiftPlugin:()=>qo,BitwiseLogicOperationsPlugin:()=>ei,BooleanPlugin:()=>ti,CharPlugin:()=>ri,CodePlugin:()=>ni,ComplexPlugin:()=>Gl,ConditionalAggregationPlugin:()=>ua,CountBlankPlugin:()=>si,CountUniquePlugin:()=>oi,DateTimePlugin:()=>ii,DegreesPlugin:()=>ci,DeltaPlugin:()=>di,ExpPlugin:()=>fi,FinancialPlugin:()=>pi,FormulaTextPlugin:()=>Ci,HyperlinkPlugin:()=>vi,InformationPlugin:()=>Ri,IsEvenPlugin:()=>Si,IsOddPlugin:()=>Ti,LogarithmPlugin:()=>Ni,LookupPlugin:()=>pa,MathConstantsPlugin:()=>Mi,MathPlugin:()=>Vl,MatrixPlugin:()=>bi,MedianPlugin:()=>Ii,ModuloPlugin:()=>xi,NumericAggregationPlugin:()=>Di,PowerPlugin:()=>Fi,RadiansPlugin:()=>Ui,RadixConversionPlugin:()=>Bi,RandomPlugin:()=>Ki,RomanPlugin:()=>ga,RoundingPlugin:()=>Qi,SimpleArithmerticPlugin:()=>ya,SqrtPlugin:()=>Zi,StatisticalAggregationPlugin:()=>ru,StatisticalPlugin:()=>Ul,SumprodPlugin:()=>ha,TextPlugin:()=>ca,TrigonometryPlugin:()=>da}),function(e){e.RELATIVE="RELATIVE",e.ABSOLUTE="ABSOLUTE"}(n||(n={}));class i{constructor(e,t,r){this.type=e,this.col=t,this.sheet=r}static absolute(e,t){return new i(n.ABSOLUTE,e,t)}static relative(e,t){return new i(n.RELATIVE,e,t)}static compareByAbsoluteAddress(e){return(t,r)=>t.toSimpleColumnAddress(e).col-r.toSimpleColumnAddress(e).col}isColumnAbsolute(){return this.type===n.ABSOLUTE}isColumnRelative(){return this.type===n.RELATIVE}isAbsolute(){return this.type===n.ABSOLUTE&&void 0!==this.sheet}moved(e,t,r){const n=void 0===this.sheet?void 0:e;return new i(this.type,this.col+t,n)}shiftedByColumns(e){return new i(this.type,this.col+e,this.sheet)}toSimpleColumnAddress(e){const t=xr(this,e);let r=this.col;return this.isColumnRelative()&&(r=e.col+this.col),Nr(t,r)}shiftRelativeDimensions(e,t){const r=this.isColumnRelative()?this.col+e:this.col;return new i(this.type,r,this.sheet)}shiftAbsoluteDimensions(e,t){const r=this.isColumnAbsolute()?this.col+e:this.col;return new i(this.type,r,this.sheet)}withSheet(e){return new i(this.type,this.col,e)}isInvalid(e){return this.toSimpleColumnAddress(e).col<0}hash(e){const t=e&&void 0!==this.sheet?`#${this.sheet}`:"";switch(this.type){case n.RELATIVE:return`${t}#COLR${this.col}`;case n.ABSOLUTE:return`${t}#COLA${this.col}`}}unparse(e){const t=this.toSimpleColumnAddress(e);if(Or(t))return;const r=L(t.col);return`${this.type===n.ABSOLUTE?"$":""}${r}`}exceedsSheetSizeLimits(e){return this.col>=e}}
32
32
  /**
@@ -917,7 +917,7 @@ class ru extends hn{avedev(e,t){return this.runFunction(e.args,t,this.metadata("
917
917
  class su extends Vo{}su.HyperFormula=Vo,su.ErrorType=nr,su.CellError=Rr,su.CellType=sr,su.CellValueType=mr,su.CellValueDetailedType=Er,su.DetailedCellError=fn,su.ExportedCellChange=io,su.ExportedNamedExpressionChange=ao,su.ConfigValueTooBigError=Mt,su.ConfigValueTooSmallError=Ot,su.EvaluationSuspendedError=At,su.ExpectedOneOfValuesError=_t,su.ExpectedValueOfTypeError=Tt,su.ArraySize=cn,su.SimpleRangeValue=rt,su.FunctionPlugin=hn,su.FunctionArgumentType=un,su.FunctionPluginValidationError=Pt,su.InvalidAddressError=ft,su.InvalidArgumentsError=pt,su.LanguageNotRegisteredError=xt,su.LanguageAlreadyRegisteredError=Lt,su.MissingTranslationError=bt,su.NamedExpressionDoesNotExistError=yt,su.NamedExpressionNameIsAlreadyTakenError=mt,su.NamedExpressionNameIsInvalidError=Et,su.NoOperationToRedoError=Ct,su.NoOperationToUndoError=wt,su.NoRelativeAddressesAllowedError=Ft,su.NoSheetWithIdError=lt,su.NoSheetWithNameError=ut,su.NotAFormulaError=dt,su.NothingToPasteError=vt,su.ProtectedFunctionTranslationError=It,su.SheetNameAlreadyTakenError=ht,su.SheetSizeLimitExceededError=ct,su.SourceLocationHasArrayError=kt,su.TargetLocationHasArrayError=Ht,su.UnableToParseError=St;const ou=Wo.defaultConfig.language;Vo.registerLanguage(ou,Go),Vo.languages[Go.langCode]=Go;for(const e of Object.getOwnPropertyNames(o))e.startsWith("_")||Vo.registerFunctionPlugin(o[e]);const iu=su;window.HyperFormula=r(40436).ZP},50453:function(e,t,r){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,r){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,r)}function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function n(e,s,o){return n=r()?Reflect.construct:function(e,r,n){var s=[null];s.push.apply(s,r);var o=new(Function.bind.apply(e,s));return n&&t(o,n.prototype),o},n.apply(null,arguments)}function s(e){return o(e)||i(e)||a(e)||u()}function o(e){if(Array.isArray(e))return l(e)}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function a(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var h=Object.hasOwnProperty,c=Object.setPrototypeOf,d=Object.isFrozen,f=Object.getPrototypeOf,p=Object.getOwnPropertyDescriptor,g=Object.freeze,m=Object.seal,E=Object.create,y="undefined"!=typeof Reflect&&Reflect,w=y.apply,C=y.construct;w||(w=function(e,t,r){return e.apply(t,r)}),g||(g=function(e){return e}),m||(m=function(e){return e}),C||(C=function(e,t){return n(e,s(t))});var v=x(Array.prototype.forEach),R=x(Array.prototype.pop),S=x(Array.prototype.push),T=x(String.prototype.toLowerCase),N=x(String.prototype.toString),O=x(String.prototype.match),M=x(String.prototype.replace),_=x(String.prototype.indexOf),A=x(String.prototype.trim),b=x(RegExp.prototype.test),I=L(TypeError);function x(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];return w(e,t,n)}}function L(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(e,r)}}function P(e,t,r){var n;r=null!==(n=r)&&void 0!==n?n:T,c&&c(e,null);for(var s=t.length;s--;){var o=t[s];if("string"==typeof o){var i=r(o);i!==o&&(d(t)||(t[s]=i),o=i)}e[o]=!0}return e}function D(e){var t,r=E(null);for(t in e)!0===w(h,e,[t])&&(r[t]=e[t]);return r}function k(e,t){for(;null!==e;){var r=p(e,t);if(r){if(r.get)return x(r.get);if("function"==typeof r.value)return x(r.value)}e=f(e)}function n(e){return console.warn("fallback value for",e),null}return n}var H=g(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),F=g(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),U=g(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),V=g(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),B=g(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),W=g(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Y=g(["#text"]),G=g(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),j=g(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=g(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),$=g(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),K=m(/\{\{[\w\W]*|[\w\W]*\}\}/gm),X=m(/<%[\w\W]*|[\w\W]*%>/gm),q=m(/\${[\w\W]*}/gm),Q=m(/^data-[\-\w.\u00B7-\uFFFF]/),Z=m(/^aria-[\-\w]+$/),J=m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ee=m(/^(?:\w+script|data):/i),te=m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),re=m(/^html$/i),ne=function(){return"undefined"==typeof window?null:window},se=function(t,r){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var n=null,s="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(s)&&(n=r.currentScript.getAttribute(s));var o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function oe(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ne(),r=function(e){return oe(e)};if(r.version="2.4.7",r.removed=[],!t||!t.document||9!==t.document.nodeType)return r.isSupported=!1,r;var n=t.document,o=t.document,i=t.DocumentFragment,a=t.HTMLTemplateElement,l=t.Node,u=t.Element,h=t.NodeFilter,c=t.NamedNodeMap,d=void 0===c?t.NamedNodeMap||t.MozNamedAttrMap:c,f=t.HTMLFormElement,p=t.DOMParser,m=t.trustedTypes,E=u.prototype,y=k(E,"cloneNode"),w=k(E,"nextSibling"),C=k(E,"childNodes"),x=k(E,"parentNode");if("function"==typeof a){var L=o.createElement("template");L.content&&L.content.ownerDocument&&(o=L.content.ownerDocument)}var ie=se(m,n),ae=ie?ie.createHTML(""):"",le=o,ue=le.implementation,he=le.createNodeIterator,ce=le.createDocumentFragment,de=le.getElementsByTagName,fe=n.importNode,pe={};try{pe=D(o).documentMode?o.documentMode:{}}catch(e){}var ge={};r.isSupported="function"==typeof x&&ue&&void 0!==ue.createHTMLDocument&&9!==pe;var me,Ee,ye=K,we=X,Ce=q,ve=Q,Re=Z,Se=ee,Te=te,Ne=J,Oe=null,Me=P({},[].concat(s(H),s(F),s(U),s(B),s(Y))),_e=null,Ae=P({},[].concat(s(G),s(j),s(z),s($))),be=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ie=null,xe=null,Le=!0,Pe=!0,De=!1,ke=!0,He=!1,Fe=!1,Ue=!1,Ve=!1,Be=!1,We=!1,Ye=!1,Ge=!0,je=!1,ze="user-content-",$e=!0,Ke=!1,Xe={},qe=null,Qe=P({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ze=null,Je=P({},["audio","video","img","source","image","track"]),et=null,tt=P({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),rt="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",st="http://www.w3.org/1999/xhtml",ot=st,it=!1,at=null,lt=P({},[rt,nt,st],N),ut=["application/xhtml+xml","text/html"],ht="text/html",ct=null,dt=o.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},pt=function(t){ct&&ct===t||(t&&"object"===e(t)||(t={}),t=D(t),me=me=-1===ut.indexOf(t.PARSER_MEDIA_TYPE)?ht:t.PARSER_MEDIA_TYPE,Ee="application/xhtml+xml"===me?N:T,Oe="ALLOWED_TAGS"in t?P({},t.ALLOWED_TAGS,Ee):Me,_e="ALLOWED_ATTR"in t?P({},t.ALLOWED_ATTR,Ee):Ae,at="ALLOWED_NAMESPACES"in t?P({},t.ALLOWED_NAMESPACES,N):lt,et="ADD_URI_SAFE_ATTR"in t?P(D(tt),t.ADD_URI_SAFE_ATTR,Ee):tt,Ze="ADD_DATA_URI_TAGS"in t?P(D(Je),t.ADD_DATA_URI_TAGS,Ee):Je,qe="FORBID_CONTENTS"in t?P({},t.FORBID_CONTENTS,Ee):Qe,Ie="FORBID_TAGS"in t?P({},t.FORBID_TAGS,Ee):{},xe="FORBID_ATTR"in t?P({},t.FORBID_ATTR,Ee):{},Xe="USE_PROFILES"in t&&t.USE_PROFILES,Le=!1!==t.ALLOW_ARIA_ATTR,Pe=!1!==t.ALLOW_DATA_ATTR,De=t.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,He=t.SAFE_FOR_TEMPLATES||!1,Fe=t.WHOLE_DOCUMENT||!1,Be=t.RETURN_DOM||!1,We=t.RETURN_DOM_FRAGMENT||!1,Ye=t.RETURN_TRUSTED_TYPE||!1,Ve=t.FORCE_BODY||!1,Ge=!1!==t.SANITIZE_DOM,je=t.SANITIZE_NAMED_PROPS||!1,$e=!1!==t.KEEP_CONTENT,Ke=t.IN_PLACE||!1,Ne=t.ALLOWED_URI_REGEXP||Ne,ot=t.NAMESPACE||st,be=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ft(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ft(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),He&&(Pe=!1),We&&(Be=!0),Xe&&(Oe=P({},s(Y)),_e=[],!0===Xe.html&&(P(Oe,H),P(_e,G)),!0===Xe.svg&&(P(Oe,F),P(_e,j),P(_e,$)),!0===Xe.svgFilters&&(P(Oe,U),P(_e,j),P(_e,$)),!0===Xe.mathMl&&(P(Oe,B),P(_e,z),P(_e,$))),t.ADD_TAGS&&(Oe===Me&&(Oe=D(Oe)),P(Oe,t.ADD_TAGS,Ee)),t.ADD_ATTR&&(_e===Ae&&(_e=D(_e)),P(_e,t.ADD_ATTR,Ee)),t.ADD_URI_SAFE_ATTR&&P(et,t.ADD_URI_SAFE_ATTR,Ee),t.FORBID_CONTENTS&&(qe===Qe&&(qe=D(qe)),P(qe,t.FORBID_CONTENTS,Ee)),$e&&(Oe["#text"]=!0),Fe&&P(Oe,["html","head","body"]),Oe.table&&(P(Oe,["tbody"]),delete Ie.tbody),g&&g(t),ct=t)},gt=P({},["mi","mo","mn","ms","mtext"]),mt=P({},["foreignobject","desc","title","annotation-xml"]),Et=P({},["title","style","font","a","script"]),yt=P({},F);P(yt,U),P(yt,V);var wt=P({},B);P(wt,W);var Ct=function(e){var t=x(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});var r=T(e.tagName),n=T(t.tagName);return!!at[e.namespaceURI]&&(e.namespaceURI===nt?t.namespaceURI===st?"svg"===r:t.namespaceURI===rt?"svg"===r&&("annotation-xml"===n||gt[n]):Boolean(yt[r]):e.namespaceURI===rt?t.namespaceURI===st?"math"===r:t.namespaceURI===nt?"math"===r&&mt[n]:Boolean(wt[r]):e.namespaceURI===st?!(t.namespaceURI===nt&&!mt[n])&&!(t.namespaceURI===rt&&!gt[n])&&!wt[r]&&(Et[r]||!yt[r]):!("application/xhtml+xml"!==me||!at[e.namespaceURI]))},vt=function(e){S(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ae}catch(t){e.remove()}}},Rt=function(e,t){try{S(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){S(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!_e[e])if(Be||We)try{vt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},St=function(e){var t,r;if(Ve)e="<remove></remove>"+e;else{var n=O(e,/^[\r\n\t ]+/);r=n&&n[0]}"application/xhtml+xml"===me&&ot===st&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var s=ie?ie.createHTML(e):e;if(ot===st)try{t=(new p).parseFromString(s,me)}catch(e){}if(!t||!t.documentElement){t=ue.createDocument(ot,"template",null);try{t.documentElement.innerHTML=it?ae:s}catch(e){}}var i=t.body||t.documentElement;return e&&r&&i.insertBefore(o.createTextNode(r),i.childNodes[0]||null),ot===st?de.call(t,Fe?"html":"body")[0]:Fe?t.documentElement:i},Tt=function(e){return he.call(e.ownerDocument||e,e,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT,null,!1)},Nt=function(e){return e instanceof f&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Ot=function(t){return"object"===e(l)?t instanceof l:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Mt=function(e,t,n){ge[e]&&v(ge[e],(function(e){e.call(r,t,n,ct)}))},_t=function(e){var t;if(Mt("beforeSanitizeElements",e,null),Nt(e))return vt(e),!0;if(b(/[\u0080-\uFFFF]/,e.nodeName))return vt(e),!0;var n=Ee(e.nodeName);if(Mt("uponSanitizeElement",e,{tagName:n,allowedTags:Oe}),e.hasChildNodes()&&!Ot(e.firstElementChild)&&(!Ot(e.content)||!Ot(e.content.firstElementChild))&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return vt(e),!0;if("select"===n&&b(/<template/i,e.innerHTML))return vt(e),!0;if(!Oe[n]||Ie[n]){if(!Ie[n]&&bt(n)){if(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,n))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(n))return!1}if($e&&!qe[n]){var s=x(e)||e.parentNode,o=C(e)||e.childNodes;if(o&&s)for(var i=o.length-1;i>=0;--i)s.insertBefore(y(o[i],!0),w(e))}return vt(e),!0}return e instanceof u&&!Ct(e)?(vt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(He&&3===e.nodeType&&(t=e.textContent,t=M(t,ye," "),t=M(t,we," "),t=M(t,Ce," "),e.textContent!==t&&(S(r.removed,{element:e.cloneNode()}),e.textContent=t)),Mt("afterSanitizeElements",e,null),!1):(vt(e),!0)},At=function(e,t,r){if(Ge&&("id"===t||"name"===t)&&(r in o||r in dt))return!1;if(Pe&&!xe[t]&&b(ve,t));else if(Le&&b(Re,t));else if(!_e[t]||xe[t]){if(!(bt(e)&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&b(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,r)||be.tagNameCheck instanceof Function&&be.tagNameCheck(r))))return!1}else if(et[t]);else if(b(Ne,M(r,Te,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==_(r,"data:")||!Ze[e])if(De&&!b(Se,M(r,Te,"")));else if(r)return!1;return!0},bt=function(e){return e.indexOf("-")>0},It=function(t){var n,s,o,i;Mt("beforeSanitizeAttributes",t,null);var a=t.attributes;if(a){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_e};for(i=a.length;i--;){var u=n=a[i],h=u.name,c=u.namespaceURI;if(s="value"===h?n.value:A(n.value),o=Ee(h),l.attrName=o,l.attrValue=s,l.keepAttr=!0,l.forceKeepAttr=void 0,Mt("uponSanitizeAttribute",t,l),s=l.attrValue,!l.forceKeepAttr&&(Rt(h,t),l.keepAttr))if(ke||!b(/\/>/i,s)){He&&(s=M(s,ye," "),s=M(s,we," "),s=M(s,Ce," "));var d=Ee(t.nodeName);if(At(d,o,s)){if(!je||"id"!==o&&"name"!==o||(Rt(h,t),s=ze+s),ie&&"object"===e(m)&&"function"==typeof m.getAttributeType)if(c);else switch(m.getAttributeType(d,o)){case"TrustedHTML":s=ie.createHTML(s);break;case"TrustedScriptURL":s=ie.createScriptURL(s)}try{c?t.setAttributeNS(c,h,s):t.setAttribute(h,s),R(r.removed)}catch(e){}}}else Rt(h,t)}Mt("afterSanitizeAttributes",t,null)}},xt=function e(t){var r,n=Tt(t);for(Mt("beforeSanitizeShadowDOM",t,null);r=n.nextNode();)Mt("uponSanitizeShadowNode",r,null),_t(r)||(r.content instanceof i&&e(r.content),It(r));Mt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(s){var o,a,u,h,c,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((it=!s)&&(s="\x3c!--\x3e"),"string"!=typeof s&&!Ot(s)){if("function"!=typeof s.toString)throw I("toString is not a function");if("string"!=typeof(s=s.toString()))throw I("dirty is not a string, aborting")}if(!r.isSupported){if("object"===e(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof s)return t.toStaticHTML(s);if(Ot(s))return t.toStaticHTML(s.outerHTML)}return s}if(Ue||pt(d),r.removed=[],"string"==typeof s&&(Ke=!1),Ke){if(s.nodeName){var f=Ee(s.nodeName);if(!Oe[f]||Ie[f])throw I("root node is forbidden and cannot be sanitized in-place")}}else if(s instanceof l)1===(a=(o=St("\x3c!----\x3e")).ownerDocument.importNode(s,!0)).nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?o=a:o.appendChild(a);else{if(!Be&&!He&&!Fe&&-1===s.indexOf("<"))return ie&&Ye?ie.createHTML(s):s;if(!(o=St(s)))return Be?null:Ye?ae:""}o&&Ve&&vt(o.firstChild);for(var p=Tt(Ke?s:o);u=p.nextNode();)3===u.nodeType&&u===h||_t(u)||(u.content instanceof i&&xt(u.content),It(u),h=u);if(h=null,Ke)return s;if(Be){if(We)for(c=ce.call(o.ownerDocument);o.firstChild;)c.appendChild(o.firstChild);else c=o;return(_e.shadowroot||_e.shadowrootmod)&&(c=fe.call(n,c,!0)),c}var g=Fe?o.outerHTML:o.innerHTML;return Fe&&Oe["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&b(re,o.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+g),He&&(g=M(g,ye," "),g=M(g,we," "),g=M(g,Ce," ")),ie&&Ye?ie.createHTML(g):g},r.setConfig=function(e){pt(e),Ue=!0},r.clearConfig=function(){ct=null,Ue=!1},r.isValidAttribute=function(e,t,r){ct||pt({});var n=Ee(e),s=Ee(t);return At(n,s,r)},r.addHook=function(e,t){"function"==typeof t&&(ge[e]=ge[e]||[],S(ge[e],t))},r.removeHook=function(e){if(ge[e])return R(ge[e])},r.removeHooks=function(e){ge[e]&&(ge[e]=[])},r.removeAllHooks=function(){ge={}},r}return oe()}(),window.DOMPurify=r(50453)},55015:()=>{},10200:()=>{},68595:()=>{},87441:()=>{},42438:()=>{},56056:()=>{},77690:()=>{},51782:()=>{},57682:()=>{},5970:()=>{},11024:()=>{},97163:()=>{},87303:()=>{},76:()=>{},25315:()=>{},63270:()=>{},150:()=>{},91181:()=>{},24984:()=>{},38788:()=>{},92282:()=>{},55838:()=>{},55664:()=>{},15459:()=>{},68609:()=>{},49138:()=>{},25748:()=>{},11109:()=>{},59217:()=>{},52378:()=>{},31080:()=>{},12580:()=>{},63987:()=>{},98238:()=>{},53726:()=>{},906:()=>{},28095:()=>{},64023:()=>{},14092:()=>{},1859:()=>{},78e3:()=>{},42193:()=>{},61651:()=>{},69649:()=>{},98258:()=>{},4662:()=>{},84221:()=>{},57633:()=>{},70217:()=>{},71067:()=>{},67289:()=>{},81993:()=>{},83927:()=>{},49733:()=>{},6210:()=>{},92719:()=>{},57466:()=>{},84091:()=>{},27e3:()=>{},13049:()=>{},67891:()=>{},37349:()=>{},89883:()=>{},33265:()=>{},23721:()=>{},11819:()=>{},61811:()=>{},12263:()=>{},47353:()=>{},80505:()=>{},71100:()=>{},15707:()=>{},20514:()=>{},43359:()=>{},74084:()=>{},47470:()=>{},52973:()=>{},59087:()=>{},17902:()=>{},95034:()=>{},94982:()=>{},50705:()=>{},44290:()=>{},74352:()=>{},91717:()=>{},98149:()=>{},54008:()=>{},66628:()=>{},81890:()=>{},49498:()=>{},14138:()=>{},60233:()=>{},24848:()=>{},72914:()=>{},79269:()=>{},98956:()=>{},59574:()=>{},33569:()=>{},74664:()=>{},9490:()=>{},1931:()=>{},24665:()=>{},19710:()=>{},40334:()=>{},59835:()=>{},27768:()=>{},61196:()=>{},55190:()=>{},26847:()=>{},28280:()=>{},65119:()=>{},90408:()=>{},20318:()=>{},52582:()=>{},40649:()=>{},18235:()=>{},80325:()=>{},56099:()=>{},24446:()=>{},72401:()=>{},82114:()=>{},46105:()=>{},8956:()=>{},70460:()=>{},42242:()=>{},55371:()=>{},95985:()=>{},11910:()=>{},84250:()=>{},69651:()=>{},69813:()=>{},26844:()=>{},72416:()=>{},76598:()=>{},88292:()=>{},22418:function(e,t,r){(e=r.nmd(e)).exports=function(){"use strict";var t,n;function s(){return t.apply(null,arguments)}function o(e){t=e}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(l(e,t))return!1;return!0}function h(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var r,n=[],s=e.length;for(r=0;r<s;++r)n.push(t(e[r],r));return n}function p(e,t){for(var r in t)l(t,r)&&(e[r]=t[r]);return l(t,"toString")&&(e.toString=t.toString),l(t,"valueOf")&&(e.valueOf=t.valueOf),e}function g(e,t,r,n){return Kr(e,t,r,n,!0).utc()}function m(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function E(e){return null==e._pf&&(e._pf=m()),e._pf}function y(e){if(null==e._isValid){var t=E(e),r=n.call(t.parsedDateParts,(function(e){return null!=e})),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function w(e){var t=g(NaN);return null!=e?p(E(t),e):E(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,r=Object(this),n=r.length>>>0;for(t=0;t<n;t++)if(t in r&&e.call(this,r[t],t,r))return!0;return!1};var C=s.momentProperties=[],v=!1;function R(e,t){var r,n,s,o=C.length;if(h(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),h(t._i)||(e._i=t._i),h(t._f)||(e._f=t._f),h(t._l)||(e._l=t._l),h(t._strict)||(e._strict=t._strict),h(t._tzm)||(e._tzm=t._tzm),h(t._isUTC)||(e._isUTC=t._isUTC),h(t._offset)||(e._offset=t._offset),h(t._pf)||(e._pf=E(t)),h(t._locale)||(e._locale=t._locale),o>0)for(r=0;r<o;r++)h(s=t[n=C[r]])||(e[n]=s);return e}function S(e){R(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,s.updateOffset(this),v=!1)}function T(e){return e instanceof S||null!=e&&null!=e._isAMomentObject}function N(e){!1===s.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function O(e,t){var r=!0;return p((function(){if(null!=s.deprecationHandler&&s.deprecationHandler(null,e),r){var n,o,i,a=[],u=arguments.length;for(o=0;o<u;o++){if(n="","object"==typeof arguments[o]){for(i in n+="\n["+o+"] ",arguments[0])l(arguments[0],i)&&(n+=i+": "+arguments[0][i]+", ");n=n.slice(0,-2)}else n=arguments[o];a.push(n)}N(e+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),r=!1}return t.apply(this,arguments)}),t)}var M,_={};function A(e,t){null!=s.deprecationHandler&&s.deprecationHandler(e,t),_[e]||(N(t),_[e]=!0)}function b(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function I(e){var t,r;for(r in e)l(e,r)&&(b(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function x(e,t){var r,n=p({},e);for(r in t)l(t,r)&&(a(e[r])&&a(t[r])?(n[r]={},p(n[r],e[r]),p(n[r],t[r])):null!=t[r]?n[r]=t[r]:delete n[r]);for(r in e)l(e,r)&&!l(t,r)&&a(e[r])&&(n[r]=p({},n[r]));return n}function L(e){null!=e&&this.set(e)}s.suppressDeprecationWarnings=!1,s.deprecationHandler=null,M=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)l(e,t)&&r.push(t);return r};var P={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function D(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return b(n)?n.call(t,r):n}function k(e,t,r){var n=""+Math.abs(e),s=t-n.length;return(e>=0?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,F=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,U={},V={};function B(e,t,r,n){var s=n;"string"==typeof n&&(s=function(){return this[n]()}),e&&(V[e]=s),t&&(V[t[0]]=function(){return k(s.apply(this,arguments),t[1],t[2])}),r&&(V[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function W(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Y(e){var t,r,n=e.match(H);for(t=0,r=n.length;t<r;t++)V[n[t]]?n[t]=V[n[t]]:n[t]=W(n[t]);return function(t){var s,o="";for(s=0;s<r;s++)o+=b(n[s])?n[s].call(t,e):n[s];return o}}function G(e,t){return e.isValid()?(t=j(t,e.localeData()),U[t]=U[t]||Y(t),U[t](e)):e.localeData().invalidDate()}function j(e,t){var r=5;function n(e){return t.longDateFormat(e)||e}for(F.lastIndex=0;r>=0&&F.test(e);)e=e.replace(F,n),F.lastIndex=0,r-=1;return e}var z={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function $(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(H).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var K="Invalid date";function X(){return this._invalidDate}var q="%d",Q=/\d{1,2}/;function Z(e){return this._ordinal.replace("%d",e)}var J={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ee(e,t,r,n){var s=this._relativeTime[r];return b(s)?s(e,t,r,n):s.replace(/%d/i,e)}function te(e,t){var r=this._relativeTime[e>0?"future":"past"];return b(r)?r(t):r.replace(/%s/i,t)}var re={};function ne(e,t){var r=e.toLowerCase();re[r]=re[r+"s"]=re[t]=e}function se(e){return"string"==typeof e?re[e]||re[e.toLowerCase()]:void 0}function oe(e){var t,r,n={};for(r in e)l(e,r)&&(t=se(r))&&(n[t]=e[r]);return n}var ie={};function ae(e,t){ie[e]=t}function le(e){var t,r=[];for(t in e)l(e,t)&&r.push({unit:t,priority:ie[t]});return r.sort((function(e,t){return e.priority-t.priority})),r}function ue(e){return e%4==0&&e%100!=0||e%400==0}function he(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ce(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=he(t)),r}function de(e,t){return function(r){return null!=r?(pe(this,e,r),s.updateOffset(this,t),this):fe(this,e)}}function fe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function pe(e,t,r){e.isValid()&&!isNaN(r)&&("FullYear"===t&&ue(e.year())&&1===e.month()&&29===e.date()?(r=ce(r),e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),et(r,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](r))}function ge(e){return b(this[e=se(e)])?this[e]():this}function me(e,t){if("object"==typeof e){var r,n=le(e=oe(e)),s=n.length;for(r=0;r<s;r++)this[n[r].unit](e[n[r].unit])}else if(b(this[e=se(e)]))return this[e](t);return this}var Ee,ye=/\d/,we=/\d\d/,Ce=/\d{3}/,ve=/\d{4}/,Re=/[+-]?\d{6}/,Se=/\d\d?/,Te=/\d\d\d\d?/,Ne=/\d\d\d\d\d\d?/,Oe=/\d{1,3}/,Me=/\d{1,4}/,_e=/[+-]?\d{1,6}/,Ae=/\d+/,be=/[+-]?\d+/,Ie=/Z|[+-]\d\d:?\d\d/gi,xe=/Z|[+-]\d\d(?::?\d\d)?/gi,Le=/[+-]?\d+(\.\d{1,3})?/,Pe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function De(e,t,r){Ee[e]=b(t)?t:function(e,n){return e&&r?r:t}}function ke(e,t){return l(Ee,e)?Ee[e](t._strict,t._locale):new RegExp(He(e))}function He(e){return Fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,n,s){return t||r||n||s})))}function Fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}Ee={};var Ue={};function Ve(e,t){var r,n,s=t;for("string"==typeof e&&(e=[e]),c(t)&&(s=function(e,r){r[t]=ce(e)}),n=e.length,r=0;r<n;r++)Ue[e[r]]=s}function Be(e,t){Ve(e,(function(e,r,n,s){n._w=n._w||{},t(e,n._w,n,s)}))}function We(e,t,r){null!=t&&l(Ue,e)&&Ue[e](t,r._a,r,e)}var Ye,Ge=0,je=1,ze=2,$e=3,Ke=4,Xe=5,qe=6,Qe=7,Ze=8;function Je(e,t){return(e%t+t)%t}function et(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=Je(t,12);return e+=(t-r)/12,1===r?ue(e)?29:28:31-r%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},B("M",["MM",2],"Mo",(function(){return this.month()+1})),B("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),B("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ne("month","M"),ae("month",8),De("M",Se),De("MM",Se,we),De("MMM",(function(e,t){return t.monthsShortRegex(e)})),De("MMMM",(function(e,t){return t.monthsRegex(e)})),Ve(["M","MM"],(function(e,t){t[je]=ce(e)-1})),Ve(["MMM","MMMM"],(function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);null!=s?t[je]=s:E(r).invalidMonth=e}));var tt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),rt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),nt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,st=Pe,ot=Pe;function it(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||nt).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone}function at(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[nt.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function lt(e,t,r){var n,s,o,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=g([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();return r?"MMM"===t?-1!==(s=Ye.call(this._shortMonthsParse,i))?s:null:-1!==(s=Ye.call(this._longMonthsParse,i))?s:null:"MMM"===t?-1!==(s=Ye.call(this._shortMonthsParse,i))||-1!==(s=Ye.call(this._longMonthsParse,i))?s:null:-1!==(s=Ye.call(this._longMonthsParse,i))||-1!==(s=Ye.call(this._shortMonthsParse,i))?s:null}function ut(e,t,r){var n,s,o;if(this._monthsParseExact)return lt.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=g([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function ht(e,t){var r;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=ce(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return r=Math.min(e.date(),et(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,r),e}function ct(e){return null!=e?(ht(this,e),s.updateOffset(this,!0),this):fe(this,"Month")}function dt(){return et(this.year(),this.month())}function ft(e){return this._monthsParseExact?(l(this,"_monthsRegex")||gt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=st),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function pt(e){return this._monthsParseExact?(l(this,"_monthsRegex")||gt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=ot),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function gt(){function e(e,t){return t.length-e.length}var t,r,n=[],s=[],o=[];for(t=0;t<12;t++)r=g([2e3,t]),n.push(this.monthsShort(r,"")),s.push(this.months(r,"")),o.push(this.months(r,"")),o.push(this.monthsShort(r,""));for(n.sort(e),s.sort(e),o.sort(e),t=0;t<12;t++)n[t]=Fe(n[t]),s[t]=Fe(s[t]);for(t=0;t<24;t++)o[t]=Fe(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function mt(e){return ue(e)?366:365}B("Y",0,0,(function(){var e=this.year();return e<=9999?k(e,4):"+"+e})),B(0,["YY",2],0,(function(){return this.year()%100})),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),ne("year","y"),ae("year",1),De("Y",be),De("YY",Se,we),De("YYYY",Me,ve),De("YYYYY",_e,Re),De("YYYYYY",_e,Re),Ve(["YYYYY","YYYYYY"],Ge),Ve("YYYY",(function(e,t){t[Ge]=2===e.length?s.parseTwoDigitYear(e):ce(e)})),Ve("YY",(function(e,t){t[Ge]=s.parseTwoDigitYear(e)})),Ve("Y",(function(e,t){t[Ge]=parseInt(e,10)})),s.parseTwoDigitYear=function(e){return ce(e)+(ce(e)>68?1900:2e3)};var Et=de("FullYear",!0);function yt(){return ue(this.year())}function wt(e,t,r,n,s,o,i){var a;return e<100&&e>=0?(a=new Date(e+400,t,r,n,s,o,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,r,n,s,o,i),a}function Ct(e){var t,r;return e<100&&e>=0?((r=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function vt(e,t,r){var n=7+t-r;return-(7+Ct(e,0,n).getUTCDay()-t)%7+n-1}function Rt(e,t,r,n,s){var o,i,a=1+7*(t-1)+(7+r-n)%7+vt(e,n,s);return a<=0?i=mt(o=e-1)+a:a>mt(e)?(o=e+1,i=a-mt(e)):(o=e,i=a),{year:o,dayOfYear:i}}function St(e,t,r){var n,s,o=vt(e.year(),t,r),i=Math.floor((e.dayOfYear()-o-1)/7)+1;return i<1?n=i+Tt(s=e.year()-1,t,r):i>Tt(e.year(),t,r)?(n=i-Tt(e.year(),t,r),s=e.year()+1):(s=e.year(),n=i),{week:n,year:s}}function Tt(e,t,r){var n=vt(e,t,r),s=vt(e+1,t,r);return(mt(e)-n+s)/7}function Nt(e){return St(e,this._week.dow,this._week.doy).week}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),ae("week",5),ae("isoWeek",5),De("w",Se),De("ww",Se,we),De("W",Se),De("WW",Se,we),Be(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=ce(e)}));var Ot={dow:0,doy:6};function Mt(){return this._week.dow}function _t(){return this._week.doy}function At(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function bt(e){var t=St(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function It(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function xt(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Lt(e,t){return e.slice(t,7).concat(e.slice(0,t))}B("d",0,"do","day"),B("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),B("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),B("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),ae("day",11),ae("weekday",11),ae("isoWeekday",11),De("d",Se),De("e",Se),De("E",Se),De("dd",(function(e,t){return t.weekdaysMinRegex(e)})),De("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),De("dddd",(function(e,t){return t.weekdaysRegex(e)})),Be(["dd","ddd","dddd"],(function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);null!=s?t.d=s:E(r).invalidWeekday=e})),Be(["d","e","E"],(function(e,t,r,n){t[n]=ce(e)}));var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Dt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),kt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ht=Pe,Ft=Pe,Ut=Pe;function Vt(e,t){var r=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Lt(r,this._week.dow):e?r[e.day()]:r}function Bt(e){return!0===e?Lt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Wt(e){return!0===e?Lt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Yt(e,t,r){var n,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=g([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(s=Ye.call(this._weekdaysParse,i))?s:null:"ddd"===t?-1!==(s=Ye.call(this._shortWeekdaysParse,i))?s:null:-1!==(s=Ye.call(this._minWeekdaysParse,i))?s:null:"dddd"===t?-1!==(s=Ye.call(this._weekdaysParse,i))||-1!==(s=Ye.call(this._shortWeekdaysParse,i))||-1!==(s=Ye.call(this._minWeekdaysParse,i))?s:null:"ddd"===t?-1!==(s=Ye.call(this._shortWeekdaysParse,i))||-1!==(s=Ye.call(this._weekdaysParse,i))||-1!==(s=Ye.call(this._minWeekdaysParse,i))?s:null:-1!==(s=Ye.call(this._minWeekdaysParse,i))||-1!==(s=Ye.call(this._weekdaysParse,i))||-1!==(s=Ye.call(this._shortWeekdaysParse,i))?s:null}function Gt(e,t,r){var n,s,o;if(this._weekdaysParseExact)return Yt.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=g([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function jt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=It(e,this.localeData()),this.add(e-t,"d")):t}function zt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function $t(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=xt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Kt(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Ht),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Xt(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ft),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function qt(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ut),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qt(){function e(e,t){return t.length-e.length}var t,r,n,s,o,i=[],a=[],l=[],u=[];for(t=0;t<7;t++)r=g([2e3,1]).day(t),n=Fe(this.weekdaysMin(r,"")),s=Fe(this.weekdaysShort(r,"")),o=Fe(this.weekdays(r,"")),i.push(n),a.push(s),l.push(o),u.push(n),u.push(s),u.push(o);i.sort(e),a.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Zt(){return this.hours()%12||12}function Jt(){return this.hours()||24}function er(e,t){B(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function tr(e,t){return t._meridiemParse}function rr(e){return"p"===(e+"").toLowerCase().charAt(0)}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Zt),B("k",["kk",2],0,Jt),B("hmm",0,0,(function(){return""+Zt.apply(this)+k(this.minutes(),2)})),B("hmmss",0,0,(function(){return""+Zt.apply(this)+k(this.minutes(),2)+k(this.seconds(),2)})),B("Hmm",0,0,(function(){return""+this.hours()+k(this.minutes(),2)})),B("Hmmss",0,0,(function(){return""+this.hours()+k(this.minutes(),2)+k(this.seconds(),2)})),er("a",!0),er("A",!1),ne("hour","h"),ae("hour",13),De("a",tr),De("A",tr),De("H",Se),De("h",Se),De("k",Se),De("HH",Se,we),De("hh",Se,we),De("kk",Se,we),De("hmm",Te),De("hmmss",Ne),De("Hmm",Te),De("Hmmss",Ne),Ve(["H","HH"],$e),Ve(["k","kk"],(function(e,t,r){var n=ce(e);t[$e]=24===n?0:n})),Ve(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),Ve(["h","hh"],(function(e,t,r){t[$e]=ce(e),E(r).bigHour=!0})),Ve("hmm",(function(e,t,r){var n=e.length-2;t[$e]=ce(e.substr(0,n)),t[Ke]=ce(e.substr(n)),E(r).bigHour=!0})),Ve("hmmss",(function(e,t,r){var n=e.length-4,s=e.length-2;t[$e]=ce(e.substr(0,n)),t[Ke]=ce(e.substr(n,2)),t[Xe]=ce(e.substr(s)),E(r).bigHour=!0})),Ve("Hmm",(function(e,t,r){var n=e.length-2;t[$e]=ce(e.substr(0,n)),t[Ke]=ce(e.substr(n))})),Ve("Hmmss",(function(e,t,r){var n=e.length-4,s=e.length-2;t[$e]=ce(e.substr(0,n)),t[Ke]=ce(e.substr(n,2)),t[Xe]=ce(e.substr(s))}));var nr=/[ap]\.?m?\.?/i,sr=de("Hours",!0);function or(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var ir,ar={calendar:P,longDateFormat:z,invalidDate:K,ordinal:q,dayOfMonthOrdinalParse:Q,relativeTime:J,months:tt,monthsShort:rt,week:Ot,weekdays:Pt,weekdaysMin:kt,weekdaysShort:Dt,meridiemParse:nr},lr={},ur={};function hr(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function cr(e){return e?e.toLowerCase().replace("_","-"):e}function dr(e){for(var t,r,n,s,o=0;o<e.length;){for(t=(s=cr(e[o]).split("-")).length,r=(r=cr(e[o+1]))?r.split("-"):null;t>0;){if(n=pr(s.slice(0,t).join("-")))return n;if(r&&r.length>=t&&hr(s,r)>=t-1)break;t--}o++}return ir}function fr(e){return null!=e.match("^[^/\\\\]*$")}function pr(t){var n=null;if(void 0===lr[t]&&e&&e.exports&&fr(t))try{n=ir._abbr,r(95126)("./"+t),gr(n)}catch(e){lr[t]=null}return lr[t]}function gr(e,t){var r;return e&&((r=h(t)?yr(e):mr(e,t))?ir=r:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ir._abbr}function mr(e,t){if(null!==t){var r,n=ar;if(t.abbr=e,null!=lr[e])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=lr[e]._config;else if(null!=t.parentLocale)if(null!=lr[t.parentLocale])n=lr[t.parentLocale]._config;else{if(null==(r=pr(t.parentLocale)))return ur[t.parentLocale]||(ur[t.parentLocale]=[]),ur[t.parentLocale].push({name:e,config:t}),null;n=r._config}return lr[e]=new L(x(n,t)),ur[e]&&ur[e].forEach((function(e){mr(e.name,e.config)})),gr(e),lr[e]}return delete lr[e],null}function Er(e,t){if(null!=t){var r,n,s=ar;null!=lr[e]&&null!=lr[e].parentLocale?lr[e].set(x(lr[e]._config,t)):(null!=(n=pr(e))&&(s=n._config),t=x(s,t),null==n&&(t.abbr=e),(r=new L(t)).parentLocale=lr[e],lr[e]=r),gr(e)}else null!=lr[e]&&(null!=lr[e].parentLocale?(lr[e]=lr[e].parentLocale,e===gr()&&gr(e)):null!=lr[e]&&delete lr[e]);return lr[e]}function yr(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ir;if(!i(e)){if(t=pr(e))return t;e=[e]}return dr(e)}function wr(){return M(lr)}function Cr(e){var t,r=e._a;return r&&-2===E(e).overflow&&(t=r[je]<0||r[je]>11?je:r[ze]<1||r[ze]>et(r[Ge],r[je])?ze:r[$e]<0||r[$e]>24||24===r[$e]&&(0!==r[Ke]||0!==r[Xe]||0!==r[qe])?$e:r[Ke]<0||r[Ke]>59?Ke:r[Xe]<0||r[Xe]>59?Xe:r[qe]<0||r[qe]>999?qe:-1,E(e)._overflowDayOfYear&&(t<Ge||t>ze)&&(t=ze),E(e)._overflowWeeks&&-1===t&&(t=Qe),E(e)._overflowWeekday&&-1===t&&(t=Ze),E(e).overflow=t),e}var vr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Rr=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sr=/Z|[+-]\d\d(?::?\d\d)?/,Tr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Nr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Or=/^\/?Date\((-?\d+)/i,Mr=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,_r={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ar(e){var t,r,n,s,o,i,a=e._i,l=vr.exec(a)||Rr.exec(a),u=Tr.length,h=Nr.length;if(l){for(E(e).iso=!0,t=0,r=u;t<r;t++)if(Tr[t][1].exec(l[1])){s=Tr[t][0],n=!1!==Tr[t][2];break}if(null==s)return void(e._isValid=!1);if(l[3]){for(t=0,r=h;t<r;t++)if(Nr[t][1].exec(l[3])){o=(l[2]||" ")+Nr[t][0];break}if(null==o)return void(e._isValid=!1)}if(!n&&null!=o)return void(e._isValid=!1);if(l[4]){if(!Sr.exec(l[4]))return void(e._isValid=!1);i="Z"}e._f=s+(o||"")+(i||""),Br(e)}else e._isValid=!1}function br(e,t,r,n,s,o){var i=[Ir(e),rt.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return o&&i.push(parseInt(o,10)),i}function Ir(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function xr(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Lr(e,t,r){return!e||Dt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(E(r).weekdayMismatch=!0,r._isValid=!1,!1)}function Pr(e,t,r){if(e)return _r[e];if(t)return 0;var n=parseInt(r,10),s=n%100;return(n-s)/100*60+s}function Dr(e){var t,r=Mr.exec(xr(e._i));if(r){if(t=br(r[4],r[3],r[2],r[5],r[6],r[7]),!Lr(r[1],t,e))return;e._a=t,e._tzm=Pr(r[8],r[9],r[10]),e._d=Ct.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),E(e).rfc2822=!0}else e._isValid=!1}function kr(e){var t=Or.exec(e._i);null===t?(Ar(e),!1===e._isValid&&(delete e._isValid,Dr(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:s.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Hr(e,t,r){return null!=e?e:null!=t?t:r}function Fr(e){var t=new Date(s.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Ur(e){var t,r,n,s,o,i=[];if(!e._d){for(n=Fr(e),e._w&&null==e._a[ze]&&null==e._a[je]&&Vr(e),null!=e._dayOfYear&&(o=Hr(e._a[Ge],n[Ge]),(e._dayOfYear>mt(o)||0===e._dayOfYear)&&(E(e)._overflowDayOfYear=!0),r=Ct(o,0,e._dayOfYear),e._a[je]=r.getUTCMonth(),e._a[ze]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=i[t]=n[t];for(;t<7;t++)e._a[t]=i[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[$e]&&0===e._a[Ke]&&0===e._a[Xe]&&0===e._a[qe]&&(e._nextDay=!0,e._a[$e]=0),e._d=(e._useUTC?Ct:wt).apply(null,i),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[$e]=24),e._w&&void 0!==e._w.d&&e._w.d!==s&&(E(e).weekdayMismatch=!0)}}function Vr(e){var t,r,n,s,o,i,a,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,i=4,r=Hr(t.GG,e._a[Ge],St(Xr(),1,4).year),n=Hr(t.W,1),((s=Hr(t.E,1))<1||s>7)&&(l=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,u=St(Xr(),o,i),r=Hr(t.gg,e._a[Ge],u.year),n=Hr(t.w,u.week),null!=t.d?((s=t.d)<0||s>6)&&(l=!0):null!=t.e?(s=t.e+o,(t.e<0||t.e>6)&&(l=!0)):s=o),n<1||n>Tt(r,o,i)?E(e)._overflowWeeks=!0:null!=l?E(e)._overflowWeekday=!0:(a=Rt(r,n,s,o,i),e._a[Ge]=a.year,e._dayOfYear=a.dayOfYear)}function Br(e){if(e._f!==s.ISO_8601)if(e._f!==s.RFC_2822){e._a=[],E(e).empty=!0;var t,r,n,o,i,a,l,u=""+e._i,h=u.length,c=0;for(l=(n=j(e._f,e._locale).match(H)||[]).length,t=0;t<l;t++)o=n[t],(r=(u.match(ke(o,e))||[])[0])&&((i=u.substr(0,u.indexOf(r))).length>0&&E(e).unusedInput.push(i),u=u.slice(u.indexOf(r)+r.length),c+=r.length),V[o]?(r?E(e).empty=!1:E(e).unusedTokens.push(o),We(o,r,e)):e._strict&&!r&&E(e).unusedTokens.push(o);E(e).charsLeftOver=h-c,u.length>0&&E(e).unusedInput.push(u),e._a[$e]<=12&&!0===E(e).bigHour&&e._a[$e]>0&&(E(e).bigHour=void 0),E(e).parsedDateParts=e._a.slice(0),E(e).meridiem=e._meridiem,e._a[$e]=Wr(e._locale,e._a[$e],e._meridiem),null!==(a=E(e).era)&&(e._a[Ge]=e._locale.erasConvertYear(a,e._a[Ge])),Ur(e),Cr(e)}else Dr(e);else Ar(e)}function Wr(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((n=e.isPM(r))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function Yr(e){var t,r,n,s,o,i,a=!1,l=e._f.length;if(0===l)return E(e).invalidFormat=!0,void(e._d=new Date(NaN));for(s=0;s<l;s++)o=0,i=!1,t=R({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[s],Br(t),y(t)&&(i=!0),o+=E(t).charsLeftOver,o+=10*E(t).unusedTokens.length,E(t).score=o,a?o<n&&(n=o,r=t):(null==n||o<n||i)&&(n=o,r=t,i&&(a=!0));p(e,r||t)}function Gr(e){if(!e._d){var t=oe(e._i),r=void 0===t.day?t.date:t.day;e._a=f([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Ur(e)}}function jr(e){var t=new S(Cr(zr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function zr(e){var t=e._i,r=e._f;return e._locale=e._locale||yr(e._l),null===t||void 0===r&&""===t?w({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),T(t)?new S(Cr(t)):(d(t)?e._d=t:i(r)?Yr(e):r?Br(e):$r(e),y(e)||(e._d=null),e))}function $r(e){var t=e._i;h(t)?e._d=new Date(s.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?kr(e):i(t)?(e._a=f(t.slice(0),(function(e){return parseInt(e,10)})),Ur(e)):a(t)?Gr(e):c(t)?e._d=new Date(t):s.createFromInputFallback(e)}function Kr(e,t,r,n,s){var o={};return!0!==t&&!1!==t||(n=t,t=void 0),!0!==r&&!1!==r||(n=r,r=void 0),(a(e)&&u(e)||i(e)&&0===e.length)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=s,o._l=r,o._i=e,o._f=t,o._strict=n,jr(o)}function Xr(e,t,r,n){return Kr(e,t,r,n,!1)}s.createFromInputFallback=O("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),s.ISO_8601=function(){},s.RFC_2822=function(){};var qr=O("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Xr.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:w()})),Qr=O("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Xr.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:w()}));function Zr(e,t){var r,n;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Xr();for(r=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](r)||(r=t[n]);return r}function Jr(){return Zr("isBefore",[].slice.call(arguments,0))}function en(){return Zr("isAfter",[].slice.call(arguments,0))}var tn=function(){return Date.now?Date.now():+new Date},rn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function nn(e){var t,r,n=!1,s=rn.length;for(t in e)if(l(e,t)&&(-1===Ye.call(rn,t)||null!=e[t]&&isNaN(e[t])))return!1;for(r=0;r<s;++r)if(e[rn[r]]){if(n)return!1;parseFloat(e[rn[r]])!==ce(e[rn[r]])&&(n=!0)}return!0}function sn(){return this._isValid}function on(){return An(NaN)}function an(e){var t=oe(e),r=t.year||0,n=t.quarter||0,s=t.month||0,o=t.week||t.isoWeek||0,i=t.day||0,a=t.hour||0,l=t.minute||0,u=t.second||0,h=t.millisecond||0;this._isValid=nn(t),this._milliseconds=+h+1e3*u+6e4*l+1e3*a*60*60,this._days=+i+7*o,this._months=+s+3*n+12*r,this._data={},this._locale=yr(),this._bubble()}function ln(e){return e instanceof an}function un(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function hn(e,t,r){var n,s=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),i=0;for(n=0;n<s;n++)(r&&e[n]!==t[n]||!r&&ce(e[n])!==ce(t[n]))&&i++;return i+o}function cn(e,t){B(e,0,0,(function(){var e=this.utcOffset(),r="+";return e<0&&(e=-e,r="-"),r+k(~~(e/60),2)+t+k(~~e%60,2)}))}cn("Z",":"),cn("ZZ",""),De("Z",xe),De("ZZ",xe),Ve(["Z","ZZ"],(function(e,t,r){r._useUTC=!0,r._tzm=fn(xe,e)}));var dn=/([\+\-]|\d\d)/gi;function fn(e,t){var r,n,s=(t||"").match(e);return null===s?null:0===(n=60*(r=((s[s.length-1]||[])+"").match(dn)||["-",0,0])[1]+ce(r[2]))?0:"+"===r[0]?n:-n}function pn(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(T(e)||d(e)?e.valueOf():Xr(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),s.updateOffset(r,!1),r):Xr(e).local()}function gn(e){return-Math.round(e._d.getTimezoneOffset())}function mn(e,t,r){var n,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=fn(xe,e)))return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&t&&(n=gn(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),o!==e&&(!t||this._changeInProgress?Pn(this,An(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,s.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:gn(this)}function En(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function yn(e){return this.utcOffset(0,e)}function wn(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(gn(this),"m")),this}function Cn(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=fn(Ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function vn(e){return!!this.isValid()&&(e=e?Xr(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function Rn(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Sn(){if(!h(this._isDSTShifted))return this._isDSTShifted;var e,t={};return R(t,this),(t=zr(t))._a?(e=t._isUTC?g(t._a):Xr(t._a),this._isDSTShifted=this.isValid()&&hn(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Tn(){return!!this.isValid()&&!this._isUTC}function Nn(){return!!this.isValid()&&this._isUTC}function On(){return!!this.isValid()&&this._isUTC&&0===this._offset}s.updateOffset=function(){};var Mn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,_n=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function An(e,t){var r,n,s,o=e,i=null;return ln(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(i=Mn.exec(e))?(r="-"===i[1]?-1:1,o={y:0,d:ce(i[ze])*r,h:ce(i[$e])*r,m:ce(i[Ke])*r,s:ce(i[Xe])*r,ms:ce(un(1e3*i[qe]))*r}):(i=_n.exec(e))?(r="-"===i[1]?-1:1,o={y:bn(i[2],r),M:bn(i[3],r),w:bn(i[4],r),d:bn(i[5],r),h:bn(i[6],r),m:bn(i[7],r),s:bn(i[8],r)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(s=xn(Xr(o.from),Xr(o.to)),(o={}).ms=s.milliseconds,o.M=s.months),n=new an(o),ln(e)&&l(e,"_locale")&&(n._locale=e._locale),ln(e)&&l(e,"_isValid")&&(n._isValid=e._isValid),n}function bn(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function In(e,t){var r={};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function xn(e,t){var r;return e.isValid()&&t.isValid()?(t=pn(t,e),e.isBefore(t)?r=In(e,t):((r=In(t,e)).milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Ln(e,t){return function(r,n){var s;return null===n||isNaN(+n)||(A(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=r,r=n,n=s),Pn(this,An(r,n),e),this}}function Pn(e,t,r,n){var o=t._milliseconds,i=un(t._days),a=un(t._months);e.isValid()&&(n=null==n||n,a&&ht(e,fe(e,"Month")+a*r),i&&pe(e,"Date",fe(e,"Date")+i*r),o&&e._d.setTime(e._d.valueOf()+o*r),n&&s.updateOffset(e,i||a))}An.fn=an.prototype,An.invalid=on;var Dn=Ln(1,"add"),kn=Ln(-1,"subtract");function Hn(e){return"string"==typeof e||e instanceof String}function Fn(e){return T(e)||d(e)||Hn(e)||c(e)||Vn(e)||Un(e)||null==e}function Un(e){var t,r,n=a(e)&&!u(e),s=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i=o.length;for(t=0;t<i;t+=1)r=o[t],s=s||l(e,r);return n&&s}function Vn(e){var t=i(e),r=!1;return t&&(r=0===e.filter((function(t){return!c(t)&&Hn(e)})).length),t&&r}function Bn(e){var t,r,n=a(e)&&!u(e),s=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)r=o[t],s=s||l(e,r);return n&&s}function Wn(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Yn(e,t){1===arguments.length&&(arguments[0]?Fn(arguments[0])?(e=arguments[0],t=void 0):Bn(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Xr(),n=pn(r,this).startOf("day"),o=s.calendarFormat(this,n)||"sameElse",i=t&&(b(t[o])?t[o].call(this,r):t[o]);return this.format(i||this.localeData().calendar(o,this,Xr(r)))}function Gn(){return new S(this)}function jn(e,t){var r=T(e)?e:Xr(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=se(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf())}function zn(e,t){var r=T(e)?e:Xr(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=se(t)||"millisecond")?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf())}function $n(e,t,r,n){var s=T(e)?e:Xr(e),o=T(t)?t:Xr(t);return!!(this.isValid()&&s.isValid()&&o.isValid())&&("("===(n=n||"()")[0]?this.isAfter(s,r):!this.isBefore(s,r))&&(")"===n[1]?this.isBefore(o,r):!this.isAfter(o,r))}function Kn(e,t){var r,n=T(e)?e:Xr(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=se(t)||"millisecond")?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf()))}function Xn(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function qn(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Qn(e,t,r){var n,s,o;if(!this.isValid())return NaN;if(!(n=pn(e,this)).isValid())return NaN;switch(s=6e4*(n.utcOffset()-this.utcOffset()),t=se(t)){case"year":o=Zn(this,n)/12;break;case"month":o=Zn(this,n);break;case"quarter":o=Zn(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-s)/864e5;break;case"week":o=(this-n-s)/6048e5;break;default:o=this-n}return r?o:he(o)}function Zn(e,t){if(e.date()<t.date())return-Zn(t,e);var r=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(r,"months");return-(r+(t-n<0?(t-n)/(n-e.clone().add(r-1,"months")):(t-n)/(e.clone().add(r+1,"months")-n)))||0}function Jn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function es(e){if(!this.isValid())return null;var t=!0!==e,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?G(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):b(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(r,"Z")):G(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ts(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n,s="moment",o="";return this.isLocal()||(s=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+s+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",n=o+'[")]',this.format(e+t+r+n)}function rs(e){e||(e=this.isUtc()?s.defaultFormatUtc:s.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)}function ns(e,t){return this.isValid()&&(T(e)&&e.isValid()||Xr(e).isValid())?An({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ss(e){return this.from(Xr(),e)}function os(e,t){return this.isValid()&&(T(e)&&e.isValid()||Xr(e).isValid())?An({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function is(e){return this.to(Xr(),e)}function as(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yr(e))&&(this._locale=t),this)}s.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",s.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ls=O("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function us(){return this._locale}var hs=1e3,cs=60*hs,ds=60*cs,fs=3506328*ds;function ps(e,t){return(e%t+t)%t}function gs(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-fs:new Date(e,t,r).valueOf()}function ms(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-fs:Date.UTC(e,t,r)}function Es(e){var t,r;if(void 0===(e=se(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?ms:gs,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ps(t+(this._isUTC?0:this.utcOffset()*cs),ds);break;case"minute":t=this._d.valueOf(),t-=ps(t,cs);break;case"second":t=this._d.valueOf(),t-=ps(t,hs)}return this._d.setTime(t),s.updateOffset(this,!0),this}function ys(e){var t,r;if(void 0===(e=se(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?ms:gs,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ds-ps(t+(this._isUTC?0:this.utcOffset()*cs),ds)-1;break;case"minute":t=this._d.valueOf(),t+=cs-ps(t,cs)-1;break;case"second":t=this._d.valueOf(),t+=hs-ps(t,hs)-1}return this._d.setTime(t),s.updateOffset(this,!0),this}function ws(){return this._d.valueOf()-6e4*(this._offset||0)}function Cs(){return Math.floor(this.valueOf()/1e3)}function vs(){return new Date(this.valueOf())}function Rs(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ss(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Ts(){return this.isValid()?this.toISOString():null}function Ns(){return y(this)}function Os(){return p({},E(this))}function Ms(){return E(this).overflow}function _s(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function As(e,t){var r,n,o,i=this._eras||yr("en")._eras;for(r=0,n=i.length;r<n;++r)switch("string"==typeof i[r].since&&(o=s(i[r].since).startOf("day"),i[r].since=o.valueOf()),typeof i[r].until){case"undefined":i[r].until=1/0;break;case"string":o=s(i[r].until).startOf("day").valueOf(),i[r].until=o.valueOf()}return i}function bs(e,t,r){var n,s,o,i,a,l=this.eras();for(e=e.toUpperCase(),n=0,s=l.length;n<s;++n)if(o=l[n].name.toUpperCase(),i=l[n].abbr.toUpperCase(),a=l[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(i===e)return l[n];break;case"NNNN":if(o===e)return l[n];break;case"NNNNN":if(a===e)return l[n]}else if([o,i,a].indexOf(e)>=0)return l[n]}function Is(e,t){var r=e.since<=e.until?1:-1;return void 0===t?s(e.since).year():s(e.since).year()+(t-e.offset)*r}function xs(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].name;if(n[e].until<=r&&r<=n[e].since)return n[e].name}return""}function Ls(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].narrow;if(n[e].until<=r&&r<=n[e].since)return n[e].narrow}return""}function Ps(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].abbr;if(n[e].until<=r&&r<=n[e].since)return n[e].abbr}return""}function Ds(){var e,t,r,n,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(r=o[e].since<=o[e].until?1:-1,n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until||o[e].until<=n&&n<=o[e].since)return(this.year()-s(o[e].since).year())*r+o[e].offset;return this.year()}function ks(e){return l(this,"_erasNameRegex")||Ys.call(this),e?this._erasNameRegex:this._erasRegex}function Hs(e){return l(this,"_erasAbbrRegex")||Ys.call(this),e?this._erasAbbrRegex:this._erasRegex}function Fs(e){return l(this,"_erasNarrowRegex")||Ys.call(this),e?this._erasNarrowRegex:this._erasRegex}function Us(e,t){return t.erasAbbrRegex(e)}function Vs(e,t){return t.erasNameRegex(e)}function Bs(e,t){return t.erasNarrowRegex(e)}function Ws(e,t){return t._eraYearOrdinalRegex||Ae}function Ys(){var e,t,r=[],n=[],s=[],o=[],i=this.eras();for(e=0,t=i.length;e<t;++e)n.push(Fe(i[e].name)),r.push(Fe(i[e].abbr)),s.push(Fe(i[e].narrow)),o.push(Fe(i[e].name)),o.push(Fe(i[e].abbr)),o.push(Fe(i[e].narrow));this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}function Gs(e,t){B(0,[e,e.length],0,t)}function js(e){return Qs.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function zs(e){return Qs.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function $s(){return Tt(this.year(),1,4)}function Ks(){return Tt(this.isoWeekYear(),1,4)}function Xs(){var e=this.localeData()._week;return Tt(this.year(),e.dow,e.doy)}function qs(){var e=this.localeData()._week;return Tt(this.weekYear(),e.dow,e.doy)}function Qs(e,t,r,n,s){var o;return null==e?St(this,n,s).year:(t>(o=Tt(e,n,s))&&(t=o),Zs.call(this,e,t,r,n,s))}function Zs(e,t,r,n,s){var o=Rt(e,t,r,n,s),i=Ct(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}function Js(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}B("N",0,0,"eraAbbr"),B("NN",0,0,"eraAbbr"),B("NNN",0,0,"eraAbbr"),B("NNNN",0,0,"eraName"),B("NNNNN",0,0,"eraNarrow"),B("y",["y",1],"yo","eraYear"),B("y",["yy",2],0,"eraYear"),B("y",["yyy",3],0,"eraYear"),B("y",["yyyy",4],0,"eraYear"),De("N",Us),De("NN",Us),De("NNN",Us),De("NNNN",Vs),De("NNNNN",Bs),Ve(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?E(r).era=s:E(r).invalidEra=e})),De("y",Ae),De("yy",Ae),De("yyy",Ae),De("yyyy",Ae),De("yo",Ws),Ve(["y","yy","yyy","yyyy"],Ge),Ve(["yo"],(function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Ge]=r._locale.eraYearOrdinalParse(e,s):t[Ge]=parseInt(e,10)})),B(0,["gg",2],0,(function(){return this.weekYear()%100})),B(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Gs("gggg","weekYear"),Gs("ggggg","weekYear"),Gs("GGGG","isoWeekYear"),Gs("GGGGG","isoWeekYear"),ne("weekYear","gg"),ne("isoWeekYear","GG"),ae("weekYear",1),ae("isoWeekYear",1),De("G",be),De("g",be),De("GG",Se,we),De("gg",Se,we),De("GGGG",Me,ve),De("gggg",Me,ve),De("GGGGG",_e,Re),De("ggggg",_e,Re),Be(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=ce(e)})),Be(["gg","GG"],(function(e,t,r,n){t[n]=s.parseTwoDigitYear(e)})),B("Q",0,"Qo","quarter"),ne("quarter","Q"),ae("quarter",7),De("Q",ye),Ve("Q",(function(e,t){t[je]=3*(ce(e)-1)})),B("D",["DD",2],"Do","date"),ne("date","D"),ae("date",9),De("D",Se),De("DD",Se,we),De("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Ve(["D","DD"],ze),Ve("Do",(function(e,t){t[ze]=ce(e.match(Se)[0])}));var eo=de("Date",!0);function to(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}B("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),ae("dayOfYear",4),De("DDD",Oe),De("DDDD",Ce),Ve(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=ce(e)})),B("m",["mm",2],0,"minute"),ne("minute","m"),ae("minute",14),De("m",Se),De("mm",Se,we),Ve(["m","mm"],Ke);var ro=de("Minutes",!1);B("s",["ss",2],0,"second"),ne("second","s"),ae("second",15),De("s",Se),De("ss",Se,we),Ve(["s","ss"],Xe);var no,so,oo=de("Seconds",!1);for(B("S",0,0,(function(){return~~(this.millisecond()/100)})),B(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),B(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),B(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),B(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),B(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),B(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ne("millisecond","ms"),ae("millisecond",16),De("S",Oe,ye),De("SS",Oe,we),De("SSS",Oe,Ce),no="SSSS";no.length<=9;no+="S")De(no,Ae);function io(e,t){t[qe]=ce(1e3*("0."+e))}for(no="S";no.length<=9;no+="S")Ve(no,io);function ao(){return this._isUTC?"UTC":""}function lo(){return this._isUTC?"Coordinated Universal Time":""}so=de("Milliseconds",!1),B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var uo=S.prototype;function ho(e){return Xr(1e3*e)}function co(){return Xr.apply(null,arguments).parseZone()}function fo(e){return e}uo.add=Dn,uo.calendar=Yn,uo.clone=Gn,uo.diff=Qn,uo.endOf=ys,uo.format=rs,uo.from=ns,uo.fromNow=ss,uo.to=os,uo.toNow=is,uo.get=ge,uo.invalidAt=Ms,uo.isAfter=jn,uo.isBefore=zn,uo.isBetween=$n,uo.isSame=Kn,uo.isSameOrAfter=Xn,uo.isSameOrBefore=qn,uo.isValid=Ns,uo.lang=ls,uo.locale=as,uo.localeData=us,uo.max=Qr,uo.min=qr,uo.parsingFlags=Os,uo.set=me,uo.startOf=Es,uo.subtract=kn,uo.toArray=Rs,uo.toObject=Ss,uo.toDate=vs,uo.toISOString=es,uo.inspect=ts,"undefined"!=typeof Symbol&&null!=Symbol.for&&(uo[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),uo.toJSON=Ts,uo.toString=Jn,uo.unix=Cs,uo.valueOf=ws,uo.creationData=_s,uo.eraName=xs,uo.eraNarrow=Ls,uo.eraAbbr=Ps,uo.eraYear=Ds,uo.year=Et,uo.isLeapYear=yt,uo.weekYear=js,uo.isoWeekYear=zs,uo.quarter=uo.quarters=Js,uo.month=ct,uo.daysInMonth=dt,uo.week=uo.weeks=At,uo.isoWeek=uo.isoWeeks=bt,uo.weeksInYear=Xs,uo.weeksInWeekYear=qs,uo.isoWeeksInYear=$s,uo.isoWeeksInISOWeekYear=Ks,uo.date=eo,uo.day=uo.days=jt,uo.weekday=zt,uo.isoWeekday=$t,uo.dayOfYear=to,uo.hour=uo.hours=sr,uo.minute=uo.minutes=ro,uo.second=uo.seconds=oo,uo.millisecond=uo.milliseconds=so,uo.utcOffset=mn,uo.utc=yn,uo.local=wn,uo.parseZone=Cn,uo.hasAlignedHourOffset=vn,uo.isDST=Rn,uo.isLocal=Tn,uo.isUtcOffset=Nn,uo.isUtc=On,uo.isUTC=On,uo.zoneAbbr=ao,uo.zoneName=lo,uo.dates=O("dates accessor is deprecated. Use date instead.",eo),uo.months=O("months accessor is deprecated. Use month instead",ct),uo.years=O("years accessor is deprecated. Use year instead",Et),uo.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",En),uo.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Sn);var po=L.prototype;function go(e,t,r,n){var s=yr(),o=g().set(n,t);return s[r](o,e)}function mo(e,t,r){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return go(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=go(e,n,r,"month");return s}function Eo(e,t,r,n){"boolean"==typeof e?(c(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,c(t)&&(r=t,t=void 0),t=t||"");var s,o=yr(),i=e?o._week.dow:0,a=[];if(null!=r)return go(t,(r+i)%7,n,"day");for(s=0;s<7;s++)a[s]=go(t,(s+i)%7,n,"day");return a}function yo(e,t){return mo(e,t,"months")}function wo(e,t){return mo(e,t,"monthsShort")}function Co(e,t,r){return Eo(e,t,r,"weekdays")}function vo(e,t,r){return Eo(e,t,r,"weekdaysShort")}function Ro(e,t,r){return Eo(e,t,r,"weekdaysMin")}po.calendar=D,po.longDateFormat=$,po.invalidDate=X,po.ordinal=Z,po.preparse=fo,po.postformat=fo,po.relativeTime=ee,po.pastFuture=te,po.set=I,po.eras=As,po.erasParse=bs,po.erasConvertYear=Is,po.erasAbbrRegex=Hs,po.erasNameRegex=ks,po.erasNarrowRegex=Fs,po.months=it,po.monthsShort=at,po.monthsParse=ut,po.monthsRegex=pt,po.monthsShortRegex=ft,po.week=Nt,po.firstDayOfYear=_t,po.firstDayOfWeek=Mt,po.weekdays=Vt,po.weekdaysMin=Wt,po.weekdaysShort=Bt,po.weekdaysParse=Gt,po.weekdaysRegex=Kt,po.weekdaysShortRegex=Xt,po.weekdaysMinRegex=qt,po.isPM=rr,po.meridiem=or,gr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ce(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),s.lang=O("moment.lang is deprecated. Use moment.locale instead.",gr),s.langData=O("moment.langData is deprecated. Use moment.localeData instead.",yr);var So=Math.abs;function To(){var e=this._data;return this._milliseconds=So(this._milliseconds),this._days=So(this._days),this._months=So(this._months),e.milliseconds=So(e.milliseconds),e.seconds=So(e.seconds),e.minutes=So(e.minutes),e.hours=So(e.hours),e.months=So(e.months),e.years=So(e.years),this}function No(e,t,r,n){var s=An(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function Oo(e,t){return No(this,e,t,1)}function Mo(e,t){return No(this,e,t,-1)}function _o(e){return e<0?Math.floor(e):Math.ceil(e)}function Ao(){var e,t,r,n,s,o=this._milliseconds,i=this._days,a=this._months,l=this._data;return o>=0&&i>=0&&a>=0||o<=0&&i<=0&&a<=0||(o+=864e5*_o(Io(a)+i),i=0,a=0),l.milliseconds=o%1e3,e=he(o/1e3),l.seconds=e%60,t=he(e/60),l.minutes=t%60,r=he(t/60),l.hours=r%24,i+=he(r/24),a+=s=he(bo(i)),i-=_o(Io(s)),n=he(a/12),a%=12,l.days=i,l.months=a,l.years=n,this}function bo(e){return 4800*e/146097}function Io(e){return 146097*e/4800}function xo(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=se(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+bo(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Io(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function Lo(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ce(this._months/12):NaN}function Po(e){return function(){return this.as(e)}}var Do=Po("ms"),ko=Po("s"),Ho=Po("m"),Fo=Po("h"),Uo=Po("d"),Vo=Po("w"),Bo=Po("M"),Wo=Po("Q"),Yo=Po("y");function Go(){return An(this)}function jo(e){return e=se(e),this.isValid()?this[e+"s"]():NaN}function zo(e){return function(){return this.isValid()?this._data[e]:NaN}}var $o=zo("milliseconds"),Ko=zo("seconds"),Xo=zo("minutes"),qo=zo("hours"),Qo=zo("days"),Zo=zo("months"),Jo=zo("years");function ei(){return he(this.days()/7)}var ti=Math.round,ri={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ni(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function si(e,t,r,n){var s=An(e).abs(),o=ti(s.as("s")),i=ti(s.as("m")),a=ti(s.as("h")),l=ti(s.as("d")),u=ti(s.as("M")),h=ti(s.as("w")),c=ti(s.as("y")),d=o<=r.ss&&["s",o]||o<r.s&&["ss",o]||i<=1&&["m"]||i<r.m&&["mm",i]||a<=1&&["h"]||a<r.h&&["hh",a]||l<=1&&["d"]||l<r.d&&["dd",l];return null!=r.w&&(d=d||h<=1&&["w"]||h<r.w&&["ww",h]),(d=d||u<=1&&["M"]||u<r.M&&["MM",u]||c<=1&&["y"]||["yy",c])[2]=t,d[3]=+e>0,d[4]=n,ni.apply(null,d)}function oi(e){return void 0===e?ti:"function"==typeof e&&(ti=e,!0)}function ii(e,t){return void 0!==ri[e]&&(void 0===t?ri[e]:(ri[e]=t,"s"===e&&(ri.ss=t-1),!0))}function ai(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,s=!1,o=ri;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(s=e),"object"==typeof t&&(o=Object.assign({},ri,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),n=si(this,!s,o,r=this.localeData()),s&&(n=r.pastFuture(+this,n)),r.postformat(n)}var li=Math.abs;function ui(e){return(e>0)-(e<0)||+e}function hi(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,s,o,i,a,l=li(this._milliseconds)/1e3,u=li(this._days),h=li(this._months),c=this.asSeconds();return c?(e=he(l/60),t=he(e/60),l%=60,e%=60,r=he(h/12),h%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",s=c<0?"-":"",o=ui(this._months)!==ui(c)?"-":"",i=ui(this._days)!==ui(c)?"-":"",a=ui(this._milliseconds)!==ui(c)?"-":"",s+"P"+(r?o+r+"Y":"")+(h?o+h+"M":"")+(u?i+u+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+n+"S":"")):"P0D"}var ci=an.prototype;return ci.isValid=sn,ci.abs=To,ci.add=Oo,ci.subtract=Mo,ci.as=xo,ci.asMilliseconds=Do,ci.asSeconds=ko,ci.asMinutes=Ho,ci.asHours=Fo,ci.asDays=Uo,ci.asWeeks=Vo,ci.asMonths=Bo,ci.asQuarters=Wo,ci.asYears=Yo,ci.valueOf=Lo,ci._bubble=Ao,ci.clone=Go,ci.get=jo,ci.milliseconds=$o,ci.seconds=Ko,ci.minutes=Xo,ci.hours=qo,ci.days=Qo,ci.weeks=ei,ci.months=Zo,ci.years=Jo,ci.humanize=ai,ci.toISOString=hi,ci.toString=hi,ci.toJSON=hi,ci.locale=as,ci.localeData=us,ci.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",hi),ci.lang=ls,B("X",0,0,"unix"),B("x",0,0,"valueOf"),De("x",be),De("X",Le),Ve("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e))})),Ve("x",(function(e,t,r){r._d=new Date(ce(e))})),
918
918
  //! moment.js
919
919
  s.version="2.29.4",o(Xr),s.fn=uo,s.min=Jr,s.max=en,s.now=tn,s.utc=g,s.unix=ho,s.months=yo,s.isDate=d,s.locale=gr,s.invalid=w,s.duration=An,s.isMoment=T,s.weekdays=Co,s.parseZone=co,s.localeData=yr,s.isDuration=ln,s.monthsShort=wo,s.weekdaysMin=Ro,s.defineLocale=mr,s.updateLocale=Er,s.locales=wr,s.weekdaysShort=vo,s.normalizeUnits=se,s.relativeTimeRounding=oi,s.relativeTimeThreshold=ii,s.calendarFormat=Wn,s.prototype=uo,s.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},s}(),window.moment=r(22418)},75586:(e,t,r)=>{e.exports=function e(t,r,n){function s(i,a){if(!r[i]){if(!t[i]){if(o)return o(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var u=r[i]={exports:{}};t[i][0].call(u.exports,(function(e){return s(t[i][1][e]||e)}),u,u.exports,e,t,r,n)}return r[i].exports}for(var o=void 0,i=0;i<n.length;i++)s(n[i]);return s}({1:[function(e,t,r){!function(e){"use strict";var r,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,o=Math.floor,i="[BigNumber Error] ",a=i+"Number primitive has more than 15 significant digits: ",l=1e14,u=14,h=9007199254740991,c=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,f=1e9;function p(e){var t=0|e;return 0<e||e===t?t:t-1}function g(e){for(var t,r,n=1,s=e.length,o=e[0]+"";n<s;){for(t=e[n++]+"",r=u-t.length;r--;t="0"+t);o+=t}for(s=o.length;48===o.charCodeAt(--s););return o.slice(0,s+1||1)}function m(e,t){var r,n,s=e.c,o=t.c,i=e.s,a=t.s,l=e.e,u=t.e;if(!i||!a)return null;if(r=s&&!s[0],n=o&&!o[0],r||n)return r?n?0:-a:i;if(i!=a)return i;if(r=i<0,n=l==u,!s||!o)return n?0:!s^r?1:-1;if(!n)return u<l^r?1:-1;for(a=(l=s.length)<(u=o.length)?l:u,i=0;i<a;i++)if(s[i]!=o[i])return s[i]>o[i]^r?1:-1;return l==u?0:u<l^r?1:-1}function E(e,t,r,n){if(e<t||r<e||e!==(e<0?s(e):o(e)))throw Error(i+(n||"Argument")+("number"==typeof e?e<t||r<e?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function y(e){var t=e.c.length-1;return p(e.e/u)==t&&e.c[t]%2!=0}function w(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function C(e,t,r){var n,s;if(t<0){for(s=r+".";++t;s+=r);e=s+e}else if(++t>(n=e.length)){for(s=r,t-=n;--t;s+=r);e+=s}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}(r=function e(t){var r,v,R,S,T,N,O,M,_,A,b=Y.prototype={constructor:Y,toString:null,valueOf:null},I=new Y(1),x=20,L=4,P=-7,D=21,k=-1e7,H=1e7,F=!1,U=1,V=0,B={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},W="0123456789abcdefghijklmnopqrstuvwxyz";function Y(e,t){var r,s,i,l,c,d,f,p,g=this;if(!(g instanceof Y))return new Y(e,t);if(null==t){if(e instanceof Y)return g.s=e.s,g.e=e.e,void(g.c=(e=e.c)?e.slice():e);if((d="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,c=e;10<=c;c/=10,l++);return g.e=l,void(g.c=[e])}p=String(e)}else{if(p=String(e),!n.test(p))return R(g,p,d);g.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}-1<(l=p.indexOf("."))&&(p=p.replace(".","")),0<(c=p.search(/e/i))?(l<0&&(l=c),l+=+p.slice(c+1),p=p.substring(0,c)):l<0&&(l=p.length)}else{if(E(t,2,W.length,"Base"),p=String(e),10==t)return $(g=new Y(e instanceof Y?e:p),x+g.e+1,L);if(d="number"==typeof e){if(0*e!=0)return R(g,p,d,t);if(g.s=1/e<0?(p=p.slice(1),-1):1,Y.DEBUG&&15<p.replace(/^0\.0*|\./,"").length)throw Error(a+e);d=!1}else g.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(r=W.slice(0,t),l=c=0,f=p.length;c<f;c++)if(r.indexOf(s=p.charAt(c))<0){if("."==s){if(l<c){l=f;continue}}else if(!i&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){i=!0,c=-1,l=0;continue}return R(g,String(e),d,t)}-1<(l=(p=v(p,t,10,g.s)).indexOf("."))?p=p.replace(".",""):l=p.length}for(c=0;48===p.charCodeAt(c);c++);for(f=p.length;48===p.charCodeAt(--f););if(p=p.slice(c,++f)){if(f-=c,d&&Y.DEBUG&&15<f&&(h<e||e!==o(e)))throw Error(a+g.s*e);if(H<(l=l-c-1))g.c=g.e=null;else if(l<k)g.c=[g.e=0];else{if(g.e=l,g.c=[],c=(l+1)%u,l<0&&(c+=u),c<f){for(c&&g.c.push(+p.slice(0,c)),f-=u;c<f;)g.c.push(+p.slice(c,c+=u));p=p.slice(c),c=u-p.length}else c-=f;for(;c--;p+="0");g.c.push(+p)}}else g.c=[g.e=0]}function G(e,t,r,n){var s,o,i,a,l;if(null==r?r=L:E(r,0,8),!e.c)return e.toString();if(s=e.c[0],i=e.e,null==t)l=g(e.c),l=1==n||2==n&&(i<=P||D<=i)?w(l,i):C(l,i,"0");else if(o=(e=$(new Y(e),t,r)).e,a=(l=g(e.c)).length,1==n||2==n&&(t<=o||o<=P)){for(;a<t;l+="0",a++);l=w(l,o)}else if(t-=i,l=C(l,o,"0"),a<o+1){if(0<--t)for(l+=".";t--;l+="0");}else if(0<(t+=o-a))for(o+1==a&&(l+=".");t--;l+="0");return e.s<0&&s?"-"+l:l}function j(e,t){for(var r,n=1,s=new Y(e[0]);n<e.length;n++){if(!(r=new Y(e[n])).s){s=r;break}t.call(s,r)&&(s=r)}return s}function z(e,t,r){for(var n=1,s=t.length;!t[--s];t.pop());for(s=t[0];10<=s;s/=10,n++);return(r=n+r*u-1)>H?e.c=e.e=null:e.c=r<k?[e.e=0]:(e.e=r,t),e}function $(e,t,r,n){var i,a,h,d,f,p,g,m=e.c,E=c;if(m){e:{for(i=1,d=m[0];10<=d;d/=10,i++);if((a=t-i)<0)a+=u,h=t,g=(f=m[p=0])/E[i-h-1]%10|0;else if((p=s((a+1)/u))>=m.length){if(!n)break e;for(;m.length<=p;m.push(0));f=g=0,h=(a%=u)-u+(i=1)}else{for(f=d=m[p],i=1;10<=d;d/=10,i++);g=(h=(a%=u)-u+i)<0?0:f/E[i-h-1]%10|0}if(n=n||t<0||null!=m[p+1]||(h<0?f:f%E[i-h-1]),n=r<4?(g||n)&&(0==r||r==(e.s<0?3:2)):5<g||5==g&&(4==r||n||6==r&&(0<a?0<h?f/E[i-h]:0:m[p-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=E[(u-t%u)%u],e.e=-t||0):m[0]=e.e=0,e;if(0==a?(m.length=p,d=1,p--):(m.length=p+1,d=E[u-a],m[p]=0<h?o(f/E[i-h]%E[h])*d:0),n)for(;;){if(0==p){for(a=1,h=m[0];10<=h;h/=10,a++);for(h=m[0]+=d,d=1;10<=h;h/=10,d++);a!=d&&(e.e++,m[0]==l&&(m[0]=1));break}if(m[p]+=d,m[p]!=l)break;m[p--]=0,d=1}for(a=m.length;0===m[--a];m.pop());}e.e>H?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function K(e){var t,r=e.e;return null===r?e.toString():(t=g(e.c),t=r<=P||D<=r?w(t,r):C(t,r,"0"),e.s<0?"-"+t:t)}return Y.clone=e,Y.ROUND_UP=0,Y.ROUND_DOWN=1,Y.ROUND_CEIL=2,Y.ROUND_FLOOR=3,Y.ROUND_HALF_UP=4,Y.ROUND_HALF_DOWN=5,Y.ROUND_HALF_EVEN=6,Y.ROUND_HALF_CEIL=7,Y.ROUND_HALF_FLOOR=8,Y.EUCLID=9,Y.config=Y.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(i+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(E(r=e[t],0,f,t),x=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(E(r=e[t],0,8,t),L=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(E(r[0],-f,0,t),E(r[1],0,f,t),P=r[0],D=r[1]):(E(r,-f,f,t),P=-(D=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)E(r[0],-f,-1,t),E(r[1],1,f,t),k=r[0],H=r[1];else{if(E(r,-f,f,t),!r)throw Error(i+t+" cannot be zero: "+r);k=-(H=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(i+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw F=!r,Error(i+"crypto unavailable");F=r}else F=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(E(r=e[t],0,9,t),U=r),e.hasOwnProperty(t="POW_PRECISION")&&(E(r=e[t],0,f,t),V=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(i+t+" not an object: "+r);B=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(i+t+" invalid: "+r);W=r}}return{DECIMAL_PLACES:x,ROUNDING_MODE:L,EXPONENTIAL_AT:[P,D],RANGE:[k,H],CRYPTO:F,MODULO_MODE:U,POW_PRECISION:V,FORMAT:B,ALPHABET:W}},Y.isBigNumber=function(e){return e instanceof Y||e&&!0===e._isBigNumber||!1},Y.maximum=Y.max=function(){return j(arguments,b.lt)},Y.minimum=Y.min=function(){return j(arguments,b.gt)},Y.random=(S=9007199254740992,T=Math.random()*S&2097151?function(){return o(Math.random()*S)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,a,l,h=0,d=[],p=new Y(I);if(null==e?e=x:E(e,0,f),a=s(e/u),F)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));h<a;)9e15<=(l=131072*t[h]+(t[h+1]>>>11))?(r=crypto.getRandomValues(new Uint32Array(2)),t[h]=r[0],t[h+1]=r[1]):(d.push(l%1e14),h+=2);h=a/2}else{if(!crypto.randomBytes)throw F=!1,Error(i+"crypto unavailable");for(t=crypto.randomBytes(a*=7);h<a;)9e15<=(l=281474976710656*(31&t[h])+1099511627776*t[h+1]+4294967296*t[h+2]+16777216*t[h+3]+(t[h+4]<<16)+(t[h+5]<<8)+t[h+6])?crypto.randomBytes(7).copy(t,h):(d.push(l%1e14),h+=7);h=a/7}if(!F)for(;h<a;)(l=T())<9e15&&(d[h++]=l%1e14);for(a=d[--h],e%=u,a&&e&&(l=c[u-e],d[h]=o(a/l)*l);0===d[h];d.pop(),h--);if(h<0)d=[n=0];else{for(n=-1;0===d[0];d.splice(0,1),n-=u);for(h=1,l=d[0];10<=l;l/=10,h++);h<u&&(n-=u-h)}return p.e=n,p.c=d,p}),Y.sum=function(){for(var e=1,t=arguments,r=new Y(t[0]);e<t.length;)r=r.plus(t[e++]);return r},v=function(){var e="0123456789";function t(e,t,r,n){for(var s,o,i=[0],a=0,l=e.length;a<l;){for(o=i.length;o--;i[o]*=t);for(i[0]+=n.indexOf(e.charAt(a++)),s=0;s<i.length;s++)i[s]>r-1&&(null==i[s+1]&&(i[s+1]=0),i[s+1]+=i[s]/r|0,i[s]%=r)}return i.reverse()}return function(n,s,o,i,a){var l,u,h,c,d,f,p,m,E=n.indexOf("."),y=x,w=L;for(0<=E&&(c=V,V=0,n=n.replace(".",""),f=(m=new Y(s)).pow(n.length-E),V=c,m.c=t(C(g(f.c),f.e,"0"),10,o,e),m.e=m.c.length),h=c=(p=t(n,s,o,a?(l=W,e):(l=e,W))).length;0==p[--c];p.pop());if(!p[0])return l.charAt(0);if(E<0?--h:(f.c=p,f.e=h,f.s=i,p=(f=r(f,m,y,w,o)).c,d=f.r,h=f.e),E=p[u=h+y+1],c=o/2,d=d||u<0||null!=p[u+1],d=w<4?(null!=E||d)&&(0==w||w==(f.s<0?3:2)):c<E||E==c&&(4==w||d||6==w&&1&p[u-1]||w==(f.s<0?8:7)),u<1||!p[0])n=d?C(l.charAt(1),-y,l.charAt(0)):l.charAt(0);else{if(p.length=u,d)for(--o;++p[--u]>o;)p[u]=0,u||(++h,p=[1].concat(p));for(c=p.length;!p[--c];);for(E=0,n="";E<=c;n+=l.charAt(p[E++]));n=C(n,h,l.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,s,o,i,a=0,l=e.length,u=t%d,h=t/d|0;for(e=e.slice();l--;)a=((s=u*(o=e[l]%d)+(n=h*o+(i=e[l]/d|0)*u)%d*d+a)/r|0)+(n/d|0)+h*i,e[l]=s%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var s,o;if(r!=n)o=n<r?1:-1;else for(s=o=0;s<r;s++)if(e[s]!=t[s]){o=e[s]>t[s]?1:-1;break}return o}function r(e,t,r,n){for(var s=0;r--;)e[r]-=s,s=e[r]<t[r]?1:0,e[r]=s*n+e[r]-t[r];for(;!e[0]&&1<e.length;e.splice(0,1));}return function(n,s,i,a,h){var c,d,f,g,m,E,y,w,C,v,R,S,T,N,O,M,_,A=n.s==s.s?1:-1,b=n.c,I=s.c;if(!(b&&b[0]&&I&&I[0]))return new Y(n.s&&s.s&&(b?!I||b[0]!=I[0]:I)?b&&0==b[0]||!I?0*A:A/0:NaN);for(C=(w=new Y(A)).c=[],A=i+(d=n.e-s.e)+1,h||(h=l,d=p(n.e/u)-p(s.e/u),A=A/u|0),f=0;I[f]==(b[f]||0);f++);if(I[f]>(b[f]||0)&&d--,A<0)C.push(1),g=!0;else{for(N=b.length,M=I.length,A+=2,1<(m=o(h/(I[f=0]+1)))&&(I=e(I,m,h),b=e(b,m,h),M=I.length,N=b.length),T=M,R=(v=b.slice(0,M)).length;R<M;v[R++]=0);_=I.slice(),_=[0].concat(_),O=I[0],I[1]>=h/2&&O++;do{if(m=0,(c=t(I,v,M,R))<0){if(S=v[0],M!=R&&(S=S*h+(v[1]||0)),1<(m=o(S/O)))for(h<=m&&(m=h-1),y=(E=e(I,m,h)).length,R=v.length;1==t(E,v,y,R);)m--,r(E,M<y?_:I,y,h),y=E.length,c=1;else 0==m&&(c=m=1),y=(E=I.slice()).length;if(y<R&&(E=[0].concat(E)),r(v,E,R,h),R=v.length,-1==c)for(;t(I,v,M,R)<1;)m++,r(v,M<R?_:I,R,h),R=v.length}else 0===c&&(m++,v=[0]);C[f++]=m,v[0]?v[R++]=b[T]||0:(v=[b[T]],R=1)}while((T++<N||null!=v[0])&&A--);g=null!=v[0],C[0]||C.splice(0,1)}if(h==l){for(f=1,A=C[0];10<=A;A/=10,f++);$(w,i+(w.e=f+d*u-1)+1,a,g)}else w.e=d,w.r=+g;return w}}(),N=/^(-?)0([xbo])(?=\w[\w.]*$)/i,O=/^([^.]+)\.$/,M=/^\.([^.]+)$/,_=/^-?(Infinity|NaN)$/,A=/^\s*\+(?=[\w.])|^\s+|\s+$/g,R=function(e,t,r,n){var s,o=r?t:t.replace(A,"");if(_.test(o))e.s=isNaN(o)?null:o<0?-1:1,e.c=e.e=null;else{if(!r&&(o=o.replace(N,(function(e,t,r){return s="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=s?e:t})),n&&(s=n,o=o.replace(O,"$1").replace(M,"0.$1")),t!=o))return new Y(o,s);if(Y.DEBUG)throw Error(i+"Not a"+(n?" base "+n:"")+" number: "+t);e.c=e.e=e.s=null}},b.absoluteValue=b.abs=function(){var e=new Y(this);return e.s<0&&(e.s=1),e},b.comparedTo=function(e,t){return m(this,new Y(e,t))},b.decimalPlaces=b.dp=function(e,t){var r,n,s;if(null!=e)return E(e,0,f),null==t?t=L:E(t,0,8),$(new Y(this),e+this.e+1,t);if(!(r=this.c))return null;if(n=((s=r.length-1)-p(this.e/u))*u,s=r[s])for(;s%10==0;s/=10,n--);return n<0&&(n=0),n},b.dividedBy=b.div=function(e,t){return r(this,new Y(e,t),x,L)},b.dividedToIntegerBy=b.idiv=function(e,t){return r(this,new Y(e,t),0,1)},b.exponentiatedBy=b.pow=function(e,t){var r,n,a,l,h,c,d,f,p=this;if((e=new Y(e)).c&&!e.isInteger())throw Error(i+"Exponent not an integer: "+K(e));if(null!=t&&(t=new Y(t)),h=14<e.e,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return f=new Y(Math.pow(+K(p),h?2-y(e):+K(e))),t?f.mod(t):f;if(c=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new Y(NaN);(n=!c&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(9<e.e&&(0<p.e||p.e<-1||(0==p.e?1<p.c[0]||h&&24e7<=p.c[1]:p.c[0]<8e13||h&&p.c[0]<=9999975e7)))return l=p.s<0&&y(e)?-0:0,-1<p.e&&(l=1/l),new Y(c?1/l:l);V&&(l=s(V/u+2))}for(d=h?(r=new Y(.5),c&&(e.s=1),y(e)):(a=Math.abs(+K(e)))%2,f=new Y(I);;){if(d){if(!(f=f.times(p)).c)break;l?f.c.length>l&&(f.c.length=l):n&&(f=f.mod(t))}if(a){if(0===(a=o(a/2)))break;d=a%2}else if($(e=e.times(r),e.e+1,1),14<e.e)d=y(e);else{if(0==(a=+K(e)))break;d=a%2}p=p.times(p),l?p.c&&p.c.length>l&&(p.c.length=l):n&&(p=p.mod(t))}return n?f:(c&&(f=I.div(f)),t?f.mod(t):l?$(f,V,L,void 0):f)},b.integerValue=function(e){var t=new Y(this);return null==e?e=L:E(e,0,8),$(t,t.e+1,e)},b.isEqualTo=b.eq=function(e,t){return 0===m(this,new Y(e,t))},b.isFinite=function(){return!!this.c},b.isGreaterThan=b.gt=function(e,t){return 0<m(this,new Y(e,t))},b.isGreaterThanOrEqualTo=b.gte=function(e,t){return 1===(t=m(this,new Y(e,t)))||0===t},b.isInteger=function(){return!!this.c&&p(this.e/u)>this.c.length-2},b.isLessThan=b.lt=function(e,t){return m(this,new Y(e,t))<0},b.isLessThanOrEqualTo=b.lte=function(e,t){return-1===(t=m(this,new Y(e,t)))||0===t},b.isNaN=function(){return!this.s},b.isNegative=function(){return this.s<0},b.isPositive=function(){return 0<this.s},b.isZero=function(){return!!this.c&&0==this.c[0]},b.minus=function(e,t){var r,n,s,o,i=this,a=i.s;if(t=(e=new Y(e,t)).s,!a||!t)return new Y(NaN);if(a!=t)return e.s=-t,i.plus(e);var h=i.e/u,c=e.e/u,d=i.c,f=e.c;if(!h||!c){if(!d||!f)return d?(e.s=-t,e):new Y(f?i:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new Y(d[0]?i:3==L?-0:0)}if(h=p(h),c=p(c),d=d.slice(),a=h-c){for((s=(o=a<0)?(a=-a,d):(c=h,f)).reverse(),t=a;t--;s.push(0));s.reverse()}else for(n=(o=(a=d.length)<(t=f.length))?a:t,a=t=0;t<n;t++)if(d[t]!=f[t]){o=d[t]<f[t];break}if(o&&(s=d,d=f,f=s,e.s=-e.s),0<(t=(n=f.length)-(r=d.length)))for(;t--;d[r++]=0);for(t=l-1;a<n;){if(d[--n]<f[n]){for(r=n;r&&!d[--r];d[r]=t);--d[r],d[n]+=l}d[n]-=f[n]}for(;0==d[0];d.splice(0,1),--c);return d[0]?z(e,d,c):(e.s=3==L?-1:1,e.c=[e.e=0],e)},b.modulo=b.mod=function(e,t){var n,s,o=this;return e=new Y(e,t),!o.c||!e.s||e.c&&!e.c[0]?new Y(NaN):!e.c||o.c&&!o.c[0]?new Y(o):(9==U?(s=e.s,e.s=1,n=r(o,e,0,3),e.s=s,n.s*=s):n=r(o,e,0,U),(e=o.minus(n.times(e))).c[0]||1!=U||(e.s=o.s),e)},b.multipliedBy=b.times=function(e,t){var r,n,s,o,i,a,h,c,f,g,m,E,y,w,C,v=this,R=v.c,S=(e=new Y(e,t)).c;if(!(R&&S&&R[0]&&S[0]))return!v.s||!e.s||R&&!R[0]&&!S||S&&!S[0]&&!R?e.c=e.e=e.s=null:(e.s*=v.s,R&&S?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=p(v.e/u)+p(e.e/u),e.s*=v.s,(h=R.length)<(g=S.length)&&(y=R,R=S,S=y,s=h,h=g,g=s),s=h+g,y=[];s--;y.push(0));for(w=l,C=d,s=g;0<=--s;){for(r=0,m=S[s]%C,E=S[s]/C|0,o=s+(i=h);s<o;)r=((c=m*(c=R[--i]%C)+(a=E*c+(f=R[i]/C|0)*m)%C*C+y[o]+r)/w|0)+(a/C|0)+E*f,y[o--]=c%w;y[o]=r}return r?++n:y.splice(0,1),z(e,y,n)},b.negated=function(){var e=new Y(this);return e.s=-e.s||null,e},b.plus=function(e,t){var r,n=this,s=n.s;if(t=(e=new Y(e,t)).s,!s||!t)return new Y(NaN);if(s!=t)return e.s=-t,n.minus(e);var o=n.e/u,i=e.e/u,a=n.c,h=e.c;if(!o||!i){if(!a||!h)return new Y(s/0);if(!a[0]||!h[0])return h[0]?e:new Y(a[0]?n:0*s)}if(o=p(o),i=p(i),a=a.slice(),s=o-i){for((r=0<s?(i=o,h):(s=-s,a)).reverse();s--;r.push(0));r.reverse()}for((s=a.length)-(t=h.length)<0&&(r=h,h=a,a=r,t=s),s=0;t;)s=(a[--t]=a[t]+h[t]+s)/l|0,a[t]=l===a[t]?0:a[t]%l;return s&&(a=[s].concat(a),++i),z(e,a,i)},b.precision=b.sd=function(e,t){var r,n,s;if(null!=e&&e!==!!e)return E(e,1,f),null==t?t=L:E(t,0,8),$(new Y(this),e,t);if(!(r=this.c))return null;if(n=(s=r.length-1)*u+1,s=r[s]){for(;s%10==0;s/=10,n--);for(s=r[0];10<=s;s/=10,n++);}return e&&this.e+1>n&&(n=this.e+1),n},b.shiftedBy=function(e){return E(e,-h,h),this.times("1e"+e)},b.squareRoot=b.sqrt=function(){var e,t,n,s,o,i=this,a=i.c,l=i.s,u=i.e,h=x+4,c=new Y("0.5");if(1!==l||!a||!a[0])return new Y(!l||l<0&&(!a||a[0])?NaN:a?i:1/0);if((n=0==(l=Math.sqrt(+K(i)))||l==1/0?(((t=g(a)).length+u)%2==0&&(t+="0"),l=Math.sqrt(+t),u=p((u+1)/2)-(u<0||u%2),new Y(t=l==1/0?"1e"+u:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+u)):new Y(l+"")).c[0])for((l=(u=n.e)+h)<3&&(l=0);;)if(o=n,n=c.times(o.plus(r(i,o,h,1))),g(o.c).slice(0,l)===(t=g(n.c)).slice(0,l)){if(n.e<u&&--l,"9999"!=(t=t.slice(l-3,l+1))&&(s||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||($(n,n.e+x+2,1),e=!n.times(n).eq(i));break}if(!s&&($(o,o.e+x+2,0),o.times(o).eq(i))){n=o;break}h+=4,l+=4,s=1}return $(n,n.e+x+1,L,e)},b.toExponential=function(e,t){return null!=e&&(E(e,0,f),e++),G(this,e,t,1)},b.toFixed=function(e,t){return null!=e&&(E(e,0,f),e=e+this.e+1),G(this,e,t)},b.toFormat=function(e,t,r){var n;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=B;else if("object"!=typeof r)throw Error(i+"Argument not an object: "+r);if(n=this.toFixed(e,t),this.c){var s,o=n.split("."),a=+r.groupSize,l=+r.secondaryGroupSize,u=r.groupSeparator||"",h=o[0],c=o[1],d=this.s<0,f=d?h.slice(1):h,p=f.length;if(l&&(s=a,a=l,p-=l=s),0<a&&0<p){for(s=p%a||a,h=f.substr(0,s);s<p;s+=a)h+=u+f.substr(s,a);0<l&&(h+=u+f.slice(s)),d&&(h="-"+h)}n=c?h+(r.decimalSeparator||"")+((l=+r.fractionGroupSize)?c.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):c):h}return(r.prefix||"")+n+(r.suffix||"")},b.toFraction=function(e){var t,n,s,o,a,l,h,d,f,p,m,E,y=this,w=y.c;if(null!=e&&(!(h=new Y(e)).isInteger()&&(h.c||1!==h.s)||h.lt(I)))throw Error(i+"Argument "+(h.isInteger()?"out of range: ":"not an integer: ")+K(h));if(!w)return new Y(y);for(t=new Y(I),f=n=new Y(I),s=d=new Y(I),E=g(w),a=t.e=E.length-y.e-1,t.c[0]=c[(l=a%u)<0?u+l:l],e=!e||0<h.comparedTo(t)?0<a?t:f:h,l=H,H=1/0,h=new Y(E),d.c[0]=0;p=r(h,t,0,1),1!=(o=n.plus(p.times(s))).comparedTo(e);)n=s,s=o,f=d.plus(p.times(o=f)),d=o,t=h.minus(p.times(o=t)),h=o;return o=r(e.minus(n),s,0,1),d=d.plus(o.times(f)),n=n.plus(o.times(s)),d.s=f.s=y.s,m=r(f,s,a*=2,L).minus(y).abs().comparedTo(r(d,n,a,L).minus(y).abs())<1?[f,s]:[d,n],H=l,m},b.toNumber=function(){return+K(this)},b.toPrecision=function(e,t){return null!=e&&E(e,1,f),G(this,e,t,2)},b.toString=function(e){var t,r=this,n=r.s,s=r.e;return null===s?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=null==e?s<=P||D<=s?w(g(r.c),s):C(g(r.c),s,"0"):10===e?C(g((r=$(new Y(r),x+s+1,L)).c),r.e,"0"):(E(e,2,W.length,"Base"),v(C(g(r.c),s,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},b.valueOf=b.toJSON=function(){return K(this)},b._isBigNumber=!0,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(b[Symbol.toStringTag]="BigNumber",b[Symbol.for("nodejs.util.inspect.custom")]=b.valueOf),null!=t&&Y.set(t),Y}()).default=r.BigNumber=r,void 0!==t&&t.exports?t.exports=r:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=r)}(this)},{}],2:[function(e,t,r){"use strict";t.exports={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}},{}],3:[function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,s=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){s=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(s)throw o}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var s=e("./globalState"),o=e("./validating"),i=e("./parsing"),a=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],l={general:{scale:1024,suffixes:a,marker:"bd"},binary:{scale:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],marker:"b"},decimal:{scale:1e3,suffixes:a,marker:"d"}},u={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1};function h(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=2<arguments.length?arguments[2]:void 0;if("string"==typeof t&&(t=i.parseFormat(t)),!o.validateFormat(t))return"ERROR: invalid format";var n=t.prefix||"",a=t.postfix||"",h=function(e,t,r){switch(t.output){case"currency":return function(e,t,r){var n=r.currentCurrency(),s=Object.assign({},u,t),o=void 0,i="",a=!!s.totalLength||!!s.forceAverage||s.average,l=t.currencyPosition||n.position,h=t.currencySymbol||n.symbol;s.spaceSeparated&&(i=" "),"infix"===l&&(o=i+h+i);var c=p({instance:e,providedFormat:t,state:r,decimalSeparator:o});return"prefix"===l&&(c=e._value<0&&"sign"===s.negative?"-".concat(i).concat(h).concat(c.slice(1)):h+i+c),l&&"postfix"!==l||(c=c+(i=a?"":i)+h),c}(e,t=g(t,s.currentCurrencyDefaultFormat()),s);case"percent":return function(e,t,r,n){var s=t.prefixSymbol,o=p({instance:n(100*e._value),providedFormat:t,state:r}),i=Object.assign({},u,t);return s?"%".concat(i.spaceSeparated?" ":"").concat(o):"".concat(o).concat(i.spaceSeparated?" ":"","%")}(e,t=g(t,s.currentPercentageDefaultFormat()),s,r);case"byte":return t=g(t,s.currentByteDefaultFormat()),C=e,R=s,S=r,T=(v=t).base||"binary",N=l[T],M=(O=c(C._value,N.suffixes,N.scale)).value,_=O.suffix,A=p({instance:S(M),providedFormat:v,state:R,defaults:R.currentByteDefaultFormat()}),b=R.currentAbbreviations(),"".concat(A).concat(b.spaced?" ":"").concat(_);case"time":return t=g(t,s.currentTimeDefaultFormat()),m=e,E=Math.floor(m._value/60/60),y=Math.floor((m._value-60*E*60)/60),w=Math.round(m._value-60*E*60-60*y),"".concat(E,":").concat(y<10?"0":"").concat(y,":").concat(w<10?"0":"").concat(w);case"ordinal":return n=e,o=t=g(t,s.currentOrdinalDefaultFormat()),a=(i=s).currentOrdinal(),h=Object.assign({},u,o),d=p({instance:n,providedFormat:o,state:i}),f=a(n._value),"".concat(d).concat(h.spaceSeparated?" ":"").concat(f);default:return p({instance:e,providedFormat:t,numbro:r})}var n,o,i,a,h,d,f,m,E,y,w,C,v,R,S,T,N,O,M,_,A,b}(e,t,r);return(h=n+h)+a}function c(e,t,r){var n=t[0],s=Math.abs(e);if(r<=s){for(var o=1;o<t.length;++o){var i=Math.pow(r,o),a=Math.pow(r,o+1);if(i<=s&&s<a){n=t[o],e/=i;break}}n===t[0]&&(e/=Math.pow(r,t.length-1),n=t[t.length-1])}return{value:e,suffix:n}}function d(e){for(var t="",r=0;r<e;r++)t+="0";return t}function f(e,t){return-1!==e.toString().indexOf("e")?function(e,t){var r=e.toString(),s=n(r.split("e"),2),o=s[0],i=s[1],a=n(o.split("."),2),l=a[0],u=a[1],h=void 0===u?"":u;if(0<+i)r=l+h+d(i-h.length);else{var c=".";c=+l<0?"-0".concat(c):"0".concat(c);var f=(d(-i-1)+Math.abs(l)+h).substr(0,t);f.length<t&&(f+=d(t-f.length)),r=c+f}return 0<+i&&0<t&&(r+=".".concat(d(t))),r}(e,t):(Math.round(+"".concat(e,"e+").concat(t))/Math.pow(10,t)).toFixed(t)}function p(e){var t=e.instance,r=e.providedFormat,o=e.state,i=void 0===o?s:o,a=e.decimalSeparator,l=e.defaults,h=void 0===l?i.currentDefaults():l,c=t._value;if(0===c&&i.hasZeroFormat())return i.getZeroFormat();if(!isFinite(c))return c.toString();var d,p,g,m,E,y,w,C,v=Object.assign({},u,h,r),R=v.totalLength,S=R?0:v.characteristic,T=v.optionalCharacteristic,N=v.forceAverage,O=!!R||!!N||v.average,M=R?-1:O&&void 0===r.mantissa?0:v.mantissa,_=!R&&(void 0===r.optionalMantissa?-1===M:v.optionalMantissa),A=v.trimMantissa,b=v.thousandSeparated,I=v.spaceSeparated,x=v.negative,L=v.forceSign,P=v.exponential,D="";if(O){var k=function(e){var t=e.value,r=e.forceAverage,n=e.abbreviations,s=e.spaceSeparated,o=void 0!==s&&s,i=e.totalLength,a=void 0===i?0:i,l="",u=Math.abs(t),h=-1;if(u>=Math.pow(10,12)&&!r||"trillion"===r?(l=n.trillion,t/=Math.pow(10,12)):u<Math.pow(10,12)&&u>=Math.pow(10,9)&&!r||"billion"===r?(l=n.billion,t/=Math.pow(10,9)):u<Math.pow(10,9)&&u>=Math.pow(10,6)&&!r||"million"===r?(l=n.million,t/=Math.pow(10,6)):(u<Math.pow(10,6)&&u>=Math.pow(10,3)&&!r||"thousand"===r)&&(l=n.thousand,t/=Math.pow(10,3)),l&&(l=(o?" ":"")+l),a){var c=t.toString().split(".")[0];h=Math.max(a-c.length,0)}return{value:t,abbreviation:l,mantissaPrecision:h}}({value:c,forceAverage:N,abbreviations:i.currentAbbreviations(),spaceSeparated:I,totalLength:R});c=k.value,D+=k.abbreviation,R&&(M=k.mantissaPrecision)}if(P){var H=(p=(d={value:c,characteristicPrecision:S}).value,m=void 0===(g=d.characteristicPrecision)?0:g,y=(E=n(p.toExponential().split("e"),2))[0],w=E[1],C=+y,m&&1<m&&(C*=Math.pow(10,m-1),w=0<=(w=+w-(m-1))?"+".concat(w):w),{value:C,abbreviation:"e".concat(w)});c=H.value,D=H.abbreviation+D}var F,U,V,B=function(e,t,r,s,o){if(-1===s)return e;var i=f(t,s),a=n(i.toString().split("."),2),l=a[0],u=a[1],h=void 0===u?"":u;if(h.match(/^0+$/)&&(r||o))return l;var c=h.match(/0+$/);return o&&c?"".concat(l,".").concat(h.toString().slice(0,c.index)):i.toString()}(c.toString(),c,_,M,A);return B=function(e,t,r,n,s){var o=n.currentDelimiters(),i=o.thousands;s=s||o.decimal;var a=o.thousandsSize||3,l=e.toString(),u=l.split(".")[0],h=l.split(".")[1];return r&&(t<0&&(u=u.slice(1)),function(e,t){for(var r=[],n=0,s=e;0<s;s--)n===t&&(r.unshift(s),n=0),n++;return r}(u.length,a).forEach((function(e,t){u=u.slice(0,e+t)+i+u.slice(e+t)})),t<0&&(u="-".concat(u))),h?u+s+h:u}(B=function(e,t,r,s){var o=e,i=n(o.toString().split("."),2),a=i[0],l=i[1];if(a.match(/^-?0$/)&&r)return l?"".concat(a.replace("0",""),".").concat(l):a.replace("0","");if(a.length<s)for(var u=s-a.length,h=0;h<u;h++)o="0".concat(o);return o.toString()}(B,0,T,S),c,b,i,a),(O||P)&&(B+=D),(L||c<0)&&(F=B,V=x,B=0===(U=c)?F:0==+F?F.replace("-",""):0<U?"+".concat(F):"sign"===V?F:"(".concat(F.replace("-",""),")")),B}function g(e,t){if(!e)return t;var r=Object.keys(e);return 1===r.length&&"output"===r[0]?t:e}t.exports=function(e){return{format:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h.apply(void 0,r.concat([e]))},getByteUnit:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(e){var t=l.general;return c(e._value,t.suffixes,t.scale).suffix}.apply(void 0,r.concat([e]))},getBinaryByteUnit:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(e){var t=l.binary;return c(e._value,t.suffixes,t.scale).suffix}.apply(void 0,r.concat([e]))},getDecimalByteUnit:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(e){var t=l.decimal;return c(e._value,t.suffixes,t.scale).suffix}.apply(void 0,r.concat([e]))},formatOrDefault:g}}},{"./globalState":4,"./parsing":8,"./validating":10}],4:[function(e,t,r){"use strict";var n=e("./en-US"),s=e("./validating"),o=e("./parsing"),i={},a=void 0,l={},u=null,h={};function c(e){a=e}function d(){return l[a]}i.languages=function(){return Object.assign({},l)},i.currentLanguage=function(){return a},i.currentCurrency=function(){return d().currency},i.currentAbbreviations=function(){return d().abbreviations},i.currentDelimiters=function(){return d().delimiters},i.currentOrdinal=function(){return d().ordinal},i.currentDefaults=function(){return Object.assign({},d().defaults,h)},i.currentOrdinalDefaultFormat=function(){return Object.assign({},i.currentDefaults(),d().ordinalFormat)},i.currentByteDefaultFormat=function(){return Object.assign({},i.currentDefaults(),d().byteFormat)},i.currentPercentageDefaultFormat=function(){return Object.assign({},i.currentDefaults(),d().percentageFormat)},i.currentCurrencyDefaultFormat=function(){return Object.assign({},i.currentDefaults(),d().currencyFormat)},i.currentTimeDefaultFormat=function(){return Object.assign({},i.currentDefaults(),d().timeFormat)},i.setDefaults=function(e){e=o.parseFormat(e),s.validateFormat(e)&&(h=e)},i.getZeroFormat=function(){return u},i.setZeroFormat=function(e){return u="string"==typeof e?e:null},i.hasZeroFormat=function(){return null!==u},i.languageData=function(e){if(e){if(l[e])return l[e];throw new Error('Unknown tag "'.concat(e,'"'))}return d()},i.registerLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!s.validateLanguage(e))throw new Error("Invalid language data");l[e.languageTag]=e,t&&c(e.languageTag)},i.setLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:n.languageTag;if(!l[e]){var r=e.split("-")[0],s=Object.keys(l).find((function(e){return e.split("-")[0]===r}));return l[s]?void c(s):void c(t)}c(e)},i.registerLanguage(n),a=n.languageTag,t.exports=i},{"./en-US":2,"./parsing":8,"./validating":10}],5:[function(e,t,r){"use strict";t.exports=function(t){return{loadLanguagesInNode:function(r){return n=t,void r.forEach((function(t){var r=void 0;try{r=e("../languages/".concat(t))}catch(r){console.error('Unable to load "'.concat(t,'". No matching language file found.'))}r&&n.registerLanguage(r)}));var n}}}},{}],6:[function(e,t,r){"use strict";var n=e("bignumber.js");function s(e,t,r){var s=new n(e._value),o=t;return r.isNumbro(t)&&(o=t._value),o=new n(o),e._value=s.minus(o).toNumber(),e}t.exports=function(e){return{add:function(t,r){return o=r,i=e,a=new n((s=t)._value),l=o,i.isNumbro(o)&&(l=o._value),l=new n(l),s._value=a.plus(l).toNumber(),s;var s,o,i,a,l},subtract:function(t,r){return s(t,r,e)},multiply:function(t,r){return o=r,i=e,a=new n((s=t)._value),l=o,i.isNumbro(o)&&(l=o._value),l=new n(l),s._value=a.times(l).toNumber(),s;var s,o,i,a,l},divide:function(t,r){return o=r,i=e,a=new n((s=t)._value),l=o,i.isNumbro(o)&&(l=o._value),l=new n(l),s._value=a.dividedBy(l).toNumber(),s;var s,o,i,a,l},set:function(t,r){return n=t,o=s=r,e.isNumbro(s)&&(o=s._value),n._value=o,n;var n,s,o},difference:function(t,r){return n=r,s(i=(o=e)(t._value),n,o),Math.abs(i._value);var n,o,i}}}},{"bignumber.js":1}],7:[function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=e("./globalState"),o=e("./validating"),i=e("./loading")(f),a=e("./unformatting"),l=e("./formatting")(f),u=e("./manipulating")(f),h=e("./parsing"),c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._value=t}var t,r,o;return t=e,(r=[{key:"clone",value:function(){return f(this._value)}},{key:"format",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return l.format(this,e)}},{key:"formatCurrency",value:function(e){return"string"==typeof e&&(e=h.parseFormat(e)),(e=l.formatOrDefault(e,s.currentCurrencyDefaultFormat())).output="currency",l.format(this,e)}},{key:"formatTime",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return e.output="time",l.format(this,e)}},{key:"binaryByteUnits",value:function(){return l.getBinaryByteUnit(this)}},{key:"decimalByteUnits",value:function(){return l.getDecimalByteUnit(this)}},{key:"byteUnits",value:function(){return l.getByteUnit(this)}},{key:"difference",value:function(e){return u.difference(this,e)}},{key:"add",value:function(e){return u.add(this,e)}},{key:"subtract",value:function(e){return u.subtract(this,e)}},{key:"multiply",value:function(e){return u.multiply(this,e)}},{key:"divide",value:function(e){return u.divide(this,e)}},{key:"set",value:function(e){return u.set(this,d(e))}},{key:"value",value:function(){return this._value}},{key:"valueOf",value:function(){return this._value}}])&&n(t.prototype,r),o&&n(t,o),e}();function d(e){var t=e;return f.isNumbro(e)?t=e._value:"string"==typeof e?t=f.unformat(e):isNaN(e)&&(t=NaN),t}function f(e){return new c(d(e))}f.version="2.1.2",f.isNumbro=function(e){return e instanceof c},f.language=s.currentLanguage,f.registerLanguage=s.registerLanguage,f.setLanguage=s.setLanguage,f.languages=s.languages,f.languageData=s.languageData,f.zeroFormat=s.setZeroFormat,f.defaultFormat=s.currentDefaults,f.setDefaults=s.setDefaults,f.defaultCurrencyFormat=s.currentCurrencyDefaultFormat,f.validate=o.validate,f.loadLanguagesInNode=i.loadLanguagesInNode,f.unformat=a.unformat,t.exports=f},{"./formatting":3,"./globalState":4,"./loading":5,"./manipulating":6,"./parsing":8,"./unformatting":9,"./validating":10}],8:[function(e,t,r){"use strict";t.exports={parseFormat:function(e){var t,r,n,s,o,i,a,l,u,h,c,d,f,p,g,m,E,y,w,C,v=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(r=v,o=v,function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",t.base="general"):-1!==e.indexOf("b")?(t.output="byte",t.base="binary"):-1!==e.indexOf("d")?(t.output="byte",t.base="decimal"):-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time";t.output="percent"}else t.output="currency"}(e=(i=(s=e=(n=(t=e).match(/^{([^}]*)}/))?(r.prefix=n[1],t.slice(n[0].length)):t).match(/{([^}]*)}$/))?(o.postfix=i[1],s.slice(0,-i[0].length)):s,v),a=v,(l=e.match(/[1-9]+[0-9]*/))&&(a.totalLength=+l[0]),u=v,(h=e.split(".")[0].match(/0+/))&&(u.characteristic=h[0].length),function(e,t){if(-1!==e.indexOf(".")){var r=e.split(".")[0];t.optionalCharacteristic=-1===r.indexOf("0")}}(e,v),c=v,-1!==e.indexOf("a")&&(c.average=!0),f=v,-1!==(d=e).indexOf("K")?f.forceAverage="thousand":-1!==d.indexOf("M")?f.forceAverage="million":-1!==d.indexOf("B")?f.forceAverage="billion":-1!==d.indexOf("T")&&(f.forceAverage="trillion"),function(e,t){var r=e.split(".")[1];if(r){var n=r.match(/0+/);n&&(t.mantissa=n[0].length)}}(e,v),g=v,(p=e).match(/\[\.]/)?g.optionalMantissa=!0:p.match(/\./)&&(g.optionalMantissa=!1),m=v,-1!==e.indexOf(",")&&(m.thousandSeparated=!0),E=v,-1!==e.indexOf(" ")&&(E.spaceSeparated=!0),w=v,(y=e).match(/^\+?\([^)]*\)$/)&&(w.negative="parenthesis"),y.match(/^\+?-/)&&(w.negative="sign"),C=v,e.match(/^\+/)&&(C.forceSign=!0),v)}}},{}],9:[function(e,t,r){"use strict";var n=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function s(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function o(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",o=3<arguments.length?arguments[3]:void 0,i=4<arguments.length?arguments[4]:void 0,a=5<arguments.length?arguments[5]:void 0,l=6<arguments.length?arguments[6]:void 0;if(""!==e)return e===i?0:function e(t,r){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",i=3<arguments.length?arguments[3]:void 0,a=4<arguments.length?arguments[4]:void 0,l=5<arguments.length?arguments[5]:void 0,u=6<arguments.length?arguments[6]:void 0;if(!isNaN(+t))return+t;var h="",c=t.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(c!==t)return-1*e(c,r,o,i,a,l,u);for(var d=0;d<n.length;d++){var f=n[d];if((h=t.replace(f.key,""))!==t)return e(h,r,o,i,a,l,u)*f.factor}if((h=t.replace("%",""))!==t)return e(h,r,o,i,a,l,u)/100;var p=parseFloat(t);if(!isNaN(p)){var g=i(p);if(g&&"."!==g&&(h=t.replace(new RegExp("".concat(s(g),"$")),""))!==t)return e(h,r,o,i,a,l,u);var m={};Object.keys(l).forEach((function(e){m[l[e]]=e}));for(var E=Object.keys(m).sort().reverse(),y=E.length,w=0;w<y;w++){var C=E[w],v=m[C];if((h=t.replace(C,""))!==t){var R=void 0;switch(v){case"thousand":R=Math.pow(10,3);break;case"million":R=Math.pow(10,6);break;case"billion":R=Math.pow(10,9);break;case"trillion":R=Math.pow(10,12)}return e(h,r,o,i,a,l,u)*R}}}}(function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",n=e.replace(r,"");return(n=n.replace(new RegExp("([0-9])".concat(s(t.thousands),"([0-9])"),"g"),"$1$2")).replace(t.decimal,".")}(e,t,r),t,r,o,i,a,l)}t.exports={unformat:function(t,r){var n,s,i,a=e("./globalState"),l=a.currentDelimiters(),u=a.currentCurrency().symbol,h=a.currentOrdinal(),c=a.getZeroFormat(),d=a.currentAbbreviations(),f=void 0;if("string"==typeof t)f=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;var r=e.split(":");if(3!==r.length)return!1;var n=+r[0],s=+r[1],o=+r[2];return!isNaN(n)&&!isNaN(s)&&!isNaN(o)}(t,l)?(s=+(n=t.split(":"))[0],i=+n[1],+n[2]+60*i+3600*s):o(t,l,u,h,c,d,r);else{if("number"!=typeof t)return;f=t}if(void 0!==f)return f}}},{"./globalState":4}],10:[function(e,t,r){"use strict";function n(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=e("./unformatting"),i=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,a={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:function(e,t){return"byte"===t.output},message:"`base` must be provided only when the output is `byte`",mandatory:function(e){return"byte"===e.output}},characteristic:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:function(e){return 0<=e},message:"value must be positive"},{restriction:function(e,t){return!t.exponential},message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:function(e,t){return"percent"===t.output},message:"`prefixSymbol` can be provided only when the output is `percent`"}},l={languageTag:{type:"string",mandatory:!0,restriction:function(e){return e.match(i)},message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",ordinal:{type:"function",mandatory:!0},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function u(e){return!!o.unformat(e)}function h(e,t,r){var o=3<arguments.length&&void 0!==arguments[3]&&arguments[3],i=Object.keys(e).map((function(n){if(!t[n])return console.error("".concat(r," Invalid key: ").concat(n)),!1;var o=e[n],i=t[n];if("string"==typeof i&&(i={type:i}),"format"===i.type){if(!h(o,a,"[Validate ".concat(n,"]"),!0))return!1}else if(s(o)!==i.type)return console.error("".concat(r," ").concat(n,' type mismatched: "').concat(i.type,'" expected, "').concat(s(o),'" provided')),!1;if(i.restrictions&&i.restrictions.length)for(var l=i.restrictions.length,u=0;u<l;u++){var c=i.restrictions[u],d=c.restriction,f=c.message;if(!d(o,e))return console.error("".concat(r," ").concat(n," invalid value: ").concat(f)),!1}return i.restriction&&!i.restriction(o,e)?(console.error("".concat(r," ").concat(n," invalid value: ").concat(i.message)),!1):i.validValues&&-1===i.validValues.indexOf(o)?(console.error("".concat(r," ").concat(n," invalid value: must be among ").concat(JSON.stringify(i.validValues),', "').concat(o,'" provided')),!1):!(i.children&&!h(o,i.children,"[Validate ".concat(n,"]")))}));return o||i.push.apply(i,n(Object.keys(t).map((function(n){var s=t[n];if("string"==typeof s&&(s={type:s}),s.mandatory){var o=s.mandatory;if("function"==typeof o&&(o=o(e)),o&&void 0===e[n])return console.error("".concat(r,' Missing mandatory key "').concat(n,'"')),!1}return!0})))),i.reduce((function(e,t){return e&&t}),!0)}function c(e){return h(e,a,"[Validate format]")}t.exports={validate:function(e,t){var r=u(e),n=c(t);return r&&n},validateFormat:c,validateInput:u,validateLanguage:function(e){return h(e,l,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7),window.numbro=r(75586)},21250:(e,t)=>{"use strict";t.__esModule=!0,t.parse=function(e){const t=[[""]];if(0===e.length)return t;let o,i=0,a=0;for(;e.length>0&&o!==e.length;)if(o=e.length,e.match(s))e=e.replace(s,""),i+=1,t[a][i]="";else if(e.match(r))e=e.replace(r,""),i=0,a+=1,t[a]=[""];else{let r="";if(e.startsWith('"')){let t=0,n=!0;for(;n;){const s=e.slice(0,1);'"'===s&&(t+=1),r+=s,(0===(e=e.slice(1)).length||e.match(/^[\t\r\n]/)&&t%2==0)&&(n=!1)}r=r.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,(e=>new Array(Math.floor(e.length/2)).fill('"').join("")))}else{const t=e.match(n);r=t?t[0]:"",e=e.slice(r.length)}t[a][i]=r}return t},t.stringify=function(e){let t,r,n,s,o,i="";for(t=0,r=e.length;t<r;t+=1){for(s=e[t].length,n=0;n<s;n+=1)n>0&&(i+="\t"),o=e[t][n],"string"==typeof o?o.indexOf("\n")>-1?i+=`"${o.replace(/"/g,'""')}"`:i+=o:i+=null==o?"":o;t!==r-1&&(i+="\n")}return i};const r=/^(\r\n|\n\r|\r|\n)/,n=/^[^\t\r\n]+/,s=/^\t/},32313:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(21250);t.parse=n.parse,t.stringify=n.stringify},66175:(e,t)=>{"use strict";t.__esModule=!0,t.autoResize=function(){var e,t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},r=document.body,n=document.createTextNode(""),s=document.createElement("SPAN"),o=function(e,t,r){e.addEventListener(t,r,!1)},i=function(e,t,r){e.removeEventListener(t,r,!1)},a=function(o){var i,a;o?/^[a-zA-Z \.,\\\/\|0-9]$/.test(o)||(o="."):o="",void 0!==n.textContent?n.textContent=e.value+o:n.data=e.value+o,s.style.position="absolute",s.style.fontSize=h(e).fontSize,s.style.fontFamily=h(e).fontFamily,s.style.whiteSpace="pre",r.appendChild(s),i=s.clientWidth+2,r.removeChild(s),e.style.height=t.minHeight+"px",t.minWidth>i?e.style.width=t.minWidth+"px":i>t.maxWidth?e.style.width=t.maxWidth+"px":e.style.width=i+"px",a=e.scrollHeight?e.scrollHeight-1:0,t.minHeight>a?e.style.height=t.minHeight+"px":t.maxHeight<a?(e.style.height=t.maxHeight+"px",e.style.overflowY="visible"):e.style.height=a+"px"},l=function(){window.setTimeout(a,0)},u=function(r,i,u){e=r,function(r){if(r&&r.minHeight)if("inherit"==r.minHeight)t.minHeight=e.clientHeight;else{var o=parseInt(r.minHeight);isNaN(o)||(t.minHeight=o)}if(r&&r.maxHeight)if("inherit"==r.maxHeight)t.maxHeight=e.clientHeight;else{var i=parseInt(r.maxHeight);isNaN(i)||(t.maxHeight=i)}if(r&&r.minWidth)if("inherit"==r.minWidth)t.minWidth=e.clientWidth;else{var a=parseInt(r.minWidth);isNaN(a)||(t.minWidth=a)}if(r&&r.maxWidth)if("inherit"==r.maxWidth)t.maxWidth=e.clientWidth;else{var l=parseInt(r.maxWidth);isNaN(l)||(t.maxWidth=l)}s.firstChild||(s.className="autoResize",s.style.display="inline-block",s.appendChild(n))}(i),"TEXTAREA"==e.nodeName&&(e.style.resize="none",e.style.overflowY="",e.style.height=t.minHeight+"px",e.style.minWidth=t.minWidth+"px",e.style.maxWidth=t.maxWidth+"px",e.style.overflowY="hidden"),u&&(o(e,"change",a),o(e,"cut",l),o(e,"paste",l),o(e,"drop",l),o(e,"keydown",l),o(e,"focus",a),o(e,"compositionstart",l),o(e,"compositionupdate",l),o(e,"compositionend",l)),a()};function h(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}return{init:function(e,t,r){u(e,t,r)},unObserve:function(){i(e,"change",a),i(e,"cut",l),i(e,"paste",l),i(e,"drop",l),i(e,"keydown",l),i(e,"focus",a),i(e,"compositionstart",l),i(e,"compositionupdate",l),i(e,"compositionend",l)},resize:a}}},63031:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(66175);t.autoResize=n.autoResize},63080:(e,t)=>{"use strict";t.__esModule=!0;t.RENDER_TYPE=1;t.FULLY_VISIBLE_TYPE=2;t.PARTIALLY_VISIBLE_TYPE=3},10933:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s={ViewportColumnsCalculator:!0,ViewportRowsCalculator:!0},o=n(r(36840));t.ViewportColumnsCalculator=o.default;var i=n(r(80514));t.ViewportRowsCalculator=i.default;var a=r(63080);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}))},36840:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,r(95988),r(58259);var s=n(r(93231)),o=n(r(42538)),i=n(r(48427)),a=r(63080);function l(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var u=new WeakMap,h=new WeakMap;class c{static get DEFAULT_WIDTH(){return 50}constructor(e){(0,s.default)(this,"count",0),(0,s.default)(this,"startColumn",null),(0,s.default)(this,"endColumn",null),(0,s.default)(this,"startPosition",null),(0,s.default)(this,"isVisibleInTrimmingContainer",!1),(0,s.default)(this,"stretchAllRatio",0),(0,s.default)(this,"stretchLastWidth",0),l(this,u,{writable:!0,value:0}),(0,s.default)(this,"needVerifyLastColumnWidth",!0),(0,s.default)(this,"stretchAllColumnsWidth",[]),l(this,h,{writable:!0,value:void 0}),(0,i.default)(this,h,e),"function"!=typeof(0,o.default)(this,h).stretchingColumnWidthFn&&((0,o.default)(this,h).stretchingColumnWidthFn=e=>e),this.calculate()}calculate(){const{calculationType:e,overrideFn:t,scrollOffset:r,totalColumns:n,viewportWidth:s}=(0,o.default)(this,h),i=Math.max((0,o.default)(this,h).scrollOffset,0),l=i>0?s+1:s;let u=0,c=!0;const d=[];let f,p=0,g=0;for(let t=0;t<n;t++)if(f=this._getColumnWidth(t),u<=i&&e!==a.FULLY_VISIBLE_TYPE&&(this.startColumn=t,p=f),u>=i&&u+(e===a.FULLY_VISIBLE_TYPE?f:0)<=i+l&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=t,p=f),this.endColumn=t),d.push(u),u+=f,g=f,e!==a.FULLY_VISIBLE_TYPE&&(this.endColumn=t),u>=i+s){c=!1;break}const m=r+s-l,E=e===a.FULLY_VISIBLE_TYPE?0:g,y=e===a.FULLY_VISIBLE_TYPE?p:0;if(m<-1*(0,o.default)(this,h).inlineStartOffset||r>d.at(-1)+E||-1*(0,o.default)(this,h).scrollOffset-(0,o.default)(this,h).viewportWidth>-1*y?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,this.endColumn===n-1&&c)for(this.startColumn=this.endColumn;this.startColumn>0;){const t=d[this.endColumn]+f-d[this.startColumn-1];if((t<=s||e!==a.FULLY_VISIBLE_TYPE)&&(this.startColumn-=1),t>s)break}e===a.RENDER_TYPE&&null!==this.startColumn&&t&&t(this),this.startPosition=d[this.startColumn],void 0===this.startPosition&&(this.startPosition=null),n<this.endColumn&&(this.endColumn=n-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}refreshStretching(e){if("none"===(0,o.default)(this,h).stretchMode)return;let t=e;(0,i.default)(this,u,t);const r=(0,o.default)(this,h).totalColumns;let n=0;for(let e=0;e<r;e++){const r=this._getColumnWidth(e),s=(0,o.default)(this,h).stretchingColumnWidthFn(void 0,e);"number"==typeof s?t-=s:n+=r}const s=t-n;if("all"===(0,o.default)(this,h).stretchMode&&s>0)this.stretchAllRatio=t/n,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===(0,o.default)(this,h).stretchMode&&t!==1/0){const e=this._getColumnWidth(r-1),t=s+e;this.stretchLastWidth=t>=0?t:e}}getStretchedColumnWidth(e,t){let r=null;return"all"===(0,o.default)(this,h).stretchMode&&0!==this.stretchAllRatio?r=this._getStretchedAllColumnWidth(e,t):"last"===(0,o.default)(this,h).stretchMode&&0!==this.stretchLastWidth&&(r=this._getStretchedLastColumnWidth(e)),r}_getStretchedAllColumnWidth(e,t){let r=0;const n=(0,o.default)(this,h).totalColumns;if(!this.stretchAllColumnsWidth[e]){const r=Math.round(t*this.stretchAllRatio),n=(0,o.default)(this,h).stretchingColumnWidthFn(r,e);this.stretchAllColumnsWidth[e]=void 0===n?r:isNaN(n)?this._getColumnWidth(e):n}if(this.stretchAllColumnsWidth.length===n&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(let e=0;e<this.stretchAllColumnsWidth.length;e++)r+=this.stretchAllColumnsWidth[e];r!==(0,o.default)(this,u)&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=(0,o.default)(this,u)-r)}return this.stretchAllColumnsWidth[e]}_getStretchedLastColumnWidth(e){return e===(0,o.default)(this,h).totalColumns-1?this.stretchLastWidth:null}_getColumnWidth(e){let t=(0,o.default)(this,h).columnWidthFn(e);return isNaN(t)&&(t=c.DEFAULT_WIDTH),t}}var d=c;t.default=d},80514:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,r(95988),r(58259);var s=n(r(93231)),o=n(r(42538)),i=n(r(48427)),a=r(63080);function l(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var u=new WeakMap;class h{static get DEFAULT_HEIGHT(){return 23}constructor(e){(0,s.default)(this,"count",0),(0,s.default)(this,"startRow",null),(0,s.default)(this,"endRow",null),(0,s.default)(this,"startPosition",null),(0,s.default)(this,"isVisibleInTrimmingContainer",!1),l(this,u,{writable:!0,value:void 0}),(0,i.default)(this,u,e),this.calculate()}calculate(){const{calculationType:e,overrideFn:t,rowHeightFn:r,scrollOffset:n,totalRows:s,viewportHeight:i}=(0,o.default)(this,u),l=Math.max((0,o.default)(this,u).scrollOffset,0),c=(0,o.default)(this,u).horizontalScrollbarHeight||0;let d=0,f=!0;const p=[];let g,m=0,E=0;for(let t=0;t<s;t++)if(g=r(t),isNaN(g)&&(g=h.DEFAULT_HEIGHT),d<=l&&e!==a.FULLY_VISIBLE_TYPE&&(this.startRow=t,m=g),d>=l&&d+(e===a.FULLY_VISIBLE_TYPE?g:0)<=l+i-c&&(null===this.startRow&&(this.startRow=t,m=g),this.endRow=t),p.push(d),d+=g,E=g,e!==a.FULLY_VISIBLE_TYPE&&(this.endRow=t),d>=l+i-c){f=!1;break}const y=n+i-c,w=e===a.FULLY_VISIBLE_TYPE?m:0,C=e===a.FULLY_VISIBLE_TYPE?0:E;if(y<w||n>p.at(-1)+C?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,this.endRow===s-1&&f)for(this.startRow=this.endRow;this.startRow>0;){const t=p[this.endRow]+g-p[this.startRow-1];if((t<=i-c||e!==a.FULLY_VISIBLE_TYPE)&&(this.startRow-=1),t>=i-c)break}e===a.RENDER_TYPE&&null!==this.startRow&&t&&t(this),this.startPosition=p[this.startRow],void 0===this.startPosition&&(this.startPosition=null),s<this.endRow&&(this.endRow=s-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}var c=h;t.default=c},31428:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=n(r(42538)),i=n(r(48427));function a(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var l=new WeakMap;class u{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,s.default)(this,"row",null),(0,s.default)(this,"col",null),a(this,l,{writable:!0,value:!1}),(0,i.default)(this,l,r),void 0!==e&&void 0!==t&&(this.row=e,this.col=t)}isValid(e){const{countRows:t,countCols:r,countRowHeaders:n,countColHeaders:s}={countRows:0,countCols:0,countRowHeaders:0,countColHeaders:0,...e};return!(!Number.isInteger(this.row)||!Number.isInteger(this.col))&&(!(this.row<-s||this.col<-n)&&!(this.row>=t||this.col>=r))}isEqual(e){return e===this||this.row===e.row&&this.col===e.col}isHeader(){return!this.isCell()}isCell(){return this.row>=0&&this.col>=0}isRtl(){return(0,o.default)(this,l)}isSouthEastOf(e){return this.row>=e.row&&((0,o.default)(this,l)?this.col<=e.col:this.col>=e.col)}isNorthWestOf(e){return this.row<=e.row&&((0,o.default)(this,l)?this.col>=e.col:this.col<=e.col)}isSouthWestOf(e){return this.row>=e.row&&((0,o.default)(this,l)?this.col>=e.col:this.col<=e.col)}isNorthEastOf(e){return this.row<=e.row&&((0,o.default)(this,l)?this.col<=e.col:this.col>=e.col)}normalize(){return this.row=null===this.row?this.row:Math.max(this.row,0),this.col=null===this.col?this.col:Math.max(this.col,0),this}assign(e){return Number.isInteger(null==e?void 0:e.row)&&(this.row=e.row),Number.isInteger(null==e?void 0:e.col)&&(this.col=e.col),e instanceof u&&(0,i.default)(this,l,e.isRtl()),this}clone(){return new u(this.row,this.col,(0,o.default)(this,l))}toObject(){return{row:this.row,col:this.col}}}var h=u;t.default=h},17936:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=n(r(42538)),i=n(r(48427)),a=n(r(31428));function l(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var u=new WeakMap;class h{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];(0,s.default)(this,"highlight",null),(0,s.default)(this,"from",null),(0,s.default)(this,"to",null),l(this,u,{writable:!0,value:!1}),this.highlight=e.clone(),this.from=t.clone(),this.to=r.clone(),(0,i.default)(this,u,n)}setHighlight(e){return this.highlight=e.clone(),this}setFrom(e){return this.from=e.clone(),this}setTo(e){return this.to=e.clone(),this}isValid(e){return this.from.isValid(e)&&this.to.isValid(e)}isSingle(){return this.isSingleCell()||this.isSingleHeader()}isSingleCell(){return this.from.row>=0&&this.from.row===this.to.row&&this.from.col>=0&&this.from.col===this.to.col}isSingleHeader(){return(this.from.row<0||this.from.col<0)&&this.from.row===this.to.row&&this.from.col===this.to.col}containsHeaders(){return this.from.isHeader()||this.to.isHeader()}getOuterHeight(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}getOuterWidth(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}getHeight(){if(this.from.row<0&&this.to.row<0)return 0;const e=Math.max(this.from.row,0),t=Math.max(this.to.row,0);return Math.max(e,t)-Math.min(e,t)+1}getWidth(){if(this.from.col<0&&this.to.col<0)return 0;const e=Math.max(this.from.col,0),t=Math.max(this.to.col,0);return Math.max(e,t)-Math.min(e,t)+1}getCellsCount(){return this.getWidth()*this.getHeight()}includes(e){const{row:t,col:r}=e,n=this.getOuterTopStartCorner(),s=this.getOuterBottomEndCorner();return n.row<=t&&s.row>=t&&n.col<=r&&s.col>=r}includesRange(e){return this.includes(e.getOuterTopStartCorner())&&this.includes(e.getOuterBottomEndCorner())}isEqual(e){return Math.min(this.from.row,this.to.row)===Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(e.from.col,e.to.col)}overlaps(e){return e.isSouthEastOf(this.getOuterTopLeftCorner())&&e.isNorthWestOf(this.getOuterBottomRightCorner())}isSouthEastOf(e){return this.getOuterTopLeftCorner().isSouthEastOf(e)||this.getOuterBottomRightCorner().isSouthEastOf(e)}isNorthWestOf(e){return this.getOuterTopLeftCorner().isNorthWestOf(e)||this.getOuterBottomRightCorner().isNorthWestOf(e)}isOverlappingHorizontally(e){return this.getOuterTopRightCorner().col>=e.getOuterTopLeftCorner().col&&this.getOuterTopRightCorner().col<=e.getOuterTopRightCorner().col||this.getOuterTopLeftCorner().col<=e.getOuterTopRightCorner().col&&this.getOuterTopLeftCorner().col>=e.getOuterTopLeftCorner().col}isOverlappingVertically(e){return this.getOuterBottomRightCorner().row>=e.getOuterTopRightCorner().row&&this.getOuterBottomRightCorner().row<=e.getOuterBottomRightCorner().row||this.getOuterTopRightCorner().row<=e.getOuterBottomRightCorner().row&&this.getOuterTopRightCorner().row>=e.getOuterTopRightCorner().row}expand(e){const t=this.getOuterTopStartCorner(),r=this.getOuterBottomEndCorner();return(e.row<t.row||e.col<t.col||e.row>r.row||e.col>r.col)&&(this.from=this._createCellCoords(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=this._createCellCoords(Math.max(r.row,e.row),Math.max(r.col,e.col)),!0)}expandByRange(e){if(this.includesRange(e)||!this.overlaps(e))return!1;const t=this.getOuterTopStartCorner(),r=this.getOuterBottomEndCorner(),n=this.getDirection(),s=e.getOuterTopStartCorner(),o=e.getOuterBottomEndCorner(),i=Math.min(t.row,s.row),a=Math.min(t.col,s.col),l=Math.max(r.row,o.row),u=Math.max(r.col,o.col),h=this._createCellCoords(i,a),c=this._createCellCoords(l,u);return this.from=h,this.to=c,this.setDirection(n),this.highlight.row===this.getOuterBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getOuterTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally(),!0}getDirection(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0}setDirection(e){switch(e){case"NW-SE":[this.from,this.to]=[this.getOuterTopLeftCorner(),this.getOuterBottomRightCorner()];break;case"NE-SW":[this.from,this.to]=[this.getOuterTopRightCorner(),this.getOuterBottomLeftCorner()];break;case"SE-NW":[this.from,this.to]=[this.getOuterBottomRightCorner(),this.getOuterTopLeftCorner()];break;case"SW-NE":[this.from,this.to]=[this.getOuterBottomLeftCorner(),this.getOuterTopRightCorner()]}}getVerticalDirection(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}getHorizontalDirection(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}flipDirectionVertically(){switch(this.getDirection()){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE")}}flipDirectionHorizontally(){switch(this.getDirection()){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW")}}getTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getTopLeftCorner(){return(0,o.default)(this,u)?this.getTopEndCorner():this.getTopStartCorner()}getBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getBottomRightCorner(){return(0,o.default)(this,u)?this.getBottomStartCorner():this.getBottomEndCorner()}getTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getTopRightCorner(){return(0,o.default)(this,u)?this.getTopStartCorner():this.getTopEndCorner()}getBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getBottomLeftCorner(){return(0,o.default)(this,u)?this.getBottomEndCorner():this.getBottomStartCorner()}getOuterTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterTopLeftCorner(){return(0,o.default)(this,u)?this.getOuterTopEndCorner():this.getOuterTopStartCorner()}getOuterBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterBottomRightCorner(){return(0,o.default)(this,u)?this.getOuterBottomStartCorner():this.getOuterBottomEndCorner()}getOuterTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterTopRightCorner(){return(0,o.default)(this,u)?this.getOuterTopStartCorner():this.getOuterTopEndCorner()}getOuterBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterBottomLeftCorner(){return(0,o.default)(this,u)?this.getOuterBottomEndCorner():this.getOuterBottomStartCorner()}isCorner(e,t){return!!(t&&t.includes(e)&&(this.getOuterTopLeftCorner().isEqual(this._createCellCoords(t.from.row,t.from.col))||this.getOuterTopRightCorner().isEqual(this._createCellCoords(t.from.row,t.to.col))||this.getOuterBottomLeftCorner().isEqual(this._createCellCoords(t.to.row,t.from.col))||this.getOuterBottomRightCorner().isEqual(this._createCellCoords(t.to.row,t.to.col))))||(e.isEqual(this.getOuterTopLeftCorner())||e.isEqual(this.getOuterTopRightCorner())||e.isEqual(this.getOuterBottomLeftCorner())||e.isEqual(this.getOuterBottomRightCorner()))}getOppositeCorner(e,t){if(!(e instanceof a.default))return!1;if(t){const{from:r,to:n}=t;if(t.includes(e)){if(this.getOuterTopStartCorner().isEqual(this._createCellCoords(r.row,r.col)))return this.getOuterBottomEndCorner();if(this.getOuterTopEndCorner().isEqual(this._createCellCoords(r.row,n.col)))return this.getOuterBottomStartCorner();if(this.getOuterBottomStartCorner().isEqual(this._createCellCoords(n.row,r.col)))return this.getOuterTopEndCorner();if(this.getOuterBottomEndCorner().isEqual(this._createCellCoords(n.row,n.col)))return this.getOuterTopStartCorner()}}return e.isEqual(this.getOuterBottomEndCorner())?this.getOuterTopStartCorner():e.isEqual(this.getOuterTopStartCorner())?this.getOuterBottomEndCorner():e.isEqual(this.getOuterTopEndCorner())?this.getOuterBottomStartCorner():e.isEqual(this.getOuterBottomStartCorner())?this.getOuterTopEndCorner():void 0}getBordersSharedWith(e){if(!this.includesRange(e))return[];const t=Math.min(this.from.row,this.to.row),r=Math.max(this.from.row,this.to.row),n=Math.min(this.from.col,this.to.col),s=Math.max(this.from.col,this.to.col),o=Math.min(e.from.row,e.to.row),i=Math.max(e.from.row,e.to.row),a=Math.min(e.from.col,e.to.col),l=Math.max(e.from.col,e.to.col),u=[];return t===o&&u.push("top"),s===l&&u.push("right"),r===i&&u.push("bottom"),n===a&&u.push("left"),u}getInner(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),r=[];for(let n=e.row;n<=t.row;n++)for(let s=e.col;s<=t.col;s++)this.from.row===n&&this.from.col===s||this.to.row===n&&this.to.col===s||r.push(this._createCellCoords(n,s));return r}getAll(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),r=[];for(let n=e.row;n<=t.row;n++)for(let s=e.col;s<=t.col;s++)e.row===n&&e.col===s?r.push(e):t.row===n&&t.col===s?r.push(t):r.push(this._createCellCoords(n,s));return r}forAll(e){const t=this.getOuterTopStartCorner(),r=this.getOuterBottomEndCorner();for(let n=t.row;n<=r.row;n++)for(let s=t.col;s<=r.col;s++){if(!1===e(n,s))return}}clone(){return new h(this.highlight,this.from,this.to,(0,o.default)(this,u))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(e,t){return new a.default(e,t,(0,o.default)(this,u))}}var c=h;t.default=c},26085:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(49587),i=r(37913),a=n(r(57340)),l=n(r(53843)),u=n(r(31428)),h=n(r(17936));t.default=class{get eventManager(){return new a.default(this)}constructor(e,t){(0,s.default)(this,"wtTable",void 0),(0,s.default)(this,"wtScroll",void 0),(0,s.default)(this,"wtViewport",void 0),(0,s.default)(this,"wtOverlays",void 0),(0,s.default)(this,"selectionManager",void 0),(0,s.default)(this,"wtEvent",void 0),(0,s.default)(this,"guid",`wt_${(0,i.randomString)()}`),(0,s.default)(this,"drawInterrupted",!1),(0,s.default)(this,"drawn",!1),(0,s.default)(this,"domBindings",void 0),(0,s.default)(this,"wtSettings",void 0),this.domBindings={rootTable:e,rootDocument:e.ownerDocument,rootWindow:e.ownerDocument.defaultView},this.wtSettings=t,this.wtScroll=new l.default(this.createScrollDao())}findOriginalHeaders(){const e=[];if(this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(let t=0,r=this.wtTable.THEAD.childNodes[0].childNodes.length;t<r;t++)e.push(this.wtTable.THEAD.childNodes[0].childNodes[t].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(t,r){(0,o.fastInnerText)(r,e[t])}])}}createCellCoords(e,t){return new u.default(e,t,this.wtSettings.getSetting("rtlMode"))}createCellRange(e,t,r){return new h.default(e,t,r,this.wtSettings.getSetting("rtlMode"))}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,e||this.wtTable.isVisible()?this.wtTable.draw(e):this.drawInterrupted=!0,this}getCell(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return this.wtTable.getCell(e);const t=this.wtSettings.getSetting("totalRows"),r=this.wtSettings.getSetting("fixedRowsTop"),n=this.wtSettings.getSetting("fixedRowsBottom"),s=this.wtSettings.getSetting("fixedColumnsStart");if(e.row<r&&e.col<s)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(e);if(e.row<r)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<s&&e.row>=t-n){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<s)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(e);if(e.row<t&&e.row>=t-n&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}scrollViewport(e,t,r,n,s){return!(e.col<0||e.row<0)&&this.wtScroll.scrollViewport(e,t,r,n,s)}scrollViewportHorizontally(e,t,r){return!(e<0)&&this.wtScroll.scrollViewportHorizontally(e,t,r)}scrollViewportVertically(e,t,r){return!(e<0)&&this.wtScroll.scrollViewportVertically(e,t,r)}getViewport(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}destroy(){this.wtOverlays.destroy(),this.wtEvent.destroy()}createScrollDao(){const e=this;return{get drawn(){return e.drawn},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get wtTable(){return e.wtTable},get wtViewport(){return e.wtViewport},get wtSettings(){return e.wtSettings},get rootWindow(){return e.domBindings.rootWindow},get totalRows(){return e.wtSettings.getSetting("totalRows")},get totalColumns(){return e.wtSettings.getSetting("totalColumns")},get fixedRowsTop(){return e.wtSettings.getSetting("fixedRowsTop")},get fixedRowsBottom(){return e.wtSettings.getSetting("fixedRowsBottom")},get fixedColumnsStart(){return e.wtSettings.getSetting("fixedColumnsStart")}}}getTableDao(){const e=this;return{get wot(){return e},get parentTableOffset(){return e.cloneSource.wtTable.tableOffset},get cloneSource(){return e.cloneSource},get workspaceWidth(){return e.wtViewport.getWorkspaceWidth()},get wtViewport(){return e.wtViewport},get wtOverlays(){return e.wtOverlays},get selectionManager(){return e.selectionManager},get drawn(){return e.drawn},set drawn(t){e.drawn=t},get wtTable(){return e.wtTable},get startColumnRendered(){return e.wtViewport.columnsRenderCalculator.startColumn},get startColumnVisible(){return e.wtViewport.columnsVisibleCalculator.startColumn},get endColumnRendered(){return e.wtViewport.columnsRenderCalculator.endColumn},get endColumnVisible(){return e.wtViewport.columnsVisibleCalculator.endColumn},get countColumnsRendered(){return e.wtViewport.columnsRenderCalculator.count},get countColumnsVisible(){return e.wtViewport.columnsVisibleCalculator.count},get startRowRendered(){return e.wtViewport.rowsRenderCalculator.startRow},get startRowVisible(){return e.wtViewport.rowsVisibleCalculator.startRow},get endRowRendered(){return e.wtViewport.rowsRenderCalculator.endRow},get endRowVisible(){return e.wtViewport.rowsVisibleCalculator.endRow},get countRowsRendered(){return e.wtViewport.rowsRenderCalculator.count},get countRowsVisible(){return e.wtViewport.rowsVisibleCalculator.count},get columnHeaders(){return e.wtSettings.getSetting("columnHeaders")},get rowHeaders(){return e.wtSettings.getSetting("rowHeaders")}}}}},34642:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=n(r(68212)),i=n(r(26085));class a extends i.default{constructor(e,t,r){super(e,t),(0,s.default)(this,"cloneSource",void 0),(0,s.default)(this,"cloneOverlay",void 0);const n=this.wtSettings.getSetting("facade",this);this.cloneSource=r.source,this.cloneOverlay=r.overlay,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),n,this.domBindings,this.wtSettings),this.wtViewport=r.viewport,this.selectionManager=r.selectionManager,this.wtEvent=new o.default(n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,r.event),this.findOriginalHeaders()}}t.default=a},17838:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(68212)),o=n(r(56741)),i=n(r(39373)),a=n(r(58454)),l=n(r(55778)),u=n(r(26085)),h=r(62489),c=r(76163),d=r(49587);class f extends u.default{constructor(e,t){super(e,new i.default(t));const r=this.wtSettings.getSetting("facade",this);this.wtTable=new a.default(this.getTableDao(),r,this.domBindings,this.wtSettings),this.wtViewport=new l.default(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selectionManager=new h.SelectionManager(this.wtSettings.getSetting("selections")),this.wtEvent=new s.default(r,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager),this.wtOverlays=new o.default(this,r,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}exportSettingsAsClassNames(){const e=[],t=[];(0,c.objectEach)({rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},((r,n)=>{this.wtSettings.getSetting(n).length&&t.push(r),e.push(r)})),(0,d.removeClass)(this.wtTable.wtRootElement.parentNode,e),(0,d.addClass)(this.wtTable.wtRootElement.parentNode,t)}getViewportDao(){const e=this;return{get wot(){return e},get topOverlayTrimmingContainer(){return e.wtOverlays.topOverlay.trimmingContainer},get inlineStartOverlayTrimmingContainer(){return e.wtOverlays.inlineStartOverlay.trimmingContainer},get topScrollPosition(){return e.wtOverlays.topOverlay.getScrollPosition()},get topParentOffset(){return e.wtOverlays.topOverlay.getTableParentOffset()},get inlineStartScrollPosition(){return e.wtOverlays.inlineStartOverlay.getScrollPosition()},get inlineStartParentOffset(){return e.wtOverlays.inlineStartOverlay.getTableParentOffset()},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get bottomOverlay(){return e.wtOverlays.bottomOverlay}}}}t.default=f},68212:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),o=n(r(48427)),i=r(49587),a=r(46029),l=r(6022),u=r(78498),h=r(97639);function c(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,E=new WeakMap,y=new WeakMap,w=new WeakMap,C=new WeakMap,v=new WeakMap;var R=class{constructor(e,t,r,n,s,i){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;c(this,d,{writable:!0,value:void 0}),c(this,f,{writable:!0,value:void 0}),c(this,p,{writable:!0,value:void 0}),c(this,g,{writable:!0,value:void 0}),c(this,m,{writable:!0,value:void 0}),c(this,E,{writable:!0,value:void 0}),c(this,y,{writable:!0,value:void 0}),c(this,w,{writable:!0,value:void 0}),c(this,C,{writable:!0,value:[null,null]}),c(this,v,{writable:!0,value:[null,null]}),(0,o.default)(this,d,r),(0,o.default)(this,f,t),(0,o.default)(this,p,s),(0,o.default)(this,g,i),(0,o.default)(this,m,a),(0,o.default)(this,E,n),(0,o.default)(this,y,e),this.registerEvents()}registerEvents(){(0,s.default)(this,E).addEventListener((0,s.default)(this,p).holder,"contextmenu",(e=>this.onContextMenu(e))),(0,s.default)(this,E).addEventListener((0,s.default)(this,p).TABLE,"mouseover",(e=>this.onMouseOver(e))),(0,s.default)(this,E).addEventListener((0,s.default)(this,p).TABLE,"mouseout",(e=>this.onMouseOut(e)));const e=()=>{(0,s.default)(this,E).addEventListener((0,s.default)(this,p).holder,"touchstart",(e=>this.onTouchStart(e))),(0,s.default)(this,E).addEventListener((0,s.default)(this,p).holder,"touchend",(e=>this.onTouchEnd(e))),this.momentumScrolling||(this.momentumScrolling={}),(0,s.default)(this,E).addEventListener((0,s.default)(this,p).holder,"scroll",(()=>{clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||(0,s.default)(this,d).getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout((()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,(0,s.default)(this,d).getSetting("onAfterMomentumScroll"))}),200)}))},t=()=>{(0,s.default)(this,E).addEventListener((0,s.default)(this,p).holder,"mouseup",(e=>this.onMouseUp(e))),(0,s.default)(this,E).addEventListener((0,s.default)(this,p).holder,"mousedown",(e=>this.onMouseDown(e)))};(0,u.isMobileBrowser)()?e():((0,l.isTouchSupported)()&&e(),t())}selectedCellWasTouched(e){const t=this.parentCell(e).coords;if((0,s.default)(this,w)&&t){const[e,r]=[t.row,(0,s.default)(this,w).from.row],[n,o]=[t.col,(0,s.default)(this,w).from.col];return e===r&&n===o}return!1}parentCell(e){const t={},r=(0,s.default)(this,p).TABLE,n=(0,i.closestDown)(e,["TD","TH"],r);return n?(t.coords=(0,s.default)(this,p).getCoords(n),t.TD=n):(0,i.hasClass)(e,"wtBorder")&&(0,i.hasClass)(e,"current")?(t.coords=(0,s.default)(this,g).getFocusSelection().cellRange.highlight,t.TD=(0,s.default)(this,p).getCell(t.coords)):(0,i.hasClass)(e,"wtBorder")&&(0,i.hasClass)(e,"area")&&(0,s.default)(this,g).getAreaSelection().cellRange&&(t.coords=(0,s.default)(this,g).getAreaSelection().cellRange.to,t.TD=(0,s.default)(this,p).getCell(t.coords)),t}onMouseDown(e){const t=(0,s.default)(this,f).rootDocument.activeElement,r=(0,a.partial)(i.getParent,e.target),n=e.target;if(!["TD","TH"].includes(t.nodeName)&&(n===t||r(0)===t||r(1)===t))return;const o=this.parentCell(n);(0,i.hasClass)(n,"corner")?(0,s.default)(this,d).getSetting("onCellCornerMouseDown",e,n):o.TD&&(0,s.default)(this,d).has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,o.coords,o.TD),(0===e.button||this.touchApplied)&&o.TD&&((0,s.default)(this,v)[0]=o.TD,clearTimeout((0,s.default)(this,C)[0]),(0,s.default)(this,C)[0]=setTimeout((()=>{(0,s.default)(this,v)[0]=null}),1e3))}onContextMenu(e){if((0,s.default)(this,d).has("onCellContextMenu")){const t=this.parentCell(e.target);t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!(0,s.default)(this,d).has("onCellMouseOver"))return;const t=(0,s.default)(this,p).TABLE,r=(0,i.closestDown)(e.target,["TD","TH"],t),n=(0,s.default)(this,m)||this;r&&r!==n.lastMouseOver&&(0,i.isChildOf)(r,t)&&(n.lastMouseOver=r,this.callListener("onCellMouseOver",e,(0,s.default)(this,p).getCoords(r),r))}onMouseOut(e){if(!(0,s.default)(this,d).has("onCellMouseOut"))return;const t=(0,s.default)(this,p).TABLE,r=(0,i.closestDown)(e.target,["TD","TH"],t),n=(0,i.closestDown)(e.relatedTarget,["TD","TH"],t),o=(0,s.default)(this,m)||this;r&&r!==n&&(0,i.isChildOf)(r,t)&&(this.callListener("onCellMouseOut",e,(0,s.default)(this,p).getCoords(r),r),null===n&&(o.lastMouseOver=null))}onMouseUp(e){const t=this.parentCell(e.target);t.TD&&(0,s.default)(this,d).has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,t.coords,t.TD),(0===e.button||this.touchApplied)&&(t.TD===(0,s.default)(this,v)[0]&&t.TD===(0,s.default)(this,v)[1]?((0,i.hasClass)(e.target,"corner")?this.callListener("onCellCornerDblClick",e,t.coords,t.TD):this.callListener("onCellDblClick",e,t.coords,t.TD),(0,s.default)(this,v)[0]=null,(0,s.default)(this,v)[1]=null):t.TD===(0,s.default)(this,v)[0]&&((0,s.default)(this,v)[1]=t.TD,clearTimeout((0,s.default)(this,C)[1]),(0,s.default)(this,C)[1]=setTimeout((()=>{(0,s.default)(this,v)[1]=null}),500)))}onTouchStart(e){(0,o.default)(this,w,(0,s.default)(this,g).getFocusSelection().cellRange),this.touchApplied=!0,this.onMouseDown(e)}onTouchEnd(e){var t;const r=e.target,n=null===(t=this.parentCell(r))||void 0===t?void 0:t.coords,o=(0,h.isDefined)(n)&&n.row>=0&&n.col>=0;if(e.cancelable&&o&&(0,s.default)(this,d).getSetting("isDataViewInstance")){const t=["A","BUTTON","INPUT"];(0,u.isIOS)()&&((0,u.isChromeWebKit)()||(0,u.isFirefoxWebKit)())&&this.selectedCellWasTouched(r)&&!t.includes(r.tagName)?e.preventDefault():this.selectedCellWasTouched(r)||e.preventDefault()}this.onMouseUp(e),this.touchApplied=!1}callListener(e,t,r,n){const o=(0,s.default)(this,d).getSettingPure(e);o&&o(t,r,n,(0,s.default)(this,y).call(this))}destroy(){clearTimeout((0,s.default)(this,C)[0]),clearTimeout((0,s.default)(this,C)[1]),(0,s.default)(this,E).destroy()}};t.default=R},11229:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(17838)),o=n(r(26085));class i{constructor(e){e instanceof o.default?this._wot=e:this._initFromSettings(e)}_initFromSettings(e){e.facade=e=>{const t=new i(e);return()=>t},this._wot=new s.default(e.table,e)}get guid(){return this._wot.guid}get rootDocument(){return this._wot.domBindings.rootDocument}get rootWindow(){return this._wot.domBindings.rootWindow}get wtSettings(){return this._wot.wtSettings}get cloneSource(){return this._wot.cloneSource}get cloneOverlay(){return this._wot.cloneOverlay}get selectionManager(){return this._wot.selectionManager}get wtViewport(){return this._wot.wtViewport}get wtOverlays(){return this._wot.wtOverlays}get wtTable(){return this._wot.wtTable}get wtEvent(){return this._wot.wtEvent}get wtScroll(){return this._wot.wtScroll}get drawn(){return this._wot.drawn}set drawn(e){this._wot.drawn=e}get drawInterrupted(){return this._wot.drawInterrupted}set drawInterrupted(e){this._wot.drawInterrupted=e}get lastMouseOver(){return this._wot.lastMouseOver}set lastMouseOver(e){this._wot.lastMouseOver=e}get momentumScrolling(){return this._wot.momentumScrolling}set momentumScrolling(e){this._wot.momentumScrolling=e}get touchApplied(){return this._wot.touchApplied}set touchApplied(e){this._wot.touchApplied=e}get domBindings(){return this._wot.domBindings}get eventListeners(){return this._wot.eventListeners}set eventListeners(e){this._wot.eventListeners=e}get eventManager(){return this._wot.eventManager}createCellCoords(e,t){return this._wot.createCellCoords(e,t)}createCellRange(e,t,r){return this._wot.createCellRange(e,t,r)}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._wot.draw(e),this}getCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._wot.getCell(e,t)}scrollViewport(e,t,r,n,s){return this._wot.scrollViewport(e,t,r,n,s)}scrollViewportHorizontally(e,t,r){return this._wot.scrollViewportHorizontally(e,t,r)}scrollViewportVertically(e,t,r){return this._wot.scrollViewportVertically(e,t,r)}getViewport(){return this._wot.getViewport()}getOverlayName(){return this._wot.cloneOverlay?this._wot.cloneOverlay.type:"master"}exportSettingsAsClassNames(){return this._wot.exportSettingsAsClassNames()}update(e,t){return this._wot.wtSettings.update(e,t),this}getSetting(e,t,r,n,s){return this._wot.wtSettings.getSetting(e,t,r,n,s)}hasSetting(e){return this._wot.wtSettings.hasSetting(e)}destroy(){this._wot.destroy()}}t.default=i},17976:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));var o=class{constructor(e,t,r){(0,s.default)(this,"offset",void 0),(0,s.default)(this,"total",void 0),(0,s.default)(this,"countTH",void 0),this.offset=e,this.total=t,this.countTH=r}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleRowHeadedColumnToSourceColumn(e){return this.renderedToSource(this.offsettedTH(e))}sourceColumnToVisibleRowHeadedColumn(e){return this.unOffsettedTH(this.sourceToRendered(e))}};t.default=o},76191:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));var o=class{constructor(e,t,r){(0,s.default)(this,"offset",void 0),(0,s.default)(this,"total",void 0),(0,s.default)(this,"countTH",void 0),this.offset=e,this.total=t,this.countTH=r}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleColHeadedRowToSourceRow(e){return this.renderedToSource(this.offsettedTH(e))}sourceRowToVisibleColHeadedRow(e){return this.unOffsettedTH(this.sourceToRendered(e))}};t.default=o},94699:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(36840));t.ViewportColumnsCalculator=s.default;var o=n(r(80514));t.ViewportRowsCalculator=o.default;var i=n(r(31428));t.CellCoords=i.default;var a=n(r(17936));t.CellRange=a.default;var l=n(r(11229));t.default=l.default,t.Core=l.default;var u=r(403);t.Selection=u.Selection,t.HIGHLIGHT_ACTIVE_HEADER_TYPE=u.ACTIVE_HEADER_TYPE,t.HIGHLIGHT_AREA_TYPE=u.AREA_TYPE,t.HIGHLIGHT_FOCUS_TYPE=u.FOCUS_TYPE,t.HIGHLIGHT_FILL_TYPE=u.FILL_TYPE,t.HIGHLIGHT_HEADER_TYPE=u.HEADER_TYPE,t.HIGHLIGHT_ROW_TYPE=u.ROW_TYPE,t.HIGHLIGHT_COLUMN_TYPE=u.COLUMN_TYPE,t.HIGHLIGHT_CUSTOM_SELECTION_TYPE=u.CUSTOM_SELECTION_TYPE;var h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(84355));t.Renderer=h;var c=r(32512);t.OrderView=c.OrderView,t.SharedOrderView=c.SharedOrderView;var d=r(57340);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}t.getListenersCounter=d.getListenersCounter},57261:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(49587),i=r(76163),a=r(98887),l=r(31990),u=r(1192),h=n(r(34642)),c=r(66862);t.Overlay=class{constructor(e,t,r,n,a){(0,s.default)(this,"wtSettings",null),(0,i.defineGetter)(this,"wot",e,{writable:!1}),this.domBindings=a,this.facadeGetter=t,this.wtSettings=n;const{TABLE:l,hider:u,spreader:h,holder:c,wtRootElement:d}=this.wot.wtTable;this.instance=this.wot,this.type=r,this.mainTableScrollableElement=null,this.TABLE=l,this.hider=u,this.spreader=h,this.holder=c,this.wtRootElement=d,this.trimmingContainer=(0,o.getTrimmingContainer)(this.hider.parentNode.parentNode),this.updateStateOfRendering(),this.clone=this.makeClone()}updateStateOfRendering(){const e=this.needFullRender;this.needFullRender=this.shouldBeRendered();const t=e!==this.needFullRender;return t&&!this.needFullRender&&this.reset(),t}shouldBeRendered(){return!0}updateTrimmingContainer(){this.trimmingContainer=(0,o.getTrimmingContainer)(this.hider.parentNode.parentNode)}updateMainScrollableElement(){const{wtTable:e}=this.wot,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=(0,o.getScrollableElement)(e.TABLE)}getRelativeCellPosition(e,t,r){if(!1===this.clone.wtTable.holder.contains(e))return void(0,l.warn)(`The provided element is not a child of the ${this.type} overlay`);const n=this.mainTableScrollableElement===this.domBindings.rootWindow,s=r<this.wtSettings.getSetting("fixedColumnsStart"),o=t<this.wtSettings.getSetting("fixedRowsTop"),i=t>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),a=this.clone.wtTable.spreader,u={start:this.getRelativeStartPosition(a),top:a.offsetTop},h={start:this.getRelativeStartPosition(e),top:e.offsetTop};let c=null;return c=n?this.getRelativeCellPositionWithinWindow(o,s,h,u):this.getRelativeCellPositionWithinHolder(o,i,s,h,u),c}getRelativeStartPosition(e){return this.isRtl()?e.offsetParent.offsetWidth-e.offsetLeft-e.offsetWidth:e.offsetLeft}getRelativeCellPositionWithinWindow(e,t,r,n){const s=this.wot.wtTable.wtRootElement.getBoundingClientRect();let i=0,a=0;if(t){let e=s.left;this.isRtl()&&(e=this.domBindings.rootWindow.innerWidth-(s.left+s.width+(0,o.getScrollbarWidth)())),i=e<=0?-1*e:0}else i=n.start;if(e){a=this.clone.wtTable.TABLE.getBoundingClientRect().top-s.top}else a=n.top;return{start:r.start+i,top:r.top+a}}getRelativeCellPositionWithinHolder(e,t,r,n,s){const o=this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),i=this.wot.wtOverlays.topOverlay.getScrollPosition();let a=0,l=0;if(r||(a=o-s.start),t){const e=this.wot.wtTable.wtRootElement.getBoundingClientRect();l=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+e.top}else e||(l=i-s.top);return{start:n.start-a,top:n.top-l}}makeClone(){if(-1===u.CLONE_TYPES.indexOf(this.type))throw new Error(`Clone type "${this.type}" is not supported.`);const{wtTable:e,wtSettings:t}=this.wot,{rootDocument:r,rootWindow:n}=this.domBindings,s=r.createElement("DIV"),i=r.createElement("TABLE"),a=e.wtRootElement.parentNode;s.className=`${u.CLONE_CLASS_NAMES.get(this.type)} handsontable`,s.setAttribute("dir",this.isRtl()?"rtl":"ltr"),s.style.position="absolute",s.style.top=0,s.style.overflow="visible",this.isRtl()?s.style.right=0:s.style.left=0,t.getSetting("ariaTags")&&(0,o.setAttribute)(s,[(0,c.A11Y_PRESENTATION)()]),i.className=e.TABLE.className;e.TABLE.getAttribute("role")&&i.setAttribute("role",e.TABLE.getAttribute("role")),s.appendChild(i),a.appendChild(s);const l=this.wtSettings.getSetting("preventOverflow");return!0===l||"horizontal"===l&&this.type===u.CLONE_TOP||"vertical"===l&&this.type===u.CLONE_INLINE_START?this.mainTableScrollableElement=n:"hidden"===n.getComputedStyle(a).getPropertyValue("overflow")?this.mainTableScrollableElement=e.holder:this.mainTableScrollableElement=(0,o.getScrollableElement)(e.TABLE),new h.default(i,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selectionManager:this.wot.selectionManager})}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}reset(){if(!this.clone)return;const e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,r=e.style,n=t.style,s=e.parentNode.style;(0,a.arrayEach)([r,n,s],(e=>{e.width="",e.height=""}))}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}}},4150:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(49587),i=n(r(84218)),a=r(57261),l=r(1192);class u extends a.Overlay{constructor(e,t,r,n){super(e,t,l.CLONE_BOTTOM,r,n),(0,s.default)(this,"cachedFixedRowsBottom",-1),this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}createTable(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return new i.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;const{rootWindow:e}=this.domBindings,t=this.clone.wtTable.holder.parentNode;t.style.top="";let r=0;const n=this.wtSettings.getSetting("preventOverflow");this.trimmingContainer!==e||n&&"vertical"===n?(r=this.getScrollPosition(),this.repositionOverlay()):(r=this.getOverlayOffset(),t.style.bottom=`${r}px`);const s=this.adjustHeaderBordersPosition(r);return this.adjustElementsSize(),s}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:r}=this.domBindings,n=this.clone.wtTable.holder.parentNode;let s=0;t.hasVerticalScroll()||(s+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(s+=(0,o.getScrollbarWidth)(r)),n.style.bottom=`${s}px`}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let r=!1;return this.mainTableScrollableElement===t?(t.scrollTo((0,o.getWindowScrollLeft)(t),e),r=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,r=!0),r}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const{wtTable:r,wtSettings:n}=this.wot,s=n.getSetting("defaultRowHeight");let o=e,i=0;for(;o<t;){const e=r.getRowHeight(o);i+=void 0===e?s:e,o+=1}return i}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:r,rootWindow:n}=this.domBindings,s=(0,o.getScrollbarWidth)(r),i=this.clone.wtTable.holder.parentNode.style,a=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==n||"horizontal"===a){let r=t.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(r-=s),r=Math.min(r,e.wtRootElement.scrollWidth),i.width=`${r}px`}else i.width="";this.clone.wtTable.holder.style.width=i.width;let l=(0,o.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),i.height=`${l}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=e.parentNode.style.height}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){let r=this.getTableParentOffset();const n=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let s=0;t&&n.offsetHeight!==n.clientHeight&&(s=(0,o.getScrollbarWidth)(this.domBindings.rootDocument)),t?(r+=this.sumCellSizes(0,e+1),r-=this.wot.wtViewport.getViewportHeight(),r+=1):r+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),e),r+=s,this.setScrollPosition(r)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,o.getScrollTop)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let r=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight(),t=e-this.clone.wtTable.getTotalHeight(),n=this.domBindings.rootDocument.documentElement.clientHeight;r=Math.max(this.getTableParentOffset()-this.getScrollPosition()-n+e,0),r>t&&(r=0)}return r}adjustHeaderBordersPosition(e){const t=this.wtSettings.getSetting("fixedRowsBottom"),r=this.cachedFixedRowsBottom!==t,n=this.wtSettings.getSetting("columnHeaders");let s=!1;if((r||0===t)&&n.length>0){const t=this.wot.wtTable.holder.parentNode,r=(0,o.hasClass)(t,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),e||0===this.wtSettings.getSetting("totalRows")?((0,o.addClass)(t,"innerBorderBottom"),s=!r):((0,o.removeClass)(t,"innerBorderBottom"),s=r)}return s}}t.BottomOverlay=u},35566:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(49587),o=n(r(37917)),i=r(57261),a=r(1192);class l extends i.Overlay{constructor(e,t,r,n,s,o){super(e,t,a.CLONE_BOTTOM_INLINE_START_CORNER,r,n),this.bottomOverlay=s,this.inlineStartOverlay=o}createTable(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return new o.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wot:e}=this;if(this.updateTrimmingContainer(),!e.wtTable.holder.parentNode)return!1;const t=this.clone.wtTable.holder.parentNode;if(t.style.top="",this.trimmingContainer===this.domBindings.rootWindow){const e=this.inlineStartOverlay.getOverlayOffset(),r=this.bottomOverlay.getOverlayOffset();t.style[this.isRtl()?"right":"left"]=`${e}px`,t.style.bottom=`${r}px`}else(0,s.resetCssTransform)(t),this.repositionOverlay();let r=(0,s.outerHeight)(this.clone.wtTable.TABLE);const n=(0,s.outerWidth)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(r=0),t.style.height=`${r}px`,t.style.width=`${n}px`,!1}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:r}=this.domBindings,n=this.clone.wtTable.holder.parentNode;let o=0;t.hasVerticalScroll()||(o+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(o+=(0,s.getScrollbarWidth)(r)),n.style.bottom=`${o}px`}}t.BottomInlineStartCornerOverlay=l},1192:(e,t)=>{"use strict";t.__esModule=!0;const r="top";t.CLONE_TOP=r;const n="bottom";t.CLONE_BOTTOM=n;const s="inline_start";t.CLONE_INLINE_START=s;const o="top_inline_start_corner";t.CLONE_TOP_INLINE_START_CORNER=o;const i="bottom_inline_start_corner";t.CLONE_BOTTOM_INLINE_START_CORNER=i;const a=[r,n,s,o,i];t.CLONE_TYPES=a;const l=new Map([[r,`ht_clone_${r}`],[n,`ht_clone_${n}`],[s,`ht_clone_${s} ht_clone_left`],[o,`ht_clone_${o} ht_clone_top_left_corner`],[i,`ht_clone_${i} ht_clone_bottom_left_corner`]]);t.CLONE_CLASS_NAMES=l},24658:(e,t,r)=>{"use strict";t.__esModule=!0;var n={BottomInlineStartCornerOverlay:!0,BottomOverlay:!0,InlineStartOverlay:!0,Overlay:!0,TopInlineStartCornerOverlay:!0,TopOverlay:!0},s=r(35566);t.BottomInlineStartCornerOverlay=s.BottomInlineStartCornerOverlay;var o=r(4150);t.BottomOverlay=o.BottomOverlay;var i=r(3460);t.InlineStartOverlay=i.InlineStartOverlay;var a=r(57261);t.Overlay=a.Overlay;var l=r(83046);t.TopInlineStartCornerOverlay=l.TopInlineStartCornerOverlay;var u=r(71848);t.TopOverlay=u.TopOverlay;var h=r(1192);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===h[e]||(t[e]=h[e]))}))},3460:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=r(49587),o=n(r(68215)),i=r(57261),a=r(403),l=r(1192);class u extends i.Overlay{constructor(e,t,r,n){super(e,t,l.CLONE_INLINE_START,r,n)}createTable(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return new o.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wtTable:e}=this.wot;if(!this.needFullRender||!e.holder.parentNode)return!1;const{rootWindow:t}=this.domBindings,r=this.clone.wtTable.holder.parentNode,n=this.wtSettings.getSetting("preventOverflow");let o=0;this.trimmingContainer!==t||n&&"horizontal"===n?(o=this.getScrollPosition(),(0,s.resetCssTransform)(r)):(o=this.getOverlayOffset()*(this.isRtl()?-1:1),(0,s.setOverlayPosition)(r,`${o}px`,"0px"));const i=this.adjustHeaderBordersPosition(o);return this.adjustElementsSize(),i}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let r=!1;return this.isRtl()&&(e=-e),this.mainTableScrollableElement===t&&t.scrollX!==e?(t.scrollTo(e,(0,s.getWindowScrollTop)(t)),r=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,r=!0),r}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(e,t){const r=this.wtSettings.getSetting("defaultColumnWidth");let n=e,s=0;for(;n<t;)s+=this.wot.wtTable.getStretchedColumnWidth(n)||r,n+=1;return s}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:r}=this.domBindings,n=(0,s.getScrollbarWidth)(t),o=this.clone.wtTable.holder.parentNode.style,i=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==r||"vertical"===i){let t=this.wot.wtViewport.getWorkspaceHeight();this.wot.wtOverlays.hasScrollbarBottom&&(t-=n),t=Math.min(t,e.wtRootElement.scrollHeight),o.height=`${t}px`}else o.height="";this.clone.wtTable.holder.style.height=o.height;const a=(0,s.outerWidth)(this.clone.wtTable.TABLE);o.width=`${a}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(a.CORNER_DEFAULT_STYLE.width,10)/2:0;this.clone.wtTable.hider.style.height=this.hider.style.height,e.style.height=e.parentNode.style.height,e.style.width=`${parseInt(e.parentNode.style.width,10)+t}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalColumns"),t=this.isRtl()?"right":"left";if("number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style[t]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style[t]="0"}this.isRtl()?this.spreader.style.left="":this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`:this.clone.wtTable.spreader.style.top=""}scrollTo(e,t){let r=this.getTableParentOffset();const n=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let o=0;if(t){this.wot.wtTable.getColumnWidth(e)>this.wot.wtViewport.getViewportWidth()&&(t=!1)}return t&&n.offsetWidth!==n.clientWidth&&(o=(0,s.getScrollbarWidth)(this.domBindings.rootDocument)),t?(r+=this.sumCellSizes(0,e+1),r-=this.wot.wtViewport.getViewportWidth()):r+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),e),r+=o,this.setScrollPosition(r)}getTableParentOffset(){let e=0;return this.wtSettings.getSetting("preventOverflow")||this.trimmingContainer!==this.domBindings.rootWindow||(e=this.wot.wtTable.holderOffset.left),e}getScrollPosition(){return Math.abs((0,s.getScrollLeft)(this.mainTableScrollableElement,this.domBindings.rootWindow))}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let r=0;if(this.trimmingContainer===e&&(!t||"horizontal"!==t)){r=this.isRtl()?Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):Math.max(this.getScrollPosition()-this.getTableParentOffset(),0);r>this.wot.wtTable.getTotalWidth()-this.clone.wtTable.getTotalWidth()&&(r=0)}return r}adjustHeaderBordersPosition(e){const t=this.wot.wtTable.holder.parentNode,r=this.wtSettings.getSetting("rowHeaders"),n=this.wtSettings.getSetting("fixedColumnsStart");this.wtSettings.getSetting("totalRows")?(0,s.removeClass)(t,"emptyRows"):(0,s.addClass)(t,"emptyRows");let o=!1;if(n&&!r.length)(0,s.addClass)(t,"innerBorderLeft innerBorderInlineStart");else if(!n&&r.length){const r=(0,s.hasClass)(t,"innerBorderInlineStart");e?((0,s.addClass)(t,"innerBorderLeft innerBorderInlineStart"),o=!r):((0,s.removeClass)(t,"innerBorderLeft innerBorderInlineStart"),o=r)}return o}}t.InlineStartOverlay=u},71848:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(49587),i=n(r(54472)),a=r(57261),l=r(403),u=r(1192);class h extends a.Overlay{constructor(e,t,r,n){super(e,t,u.CLONE_TOP,r,n),(0,s.default)(this,"cachedFixedRowsTop",-1),this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}createTable(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return new i.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode,{rootWindow:t}=this.domBindings,r=this.wtSettings.getSetting("preventOverflow");let n=0,s=!1;if(this.trimmingContainer!==t||r&&"vertical"===r)n=this.getScrollPosition(),(0,o.resetCssTransform)(e);else{const{wtTable:t}=this.wot,r=t.hider.getBoundingClientRect();s=Math.ceil(r.bottom)===e.offsetHeight,n=this.getOverlayOffset(),(0,o.setOverlayPosition)(e,"0px",`${n}px`)}const i=this.adjustHeaderBordersPosition(n,s);return this.adjustElementsSize(),i}setScrollPosition(e){const t=this.domBindings.rootWindow;let r=!1;return this.mainTableScrollableElement===t&&t.scrollY!==e?(t.scrollTo((0,o.getWindowScrollLeft)(t),e),r=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,r=!0),r}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const r=this.wtSettings.getSetting("defaultRowHeight");let n=e,s=0;for(;n<t;){const e=this.wot.wtTable.getRowHeight(n);s+=void 0===e?r:e,n+=1}return s}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:r}=this.domBindings,n=(0,o.getScrollbarWidth)(t),s=this.clone.wtTable.holder.parentNode.style,i=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==r||"horizontal"===i){let t=this.wot.wtViewport.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(t-=n),t=Math.min(t,e.wtRootElement.scrollWidth),s.width=`${t}px`}else s.width="";this.clone.wtTable.holder.style.width=s.width;let a=(0,o.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(a=0),s.height=`${a}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(l.CORNER_DEFAULT_STYLE.height,10)/2:0;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=`${parseInt(e.parentNode.style.height,10)+t}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){const{wot:r,wtSettings:n}=this,s=(r.cloneSource?r.cloneSource:r).wtTable.holder;let i=this.getTableParentOffset(),a=0;if(t){this.wot.wtTable.getRowHeight(e)>this.wot.wtViewport.getViewportHeight()&&(t=!1)}if(t&&s.offsetHeight!==s.clientHeight&&(a=(0,o.getScrollbarWidth)(this.domBindings.rootDocument)),t){const t=n.getSetting("fixedRowsBottom"),s=n.getSetting("totalRows");i+=this.sumCellSizes(0,e+1),i-=r.wtViewport.getViewportHeight()-this.sumCellSizes(s-t,s),i+=1}else i+=this.sumCellSizes(n.getSetting("fixedRowsTop"),e);return i+=a,this.setScrollPosition(i)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,o.getScrollTop)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let r=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight()-this.clone.wtTable.getTotalHeight();r=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),r>e&&(r=0)}return r}adjustHeaderBordersPosition(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=this.wot.wtTable.holder.parentNode;this.wtSettings.getSetting("totalColumns")?(0,o.removeClass)(r,"emptyColumns"):(0,o.addClass)(r,"emptyColumns");let n=!1;if(!t){const t=this.wtSettings.getSetting("fixedRowsTop"),s=this.cachedFixedRowsTop!==t,i=this.wtSettings.getSetting("columnHeaders");if((s||0===t)&&i.length>0){const t=(0,o.hasClass)(r,"innerBorderTop");this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop"),e||0===this.wtSettings.getSetting("totalRows")?((0,o.addClass)(r,"innerBorderTop"),n=!t):((0,o.removeClass)(r,"innerBorderTop"),n=t)}}return n}}t.TopOverlay=h},83046:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(49587),i=n(r(34868)),a=r(57261),l=r(1192);class u extends a.Overlay{constructor(e,t,r,n,o,i){super(e,t,l.CLONE_TOP_INLINE_START_CORNER,r,n),(0,s.default)(this,"topOverlay",void 0),(0,s.default)(this,"inlineStartOverlay",void 0),this.topOverlay=o,this.inlineStartOverlay=i}createTable(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return new i.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){if(this.updateTrimmingContainer(),!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.domBindings.rootWindow){const t=this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1),r=this.topOverlay.getOverlayOffset();(0,o.setOverlayPosition)(e,`${t}px`,`${r}px`)}else(0,o.resetCssTransform)(e);let t=(0,o.outerHeight)(this.clone.wtTable.TABLE);const r=(0,o.outerWidth)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(t=0),e.style.height=`${t}px`,e.style.width=`${r}px`,!1}}t.TopInlineStartCornerOverlay=u},56741:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(49587),i=r(6022),a=r(98887),l=r(49223),u=r(78498),h=r(24658);var c=class{constructor(e,t,r,n,a,l){(0,s.default)(this,"wot",null),(0,s.default)(this,"topOverlay",null),(0,s.default)(this,"bottomOverlay",null),(0,s.default)(this,"inlineStartOverlay",null),(0,s.default)(this,"topInlineStartCornerOverlay",null),(0,s.default)(this,"bottomInlineStartCornerOverlay",null),(0,s.default)(this,"browserLineHeight",void 0),(0,s.default)(this,"wtSettings",null),(0,s.default)(this,"resizeObserver",new ResizeObserver((e=>{(0,i.requestAnimationFrame)((()=>{Array.isArray(e)&&e.length&&this.wtSettings.getSetting("onContainerElementResize")}))}))),this.wot=e,this.wtSettings=n,this.domBindings=r,this.facadeGetter=t,this.wtTable=l;const{rootDocument:u,rootWindow:h}=this.domBindings;this.instance=this.wot,this.eventManager=a,this.scrollbarSize=(0,o.getScrollbarWidth)(u);const c="hidden"===h.getComputedStyle(l.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement=c?l.holder:(0,o.getScrollableElement)(l.TABLE),this.initOverlays(),this.hasScrollbarBottom=!1,this.hasScrollbarRight=!1,this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.initBrowserLineHeight(),this.registerListeners(),this.lastScrollX=h.scrollX,this.lastScrollY=h.scrollY}getOverlays(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[this.topOverlay,this.topInlineStartCornerOverlay,this.inlineStartOverlay,this.bottomOverlay,this.bottomInlineStartCornerOverlay];return e&&t.push(this.wtTable),t}initBrowserLineHeight(){const{rootWindow:e,rootDocument:t}=this.domBindings,r=e.getComputedStyle(t.body),n=parseInt(r.lineHeight,10),s=1.2*parseInt(r.fontSize,10);this.browserLineHeight=n||s}initOverlays(){const e=[this.wot,this.facadeGetter,this.wtSettings,this.domBindings];this.topOverlay=new h.TopOverlay(...e),this.bottomOverlay=new h.BottomOverlay(...e),this.inlineStartOverlay=new h.InlineStartOverlay(...e),this.topInlineStartCornerOverlay=new h.TopInlineStartCornerOverlay(...e,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new h.BottomInlineStartCornerOverlay(...e,this.bottomOverlay,this.inlineStartOverlay)}updateStateOfRendering(){let e=this.topOverlay.updateStateOfRendering();return e=this.bottomOverlay.updateStateOfRendering()||e,e=this.inlineStartOverlay.updateStateOfRendering()||e,this.inlineStartOverlay.needFullRender&&(this.topOverlay.needFullRender&&(e=this.topInlineStartCornerOverlay.updateStateOfRendering()||e),this.bottomOverlay.needFullRender&&(e=this.bottomInlineStartCornerOverlay.updateStateOfRendering()||e)),e}refreshAll(){this.wot.drawn&&(this.wtTable.holder.parentNode?(this.wot.draw(!0),this.verticalScrolling&&this.inlineStartOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1):this.destroy())}registerListeners(){const{rootDocument:e,rootWindow:t}=this.domBindings,{mainTableScrollableElement:r}=this.topOverlay,{mainTableScrollableElement:n}=this.inlineStartOverlay;this.eventManager.addEventListener(e.documentElement,"keydown",(e=>this.onKeyDown(e))),this.eventManager.addEventListener(e.documentElement,"keyup",(()=>this.onKeyUp())),this.eventManager.addEventListener(e,"visibilitychange",(()=>this.onKeyUp())),this.eventManager.addEventListener(r,"scroll",(e=>this.onTableScroll(e)),{passive:!0}),r!==n&&this.eventManager.addEventListener(n,"scroll",(e=>this.onTableScroll(e)),{passive:!0});const s=t.devicePixelRatio&&t.devicePixelRatio>1,o=this.scrollableElement===t,i=this.wtSettings.getSetting("preventWheel"),a={passive:o};(i||s||!(0,u.isChrome)())&&this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",(e=>this.onCloneWheel(e,i)),a);let l;[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay].forEach((e=>{if(e&&e.needFullRender){const{holder:t}=e.clone.wtTable;this.eventManager.addEventListener(t,"wheel",(e=>this.onCloneWheel(e,i)),a)}})),this.eventManager.addEventListener(t,"resize",(()=>{clearTimeout(l),l=setTimeout((()=>{this.wtSettings.getSetting("onWindowResize")}),200)})),o||this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement)}deregisterListeners(){this.eventManager.clearEvents(!0)}onTableScroll(e){const t=this.domBindings.rootWindow,r=this.inlineStartOverlay.mainTableScrollableElement,n=this.topOverlay.mainTableScrollableElement,s=e.target;this.keyPressed&&(n!==t&&s!==t&&!e.target.contains(n)||r!==t&&s!==t&&!e.target.contains(r))||this.syncScrollPositions(e)}onCloneWheel(e,t){const{rootWindow:r}=this.domBindings,n=this.inlineStartOverlay.mainTableScrollableElement,s=this.topOverlay.mainTableScrollableElement,o=e.target,i=s!==r&&o!==r&&!o.contains(s),a=n!==r&&o!==r&&!o.contains(n);if(this.keyPressed&&(i||a))return;const l=this.translateMouseWheelToScroll(e);(t||this.scrollableElement!==r&&l)&&e.preventDefault()}onKeyDown(e){this.keyPressed=(0,l.isKey)(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}onKeyUp(){this.keyPressed=!1}translateMouseWheelToScroll(e){let t=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,r=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;1===e.deltaMode&&(r+=r*this.browserLineHeight,t+=t*this.browserLineHeight);const n=this.scrollVertically(t),s=this.scrollHorizontally(r);return n||s}scrollVertically(e){const t=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=e,t!==this.scrollableElement.scrollTop}scrollHorizontally(e){const t=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=e,t!==this.scrollableElement.scrollLeft}syncScrollPositions(){if(this.destroyed)return;const{rootWindow:e}=this.domBindings,t=this.topOverlay.clone.wtTable.holder,r=this.inlineStartOverlay.clone.wtTable.holder,[n,s]=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop];if(this.horizontalScrolling=t.scrollLeft!==n||this.lastScrollX!==e.scrollX,this.verticalScrolling=r.scrollTop!==s||this.lastScrollY!==e.scrollY,this.lastScrollX=e.scrollX,this.lastScrollY=e.scrollY,this.horizontalScrolling){t.scrollLeft=n;const e=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;e&&(e.scrollLeft=n)}this.verticalScrolling&&(r.scrollTop=s),this.refreshAll()}syncScrollWithMaster(){const e=this.topOverlay.mainTableScrollableElement,{scrollLeft:t,scrollTop:r}=e;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.inlineStartOverlay.needFullRender&&(this.inlineStartOverlay.clone.wtTable.holder.scrollTop=r)}updateMainScrollableElements(){this.deregisterListeners(),this.inlineStartOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();const{wtTable:e}=this,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=e.holder:this.scrollableElement=(0,o.getScrollableElement)(e.TABLE),this.registerListeners()}destroy(){this.resizeObserver.disconnect(),this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.inlineStartOverlay.destroy(),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.destroy(),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.destroy(),this.destroyed=!0}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateLastSpreaderSize()&&this.adjustElementsSize(),this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.inlineStartOverlay.refresh(e),this.topOverlay.refresh(e),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.refresh(e),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.refresh(e)}updateLastSpreaderSize(){const e=this.wtTable.spreader,t=e.clientWidth,r=e.clientHeight,n=t!==this.spreaderLastSize.width||r!==this.spreaderLastSize.height;return n&&(this.spreaderLastSize.width=t,this.spreaderLastSize.height=r),n}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtViewport:t}=this.wot,{wtTable:r}=this,n=this.wtSettings.getSetting("totalColumns"),s=this.wtSettings.getSetting("totalRows"),o=t.getRowHeaderWidth(),i=t.getColumnHeaderHeight(),a=r.hider.style;if(a.width=`${o+this.inlineStartOverlay.sumCellSizes(0,n)}px`,a.height=`${i+this.topOverlay.sumCellSizes(0,s)+1}px`,this.scrollbarSize>0){const{scrollHeight:e,scrollWidth:t}=r.wtRootElement,{scrollHeight:n,scrollWidth:s}=r.holder;this.hasScrollbarRight=e<n,this.hasScrollbarBottom=t<s,this.hasScrollbarRight&&r.hider.scrollWidth+this.scrollbarSize>t?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&r.hider.scrollHeight+this.scrollbarSize>e&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(e),this.inlineStartOverlay.adjustElementsSize(e),this.bottomOverlay.adjustElementsSize(e)}applyToDOM(){this.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.inlineStartOverlay.applyToDOM())}getParentOverlay(e){if(!e)return null;const t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let r=null;return(0,a.arrayEach)(t,(t=>{t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(r=t.clone)})),r}syncOverlayTableClassNames(){const e=this.wtTable.TABLE,t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];(0,a.arrayEach)(t,(t=>{t&&(t.clone.wtTable.TABLE.className=e.className)}))}};t.default=c},24650:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=n(r(88929));t.default=class{constructor(e,t){(0,s.default)(this,"nodesPool",null),(0,s.default)(this,"nodeType",void 0),(0,s.default)(this,"rootNode",void 0),(0,s.default)(this,"table",null),(0,s.default)(this,"renderedNodes",0),this.nodesPool="string"==typeof e?new o.default(e):null,this.nodeType=e,this.rootNode=t}setTable(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}adjust(){}render(){}}},86551:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(49587),i=r(32512),a=n(r(24650)),l=r(66862);class u extends a.default{constructor(){super("TD"),(0,s.default)(this,"orderViews",new WeakMap),(0,s.default)(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new i.SharedOrderView(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e)),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,columnsToRender:t,rows:r,rowHeaders:n}=this.table;for(let a=0;a<e;a++){const e=this.table.renderedRowToSource(a),u=r.getRenderedNode(a);this.sourceRowIndex=e;const h=this.obtainOrderView(u),c=n.obtainOrderView(u);h.prependView(c).setSize(t).setOffset(this.table.renderedColumnToSource(0)).start();for(let r=0;r<t;r++){h.render();const t=h.getCurrentNode(),n=this.table.renderedColumnToSource(r);var s,i;if((0,o.hasClass)(t,"hide")||(t.className=""),t.removeAttribute("style"),t.removeAttribute("dir"),(0,o.removeAttribute)(t,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.cellRenderer(e,n,t),this.table.isAriaEnabled())(0,o.setAttribute)(t,[...t.hasAttribute("role")?[]:[(0,l.A11Y_GRIDCELL)()],(0,l.A11Y_TABINDEX)(-1),(0,l.A11Y_COLINDEX)(n+(null!==(s=null===(i=this.table.rowUtils)||void 0===i||null===(i=i.dataAccessObject)||void 0===i?void 0:i.rowHeaders.length)&&void 0!==s?s:0)+1)])}h.end()}}}t.default=u},1909:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(24650)),o=r(49587);class i extends s.default{constructor(e){super(null,e)}adjust(){const{columnsToRender:e,rowHeadersCount:t}=this.table,r=e+t;for(;this.renderedNodes<r;)this.rootNode.appendChild(this.table.rootDocument.createElement("col")),this.renderedNodes+=1;for(;this.renderedNodes>r;)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}render(){this.adjust();const{columnsToRender:e,rowHeadersCount:t}=this.table;for(let e=0;e<t;e++){const t=this.table.renderedColumnToSource(e),r=this.table.columnUtils.getHeaderWidth(t);this.rootNode.childNodes[e].style.width=`${r}px`}for(let r=0;r<e;r++){const e=this.table.renderedColumnToSource(r),n=this.table.columnUtils.getStretchedColumnWidth(e);this.rootNode.childNodes[r+t].style.width=`${n}px`}const r=this.rootNode.firstChild;r&&(0,o.addClass)(r,"rowHeader")}}t.default=i},36270:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(49587),o=n(r(24650)),i=r(66862);class a extends o.default{constructor(e){super(null,e)}adjust(){const{columnHeadersCount:e,rowHeadersCount:t}=this.table;let r=this.rootNode.firstChild;if(e){const{columnsToRender:n}=this.table,s=n+t;for(let t=0,n=e;t<n;t++){for(r=this.rootNode.childNodes[t],r||(r=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(r)),this.renderedNodes=r.childNodes.length;this.renderedNodes<s;)r.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;for(;this.renderedNodes>s;)r.removeChild(r.lastChild),this.renderedNodes-=1}const o=this.rootNode.childNodes.length;if(o>e)for(let t=e;t<o;t++)this.rootNode.removeChild(this.rootNode.lastChild)}else r&&(0,s.empty)(r)}render(){const{columnHeadersCount:e}=this.table;this.table.isAriaEnabled()&&(0,s.setAttribute)(this.rootNode,[(0,i.A11Y_PRESENTATION)()]);for(let t=0;t<e;t+=1){const{columnHeaderFunctions:e,columnsToRender:r,rowHeadersCount:n}=this.table,o=this.rootNode.childNodes[t];this.table.isAriaEnabled()&&(0,s.setAttribute)(o,[(0,i.A11Y_ROW)(),(0,i.A11Y_ROWINDEX)(t+1)]);for(let a=-1*n;a<r;a+=1){const r=this.table.renderedColumnToSource(a),l=o.childNodes[a+n];l.className="",l.removeAttribute("style"),(0,s.removeAttribute)(l,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,s.setAttribute)(l,[(0,i.A11Y_COLINDEX)(a+1+this.table.rowHeadersCount),(0,i.A11Y_TABINDEX)(-1),...a<0?[(0,i.A11Y_PRESENTATION)()]:[(0,i.A11Y_COLUMNHEADER)(),(0,i.A11Y_SCOPE_COL)()]]),e[t](r,l,t)}}}}t.default=a},84355:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(22459));t.RowHeadersRenderer=s.default;var o=n(r(36270));t.ColumnHeadersRenderer=o.default;var i=n(r(1909));t.ColGroupRenderer=i.default;var a=n(r(51606));t.RowsRenderer=a.default;var l=n(r(86551));t.CellsRenderer=l.default;var u=n(r(92548));t.TableRenderer=u.default;t.Renderer=class{constructor(){let{TABLE:e,THEAD:t,COLGROUP:r,TBODY:n,rowUtils:h,columnUtils:c,cellRenderer:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderer=new u.default(e,{cellRenderer:d}),this.renderer.setRenderers({rowHeaders:new s.default,columnHeaders:new o.default(t),colGroup:new i.default(r),rows:new a.default(n),cells:new l.default}),this.renderer.setAxisUtils(h,c)}setFilters(e,t){return this.renderer.setFilters(e,t),this}setViewportSize(e,t){return this.renderer.setViewportSize(e,t),this}setHeaderContentRenderers(e,t){return this.renderer.setHeaderContentRenderers(e,t),this}adjust(){this.renderer.adjust()}render(){this.renderer.render()}}},22459:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(32512),i=n(r(24650)),a=r(49587),l=r(66862);class u extends i.default{constructor(){super("TH"),(0,s.default)(this,"orderViews",new WeakMap),(0,s.default)(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new o.SharedOrderView(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e)),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,rowHeaderFunctions:t,rowHeadersCount:r,rows:n,cells:s}=this.table;for(let o=0;o<e;o++){const e=this.table.renderedRowToSource(o),i=n.getRenderedNode(o);this.sourceRowIndex=e;const u=this.obtainOrderView(i),h=s.obtainOrderView(i);u.appendView(h).setSize(r).setOffset(this.table.renderedColumnToSource(0)).start();for(let n=0;n<r;n++){u.render();const r=u.getCurrentNode();r.className="",r.removeAttribute("style"),(0,a.removeAttribute)(r,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,a.setAttribute)(r,[(0,l.A11Y_ROWHEADER)(),(0,l.A11Y_SCOPE_ROW)(),(0,l.A11Y_COLINDEX)(n+1),(0,l.A11Y_TABINDEX)(-1)]),t[n](e,r,n)}u.end()}}}t.default=u},51606:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(31990),i=r(45561),a=r(32512),l=n(r(24650)),u=r(49587),h=r(66862);let c=!1;class d extends l.default{constructor(e){super("TR",e),(0,s.default)(this,"orderView",void 0),this.orderView=new a.OrderView(e,(e=>this.nodesPool.obtain(e)),this.nodeType)}getRenderedNode(e){return this.orderView.getNode(e)}render(){const{rowsToRender:e}=this.table;!c&&e>1e3&&(c=!0,(0,o.warn)(i.toSingleLine`Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting\x20
920
- the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&(0,u.setAttribute)(this.rootNode,[(0,h.A11Y_PRESENTATION)()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let n=0;n<e;n++){this.orderView.render();const e=this.orderView.getCurrentNode(),s=this.table.renderedRowToSource(n);var t,r;if(this.table.isAriaEnabled())(0,u.setAttribute)(e,[(0,h.A11Y_ROW)(),(0,h.A11Y_ROWINDEX)(s+(null!==(t=null===(r=this.table.rowUtils)||void 0===r||null===(r=r.dataAccessObject)||void 0===r?void 0:r.columnHeaders.length)&&void 0!==t?t:0)+1)])}this.orderView.end()}}t.default=d},92548:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.default)(this,"rootNode",void 0),(0,s.default)(this,"rootDocument",void 0),(0,s.default)(this,"rowHeaders",null),(0,s.default)(this,"columnHeaders",null),(0,s.default)(this,"colGroup",null),(0,s.default)(this,"rows",null),(0,s.default)(this,"cells",null),(0,s.default)(this,"rowFilter",null),(0,s.default)(this,"columnFilter",null),(0,s.default)(this,"rowUtils",null),(0,s.default)(this,"columnUtils",null),(0,s.default)(this,"rowsToRender",0),(0,s.default)(this,"columnsToRender",0),(0,s.default)(this,"rowHeaderFunctions",[]),(0,s.default)(this,"rowHeadersCount",0),(0,s.default)(this,"columnHeaderFunctions",[]),(0,s.default)(this,"columnHeadersCount",0),(0,s.default)(this,"cellRenderer",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=t}setAxisUtils(e,t){this.rowUtils=e,this.columnUtils=t}setViewportSize(e,t){this.rowsToRender=e,this.columnsToRender=t}setFilters(e,t){this.rowFilter=e,this.columnFilter=t}setHeaderContentRenderers(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}setRenderers(){let{rowHeaders:e,columnHeaders:t,colGroup:r,rows:n,cells:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),r.setTable(this),n.setTable(this),s.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=r,this.rows=n,this.cells=s}renderedRowToSource(e){return this.rowFilter.renderedToSource(e)}renderedColumnToSource(e){return this.columnFilter.renderedToSource(e)}isAriaEnabled(){return this.rowUtils.wtSettings.getSetting("ariaTags")}render(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:e,rows:t}=this;for(let r=0;r<e;r++){const e=t.getRenderedNode(r);if(e.firstChild){const t=this.renderedRowToSource(r),n=this.rowUtils.getHeight(t);e.firstChild.style.height=n?n-1+"px":""}}}}},53843:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(49587);var i=class{constructor(e){(0,s.default)(this,"dataAccessObject",void 0),(0,s.default)(this,"lastScrolledColumnPos",-1),(0,s.default)(this,"lastScrolledRowPos",-1),this.dataAccessObject=e}scrollViewport(e,t,r,n,s){const o=this.scrollViewportHorizontally(e.col,r,s),i=this.scrollViewportVertically(e.row,t,n);return o||i}scrollViewportHorizontally(e,t,r){const{drawn:n,totalColumns:s}=this.dataAccessObject;if(!n||!Number.isInteger(e)||e<0||e>s)return!1;const o=this.getFirstVisibleColumn(),i=this.getLastVisibleColumn(),a=void 0===t&&void 0===r,{fixedColumnsStart:l,inlineStartOverlay:u}=this.dataAccessObject;if(a&&e<l)return!1;let h=!1;return e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e),-1===o?h=u.scrollTo(e,a?e>this.lastScrolledColumnPos:t):(a&&(e<o||e>i)||!a)&&(h=u.scrollTo(e,a?e>i:t)),h&&(this.lastScrolledColumnPos=e),h}scrollViewportVertically(e,t,r){const{drawn:n,totalRows:s}=this.dataAccessObject;if(!n||!Number.isInteger(e)||e<0||e>s)return!1;const o=this.getFirstVisibleRow(),i=this.getLastVisibleRow(),a=void 0===t&&void 0===r,{fixedRowsBottom:l,fixedRowsTop:u,topOverlay:h}=this.dataAccessObject;if(a&&(e<u||e>s-l-1))return!1;let c=!1;return e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e),-1===o?c=h.scrollTo(e,a?e>this.lastScrolledRowPos:r):(a&&(e<o||e>i)||!a)&&(c=h.scrollTo(e,a?e>i:r)),c&&(this.lastScrolledRowPos=e),c}getFirstVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:r,totalRows:n,fixedRowsTop:s,rootWindow:i}=this.dataAccessObject;let a=t.getFirstVisibleRow();if(e.mainTableScrollableElement===i){const l=(0,o.offset)(t.wtRootElement),u=(0,o.innerHeight)(t.hider),h=(0,o.innerHeight)(i),c=(0,o.getScrollTop)(i,i);if(l.top+u-h<=c){let t=r.getColumnHeaderHeight();t+=e.sumCellSizes(0,s);for(let r=n;r>0;r--)if(t+=e.sumCellSizes(r-1,r),l.top+u-t<=c){a=r;break}}}return a}getLastVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:r,totalRows:n,rootWindow:s}=this.dataAccessObject;let i=t.getLastVisibleRow();if(e.mainTableScrollableElement===s){const a=(0,o.offset)(t.wtRootElement),l=(0,o.getScrollTop)(s,s);if(a.top>l){const t=(0,o.innerHeight)(s);let u=r.getColumnHeaderHeight();for(let r=1;r<=n;r++)if(u+=e.sumCellSizes(r-1,r),a.top+u-l>=t){i=r-2;break}}}return i}getFirstVisibleColumn(){const{inlineStartOverlay:e,wtTable:t,wtViewport:r,totalColumns:n,rootWindow:s}=this.dataAccessObject;let i=t.getFirstVisibleColumn();if(e.mainTableScrollableElement===s){const a=(0,o.offset)(t.wtRootElement),l=(0,o.innerWidth)(t.hider),u=(0,o.innerWidth)(s),h=Math.abs((0,o.getScrollLeft)(s,s));if(a.left+l-u<=h){let t=r.getRowHeaderWidth();for(let r=n;r>0;r--)if(t+=e.sumCellSizes(r-1,r),a.left+l-t<=h){i=r;break}}}return i}getLastVisibleColumn(){const{wtSettings:e,inlineStartOverlay:t,wtTable:r,wtViewport:n,totalColumns:s,rootWindow:i}=this.dataAccessObject;let a=r.getLastVisibleColumn();if(t.mainTableScrollableElement===i){let l=null;if(e.getSetting("rtlMode")){const e=r.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;l=Math.abs(e.right-t)}else{l=(0,o.offset)(r.wtRootElement).left}const u=Math.abs((0,o.getScrollLeft)(i,i));if(l>u){const e=(0,o.innerWidth)(i);let r=n.getRowHeaderWidth();for(let n=1;n<=s;n++)if(r+=t.sumCellSizes(n-1,n),l+r-u>=e){a=n-2;break}}}return a}};t.default=i},57253:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(49587),s=r(30369),o=r(76163),i=r(78498),a=r(14201);var l=class{constructor(e,t){t&&(this.eventManager=e.eventManager,this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.bottom=null,this.start=null,this.end=null,this.topStyle=null,this.bottomStyle=null,this.startStyle=null,this.endStyle=null,this.cornerDefaultStyle=a.CORNER_DEFAULT_STYLE,this.cornerCenterPointOffset=-parseInt(this.cornerDefaultStyle.width,10)/2,this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())}registerListeners(){const e=this.wot.rootDocument.body;this.eventManager.addEventListener(e,"mousedown",(()=>this.onMouseDown())),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()));for(let e=0,t=this.main.childNodes.length;e<t;e++){const t=this.main.childNodes[e];this.eventManager.addEventListener(t,"mouseenter",(t=>this.onMouseEnter(t,this.main.childNodes[e])))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(e,t){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;e.preventDefault(),(0,s.stopImmediatePropagation)(e);const r=this,n=this.wot.rootDocument.body,o=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(n,"mousemove",(function e(s){var i;((i=s).clientY<Math.floor(o.top)||i.clientY>Math.ceil(o.top+o.height)||i.clientX<Math.floor(o.left)||i.clientX>Math.ceil(o.left+o.width))&&(r.eventManager.removeEventListener(n,"mousemove",e),t.style.display="block")}))}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const r=["top","start","bottom","end","corner"];let n=this.main.style;n.position="absolute",n.top=0,n.left=0;for(let s=0;s<5;s++){const o=r[s],i=t.createElement("div");i.className=`wtBorder ${this.settings.className||""}`,this.settings[o]&&this.settings[o].hide&&(i.className+=" hidden"),n=i.style,n.backgroundColor=this.settings[o]&&this.settings[o].color?this.settings[o].color:e.border.color,n.height=this.settings[o]&&this.settings[o].width?`${this.settings[o].width}px`:`${e.border.width}px`,n.width=this.settings[o]&&this.settings[o].width?`${this.settings[o].width}px`:`${e.border.width}px`,this.main.appendChild(i)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,i.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:s}=this.wot;let o=s.bordersHolder;o||(o=t.createElement("div"),o.className="htBorders",s.bordersHolder=o,s.spreader.appendChild(o)),o.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:e}=this.wot;this.selectionHandles={top:e.createElement("DIV"),topHitArea:e.createElement("DIV"),bottom:e.createElement("DIV"),bottomHitArea:e.createElement("DIV")};this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};const t={position:"absolute",height:"40px",width:"40px","border-radius":`${parseInt(40/1.5,10)}px`};(0,o.objectEach)(t,((e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e}));const r={position:"absolute",height:"10px",width:"10px","border-radius":`${parseInt(10/1.5,10)}px`,background:"#F5F5FF",border:"1px solid #4285c8"};(0,o.objectEach)(r,((e,t)=>{this.selectionHandles.styles.bottom[t]=e,this.selectionHandles.styles.top[t]=e})),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}isPartRange(e,t){const r=this.wot.selectionManager.getAreaSelection();return!(!r.cellRange||e===r.cellRange.to.row&&t===r.cellRange.to.col)}updateMultipleSelectionHandlesPosition(e,t,r,n,s,o){const i=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:a,topHitArea:l,bottom:u,bottomHitArea:h}=this.selectionHandles.styles,c=parseInt(a.borderWidth,10),d=parseInt(a.width,10),f=parseInt(l.width,10),p=this.wot.wtTable.getWidth(),g=this.wot.wtTable.getHeight();a.top=`${parseInt(r-d-1,10)}px`,a[i]=`${parseInt(n-d-1,10)}px`,l.top=`${parseInt(r-f/4*3,10)}px`,l[i]=`${parseInt(n-f/4*3,10)}px`;const m=Math.min(parseInt(n+s,10),p-d-2*c),E=Math.min(parseInt(n+s-f/4,10),p-f-2*c);u[i]=`${m}px`,h[i]=`${E}px`;const y=Math.min(parseInt(r+o,10),g-d-2*c),w=Math.min(parseInt(r+o-f/4,10),g-f-2*c);u.top=`${y}px`,h.top=`${w}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(a.display="block",l.display="block",this.isPartRange(e,t)?(u.display="none",h.display="none"):(u.display="block",h.display="block")):(a.display="none",u.display="none",l.display="none",h.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(a.zIndex="9999",l.zIndex="9999"):(a.zIndex="",l.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:r,rootWindow:s}=this.wot;let o,a,l,u,h,c;const d=t.getRenderedRowsCount();for(let r=0;r<d;r+=1){const n=t.rowFilter.renderedToSource(r);if(n>=e[0]&&n<=e[2]){o=n,h=e[0];break}}for(let r=d-1;r>=0;r-=1){const n=t.rowFilter.renderedToSource(r);if(n>=e[0]&&n<=e[2]){a=n;break}}const f=t.getRenderedColumnsCount();for(let r=0;r<f;r+=1){const n=t.columnFilter.renderedToSource(r);if(n>=e[1]&&n<=e[3]){l=n,c=e[1];break}}for(let r=f-1;r>=0;r-=1){const n=t.columnFilter.renderedToSource(r);if(n>=e[1]&&n<=e[3]){u=n;break}}if(void 0===o||void 0===l)return void this.disappear();let p=t.getCell(this.wot.createCellCoords(o,l));const g=o!==a||l!==u,m=g?t.getCell(this.wot.createCellCoords(a,u)):p,E=(0,n.offset)(p),y=g?(0,n.offset)(m):E,w=(0,n.offset)(t.TABLE),C=(0,n.outerWidth)(t.TABLE),v=E.top,R=E.left,S=this.wot.wtSettings.getSetting("rtlMode");let T=0,N=0;if(S){const e=(0,n.outerWidth)(p),t=s.innerWidth-w.left-C;N=R+e-y.left,T=s.innerWidth-R-e-t-1}else N=y.left+(0,n.outerWidth)(m)-R,T=R-w.left-1;if(this.isEntireColumnSelected(o,a)){const e=this.getDimensionsFromHeader("columns",l,u,h,w);let t=null;e&&([t,T,N]=e),t&&(p=t)}let O=v-w.top-1,M=y.top+(0,n.outerHeight)(m)-v;if(this.isEntireRowSelected(l,u)){const e=this.getDimensionsFromHeader("rows",o,a,c,w);let t=null;e&&([t,O,M]=e),t&&(p=t)}const _=(0,n.getComputedStyle)(p,s);parseInt(_.borderTopWidth,10)>0&&(O+=1,M=M>0?M-1:0),parseInt(_[S?"borderRightWidth":"borderLeftWidth"],10)>0&&(T+=1,N=N>0?N-1:0);const A=S?"right":"left";this.topStyle.top=`${O}px`,this.topStyle[A]=`${T}px`,this.topStyle.width=`${N}px`,this.topStyle.display="block",this.startStyle.top=`${O}px`,this.startStyle[A]=`${T}px`,this.startStyle.height=`${M}px`,this.startStyle.display="block";const b=Math.floor(this.settings.border.width/2);this.bottomStyle.top=O+M-b+"px",this.bottomStyle[A]=`${T}px`,this.bottomStyle.width=`${N}px`,this.bottomStyle.display="block",this.endStyle.top=`${O}px`,this.endStyle[A]=T+N-b+"px",this.endStyle.height=`${M+1}px`,this.endStyle.display="block";let I=this.settings.border.cornerVisible;I="function"==typeof I?I(this.settings.layerLevel):I;const x=this.wot.getSetting("onModifyGetCellCoords",a,u);let[L,P]=[a,u];if(x&&Array.isArray(x)&&([,,L,P]=x),(0,i.isMobileBrowser)()||!I||this.isPartRange(L,P))this.cornerStyle.display="none";else{this.cornerStyle.top=O+M+this.cornerCenterPointOffset-1+"px",this.cornerStyle[A]=T+N+this.cornerCenterPointOffset-1+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=(0,n.getTrimmingContainer)(t.TABLE);const o=e===s;o&&(e=r.documentElement);const i=parseInt(this.cornerDefaultStyle.width,10)/2,l=parseInt(this.cornerDefaultStyle.height,10)/2;if(u===this.wot.getSetting("totalColumns")-1){const t=o?m.getBoundingClientRect().left:m.offsetLeft;let r=!1,s=0;S?(s=t-parseInt(this.cornerDefaultStyle.width,10)/2,r=s<0):(s=t+(0,n.outerWidth)(m)+parseInt(this.cornerDefaultStyle.width,10)/2,r=s>=(0,n.innerWidth)(e)),r&&(this.cornerStyle[A]=`${Math.floor(T+N+this.cornerCenterPointOffset-i)}px`,this.cornerStyle[S?"borderLeftWidth":"borderRightWidth"]=0)}if(a===this.wot.getSetting("totalRows")-1){(o?m.getBoundingClientRect().top:m.offsetTop)+(0,n.outerHeight)(m)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,n.innerHeight)(e)&&(this.cornerStyle.top=`${Math.floor(O+M+this.cornerCenterPointOffset-l)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,i.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(a,u,O,T,N,M)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,r,s,o){const{wtTable:i}=this.wot,a=i.wtRootElement.parentNode;let l=null,u=null,h=null,c=null,d=null,f=null,p=null,g=null;switch(e){case"rows":l=function(){return i.getRowHeader(...arguments)},u=function(){return(0,n.outerHeight)(...arguments)},h="ht__selection--rows",f="top";break;case"columns":l=function(){return i.getColumnHeader(...arguments)},u=function(){return(0,n.outerWidth)(...arguments)},h="ht__selection--columns",f="left"}if(a.classList.contains(h)){const e=this.wot.getSetting("columnHeaders").length;if(p=l(t,e-s),g=l(r,e-s),!p||!g)return!1;const i=(0,n.offset)(p),a=(0,n.offset)(g);return p&&g&&(c=i[f]-o[f]-1,d=a[f]+u(g)-i[f]),[p,c,d]}return!1}changeBorderStyle(e,t){const r=this[e].style,s=t[e];!s||s.hide?(0,n.addClass)(this[e],"hidden"):((0,n.hasClass)(this[e],"hidden")&&(0,n.removeClass)(this[e],"hidden"),r.backgroundColor=s.color,"top"!==e&&"bottom"!==e||(r.height=`${s.width}px`),"start"!==e&&"end"!==e||(r.width=`${s.width}px`))}changeBorderToDefaultStyle(e){const t=1,r="#000",n=this[e].style;n.backgroundColor=r,n.width=`${t}px`,n.height=`${t}px`}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?(0,n.addClass)(this[e],"hidden"):(0,n.removeClass)(this[e],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",(0,i.isMobileBrowser)()&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}};t.default=l},14201:(e,t)=>{"use strict";t.__esModule=!0;const r=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"});t.CORNER_DEFAULT_STYLE=r},90484:(e,t)=>{"use strict";t.__esModule=!0;t.ACTIVE_HEADER_TYPE="active-header";t.HEADER_TYPE="header";t.AREA_TYPE="area";t.FOCUS_TYPE="focus";t.FILL_TYPE="fill";t.ROW_TYPE="row";t.COLUMN_TYPE="column";t.CUSTOM_SELECTION_TYPE="custom-selection"},403:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s={SelectionManager:!0,Selection:!0},o=n(r(73864));t.Selection=o.default;var i=r(90484);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===i[e]||(t[e]=i[e]))}));var a=r(14201);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}));var l=r(62489);t.SelectionManager=l.SelectionManager},62489:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,r(44062);var s=n(r(42538)),o=n(r(48427)),i=r(49587),a=r(13136),l=n(r(57253));function u(e,t,r){h(e,t),t.set(e,r)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var c=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,E=new WeakSet;function y(){const e=(0,s.default)(this,p).get((0,s.default)(this,c)),t=(0,s.default)(this,c).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let r=0;r<t.length;r++)e.add(t[r]);e.forEach((e=>{var t,r;const n=(0,s.default)(this,c).wtTable.TABLE.querySelectorAll(`.${e}`);let o=[];Array.isArray(null===(t=(0,s.default)(this,d).options)||void 0===t?void 0:t.cellAttributes)&&(o=(0,s.default)(this,d).options.cellAttributes.map((e=>e[0]))),Array.isArray(null===(r=(0,s.default)(this,d).options)||void 0===r?void 0:r.headerAttributes)&&(o=[...o,...(0,s.default)(this,d).options.headerAttributes.map((e=>e[0]))]);for(let t=0,r=n.length;t<r;t++)(0,i.removeClass)(n[t],e),(0,i.removeAttribute)(n[t],o)})),e.clear()}t.SelectionManager=class{constructor(e){var t,r;h(t=this,r=E),r.add(t),u(this,c,{writable:!0,value:void 0}),u(this,d,{writable:!0,value:void 0}),u(this,f,{writable:!0,value:new a.SelectionScanner}),u(this,p,{writable:!0,value:new WeakMap}),u(this,g,{writable:!0,value:new WeakSet}),u(this,m,{writable:!0,value:new Map}),(0,o.default)(this,d,e)}setActiveOverlay(e){return(0,o.default)(this,c,e),(0,s.default)(this,f).setActiveOverlay((0,s.default)(this,c)),(0,s.default)(this,p).has((0,s.default)(this,c))||(0,s.default)(this,p).set((0,s.default)(this,c),new Set),this}getFocusSelection(){return null!==(0,s.default)(this,d)?(0,s.default)(this,d).getFocus():null}getAreaSelection(){return null!==(0,s.default)(this,d)?(0,s.default)(this,d).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if((0,s.default)(this,m).has(e)){const t=(0,s.default)(this,m).get(e);if(t.has((0,s.default)(this,c)))return t.get((0,s.default)(this,c));const r=new l.default((0,s.default)(this,c),e.settings);return t.set((0,s.default)(this,c),r),r}const t=new l.default((0,s.default)(this,c),e.settings);return(0,s.default)(this,m).set(e,new Map([[(0,s.default)(this,c),t]])),t}getBorderInstances(e){var t,r;return Array.from(null!==(t=null===(r=(0,s.default)(this,m).get(e))||void 0===r?void 0:r.values())&&void 0!==t?t:[])}destroyBorders(e){(0,s.default)(this,m).get(e).forEach((e=>e.destroy())),(0,s.default)(this,m).delete(e)}render(e){if(null===(0,s.default)(this,d))return;e&&function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,E,y).call(this);const t=Array.from((0,s.default)(this,d)),r=new Map;for(let e=0;e<t.length;e++){const n=t[e],{className:o,createLayers:i,selectionType:a}=n.settings;(0,s.default)(this,g).has(n)||((0,s.default)(this,g).add(n),n.addLocalHook("destroy",(()=>this.destroyBorders(n))));const l=this.getBorderInstance(n);if(n.isEmpty()){null==l||l.disappear();continue}if(o){(0,s.default)(this,f).setActiveSelection(n).scan().forEach((e=>{if(r.has(e)){const t=r.get(e);t.has(o)&&!0===i?t.set(o,t.get(o)+1):t.set(o,1)}else r.set(e,new Map([[o,1]]))}))}const u=n.getCorners();(0,s.default)(this,c).getSetting("onBeforeDrawBorders",u,a),null==l||l.appear(u)}r.forEach(((e,t)=>{var r,n;const o=Array.from(e).map((e=>{let[t,r]=e;return 1===r?t:[t,...Array.from({length:r-1},((e,r)=>`${t}-${r+1}`))]})).flat();o.forEach((e=>(0,s.default)(this,p).get((0,s.default)(this,c)).add(e))),(0,i.addClass)(t,o),"TD"===t.nodeName&&Array.isArray(null===(r=(0,s.default)(this,d).options)||void 0===r?void 0:r.cellAttributes)?(0,i.setAttribute)(t,(0,s.default)(this,d).options.cellAttributes):"TH"===t.nodeName&&Array.isArray(null===(n=(0,s.default)(this,d).options)||void 0===n?void 0:n.headerAttributes)&&(0,i.setAttribute)(t,(0,s.default)(this,d).options.headerAttributes)}))}}},13136:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),o=n(r(48427)),i=r(49587);function a(e,t,r){l(e,t),t.set(e,r)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var h=new WeakMap,c=new WeakMap,d=new WeakSet;function f(e){const{wtTable:t}=(0,s.default)(this,c),r=t.getRenderedRowsCount(),n=t.getRenderedColumnsCount();for(let s=0;s<r;s+=1){const r=t.rowFilter.renderedToSource(s);for(let s=0;s<n;s+=1)e(r,t.columnFilter.renderedToSource(s))}}t.SelectionScanner=class{constructor(){var e,t;l(e=this,t=d),t.add(e),a(this,h,{writable:!0,value:void 0}),a(this,c,{writable:!0,value:void 0})}setActiveOverlay(e){return(0,o.default)(this,c,e),this}setActiveSelection(e){return(0,o.default)(this,h,e),this}scan(){const e=(0,s.default)(this,h).settings.selectionType,t=new Set;return"active-header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"area"===e?this.scanCellsRange((e=>t.add(e))):"focus"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e))),this.scanCellsRange((e=>t.add(e)))):"fill"===e?this.scanCellsRange((e=>t.add(e))):"header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"row"===e?(this.scanRowsInHeadersRange((e=>t.add(e))),this.scanRowsInCellsRange((e=>t.add(e)))):"column"===e&&(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanColumnsInCellsRange((e=>t.add(e)))),t}scanColumnsInHeadersRange(e){const[t,r,n,o]=(0,s.default)(this,h).getCorners(),{wtTable:i}=(0,s.default)(this,c),a=i.getRenderedColumnsCount(),l=i.getColumnHeadersCount();let u=0;for(let d=-i.getRowHeadersCount();d<a;d++){const a=i.columnFilter.renderedToSource(d);if(!(a<r||a>o)){for(let d=-l;d<0;d++){if(d<t||d>n)continue;const f=d+l;let p=i.getColumnHeader(a,f);const g=(0,s.default)(this,c).getSetting("onBeforeHighlightingColumnHeader",a,f,{selectionType:(0,s.default)(this,h).settings.selectionType,columnCursor:u,selectionWidth:o-r+1});null!==g&&(g!==a&&(p=i.getColumnHeader(g,f)),e(p))}u+=1}}}scanRowsInHeadersRange(e){const[t,r,n,o]=(0,s.default)(this,h).getCorners(),{wtTable:i}=(0,s.default)(this,c),a=i.getRenderedRowsCount(),l=i.getRowHeadersCount();let u=0;for(let d=-i.getColumnHeadersCount();d<a;d++){const a=i.rowFilter.renderedToSource(d);if(!(a<t||a>n)){for(let d=-l;d<0;d++){if(d<r||d>o)continue;const f=d+l;let p=i.getRowHeader(a,f);const g=(0,s.default)(this,c).getSetting("onBeforeHighlightingRowHeader",a,f,{selectionType:(0,s.default)(this,h).settings.selectionType,rowCursor:u,selectionHeight:n-t+1});null!==g&&(g!==a&&(p=i.getRowHeader(g,f)),e(p))}u+=1}}}scanCellsRange(e){const[t,r,n,o]=(0,s.default)(this,h).getCorners(),{wtTable:a}=(0,s.default)(this,c);u(this,d,f).call(this,((l,u)=>{if(l>=t&&l<=n&&u>=r&&u<=o){const t=a.getCell((0,s.default)(this,c).createCellCoords(l,u)),r=(0,s.default)(this,c).getSetting("onAfterDrawSelection",l,u,(0,s.default)(this,h).settings.layerLevel);"string"==typeof r&&(0,i.addClass)(t,r),e(t)}}))}scanRowsInCellsRange(e){const[t,,r]=(0,s.default)(this,h).getCorners(),{wtTable:n}=(0,s.default)(this,c);u(this,d,f).call(this,((o,i)=>{if(o>=t&&o<=r){const t=n.getCell((0,s.default)(this,c).createCellCoords(o,i));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,r]=(0,s.default)(this,h).getCorners(),{wtTable:n}=(0,s.default)(this,c);u(this,d,f).call(this,((o,i)=>{if(i>=t&&i<=r){const t=n.getCell((0,s.default)(this,c).createCellCoords(o,i));e(t)}}))}}},73864:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(76163),o=n(r(63806));class i{constructor(e,t){this.settings=e,this.cellRange=t||null}isEmpty(){return null===this.cellRange}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row,e.col,t.row,t.col]}destroy(){this.runLocalHooks("destroy")}}(0,s.mixin)(i,o.default);var a=i;t.default=a},39373:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(49587),i=r(76163);t.default=class{constructor(e){(0,s.default)(this,"settings",{}),(0,s.default)(this,"defaults",Object.freeze(this.getDefaults())),(0,i.objectEach)(this.defaults,((t,r)=>{if(void 0!==e[r])this.settings[r]=e[r];else{if(void 0===t)throw new Error(`A required setting "${r}" was not provided`);this.settings[r]=t}}))}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,freezeOverlays:!1,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders:()=>[],columnHeaders:()=>[],totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,r)=>{const n=this.getSetting("data",e,t);(0,o.fastInnerText)(r,null==n?"":n)},columnWidth(){},rowHeight(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onBeforeViewportScrollHorizontally:e=>e,onBeforeViewportScrollVertically:e=>e,onScrollHorizontally:null,onScrollVertically:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:e=>e,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:e=>e,onBeforeHighlightingColumnHeader:e=>e,onWindowResize:null,onContainerElementResize:null,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1,ariaTags:!0}}update(e,t){return void 0===t?(0,i.objectEach)(e,((e,t)=>{this.settings[t]=e})):this.settings[e]=t,this}getSetting(e,t,r,n,s){return"function"==typeof this.settings[e]?this.settings[e](t,r,n,s):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}getSettingPure(e){return this.settings[e]}has(e){return!!this.settings[e]}}},58304:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=r(49587),i=r(46029),a=n(r(17976)),l=n(r(76191)),u=r(84355),h=n(r(66830)),c=n(r(18365)),d=r(24658),f=r(66862);var p=class{constructor(e,t,r,n,i){(0,s.default)(this,"wtSettings",null),(0,s.default)(this,"domBindings",void 0),(0,s.default)(this,"TBODY",null),(0,s.default)(this,"THEAD",null),(0,s.default)(this,"COLGROUP",null),(0,s.default)(this,"hasTableHeight",!0),(0,s.default)(this,"hasTableWidth",!0),(0,s.default)(this,"isTableVisible",!1),(0,s.default)(this,"tableOffset",0),(0,s.default)(this,"holderOffset",0),this.domBindings=r,this.isMaster="master"===i,this.name=i,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=n,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=r.rootTable,(0,o.removeTextNodes)(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;const a=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",(()=>this._modifyRowHeaderWidth(a))),this.rowUtils=new c.default(this.dataAccessObject,this.wtSettings),this.columnUtils=new h.default(this.dataAccessObject,this.wtSettings),this.tableRenderer=new u.Renderer({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer")})}is(e){return this.name===e}fixTableDomTree(){const e=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(e){const t=e.parentNode;let r;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,o.hasClass)(t,"wtHolder")||(r=this.domBindings.rootDocument.createElement("div"),r.className="wtSpreader",t&&t.insertBefore(r,e),r.appendChild(e)),r.style.position="relative",this.wtSettings.getSetting("ariaTags")&&(0,o.setAttribute)(r,[(0,f.A11Y_PRESENTATION)()]),r}createHider(e){const t=e.parentNode;let r;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,o.hasClass)(t,"wtHolder")||(r=this.domBindings.rootDocument.createElement("div"),r.className="wtHider",t&&t.insertBefore(r,e),r.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,o.setAttribute)(r,[(0,f.A11Y_PRESENTATION)()]),r}createHolder(e){const t=e.parentNode;let r;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,o.hasClass)(t,"wtHolder")||(r=this.domBindings.rootDocument.createElement("div"),r.style.position="relative",r.className="wtHolder",t&&t.insertBefore(r,e),this.isMaster&&(r.parentNode.className+="ht_master handsontable",r.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&(0,o.setAttribute)(r.parentNode,[(0,f.A11Y_PRESENTATION)()])),r.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,o.setAttribute)(r,[(0,f.A11Y_PRESENTATION)()]),r}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:r,wtViewport:n}=this.dataAccessObject,s=t.getSetting("totalRows"),i=t.getSetting("totalColumns"),u=t.getSetting("rowHeaders"),h=u.length,c=t.getSetting("columnHeaders"),f=c.length;let p=!1,g=e;if(this.isMaster&&(this.holderOffset=(0,o.offset)(this.holder),g=n.createRenderCalculators(g),h&&!t.getSetting("fixedColumnsStart"))){const e=r.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(g=!1)}if(this.isMaster&&(p=r.updateStateOfRendering()),g)this.isMaster&&n.createVisibleCalculators(),r&&r.refresh(!0);else{this.isMaster?this.tableOffset=(0,o.offset)(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=s>0?this.getFirstRenderedRow():0,t=i>0?this.getFirstRenderedColumn():0;this.rowFilter=new l.default(e,s,f),this.columnFilter=new a.default(t,i,h);let r=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),r=!0!==e.skipRender}if(r){let e;if(this.tableRenderer.setHeaderContentRenderers(u,c),(this.is(d.CLONE_BOTTOM)||this.is(d.CLONE_BOTTOM_INLINE_START_CORNER))&&this.tableRenderer.setHeaderContentRenderers(u,[]),this.resetOversizedRows(),this.tableRenderer.setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(e=this.dataAccessObject.workspaceWidth,this.dataAccessObject.wtViewport.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(d.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.dataAccessObject.wtViewport.createVisibleCalculators(),this.dataAccessObject.wtOverlays.refresh(!1),this.dataAccessObject.wtOverlays.applyToDOM();const t=(0,o.outerWidth)(this.hider),r=(0,o.outerWidth)(this.TABLE);0!==t&&r!==t&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),e!==this.dataAccessObject.wtViewport.getWorkspaceWidth()&&(this.dataAccessObject.wtViewport.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wtSettings.getSetting("onDraw",!0)}else this.is(d.CLONE_BOTTOM)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let m=!1;return this.isMaster&&(m=r.topOverlay.resetFixedPosition(),r.bottomOverlay.clone&&(m=r.bottomOverlay.resetFixedPosition()||m),m=r.inlineStartOverlay.resetFixedPosition()||m,r.topInlineStartCornerOverlay&&r.topInlineStartCornerOverlay.resetFixedPosition(),r.bottomInlineStartCornerOverlay&&r.bottomInlineStartCornerOverlay.clone&&r.bottomInlineStartCornerOverlay.resetFixedPosition()),m?(r.refreshAll(),r.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(g),p&&r.syncScrollWithMaster(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let r=this.wtSettings.getSetting("columnHeaders").length;const n=this.wtSettings.getSetting("defaultRowHeight");let s,i,a;const l=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;r;)r-=1,s=this.getColumnHeaderHeight(r),i=this.getColumnHeader(t,r),i&&(a=(0,o.innerHeight)(i),(!s&&n<a||s<a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=a),Array.isArray(l)?null!==l[r]&&void 0!==l[r]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=l[r]):isNaN(l)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=l),this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]<(l[r]||l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=l[r]||l))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,r=this.dataAccessObject.wtViewport.oversizedColumnHeaders;for(let n=0,s=e.getSetting("columnHeaders").length;n<s;n++)if(r[n]){if(!t[n]||0===t[n].childNodes.length)return;t[n].childNodes[0].style.height=`${r[n]}px`}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(d.CLONE_BOTTOM))&&!e.getSetting("externalRowCalculator")){const e=this.getRenderedRowsCount();for(let r=0;r<e;r++){const e=this.rowFilter.renderedToSource(r);t.oversizedRows&&t.oversizedRows[e]&&(t.oversizedRows[e]=void 0)}}}getCell(e){let t=e.row,r=e.col;const n=this.wtSettings.getSetting("onModifyGetCellCoords",t,r);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;const s=this.getRow(t);if(!s&&t>=0)throw new Error("TR was expected to be rendered but is not");const o=s.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(r)];if(!o&&r>=0)throw new Error("TD or TH was expected to be rendered but is not");return o}getRow(e){let t=null,r=null;var n,s;e<0?(t=null===(n=this.rowFilter)||void 0===n?void 0:n.sourceRowToVisibleColHeadedRow(e),r=this.THEAD):(t=null===(s=this.rowFilter)||void 0===s?void 0:s.sourceToRendered(e),r=this.TBODY);return void 0!==t&&void 0!==r&&(!(r.childNodes.length<t+1)&&r.childNodes[t])}getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=this.THEAD.childNodes[t];return null==r?void 0:r.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],r=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach((e=>{const n=e.childNodes[r];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;const r=this.rowFilter.sourceToRendered(e),n=r<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):r,s=(r<0?this.THEAD:this.TBODY).childNodes[n];return null==s?void 0:s.childNodes[t]}getRowHeaders(e){const t=[],r=this.wtSettings.getSetting("rowHeaders").length;for(let n=0;n<r;n++){const r=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],s=null==r?void 0:r.childNodes[n];s&&t.push(s)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,o.closest)(t,["TD","TH"])),null===t)return null;const r=t.parentNode,n=r.parentNode;let s=(0,o.index)(r),i=t.cellIndex;if((0,o.overlayContainsElement)(d.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,o.overlayContainsElement)(d.CLONE_TOP,t,this.wtRootElement))"THEAD"===n.nodeName&&(s-=n.childNodes.length);else if((0,o.overlayContainsElement)(d.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)||(0,o.overlayContainsElement)(d.CLONE_BOTTOM,t,this.wtRootElement)){s=this.wtSettings.getSetting("totalRows")-n.childNodes.length+s}else s=n===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(s):this.rowFilter.renderedToSource(s);return i=(0,o.overlayContainsElement)(d.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,o.overlayContainsElement)(d.CLONE_INLINE_START,t,this.wtRootElement)||(0,o.overlayContainsElement)(d.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(i):this.columnFilter.visibleRowHeadedColumnToSourceColumn(i),this.wot.createCellCoords(s,i)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;let t,r,n,s,i;if(e*this.wtSettings.getSetting("defaultRowHeight")!==(0,o.innerHeight)(this.TBODY)-1||this.wtSettings.getSetting("fixedRowsBottom"))for(;e;)e-=1,n=this.rowFilter.renderedToSource(e),t=this.getRowHeight(n),s=this.getTrForRow(n),i=s.querySelector("th"),r=i?(0,o.innerHeight)(i):(0,o.innerHeight)(s)-1,(!t&&this.wtSettings.getSetting("defaultRowHeight")<r||t<r)&&(r+=1,this.dataAccessObject.wtViewport.oversizedRows[n]=r)}getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}isColumnHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("rowHeaders").length;return Math.abs(e)<=t}isRowHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("columnHeaders").length;return Math.abs(e)<=t}isRowBeforeRenderedRows(e){const t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}isRowAfterRenderedRows(e){return e>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(e){const t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}isColumnAfterRenderedColumns(e){return this.columnFilter&&e>this.getLastRenderedColumn()}isColumnAfterViewport(e){return this.columnFilter&&e>this.getLastVisibleColumn()}isRowAfterViewport(e){return this.rowFilter&&e>this.getLastVisibleRow()}isColumnBeforeViewport(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}isLastRowFullyVisible(){return this.getLastVisibleRow()===this.getLastRenderedRow()}isLastColumnFullyVisible(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}allRowsInViewport(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}allColumnsInViewport(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}getRowHeight(e){return this.rowUtils.getHeight(e)}getColumnHeaderHeight(e){return this.columnUtils.getHeaderHeight(e)}getColumnWidth(e){return this.columnUtils.getWidth(e)}getStretchedColumnWidth(e){return this.columnUtils.getStretchedColumnWidth(e)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return(0,o.outerWidth)(this.TABLE)}getHeight(){return(0,o.outerHeight)(this.TABLE)}getTotalWidth(){const e=(0,o.outerWidth)(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=(0,o.outerHeight)(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return(0,o.isVisible)(this.TABLE)}_modifyRowHeaderWidth(e){let t=(0,i.isFunction)(e)?e():null;return Array.isArray(t)?(t=[...t],t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t}_correctRowHeaderWidth(e){let t=e;return"number"!=typeof e&&(t=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}};t.default=p},84218:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),o=n(r(3148)),i=n(r(27972)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_BOTTOM)}}(0,a.mixin)(u,o.default),(0,a.mixin)(u,i.default);var h=u;t.default=h},37917:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),o=n(r(3148)),i=n(r(29185)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_BOTTOM_INLINE_START_CORNER)}}(0,a.mixin)(u,o.default),(0,a.mixin)(u,i.default);var h=u;t.default=h},68215:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),o=n(r(46962)),i=n(r(29185)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_INLINE_START)}}(0,a.mixin)(u,o.default),(0,a.mixin)(u,i.default);var h=u;t.default=h},58454:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(49587),o=n(r(58304)),i=n(r(46962)),a=n(r(27972)),l=r(76163);class u extends o.default{constructor(e,t,r,n){super(e,t,r,n,"master")}alignOverlaysWithTrimmingContainer(){const e=(0,s.getTrimmingContainer)(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t){this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{const r=e.parentElement,n=(0,s.getStyle)(e,"height",t),o=(0,s.getStyle)(e,"overflow",t),i=this.holder.style,{scrollWidth:a,scrollHeight:l}=e;let u=e.offsetWidth,h=e.offsetHeight;if(r&&["auto","hidden","scroll"].includes(o)){const n=e.cloneNode(!1);n.style.overflow="auto",n.style.position="absolute",e.nextElementSibling?r.insertBefore(n,e.nextElementSibling):r.appendChild(n);const o=parseInt((0,s.getComputedStyle)(n,t).height,10);r.removeChild(n),0===o&&(h=0)}h=Math.min(h,l),i.height="auto"===n?"auto":`${h}px`,u=Math.min(u,a),i.width=`${u}px`,i.overflow="",this.hasTableHeight="auto"===i.height||h>0,this.hasTableWidth=u>0}this.isTableVisible=(0,s.isVisible)(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,r="master",n=e.getSetting("columnHeaders").length;if(n&&!t.hasOversizedColumnHeadersMarked[r]){const s=e.getSetting("rowHeaders").length,o=this.getRenderedColumnsCount();for(let e=0;e<n;e++)for(let e=-1*s;e<o;e++)this.markIfOversizedColumnHeader(e);t.hasOversizedColumnHeadersMarked[r]=!0}}}(0,l.mixin)(u,i.default),(0,l.mixin)(u,a.default);var h=u;t.default=h},27972:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getLastRenderedColumn(){const e=this.dataAccessObject.endColumnRendered;return null===e?-1:e},getLastVisibleColumn(){const e=this.dataAccessObject.endColumnVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,r(76163).defineGetter)(n,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});var s=n;t.default=s},46962:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getLastRenderedRow(){const e=this.dataAccessObject.endRowRendered;return null===e?-1:e},getLastVisibleRow(){const e=this.dataAccessObject.endRowVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,r(76163).defineGetter)(n,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});var s=n;t.default=s},29185:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedColumn(){return 0===this.wtSettings.getSetting("totalColumns")?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){const e=this.wtSettings.getSetting("totalColumns");return Math.min(this.wtSettings.getSetting("fixedColumnsStart"),e)},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,r(76163).defineGetter)(n,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});var s=n;t.default=s},3148:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),r=e-t;return 0===e||0===t?-1:r<0?0:r},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount:()=>0};(0,r(76163).defineGetter)(n,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});var s=n;t.default=s},75237:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedRow(){return 0===this.wtSettings.getSetting("totalRows")?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsTop"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,r(76163).defineGetter)(n,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});var s=n;t.default=s},54472:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),o=n(r(75237)),i=n(r(27972)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_TOP)}}(0,a.mixin)(u,o.default),(0,a.mixin)(u,i.default);var h=u;t.default=h},34868:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),o=n(r(75237)),i=n(r(29185)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_TOP_INLINE_START_CORNER)}}(0,a.mixin)(u,o.default),(0,a.mixin)(u,i.default);var h=u;t.default=h},66830:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(49587);t.default=class{constructor(e,t){(0,s.default)(this,"dataAccessObject",void 0),(0,s.default)(this,"wtSettings",void 0),(0,s.default)(this,"headerWidths",new Map),this.dataAccessObject=e,this.wtSettings=t}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getStretchedColumnWidth(e){const t=this.dataAccessObject.wtViewport.columnsRenderCalculator;let r=this.getWidth(e);if(t){const n=t.getStretchedColumnWidth(e,r);n&&(r=n)}return r}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const r=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==r&&(t=t?Math.max(t,r):r),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}calculateWidths(){const{wtSettings:e}=this,{wtTable:t,wtViewport:r,cloneSource:n}=this.dataAccessObject,s=n?n.wtTable.holder:t.holder,i=s.offsetHeight<s.scrollHeight?(0,o.getScrollbarWidth)():0;let a=e.getSetting("rowHeaderWidth");if(r.columnsRenderCalculator.refreshStretching(r.getViewportWidth()-i),a=e.getSetting("onModifyRowHeaderWidth",a),null!=a){const t=e.getSetting("rowHeaders").length,r=e.getSetting("defaultColumnWidth");for(let e=0;e<t;e++){let t=Array.isArray(a)?a[e]:a;t=null==t?r:t,this.headerWidths.set(e,t)}}}}},88929:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(e){(0,s.default)(this,"nodeType",void 0),this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}},79208:(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0;t.WORKING_SPACE_TOP=1;t.WORKING_SPACE_BOTTOM=2},32512:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(69191));t.OrderView=s.default;var o=n(r(81004));t.SharedOrderView=o.default},81004:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(69191));class o extends s.default{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}}t.default=o},69191:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(79208),i=n(r(72844));t.default=class{constructor(e,t,r){(0,s.default)(this,"rootNode",void 0),(0,s.default)(this,"nodesPool",void 0),(0,s.default)(this,"sizeSet",new i.default),(0,s.default)(this,"childNodeType",void 0),(0,s.default)(this,"visualIndex",0),(0,s.default)(this,"collectedNodes",[]),this.rootNode=e,this.nodesPool=t,this.childNodeType=r.toUpperCase()}setSize(e){return this.sizeSet.setSize(e),this}setOffset(e){return this.sizeSet.setOffset(e),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}getCurrentNode(){const e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}getRenderedChildCount(){const{rootNode:e,sizeSet:t}=this;let r=0;if(this.isSharedViewSet()){let n=e.firstElementChild;for(;n;){if(n.tagName===this.childNodeType)r+=1;else if(t.isPlaceOn(o.WORKING_SPACE_TOP))break;n=n.nextElementSibling}}else r=e.childElementCount;return r}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this,r=this.isSharedViewSet(),{nextSize:n}=t.getViewSize();let s=this.getRenderedChildCount();for(;s<n;){const n=this.nodesPool();!r||r&&t.isPlaceOn(o.WORKING_SPACE_BOTTOM)?e.appendChild(n):e.insertBefore(n,e.firstChild),s+=1}const i=r&&t.isPlaceOn(o.WORKING_SPACE_TOP);for(;s>n;)e.removeChild(i?e.firstChild:e.lastChild),s-=1}render(){const{rootNode:e,sizeSet:t}=this;let r=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(o.WORKING_SPACE_BOTTOM)&&(r+=t.sharedSize.nextSize);let n=e.childNodes[r];if(n.tagName!==this.childNodeType){const t=this.nodesPool();e.replaceChild(t,n),n=t}this.collectedNodes.push(n),this.visualIndex+=1}end(){}}},53566:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(){(0,s.default)(this,"currentSize",0),(0,s.default)(this,"nextSize",0),(0,s.default)(this,"currentOffset",0),(0,s.default)(this,"nextOffset",0)}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}},72844:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=n(r(53566)),i=r(79208);t.default=class{constructor(){(0,s.default)(this,"size",new o.default),(0,s.default)(this,"workingSpace",i.WORKING_SPACE_ALL),(0,s.default)(this,"sharedSize",null)}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof o.default}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=i.WORKING_SPACE_TOP,e.workingSpace=i.WORKING_SPACE_BOTTOM,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=i.WORKING_SPACE_BOTTOM,e.workingSpace=i.WORKING_SPACE_TOP,this.sharedSize=e.getViewSize()}}},18365:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(e,t){(0,s.default)(this,"dataAccessObject",void 0),(0,s.default)(this,"wtSettings",void 0),this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const r=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==r&&(t=void 0===t?r:Math.max(t,r)),t}}},55778:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(49587),s=r(76163),o=r(10933);var i=class{constructor(e,t,r,n,s){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=r,this.wtTable=s,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=n,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",(()=>{this.clientHeight=this.getWorkspaceHeight()}))}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let r=0;if(t===this.domBindings.rootWindow)r=e.documentElement.clientHeight;else{r=(0,n.outerHeight)(t)>0&&t.clientHeight>0?t.clientHeight:1/0}return r}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:r}=this.domBindings,s=this.dataAccessObject.inlineStartOverlayTrimmingContainer,o=t.documentElement.offsetWidth,i=e.getSetting("totalColumns"),a=e.getSetting("preventOverflow"),l=e.getSetting("rtlMode"),u=this.wtTable.TABLE.getBoundingClientRect(),h=o-(l?u.right-o:u.left);let c,d;if(a)return(0,n.outerWidth)(this.wtTable.wtRootElement);if(c=e.getSetting("freezeOverlays")?Math.min(h,o):Math.min(this.getContainerFillWidth(),h,o),s===r&&i>0&&this.sumColumnWidths(0,i-1)>c)return t.documentElement.clientWidth;if(s!==r&&(d=(0,n.getStyle)(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",r),"scroll"===d||"hidden"===d||"auto"===d))return Math.max(c,s.clientWidth);const f=e.getSetting("stretchH");return"none"!==f&&f?c:Math.max(c,(0,n.outerWidth)(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let r=0,n=e;for(;n<t;)r+=this.wtTable.getColumnWidth(n),n+=1;return r}getContainerFillWidth(){if(this.containerWidth)return this.containerWidth;const e=this.wtTable.holder,t=this.domBindings.rootDocument.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);const r=t.offsetWidth;return this.containerWidth=r,e.removeChild(t),r}getWorkspaceOffset(){return(0,n.offset)(this.wtTable.TABLE)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,n.outerHeight)(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getRowHeaderWidth(){const e=this.wtSettings.getSetting("rowHeaderWidth"),t=this.wtSettings.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(let r=0,n=t.length;r<n;r++)this.rowHeaderWidth+=e[r]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let r=0,s=t.length;r<s;r++)e?(this.rowHeaderWidth+=(0,n.outerWidth)(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.RENDER_TYPE;const{wtSettings:t,wtTable:r}=this;let s,i,a;this.rowHeaderWidth=NaN,s=t.getSetting("renderAllRows")&&e===o.RENDER_TYPE?1/0:this.getViewportHeight();let l=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const u=t.getSetting("fixedRowsTop"),h=t.getSetting("fixedRowsBottom"),c=t.getSetting("totalRows");return u&&l>=0&&(a=this.dataAccessObject.topOverlay.sumCellSizes(0,u),l+=a,s-=a),h&&this.dataAccessObject.bottomOverlay.clone&&(a=this.dataAccessObject.bottomOverlay.sumCellSizes(c-h,c),s-=a),i=r.holder.clientHeight===r.holder.offsetHeight?0:(0,n.getScrollbarWidth)(this.domBindings.rootDocument),new o.ViewportRowsCalculator({viewportHeight:s,scrollOffset:l,totalRows:t.getSetting("totalRows"),rowHeightFn:e=>r.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),calculationType:e,horizontalScrollbarHeight:i})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.RENDER_TYPE;const{wtSettings:t,wtTable:r}=this;let s=this.getViewportWidth(),i=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const a=t.getSetting("fixedColumnsStart");if(a&&i>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,a);i+=e,s-=e}return r.holder.clientWidth!==r.holder.offsetWidth&&(s-=(0,n.getScrollbarWidth)(this.domBindings.rootDocument)),new o.ViewportColumnsCalculator({viewportWidth:s,scrollOffset:i,totalColumns:t.getSetting("totalColumns"),columnWidthFn:e=>r.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),calculationType:e,stretchMode:t.getSetting("stretchH"),stretchingColumnWidthFn:(e,r)=>t.getSetting("onBeforeStretchingColumnWidth",e,r),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createRenderCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){const t=this.createRowsCalculator(o.FULLY_VISIBLE_TYPE),r=this.createColumnsCalculator(o.FULLY_VISIBLE_TYPE);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(r)||(e=!1)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(o.RENDER_TYPE),this.columnsRenderCalculator=this.createColumnsCalculator(o.RENDER_TYPE)),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}createVisibleCalculators(){this.rowsVisibleCalculator=this.createRowsCalculator(o.FULLY_VISIBLE_TYPE),this.columnsVisibleCalculator=this.createColumnsCalculator(o.FULLY_VISIBLE_TYPE)}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;const{startRow:t,endRow:r,isVisibleInTrimmingContainer:n}=e;if(null===t&&null===r)return!n;const{startRow:s,endRow:o}=this.rowsRenderCalculator;return!(t<s||t===s&&t>0)&&!(r>o||r===o&&r<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;const{startColumn:t,endColumn:r,isVisibleInTrimmingContainer:n}=e;if(null===t&&null===r)return!n;const{startColumn:s,endColumn:o}=this.columnsRenderCalculator;return!(t<s||t===s&&t>0)&&!(r>o||r===o&&r<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){(0,s.objectEach)(this.hasOversizedColumnHeadersMarked,((e,t,r)=>{r[t]=void 0}))}};t.default=i},73421:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(16247),r(25671),r(97796),r(36662);var s=n(r(40898)),o=r(83059),i=r(70400),a=n(r(54925)),l=r(19310),u=r(79321),h=r(44575),c=r(86446),d=r(94699);function f(e,t){const r=new s.default(e,t||{},o.rootInstanceSymbol);return r.init(),r}t.CellCoords=d.CellCoords,t.CellRange=d.CellRange,(0,u.registerCellType)(h.TextCellType),f.editors={BaseEditor:c.BaseEditor},f.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new s.default(e,t,o.rootInstanceSymbol)},f.DefaultSettings=(0,i.metaSchemaFactory)(),f.hooks=a.default.getSingleton(),f.CellCoords=d.CellCoords,f.CellRange=d.CellRange,f.packageName="handsontable",f.buildDate="07/11/2023 14:25:18",f.version="0.0.0-next-7b93b7d-20231107",f.languages={dictionaryKeys:l.dictionaryKeys,getLanguageDictionary:l.getLanguageDictionary,getLanguagesDictionaries:l.getLanguagesDictionaries,registerLanguageDictionary:l.registerLanguageDictionary,getTranslatedPhrase:l.getTranslatedPhrase};var p=f;t.default=p},90078:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(16478),s=r(20395),o=r(78420);const i="autocomplete";t.CELL_TYPE=i;const a={CELL_TYPE:i,editor:n.AutocompleteEditor,renderer:s.autocompleteRenderer,validator:o.autocompleteValidator};t.AutocompleteCellType=a},1544:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(90078);t.AutocompleteCellType=n.AutocompleteCellType,t.CELL_TYPE=n.CELL_TYPE},19992:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(73388),s=r(30201);const o="checkbox";t.CELL_TYPE=o;const i={CELL_TYPE:o,editor:n.CheckboxEditor,renderer:s.checkboxRenderer};t.CheckboxCellType=i},17177:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(19992);t.CELL_TYPE=n.CELL_TYPE,t.CheckboxCellType=n.CheckboxCellType},55261:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(92090),s=r(61795),o=r(63322);const i="date";t.CELL_TYPE=i;const a={CELL_TYPE:i,editor:n.DateEditor,renderer:s.dateRenderer,validator:o.dateValidator};t.DateCellType=a},69364:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(55261);t.CELL_TYPE=n.CELL_TYPE,t.DateCellType=n.DateCellType},93534:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(28544),s=r(20395),o=r(78420);const i="dropdown";t.CELL_TYPE=i;const a={CELL_TYPE:i,editor:n.DropdownEditor,renderer:s.autocompleteRenderer,validator:o.autocompleteValidator};t.DropdownCellType=a},29329:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(93534);t.CELL_TYPE=n.CELL_TYPE,t.DropdownCellType=n.DropdownCellType},37007:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(12540),s=r(75067);const o="handsontable";t.CELL_TYPE=o;const i={CELL_TYPE:o,editor:n.HandsontableEditor,renderer:s.handsontableRenderer};t.HandsontableCellType=i},26737:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(37007);t.CELL_TYPE=n.CELL_TYPE,t.HandsontableCellType=n.HandsontableCellType},419:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,f.registerCellType)(n.AutocompleteCellType),(0,f.registerCellType)(s.CheckboxCellType),(0,f.registerCellType)(o.DateCellType),(0,f.registerCellType)(i.DropdownCellType),(0,f.registerCellType)(a.HandsontableCellType),(0,f.registerCellType)(l.NumericCellType),(0,f.registerCellType)(u.PasswordCellType),(0,f.registerCellType)(h.SelectCellType),(0,f.registerCellType)(c.TextCellType),(0,f.registerCellType)(d.TimeCellType)};var n=r(1544);t.AutocompleteCellType=n.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=n.CELL_TYPE;var s=r(17177);t.CheckboxCellType=s.CheckboxCellType,t.CHECKBOX_TYPE=s.CELL_TYPE;var o=r(69364);t.DateCellType=o.DateCellType,t.DATE_TYPE=o.CELL_TYPE;var i=r(29329);t.DropdownCellType=i.DropdownCellType,t.DROPDOWN_TYPE=i.CELL_TYPE;var a=r(26737);t.HandsontableCellType=a.HandsontableCellType,t.HANDSONTABLE_TYPE=a.CELL_TYPE;var l=r(59854);t.NumericCellType=l.NumericCellType,t.NUMERIC_TYPE=l.CELL_TYPE;var u=r(97839);t.PasswordCellType=u.PasswordCellType,t.PASSWORD_TYPE=u.CELL_TYPE;var h=r(85e3);t.SelectCellType=h.SelectCellType,t.SELECT_TYPE=h.CELL_TYPE;var c=r(44575);t.TextCellType=c.TextCellType,t.TEXT_TYPE=c.CELL_TYPE;var d=r(738);t.TimeCellType=d.TimeCellType,t.TIME_TYPE=d.CELL_TYPE;var f=r(79321);t.registerCellType=f.registerCellType,t.getCellType=f.getCellType,t.getRegisteredCellTypeNames=f.getRegisteredCellTypeNames,t.getRegisteredCellTypes=f.getRegisteredCellTypes,t.hasCellType=f.hasCellType},59854:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(57846);t.CELL_TYPE=n.CELL_TYPE,t.NumericCellType=n.NumericCellType},57846:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(6618),s=r(94350),o=r(22905);const i="numeric";t.CELL_TYPE=i;const a={CELL_TYPE:i,editor:n.NumericEditor,renderer:s.numericRenderer,validator:o.numericValidator,dataType:"number"};t.NumericCellType=a},97839:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(28204);t.CELL_TYPE=n.CELL_TYPE,t.PasswordCellType=n.PasswordCellType},28204:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(50647),s=r(32991);const o="password";t.CELL_TYPE=o;const i={CELL_TYPE:o,editor:n.PasswordEditor,renderer:s.passwordRenderer,copyable:!1};t.PasswordCellType=i},79321:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getCellType=function(e){if(!h(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return u(e)},t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);const{editor:r,renderer:n,validator:s}=t;r&&(0,o.registerEditor)(e,r);n&&(0,i.registerRenderer)(e,n);s&&(0,a.registerValidator)(e,s);l(e,t)},r(60740);var s=n(r(31056)),o=r(16691),i=r(36996),a=r(59340);const{register:l,getItem:u,hasItem:h,getNames:c,getValues:d}=(0,s.default)("cellTypes");t.getRegisteredCellTypes=d,t.getRegisteredCellTypeNames=c,t.hasCellType=h},85e3:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(59139);t.CELL_TYPE=n.CELL_TYPE,t.SelectCellType=n.SelectCellType},59139:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(71177),s=r(9126);const o="select";t.CELL_TYPE=o;const i={CELL_TYPE:o,editor:n.SelectEditor,renderer:s.selectRenderer};t.SelectCellType=i},44575:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(89294);t.CELL_TYPE=n.CELL_TYPE,t.TextCellType=n.TextCellType},89294:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953),s=r(26031);const o="text";t.CELL_TYPE=o;const i={CELL_TYPE:o,editor:n.TextEditor,renderer:s.textRenderer};t.TextCellType=i},738:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(59115);t.CELL_TYPE=n.CELL_TYPE,t.TimeCellType=n.TimeCellType},59115:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(76219),s=r(78279),o=r(85137);const i="time";t.CELL_TYPE=i;const a={CELL_TYPE:i,editor:n.TimeEditor,renderer:s.timeRenderer,validator:o.timeValidator};t.TimeCellType=a},40898:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.default=function(e,t){var r,n=this;let H=arguments.length>2&&void 0!==arguments[2]&&arguments[2],F=!1,U=this;const V=new u.default(U);let B,W,Y,G,j,z=!0;(0,T.hasValidParameter)(H)&&(0,T.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const $=null!==(r=null==t?void 0:t.layoutDirection)&&void 0!==r?r:"inherit",K=["rtl","ltr"].includes($)?$:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",K),this.isRtl=function(){return"rtl"===K},this.isLtr=function(){return!U.isRtl()},this.getDirectionFactor=function(){return U.isLtr()?1:-1},t.language=(0,M.getValidLanguageCode)(t.language);const X=new b.MetaManager(U,t,[b.DynamicCellMetaMod,b.ExtendMetaPropertiesMod]),q=X.getTableMeta(),Q=X.getGlobalMeta(),Z=(0,x.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,T.isRootInstance)(this)&&(0,i._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,y.randomString)()}`,k.set(this.guid,this),this.columnIndexMapper=new S.IndexMapper,this.rowIndexMapper=new S.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{U.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{U.runHooks("afterRowSequenceChange",e)})),W=new v.default(U),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let J=new A.Selection(q,{rowIndexMapper:U.rowIndexMapper,columnIndexMapper:U.columnIndexMapper,countCols:()=>U.countCols(),countRows:()=>U.countRows(),propToCol:e=>B.propToCol(e),isEditorOpened:()=>!!U.getActiveEditor()&&U.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),getShortcutManager:()=>U.getShortcutManager(),createCellCoords:(e,t)=>U._createCellCoords(e,t),createCellRange:(e,t,r)=>U._createCellRange(e,t,r),visualToRenderableCoords:e=>{const{row:t,col:r}=e;return U._createCellCoords(t>=0?U.rowIndexMapper.getRenderableFromVisualIndex(t):t,r>=0?U.columnIndexMapper.getRenderableFromVisualIndex(r):r)},renderableToVisualCoords:e=>{const{row:t,col:r}=e;return U._createCellCoords(t>=0?U.rowIndexMapper.getVisualFromRenderableIndex(t):t,r>=0?U.columnIndexMapper.getVisualFromRenderableIndex(r):r)},isDisabledCellSelection:(e,t)=>e<0||t<0?U.getSettings().disableVisualSelection:U.getCellMeta(e,t).disableVisualSelection});this.selection=J;const ee=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function te(e){const t=(0,_.normalizeLanguageCode)(e);(0,M.hasLanguageDictionary)(t)?(U.runHooks("beforeLanguageChange",t),Q.language=t,U.runHooks("afterLanguageChange",t)):(0,_.warnUserAboutLanguageRegistration)(e)}function re(e,t){const r="className"===e?U.rootElement:U.table;if(z)(0,s.addClass)(r,t);else{let n=[],o=[];Q[e]&&(n=Array.isArray(Q[e])?Q[e]:(0,d.stringToArray)(Q[e])),t&&(o=Array.isArray(t)?t:(0,d.stringToArray)(t));const i=(0,d.getDifferenceOfArrays)(n,o),a=(0,d.getDifferenceOfArrays)(o,n);i.length&&(0,s.removeClass)(r,i),a.length&&(0,s.addClass)(r,a)}Q[e]=t}function ne(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function se(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function oe(e,t,r){if(!e.length)return;const n=U.getActiveEditor(),o=new ne;let i=!0;o.onQueueEmpty=e=>{n&&i&&n.cancelChanges(),r(e)};for(let r=e.length-1;r>=0;r--){const[n,a,,l]=e[r],u=B.propToCol(a),h=U.getCellMeta(n,u);"numeric"===h.type&&"string"==typeof l&&(0,w.isNumericLike)(l)&&(e[r][3]=se(l)),U.getCellValidator(h)&&(o.addValidatorToQueue(),U.validateCell(e[r][3],h,function(t,r){return function(n){if("boolean"!=typeof n)throw new Error("Validation error: result is not boolean");if(!1===n&&!1===r.allowInvalid){i=!1,e.splice(t,1),r.valid=!0;const n=U.getCell(r.visualRow,r.visualCol);null!==n&&(0,s.removeClass)(n,q.invalidCellClassName)}o.removeValidatorFormQueue()}}(r,h),t))}o.checkIfQueueIsEmpty()}function ie(e,t){let r=e.length-1;if(r<0)return;for(;r>=0;r--){let n=!1;if(null!==e[r]){if(null!==e[r][2]&&void 0!==e[r][2]||null!==e[r][3]&&void 0!==e[r][3]){if(q.allowInsertRow)for(;e[r][0]>U.countRows()-1;){const{delta:e}=B.createRow(void 0,void 0,{source:t});if(0===e){n=!0;break}}if("array"===U.dataType&&(!q.columns||0===q.columns.length)&&q.allowInsertColumn)for(;B.propToCol(e[r][1])>U.countCols()-1;){const{delta:e}=B.createCol(void 0,void 0,{source:t});if(0===e){n=!0;break}}n||B.set(e[r][0],e[r][1],e[r][3])}}else e.splice(r,1)}U.forceFullRender=!0,Y.adjustRowsAndCols(),U.runHooks("beforeChangeRender",e,t),G.lockEditor(),U._refreshBorders(null),G.unlockEditor(),U.view.adjustElementsSize(),U.runHooks("afterChange",e,t||"edit");const n=U.getActiveEditor();n&&(0,i.isDefined)(n.refreshValue)&&n.refreshValue()}function ae(e,t,r){return Array.isArray(e)?e:[[e,t,r]]}function le(e,t){const r=U.getActiveEditor(),n=U.runHooks("beforeChange",e,t||"edit"),s=e.filter((e=>null!==e));return!1===n||0===s.length?(r&&r.cancelChanges(),[]):s}this.columnIndexMapper.addLocalHook("cacheUpdated",ee),this.rowIndexMapper.addLocalHook("cacheUpdated",ee),this.selection.addLocalHook("afterSetRangeEnd",(e=>{const t=(0,h.createObjectPropListener)(!1),r=this.selection.getSelectedRange(),{from:n,to:o}=r.current(),i=r.size()-1;this.runHooks("afterSelection",n.row,n.col,o.row,o.col,t,i),this.runHooks("afterSelectionByProp",n.row,U.colToProp(n.col),o.row,U.colToProp(o.col),t,i);let a=!0;F&&(a=!1),t.isTouched()&&(a=!t.value);const l=this.selection.selectedRange.current(),u=this.selection.isSelectedByAnyHeader(),c=this.selection.isSelectedByRowHeader(),d=this.selection.isSelectedByColumnHeader();if(!1!==a)if(u)c?this.scrollViewportTo({row:e.row}):d&&this.scrollViewportTo({col:e.col});else if(l&&!this.selection.isMultiple()){const{row:e,col:t}=l.from;e<0&&t>=0?this.scrollViewportTo({col:t}):t<0&&e>=0?this.scrollViewportTo({row:e}):this.scrollViewportTo({row:e,col:t})}else this.scrollViewportTo(e.toObject());c&&d?(0,s.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):c?((0,s.removeClass)(this.rootElement,"ht__selection--columns"),(0,s.addClass)(this.rootElement,"ht__selection--rows")):d?((0,s.removeClass)(this.rootElement,"ht__selection--rows"),(0,s.addClass)(this.rootElement,"ht__selection--columns")):(0,s.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(e=>{const t=e.length-1,{from:r,to:n}=e[t];this.runHooks("afterSelectionEnd",r.row,r.col,n.row,n.col,t),this.runHooks("afterSelectionEndByProp",r.row,U.colToProp(r.col),n.row,U.colToProp(n.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("afterDeselect",(()=>{G.destroyEditor(),this._refreshBorders(),(0,s.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")})),this.selection.addLocalHook("beforeHighlightSet",(()=>this.runHooks("beforeSelectionHighlightSet"))).addLocalHook("beforeSetRangeStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSetRangeStart",...t)})).addLocalHook("beforeSetRangeStartOnly",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSetRangeStartOnly",...t)})).addLocalHook("beforeSetRangeEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSetRangeEnd",...t)})).addLocalHook("beforeSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSelectColumns",...t)})).addLocalHook("afterSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterSelectColumns",...t)})).addLocalHook("beforeSelectRows",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSelectRows",...t)})).addLocalHook("afterSelectRows",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterSelectRows",...t)})).addLocalHook("beforeModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("modifyTransformStart",...t)})).addLocalHook("afterModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterModifyTransformStart",...t)})).addLocalHook("beforeModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("modifyTransformEnd",...t)})).addLocalHook("afterModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterModifyTransformEnd",...t)})).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeRowWrap",...t)})).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeColumnWrap",...t)})).addLocalHook("insertRowRequire",(e=>this.alter("insert_row_above",e,1,"auto"))).addLocalHook("insertColRequire",(e=>this.alter("insert_col_start",e,1,"auto"))),Y={alter(e,t){var r,n;let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;const l=e=>{if(0===e.length)return[];const t=[...e];t.sort(((e,t)=>{let[r]=e,[n]=t;return r===n?0:r>n?1:-1}));return(0,d.arrayReduce)(t,((e,t)=>{let[r,n]=t;const s=e[e.length-1],[o,i]=s,a=o+i;if(r<=a){const e=Math.max(n-(a-r),0);s[1]+=e}else e.push([r,n]);return e}),[t[0]])};switch(e){case"insert_row_below":case"insert_row_above":const a=U.countSourceRows();if(q.maxRows===a)return;const u="insert_row_below"===e?"below":"above";t=null!==(r=t)&&void 0!==r?r:"below"===u?a:0;const{delta:h,startPhysicalIndex:c}=B.createRow(t,s,{source:o,mode:u});if(h){const e=J.selectedRange.current(),t=null==e?void 0:e.from,r=null==t?void 0:t.row,n=U.toVisualRow(c);if(J.isSelectedByCorner())J.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,i.isDefined)(r)&&r>=n){const{row:n,col:s}=e.to;let o=t.col;J.isSelectedByRowHeader()&&(o=-1),J.getSelectedRange().pop(),J.setRangeStartOnly(U._createCellCoords(r+h,o),!0),J.setRangeEnd(U._createCellCoords(n+h,s))}else U._refreshBorders()}break;case"insert_col_start":case"insert_col_end":const f="insert_col_end"===e?"end":"start";t=null!==(n=t)&&void 0!==n?n:"end"===f?U.countSourceCols():0;const{delta:p,startPhysicalIndex:g}=B.createCol(t,s,{source:o,mode:f});if(p){if(Array.isArray(q.colHeaders)){const e=[U.toVisualColumn(g),0];e.length+=p,Array.prototype.splice.apply(q.colHeaders,e)}const e=J.selectedRange.current(),t=null==e?void 0:e.from,r=null==t?void 0:t.col,n=U.toVisualColumn(g);if(J.isSelectedByCorner())J.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,i.isDefined)(r)&&r>=n){const{row:n,col:s}=e.to;let o=t.row;J.isSelectedByColumnHeader()&&(o=-1),J.getSelectedRange().pop(),J.setRangeStartOnly(U._createCellCoords(o,r+p),!0),J.setRangeEnd(U._createCellCoords(n,s+p))}else U._refreshBorders()}break;case"remove_row":const m=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[r,n]=e;const s=(0,i.isEmpty)(r)?U.countRows()-1:Math.max(r-t,0);Number.isInteger(r)&&(r=Math.max(r-t,0));if(!B.removeRow(r,n,o))return;const a=U.countRows(),l=q.fixedRowsTop;l>=s+1&&(q.fixedRowsTop-=Math.min(n,l-s));const u=q.fixedRowsBottom;u&&s>=a-u&&(q.fixedRowsBottom-=Math.min(n,u)),t+=n}))};Array.isArray(t)?m(l(t)):m([[t,s]]),Y.adjustRowsAndCols(),U._refreshBorders();break;case"remove_col":const E=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[r,n]=e;const s=(0,i.isEmpty)(r)?U.countCols()-1:Math.max(r-t,0);let a=U.toPhysicalColumn(s);Number.isInteger(r)&&(r=Math.max(r-t,0));if(!B.removeCol(r,n,o))return;const l=q.fixedColumnsStart;l>=s+1&&(q.fixedColumnsStart-=Math.min(n,l-s)),Array.isArray(q.colHeaders)&&(void 0===a&&(a=-1),q.colHeaders.splice(a,n)),t+=n}))};Array.isArray(t)?E(l(t)):E([[t,s]]),Y.adjustRowsAndCols(),U._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}a||Y.adjustRowsAndCols()},adjustRowsAndCols(){const e=q.minRows,t=q.minSpareRows,r=q.minCols,n=q.minSpareCols;if(0===U.countRows()&&0===U.countCols()&&J.deselect(),e){const t=U.countRows();t<e&&B.createRow(t,e-t,{source:"auto"})}if(t){const e=U.countEmptyRows(!0);if(e<t){const r=t-e,n=Math.min(r,q.maxRows-U.countSourceRows());B.createRow(U.countRows(),n,{source:"auto"})}}{let e;(r||n)&&(e=U.countEmptyCols(!0));let t=U.countCols();if(r&&!q.columns&&t<r){const n=r-t;e+=n,B.createCol(t,n,{source:"auto"})}if(n&&!q.columns&&"array"===U.dataType&&e<n){t=U.countCols();const r=n-e,s=Math.min(r,q.maxCols-t);B.createCol(t,s,{source:"auto"})}}if(J.isSelected()){const e=U.countRows(),t=U.countCols();(0,d.arrayEach)(J.selectedRange,(r=>{let n=!1,s=r.from.row,o=r.from.col,i=r.to.row,a=r.to.col;s>e-1?(s=e-1,n=!0,i>s&&(i=s)):i>e-1&&(i=e-1,n=!0,s>i&&(s=i)),o>t-1?(o=t-1,n=!0,a>o&&(a=o)):a>t-1&&(a=t-1,n=!0,o>a&&(o=a)),n&&U.selectCell(s,o,i,a)}))}U.view&&U.view.adjustElementsSize()},populateFromArray(e,t,r,n,s){let o,i,a,l;const u=[],c={},f=[],p=e.row,g=e.col;if(i=t.length,0===i)return!1;let m=0,E=0;switch((0,h.isObject)(r)&&(m=r.col-g+1,E=r.row-p+1),s){case"shift_down":const s=(0,d.pivot)(t),y=s.length,w=Math.max(y,m),C=U.getData().slice(p),v=(0,d.pivot)(C).slice(g,g+w);for(a=0;a<w;a+=1)if(a<y){for(o=0,i=s[a].length;o<E-i;o+=1)s[a].push(s[a][o%i]);a<v.length?f.push(s[a].concat(v[a])):f.push(s[a].concat(new Array(C.length).fill(null)))}else f.push(s[a%y].concat(v[a]));U.populateFromArray(p,g,(0,d.pivot)(f));break;case"shift_right":const R=t.length,S=Math.max(R,E),T=U.getData().slice(p).map((e=>e.slice(g)));for(o=0;o<S;o+=1)if(o<R){for(a=0,l=t[o].length;a<m-l;a+=1)t[o].push(t[o][a%l]);if(o<T.length)for(let e=0;e<T[o].length;e+=1)t[o].push(T[o][e]);else t[o].push(...new Array(T[0].length).fill(null))}else t.push(t[o%i].slice(0,S).concat(T[o]));U.populateFromArray(p,g,t);break;default:c.row=e.row,c.col=e.col;let N,O=0,M=0,_=!0;const A=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=t[e%t.length];return null!==r?n[r%n.length]:n},b=t.length,I=r?r.row-e.row+1:0;for(i=r?I:Math.max(b,I),o=0;o<i&&!(r&&c.row>r.row&&I>b||!q.allowInsertRow&&c.row>U.countRows()-1||c.row>=q.maxRows);o++){const t=o-O,s=A(t).length,d=r?r.col-e.col+1:0;if(l=r?d:Math.max(s,d),c.col=e.col,N=U.getCellMeta(c.row,c.col),"CopyPaste.paste"!==n&&"Autofill.fill"!==n||!N.skipRowOnPaste){for(M=0,a=0;a<l&&!(r&&c.col>r.col&&d>s||!q.allowInsertColumn&&c.col>U.countCols()-1||c.col>=q.maxCols);a++){if(N=U.getCellMeta(c.row,c.col),("CopyPaste.paste"===n||"Autofill.fill"===n)&&N.skipColumnOnPaste){M+=1,c.col+=1,l+=1;continue}if(N.readOnly&&"UndoRedo.undo"!==n){c.col+=1;continue}let e=A(t,a-M),r=U.getDataAtCell(c.row,c.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===r&&(r=[]),null===r||"object"!=typeof r)_=!1;else{const t=(0,h.duckSchema)(Array.isArray(r)?r:r[0]||r),n=(0,h.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,h.isObjectEqual)(t,n)||Array.isArray(t)&&Array.isArray(n)?e=(0,h.deepClone)(e):_=!1}else null!==r&&"object"==typeof r&&(_=!1);_&&u.push([c.row,c.col,e]),_=!0,c.col+=1}c.row+=1}else O+=1,c.row+=1,i+=1}U.setDataAtCell(u,null,null,n||"populateFromArray")}}},this.init=function(){W.setData(q.data),U.runHooks("beforeInit"),((0,a.isMobileBrowser)()||(0,a.isIpadOS)())&&(0,s.addClass)(U.rootElement,"mobile"),this.updateSettings(q,!0),this.view=new C.default(this),G=l.default.getInstance(U,q,J),j=new c.FocusManager(U),(0,T.isRootInstance)(this)&&(0,I.installFocusCatcher)(U),U.runHooks("init"),this.forceFullRender=!0,this.view.render(),z&&null===U.rootElement.offsetParent&&(0,s.observeVisibilityChangeOnce)(U.rootElement,(()=>{U.view._wt.wtOverlays.updateLastSpreaderSize(),U.render(),U.view.adjustElementsSize()})),"object"==typeof z&&(U.runHooks("afterChange",z[0],z[1]),z=!1),U.runHooks("afterInit")},this._createCellCoords=function(e,t){return U.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,r){return U.view._wt.createCellRange(e,t,r)},this.validateCell=function(e,t,r,n){let s=U.getCellValidator(t);function a(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])||!0===t.hidden)return void r(e);const n=t.visualCol,s=t.visualRow,o=U.getCell(s,n,!0);if(o&&"TH"!==o.nodeName){const e=U.rowIndexMapper.getRenderableFromVisualIndex(s),t=U.columnIndexMapper.getRenderableFromVisualIndex(n);U.view._wt.getSetting("cellRenderer",e,t,o)}r(e)}var l;(0,i.isRegExp)(s)&&(l=s,s=function(e,t){t(l.test(e))}),(0,o.isFunction)(s)?(e=U.runHooks("beforeValidate",e,t.visualRow,t.prop,n),U._registerImmediate((()=>{s.call(t,e,(r=>{U&&(r=U.runHooks("afterValidate",r,e,t.visualRow,t.prop,n),t.valid=r,a(r),U.runHooks("postAfterValidate",r,e,t.visualRow,t.prop,n))}))}))):U._registerImmediate((()=>{t.valid=!0,a(t.valid,!1)}))},this.setDataAtCell=function(e,t,r,n){const s=ae(e,t,r),o=[];let i,a,l,u=n;for(i=0,a=s.length;i<a;i++){if("object"!=typeof s[i])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof s[i][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");l=s[i][1]>=this.countCols()?s[i][1]:B.colToProp(s[i][1]),o.push([s[i][0],l,W.getAtCell(this.toPhysicalRow(s[i][0]),s[i][1]),s[i][2]])}u||"object"!=typeof e||(u=t);const h=le(o,n);U.runHooks("afterSetDataAtCell",h,u),oe(h,u,(()=>{ie(h,u)}))},this.setDataAtRowProp=function(e,t,r,n){const s=ae(e,t,r),o=[];let i,a,l=n;for(i=0,a=s.length;i<a;i++)o.push([s[i][0],s[i][1],W.getAtCell(this.toPhysicalRow(s[i][0]),s[i][1]),s[i][2]]);l||"object"!=typeof e||(l=t);const u=le(o,n);U.runHooks("afterSetDataAtRowProp",u,l),oe(u,l,(()=>{ie(u,l)}))},this.listen=function(){U&&!U.isListening()&&(k.forEach((e=>{U!==e&&e.unlisten()})),D=U.guid,U.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(D=null,U.runHooks("afterUnlisten"))},this.isListening=function(){return D===U.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];U._refreshBorders(e,t)},this.populateFromArray=function(e,t,r,n,s,o,i){if("object"!=typeof r||"object"!=typeof r[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const a="number"==typeof n?U._createCellCoords(n,s):null;return Y.populateFromArray(U._createCellCoords(e,t),r,a,o,i)},this.spliceCol=function(e,t,r){for(var n=arguments.length,s=new Array(n>3?n-3:0),o=3;o<n;o++)s[o-3]=arguments[o];return B.spliceCol(e,t,r,...s)},this.spliceRow=function(e,t,r){for(var n=arguments.length,s=new Array(n>3?n-3:0),o=3;o<n;o++)s[o-3]=arguments[o];return B.spliceRow(e,t,r,...s)},this.getSelected=function(){if(J.isSelected())return(0,d.arrayMap)(J.getSelectedRange(),(e=>{let{from:t,to:r}=e;return[t.row,t.col,r.row,r.col]}))},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(J.isSelected())return Array.from(J.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!J.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,d.arrayEach)(J.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const r=e.getTopStartCorner(),n=e.getBottomEndCorner();(0,w.rangeEach)(r.row,n.row,(e=>{(0,w.rangeEach)(r.col,n.col,(r=>{this.getCellMeta(e,r).readOnly||t.push([e,r,null])}))}))})),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||(this.renderCall?this.render():this._refreshBorders(null))},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||(G.lockEditor(),this._refreshBorders(null),G.unlockEditor()))},this.batchRender=function(e){this.suspendRender();const t=e();return this.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const r=e();return this.resumeExecution(t),r},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!U.view)return;const{width:e,height:t}=U.view.getLastSize(),{width:r,height:n}=U.rootElement.getBoundingClientRect(),s=r!==e||n!==t;!1===U.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:r,height:n},s)||((s||U.view._wt.wtOverlays.scrollableElement===U.rootWindow)&&(U.view.setLastSize(r,n),U.render()),U.runHooks("afterRefreshDimensions",{width:e,height:t},{width:r,height:n},s))},this.updateData=function(e,t){(0,b.replaceData)(e,(e=>{B=e}),(e=>{B=e,U.columnIndexMapper.fitToLength(this.getInitialColumnCount()),U.rowIndexMapper.fitToLength(this.countSourceRows()),Y.adjustRowsAndCols()}),{hotInstance:U,dataMap:B,dataSource:W,internalSource:"updateData",source:t,metaManager:X,firstRun:z})},this.loadData=function(e,t){(0,b.replaceData)(e,(e=>{B=e}),(()=>{X.clearCellsCache(),U.initIndexMappers(),Y.adjustRowsAndCols(),z&&(z=[null,"loadData"])}),{hotInstance:U,dataMap:B,dataSource:W,internalSource:"loadData",source:t,metaManager:X,firstRun:z})},this.getInitialColumnCount=function(){const e=q.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,o.isFunction)(e))if("array"===U.dataType){const r=this.countSourceCols();for(let n=0;n<r;n+=1)e(n)&&(t+=1)}else"object"!==U.dataType&&"function"!==U.dataType||(t=B.colToPropCache.length);else if((0,i.isDefined)(q.dataSchema)){const e=B.getSchema();t=Array.isArray(e)?e.length:(0,h.deepObjectSize)(e)}else t=this.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,r,n){return(0,i.isUndefined)(e)?B.getAll():B.getRange(U._createCellCoords(e,t),U._createCellCoords(r,n),B.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,r,n){return B.getCopyableText(U._createCellCoords(e,t),U._createCellCoords(r,n))},this.getCopyableData=function(e,t){return B.getCopyable(e,B.colToProp(t))},this.getSchema=function(){return B.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=(z?U.loadData:U.updateData).bind(this);let n,s,a=!1;if((0,i.isDefined)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,i.isDefined)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,i.isDefined)(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(n in e)"data"===n||("language"===n?te(e.language):"className"===n?re("className",e.className):"tableClassName"===n&&U.table?(re("tableClassName",e.tableClassName),U.view._wt.wtOverlays.syncOverlayTableClassNames()):O.default.getSingleton().isRegistered(n)||O.default.getSingleton().isDeprecated(n)?((0,o.isFunction)(e[n])||Array.isArray(e[n]))&&(e[n].initialHook=!0,U.addHook(n,e[n])):!t&&(0,h.hasOwnProperty)(e,n)&&(Q[n]=e[n]));void 0===e.data&&void 0===q.data?r(null,"updateSettings"):void 0!==e.data?r(e.data,"updateSettings"):void 0!==e.columns&&(B.createMap(),U.initIndexMappers());const l=U.countCols(),u=q.columns;if(u&&(0,o.isFunction)(u)&&(a=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||X.clearCache(),l>0)for(n=0,s=0;n<l;n++){if(u){const e=a?u(n):u[s];e&&X.updateColumnMeta(s,e)}s+=1}(0,i.isDefined)(e.cell)&&(0,h.objectEach)(e.cell,(e=>{U.setCellMetaObject(e.row,e.col,e)})),U.runHooks("afterCellMetaReset");let c=U.rootElement.style.height;""!==c&&(c=parseInt(U.rootElement.style.height,10));let d=e.height;if((0,o.isFunction)(d)&&(d=d()),t){U.rootElement.getAttribute("style")&&U.rootElement.setAttribute("data-initialstyle",U.rootElement.getAttribute("style"))}if(null===d){const e=U.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?U.rootElement.setAttribute("style",e):(U.rootElement.style.height="",U.rootElement.style.overflow="")}else void 0!==d&&(U.rootElement.style.height=isNaN(d)?`${d}`:`${d}px`,U.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,o.isFunction)(t)&&(t=t()),U.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(U.view&&(U.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),U.view._wt.exportSettingsAsClassNames()),U.runHooks("afterUpdateSettings",e)),Y.adjustRowsAndCols(),U.view&&!z&&(U.forceFullRender=!0,G.lockEditor(),U._refreshBorders(null),U.view._wt.wtOverlays.adjustElementsSize(),G.unlockEditor()),t||!U.view||""!==c&&""!==d&&void 0!==d||c===d||U.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=U.getSelectedLast();if(q.getValue){if((0,o.isFunction)(q.getValue))return q.getValue.call(U);if(e)return U.getData()[e[0][0]][q.getValue]}else if(e)return U.getDataAtCell(e[0],e[1])},this.getSettings=function(){return q},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,r,n,s){Y.alter(e,t,r,n,s)},this.getCell=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t,s=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;n=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;s=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===s||null===n?null:U.view.getCellAtCoords(U._createCellCoords(s,n),r)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:r,col:n}=t;let s=r,o=n;return r>=0&&(s=this.rowIndexMapper.getVisualFromRenderableIndex(r)),n>=0&&(o=this.columnIndexMapper.getVisualFromRenderableIndex(n)),U._createCellCoords(s,o)},this.colToProp=function(e){return B.colToProp(e)},this.propToCol=function(e){return B.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return B.get(e,B.colToProp(t))},this.getDataAtRowProp=function(e,t){return B.get(e,t)},this.getDataAtCol=function(e){const t=[],r=B.getRange(U._createCellCoords(0,e),U._createCellCoords(q.data.length-1,e),B.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){const t=[],r=B.getRange(U._createCellCoords(0,B.propToCol(e)),U._createCellCoords(q.data.length-1,B.propToCol(e)),B.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){let s;return s=void 0===e?W.getData():W.getByRange(U._createCellCoords(e,t),U._createCellCoords(r,n)),s},this.getSourceDataArray=function(e,t,r,n){let s;return s=void 0===e?W.getData(!0):W.getByRange(U._createCellCoords(e,t),U._createCellCoords(r,n),!0),s},this.getSourceDataAtCol=function(e){return W.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,r,n){const s=ae(e,t,r),o=this.hasHook("afterSetSourceDataAtCell"),a=[];o&&(0,d.arrayEach)(s,(e=>{let[t,r,n]=e;a.push([t,r,W.getAtCell(t,r),n])})),(0,d.arrayEach)(s,(e=>{let[t,r,n]=e;W.setAtCell(t,r,n)})),o&&this.runHooks("afterSetSourceDataAtCell",a,n),this.render();const l=U.getActiveEditor();l&&(0,i.isDefined)(l.refreshValue)&&l.refreshValue()},this.getSourceDataAtRow=function(e){return W.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return W.getAtCell(e,t)},this.getDataAtRow=function(e){return B.getRange(U._createCellCoords(e,0),U._createCellCoords(e,this.countCols()-1),B.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,r,n){const s=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,r,n],[o,i]=s;let[,,a,l]=s,u=null,h=null;void 0===a&&(a=o),void 0===l&&(l=i);let c="mixed";return(0,w.rangeEach)(Math.max(Math.min(o,a),0),Math.max(o,a),(e=>{let t=!0;return(0,w.rangeEach)(Math.max(Math.min(i,l),0),Math.max(i,l),(r=>{const n=this.getCellMeta(e,r);return h=n.type,u?t=u===h:u=h,t})),c=t?h:"mixed",t})),c},this.removeCellMeta=function(e,t,r){const[n,s]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let o=X.getCellMetaKeyValue(n,s,r);!1!==U.runHooks("beforeRemoveCellMeta",e,t,r,o)&&(X.removeCellMeta(n,s,r),U.runHooks("afterRemoveCellMeta",e,t,r,o)),o=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];if(n.length>0&&!Array.isArray(n[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");t>0&&X.removeRow(this.toPhysicalRow(e),t),n.length>0&&(0,d.arrayEach)(n.reverse(),(t=>{X.createRow(this.toPhysicalRow(e)),(0,d.arrayEach)(t,((t,r)=>this.setCellMetaObject(e,r,t)))})),U.render()},this.setCellMetaObject=function(e,t,r){"object"==typeof r&&(0,h.objectEach)(r,((r,n)=>{this.setCellMeta(e,t,n,r)}))},this.setCellMeta=function(e,t,r,n){if(!1===U.runHooks("beforeSetCellMeta",e,t,r,n))return;let s=e,o=t;e<this.countRows()&&(s=this.toPhysicalRow(e)),t<this.countCols()&&(o=this.toPhysicalColumn(t)),X.setCellMeta(s,o,r,n),U.runHooks("afterSetCellMeta",e,t,r,n)},this.getCellsMeta=function(){return X.getCellsMeta()},this.getCellMeta=function(e,t){let r=this.toPhysicalRow(e),n=this.toPhysicalColumn(t);return null===r&&(r=e),null===n&&(n=t),X.getCellMeta(r,n,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return X.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===U.dataType||q.columns)},this.getCellRenderer=function(e,t){const r="number"==typeof e?U.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof r?(0,g.getRenderer)(r):(0,i.isUndefined)(r)?(0,g.getRenderer)("text"):r},this.getCellEditor=function(e,t){const r="number"==typeof e?U.getCellMeta(e,t).editor:e.editor;return"string"==typeof r?(0,m.getEditor)(r):(0,i.isUndefined)(r)?(0,m.getEditor)("text"):r},this.getCellValidator=function(e,t){const r="number"==typeof e?U.getCellMeta(e,t).validator:e.validator;return"string"==typeof r?(0,E.getValidator)(r):r},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,r){const n=new ne;e&&(n.onQueueEmpty=e);let s=U.countRows()-1;for(;s>=0;){if(void 0!==t&&-1===t.indexOf(s)){s-=1;continue}let e=U.countCols()-1;for(;e>=0;)void 0===r||-1!==r.indexOf(e)?(n.addValidatorToQueue(),U.validateCell(U.getDataAtCell(s,e),U.getCellMeta(s,e),(e=>{if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(n.valid=!1),n.removeValidatorFormQueue()}),"validateCells"),e-=1):e-=1;s-=1}n.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=q.rowHeaders,r=e;return void 0!==r&&(r=U.runHooks("modifyRowHeader",r)),void 0===r?(t=[],(0,w.rangeEach)(U.countRows()-1,(e=>{t.push(U.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[r]?t=t[r]:(0,o.isFunction)(t)?t=t(r):t&&"string"!=typeof t&&"number"!=typeof t&&(t=r+1),t},this.hasRowHeaders=function(){return!!q.rowHeaders},this.hasColHeaders=function(){if(void 0!==q.colHeaders&&null!==q.colHeaders)return!!q.colHeaders;for(let e=0,t=U.countCols();e<t;e++)if(U.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const r=U.runHooks("modifyColHeader",e);if(void 0===r){const e=[],t=U.countCols();for(let r=0;r<t;r++)e.push(U.getColHeader(r));return e}let n=q.colHeaders;const s=U.toPhysicalColumn(r),i=function(e){const t=[],r=U.countCols();let n=0;for(;n<r;n++)(0,o.isFunction)(q.columns)&&q.columns(n)&&t.push(n);return t[e]}(s);return!1===q.colHeaders?n=null:q.columns&&(0,o.isFunction)(q.columns)&&q.columns(i)&&q.columns(i).title?n=q.columns(i).title:q.columns&&q.columns[s]&&q.columns[s].title?n=q.columns[s].title:Array.isArray(q.colHeaders)&&void 0!==q.colHeaders[s]?n=q.colHeaders[s]:(0,o.isFunction)(q.colHeaders)?n=q.colHeaders(s):q.colHeaders&&"string"!=typeof q.colHeaders&&"number"!=typeof q.colHeaders&&(n=(0,R.spreadsheetColumnLabel)(r)),n=U.runHooks("modifyColumnHeaderValue",n,e,t),n},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=U.getCellMeta(0,e).width}if(void 0!==t&&t!==q.width||(t=q.colWidths),null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getColWidth=function(e){let t=U._getColWidthFromSettings(e);return t=U.runHooks("modifyColWidth",t,e),void 0===t&&(t=N.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=q.rowHeights;if(null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){let t=U._getRowHeightFromSettings(e);return t=U.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return W.countRows()},this.countSourceCols=function(){return W.countFirstRowKeys()},this.countRows=function(){return B.getLength()},this.countCols=function(){const e=q.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return U.view._wt.drawn?U.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return U.view._wt.drawn?U.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return U.view._wt.drawn?U.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return U.view._wt.drawn?U.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(U.countRows()-1,(r=>{if(U.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(0,w.rangeEachReverse)(U.countCols()-1,(r=>{if(U.isEmptyCol(r))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return q.isEmptyRow.call(U,e)},this.isEmptyCol=function(e){return q.isEmptyCol.call(U,e)},this.selectCell=function(e,t,r,n){let s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,i.isUndefined)(e)&&!(0,i.isUndefined)(t)&&this.selectCells([[e,t,r,n]],s,o)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(F=!0);const r=J.selectCells(e);return r&&t&&U.listen(),F=!1,r},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 J.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 J.selectRows(e,t,r)},this.deselectCell=function(){J.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;F=!0,J.selectAll(e,t,r),F=!1};const ue=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(){let e,t,r,n,{row:s,col:o,verticalSnap:i,horizontalSnap:a,considerHiddenIndexes:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==i&&(e="top"===i,t=!e),void 0!==a&&(r="start"===a,n=!r);let u=s,h=o;if(void 0===l||l){const e=Number.isInteger(s)&&s>=0,t=Number.isInteger(o)&&o>=0,r=e?ue(this.rowIndexMapper,s):void 0,n=t?ue(this.columnIndexMapper,o):void 0;if(null===r||null===n)return!1;u=e?U.rowIndexMapper.getRenderableFromVisualIndex(r):s,h=t?U.columnIndexMapper.getRenderableFromVisualIndex(n):o}const c=Number.isInteger(u),d=Number.isInteger(h);return c&&u>=0&&d&&h>=0?U.view.scrollViewport(U._createCellCoords(u,h),e,n,t,r):c&&u>=0&&(d&&h<0||!d)?U.view.scrollViewportVertically(u,e,t):!!(d&&h>=0&&(c&&u<0||!c))&&U.view.scrollViewportHorizontally(h,n,r)},this.scrollToFocusedCell=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};if(!this.selection.isSelected())return;this.addHookOnce("afterScroll",e);const{highlight:t}=this.getSelectedRangeLast();this.scrollViewportTo(t.toObject())?this.view.render():(this.removeHook("afterScroll",e),this._registerImmediate((()=>e())))},this.destroy=function(){if(U._clearTimeouts(),U._clearImmediates(),U.view&&U.view.destroy(),W&&W.destroy(),W=null,this.getShortcutManager().destroy(),X.clearCache(),k.delete(this.guid),(0,T.isRootInstance)(U)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,s.empty)(U.rootElement),V.destroy(),G&&G.destroy(),U.batchExecution((()=>{U.rowIndexMapper.unregisterAll(),U.columnIndexMapper.unregisterAll(),Z.getItems().forEach((e=>{let[,t]=e;t.destroy()})),Z.clear(),U.runHooks("afterDestroy")}),!0),O.default.getSingleton().destroy(U),(0,h.objectEach)(U,((e,t,r)=>{var n;(0,o.isFunction)(e)?r[t]=(n=t,()=>{throw new Error(`The "${n}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(r[t]=null)})),U.isDestroyed=!0,B&&B.destroy(),B=null,Y=null,J=null,G=null,U=null},this.getActiveEditor=function(){return G.getActiveEditor()},this.getPlugin=function(e){const t=(0,y.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:Z.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:Z.getId(e)},this.getInstance=function(){return U},this.addHook=function(e,t){O.default.getSingleton().add(e,t,U)},this.hasHook=function(e){return O.default.getSingleton().has(e,U)||O.default.getSingleton().has(e)},this.addHookOnce=function(e,t){O.default.getSingleton().once(e,t,U)},this.removeHook=function(e,t){O.default.getSingleton().remove(e,t,U)},this.runHooks=function(e,t,r,n,s,o,i){return O.default.getSingleton().run(U,e,t,r,n,s,o,i)},this.getTranslatedPhrase=function(e,t){return(0,M.getTranslatedPhrase)(q.language,e,t)},this.toHTML=()=>(0,f.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,f.instanceToHTML)(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,d.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,d.arrayEach)(this.immediates,(e=>{clearImmediate(e)}))},this._refreshBorders=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];G.destroyEditor(e),U.view.render(),t&&J.isSelected()&&G.prepareEditor()},this._getEditorManager=function(){return G},this.isRtl=function(){return"rtl"===U.rootWindow.getComputedStyle(U.rootElement).direction},this.isLtr=function(){return!U.isRtl()},this.getDirectionFactor=function(){return U.isLtr()?1:-1};const he=(0,L.createShortcutManager)({handleEvent:()=>U.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||U.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&he.releasePressedKeys()})),this.getShortcutManager=function(){return he},this.getFocusManager=function(){return j},(0,p.getPluginsNames)().forEach((e=>{const t=(0,p.getPlugin)(e);Z.addItem(e,new t(this))})),(0,P.registerAllShortcutContexts)(U),he.setActiveContextName("grid"),O.default.getSingleton().run(U,"construct")},r(95988),r(60740),r(6282);var s=r(49587),o=r(46029),i=r(97639),a=r(78498),l=n(r(80940)),u=n(r(57340)),h=r(76163),c=r(14864),d=r(98887),f=r(65795),p=r(5280),g=r(36996),m=r(16691),E=r(59340),y=r(37913),w=r(57691),C=n(r(26969)),v=n(r(36129)),R=r(56020),S=r(41789),T=r(83059),N=r(94699),O=n(r(54925)),M=r(19310),_=r(6415),A=r(79055),b=r(70400),I=r(47378),x=r(8815),L=r(48120),P=r(51377);let D=null;const k=new Map;new Set},39785:(e,t,r)=>{"use strict";t.__esModule=!0,t.installFocusDetector=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=e.rootElement,n=o(e),s=o(e);return n.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromTop())),s.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromBottom())),r.firstChild.before(n),r.lastChild.after(s),{activate(){e._registerTimeout((()=>{n.tabIndex=0,s.tabIndex=0}),10)},deactivate(){e._registerTimeout((()=>{n.tabIndex=-1,s.tabIndex=-1}),10)}}};var n=r(49587),s=r(66862);function o(e){const t=e.rootDocument.createElement("input");return t.type="text",t.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&(0,n.setAttribute)(t,[(0,s.A11Y_PRESENTATION)()]),t}},90376:(e,t,r)=>{"use strict";t.__esModule=!0,t.installFocusCatcher=function(e){let t;const{activate:r,deactivate:a}=(0,s.installFocusDetector)(e,{onFocusFromTop(){var r;const n=null!==(r=t)&&void 0!==r?r:o(e);n&&(e.runHooks("modifyFocusOnTabNavigation","from_above",n),e.selectCell(n.row,n.col)),e.listen()},onFocusFromBottom(){var r;const n=null!==(r=t)&&void 0!==r?r:i(e);n&&(e.runHooks("modifyFocusOnTabNavigation","from_below",n),e.selectCell(n.row,n.col)),e.listen()}}),l={wrapped:!1,flipped:!1};e.addHook("afterListen",(()=>a())),e.addHook("afterUnlisten",(()=>r())),e.addHook("afterSelection",(()=>{var r;t=null===(r=e.getSelectedRangeLast())||void 0===r?void 0:r.highlight})),e.addHook("beforeRowWrap",((e,t,r)=>{l.wrapped=!0,l.flipped=r})),e.getShortcutManager().getContext("grid").addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:r=>{const{disableTabNavigation:n,autoWrapRow:s}=e.getSettings();if(n||!e.selection.isSelected()||s&&l.wrapped&&l.flipped||!s&&l.wrapped)return s&&l.wrapped&&l.flipped&&(t=r.shiftKey?o(e):i(e)),l.wrapped=!1,l.flipped=!1,e.deselectCell(),e.unlisten(),!1;r.preventDefault()},runOnlyIf:()=>!e.getSettings().minSpareCols,preventDefault:!1,stopPropagation:!1,position:"after",relativeToGroup:n.GRID_GROUP,group:"focusCatcher"})};var n=r(51377),s=r(39785);function o(e){const{rowIndexMapper:t,columnIndexMapper:r}=e,{navigableHeaders:n}=e.getSettings();let s=n&&e.countColHeaders()>0?-e.countColHeaders():0,o=n&&e.countRowHeaders()>0?-e.countRowHeaders():0;return 0===s&&(s=t.getVisualFromRenderableIndex(s)),0===o&&(o=r.getVisualFromRenderableIndex(o)),null===s||null===o?null:e._createCellCoords(s,o)}function i(e){var t,r;const{rowIndexMapper:n,columnIndexMapper:s}=e,{navigableHeaders:o}=e.getSettings();let i=n.getRenderableIndexesLength()-1,a=s.getRenderableIndexesLength()-1;if(i<0){if(!o||0===e.countColHeaders())return null;i=-1}if(a<0){if(!o||0===e.countColHeaders())return null;a=-1}return e._createCellCoords(null!==(t=n.getVisualFromRenderableIndex(i))&&void 0!==t?t:i,null!==(r=s.getVisualFromRenderableIndex(a))&&void 0!==r?r:a)}},47378:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(90376);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},38085:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=r(32313),i=r(56020),a=r(76163),l=r(98887),u=r(57691),h=r(97639);class c{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,r){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"metaManager",void 0),(0,s.default)(this,"tableMeta",void 0),(0,s.default)(this,"dataSource",void 0),(0,s.default)(this,"duckSchema",void 0),(0,s.default)(this,"colToPropCache",void 0),(0,s.default)(this,"propToColCache",void 0),this.hot=e,this.metaManager=r,this.tableMeta=r.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),this.createMap()}createMap(){const e=this.getSchema();if(void 0===e)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");const t=this.tableMeta.columns;let r;if(this.colToPropCache=[],this.propToColCache=new Map,t){let n=0,s=0,o=!1;if("function"==typeof t){const t=(0,a.deepObjectSize)(e);n=t>0?t:this.countFirstRowKeys(),o=!0}else{const e=this.tableMeta.maxCols;n=Math.min(e,t.length)}for(r=0;r<n;r++){const e=o?t(r):t[r];if((0,a.isObject)(e)){if(void 0!==e.data){const t=o?s:r;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}s+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return(0,i.countFirstRowKeys)(this.dataSource)}recursiveDuckColumns(e,t,r){let n,s=t,o=r;return void 0===s&&(s=0,o=""),"object"!=typeof e||Array.isArray(e)||(0,a.objectEach)(e,((e,t)=>{null===e?(n=o+t,this.colToPropCache.push(n),this.propToColCache.set(n,s),s+=1):s=this.recursiveDuckColumns(e,s,`${t}.`)})),s}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.hot.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&(0,h.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,h.isDefined)(t))return this.hot.toVisualColumn(t);const r=this.hot.toVisualColumn(e);return null===r?e:r}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?(0,a.duckSchema)(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]:{};const s=this.hot.countSourceRows();let o=s,i=0,l=e;("number"!=typeof l||l>=s)&&(l=s),l<this.hot.countRows()&&(o=this.hot.toPhysicalRow(l));if(!1===this.hot.runHooks("beforeCreateRow",l,t,r)||null===o)return{delta:0};const h=this.tableMeta.maxRows,c=this.getSchema().length,d=[];for(;i<t&&s+i<h;){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=(0,a.deepClone)(this.getSchema()):(e=[],(0,u.rangeEach)(c-1,(()=>e.push(null)))):"function"===this.hot.dataType?e=this.tableMeta.dataSchema(l+i):(e={},(0,a.deepExtend)(e,this.getSchema())),d.push(e),i+=1}this.hot.rowIndexMapper.insertIndexes(l,i),"below"===n&&(o=Math.min(o+1,s)),this.spliceData(o,0,d);const f=this.hot.toVisualRow(o);return this.hot.countSourceRows()===d.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),i>0&&(null==e?this.metaManager.createRow(null,i):"auto"!==r&&this.metaManager.createRow(o,t)),this.hot.runHooks("afterCreateRow",f,i,r),this.hot.forceFullRender=!0,{delta:i,startPhysicalIndex:o}}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]:{};if(!this.hot.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");const s=this.dataSource,o=this.tableMeta.maxCols,i=this.hot.countSourceCols();let a=e;("number"!=typeof a||a>=i)&&(a=i);if(!1===this.hot.runHooks("beforeCreateCol",a,t,r))return{delta:0};let l=i;a<this.hot.countCols()&&(l=this.hot.toPhysicalColumn(a));const u=this.hot.countSourceRows();let h=this.hot.countCols(),c=0,d=l;"end"===n&&(d=Math.min(d+1,i));const f=d;for(;c<t&&h<o;){if("number"!=typeof a||a>=h)if(u>0)for(let e=0;e<u;e+=1)void 0===s[e]&&(s[e]=[]),s[e].push(null);else s.push([null]);else for(let e=0;e<u;e++)s[e].splice(d,0,null);c+=1,d+=1,h+=1}this.hot.columnIndexMapper.insertIndexes(a,c),c>0&&(null==e?this.metaManager.createColumn(null,c):"auto"!==r&&this.metaManager.createColumn(f,t));const p=this.hot.toVisualColumn(f);return this.hot.runHooks("afterCreateCol",p,c,r),this.hot.forceFullRender=!0,this.refreshDuckSchema(),{delta:c,startPhysicalIndex:f}}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;const s=this.visualRowsToPhysical(n,t),o=this.hot.countSourceRows();n=(o+n)%o;if(!1===this.hot.runHooks("beforeRemoveRow",n,s.length,s,r))return!1;const i=s.length;if(this.filterData(n,i,s),n<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(s);const e=(0,h.isDefined)(this.tableMeta.columns)||(0,h.isDefined)(this.tableMeta.dataSchema);0===this.hot.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.hot.columnIndexMapper.setIndexesSequence([])}return s.slice(0).sort(((e,t)=>t-e)).forEach((e=>{this.metaManager.removeRow(e,1)})),this.hot.runHooks("afterRemoveRow",n,i,s,r),this.hot.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;if("object"===this.hot.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let n="number"!=typeof e?-t:e;n=(this.hot.countCols()+n)%this.hot.countCols();const s=this.visualColumnsToPhysical(n,t),o=s.slice(0).sort(((e,t)=>t-e));if(!1===this.hot.runHooks("beforeRemoveCol",n,t,s,r))return!1;let i=!0;const a=o.length,l=this.dataSource;for(let e=0;e<a;e++)i&&s[0]!==s[e]-e&&(i=!1);if(i)for(let e=0,r=this.hot.countSourceRows();e<r;e++)l[e].splice(s[0],t),0===e&&this.metaManager.removeColumn(s[0],t);else for(let e=0,t=this.hot.countSourceRows();e<t;e++)for(let t=0;t<a;t++)l[e].splice(o[t],1),0===e&&this.metaManager.removeColumn(o[t],1);return n<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(s),0===this.hot.columnIndexMapper.getNotTrimmedIndexesLength()&&this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",n,t,s,r),this.hot.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,r){const n=this.hot.getDataAtCol(e),s=n.slice(t,t+r),o=n.slice(t+r);for(var i=arguments.length,a=new Array(i>3?i-3:0),u=3;u<i;u++)a[u-3]=arguments[u];(0,l.extendArray)(a,o);let h=0;for(;h<r;)a.push(null),h+=1;return(0,l.to2dArray)(a),this.hot.populateFromArray(t,e,a,null,null,"spliceCol"),s}spliceRow(e,t,r){const n=this.hot.getSourceDataAtRow(e),s=n.slice(t,t+r),o=n.slice(t+r);for(var i=arguments.length,a=new Array(i>3?i-3:0),u=3;u<i;u++)a[u-3]=arguments[u];(0,l.extendArray)(a,o);let h=0;for(;h<r;)a.push(null),h+=1;return this.hot.populateFromArray(e,t,[a],null,null,"spliceRow"),s}spliceData(e,t,r){if(!1!==this.hot.runHooks("beforeDataSplice",e,t,r)){const t=[...this.dataSource.slice(0,e),...r,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach((e=>this.dataSource.push(e)))}}filterData(e,t,r){let n=this.hot.runHooks("filterData",e,t,r);!1===Array.isArray(n)&&(n=this.dataSource.filter(((e,t)=>-1===r.indexOf(t)))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,n)}get(e,t){const r=this.hot.toPhysicalRow(e);let n=this.dataSource[r];const s=this.hot.runHooks("modifyRowData",r);n=isNaN(s)?s:n;let o=null;if(n&&n.hasOwnProperty&&(0,a.hasOwnProperty)(n,t))o=n[t];else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let r=n;if(!r)return null;for(let t=0,n=e.length;t<n;t++)if(r=r[e[t]],void 0===r)return null;o=r}else"function"==typeof t&&(o=t(this.dataSource.slice(r,r+1)[0]));if(this.hot.hasHook("modifyData")){const e=(0,a.createObjectPropListener)(o);this.hot.runHooks("modifyData",r,this.propToCol(t),e,"get"),e.isTouched()&&(o=e.value)}return o}getCopyable(e,t){return this.hot.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,r){const n=this.hot.toPhysicalRow(e);let s=r,o=this.dataSource[n];const i=this.hot.runHooks("modifyRowData",n);if(o=isNaN(i)?i:o,this.hot.hasHook("modifyData")){const e=(0,a.createObjectPropListener)(s);this.hot.runHooks("modifyData",n,this.propToCol(t),e,"set"),e.isTouched()&&(s=e.value)}if(o&&o.hasOwnProperty&&(0,a.hasOwnProperty)(o,t))o[t]=s;else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let r,n=o,i=0;for(i=0,r=e.length-1;i<r;i++)void 0===n[e[i]]&&(n[e[i]]={}),n=n[e[i]];n[e[i]]=s}else"function"==typeof t?t(this.dataSource.slice(n,n+1)[0],s):o[t]=s}visualRowsToPhysical(e,t){const r=this.hot.countSourceRows(),n=[];let s,o=(r+e)%r,i=t;for(;o<r&&i;)s=this.hot.toPhysicalRow(o),n.push(s),i-=1,o+=1;return n}visualColumnsToPhysical(e,t){const r=this.hot.countCols(),n=[];let s=(r+e)%r,o=t;for(;s<r&&o;){const e=this.hot.toPhysicalColumn(s);n.push(e),o-=1,s+=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(){const e=this.tableMeta.maxRows;let t;t=e<0||0===e?0:e||1/0;const r=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(r,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return e.row-t.row!=0||this.hot.countSourceRows()?this.getRange(e,t,c.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,r){const n=[];let s,o,i;const a=this.tableMeta.maxRows,l=this.tableMeta.maxCols;if(0===a||0===l)return[];const u=r===c.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,h=Math.min(Math.max(a-1,0),Math.max(e.row,t.row)),d=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(s=Math.min(e.row,t.row);s<=h;s++){i=[];const r=s>=0?this.hot.toPhysicalRow(s):s;for(o=Math.min(e.col,t.col);o<=d&&null!==r;o++)i.push(u.call(this,s,this.colToProp(o)));null!==r&&n.push(i)}return n}getText(e,t){return(0,o.stringify)(this.getRange(e,t,c.DESTINATION_RENDERER))}getCopyableText(e,t){return(0,o.stringify)(this.getRange(e,t,c.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.hot=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}var d=c;t.default=d},36129:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(76163),i=r(56020),a=r(98887),l=r(57691),u=r(46029);var h=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,s.default)(this,"hot",void 0),(0,s.default)(this,"data",void 0),(0,s.default)(this,"dataType","array"),(0,s.default)(this,"colToProp",(()=>{})),(0,s.default)(this,"propToCol",(()=>{})),this.hot=e,this.data=t}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,e):this.data}setData(e){this.data=e}getAtColumn(e){const t=[];return(0,a.arrayEach)(this.data,((r,n)=>{const s=this.getAtCell(n,e);t.push(s)})),t}getAtRow(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=void 0===t&&void 0===r;let i=null,a=null;if(i=this.modifyRowData(e),Array.isArray(i))a=[],s?i.forEach(((t,r)=>{a[r]=this.getAtPhysicalCell(e,r,i)})):(0,l.rangeEach)(t,r,(r=>{a[r-t]=this.getAtPhysicalCell(e,r,i)}));else if((0,o.isObject)(i)||(0,u.isFunction)(i))if(a=n?[]:{},!s||n){const s=0,u=this.countFirstRowKeys()-1;(0,l.rangeEach)(s,u,(l=>{const h=this.colToProp(l);if(l>=(t||s)&&l<=(r||u)&&!Number.isInteger(h)){const t=this.getAtPhysicalCell(e,h,i);n?a.push(t):(0,o.setProperty)(a,h,t)}}))}else(0,o.objectEach)(i,((t,r)=>{(0,o.setProperty)(a,r,this.getAtPhysicalCell(e,r,i))}));return a}setAtCell(e,t,r){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const n=(0,o.createObjectPropListener)(r);this.hot.runHooks("modifySourceData",e,t,n,"set"),n.isTouched()&&(r=n.value)}Number.isInteger(t)?this.data[e][t]=r:(0,o.setProperty)(this.data[e],t,r)}}getAtPhysicalCell(e,t,r){let n=null;if(r&&(n="string"==typeof t?(0,o.getProperty)(r,t):"function"==typeof t?t(r):r[t]),this.hot.hasHook("modifySourceData")){const r=(0,o.createObjectPropListener)(n);this.hot.runHooks("modifySourceData",e,t,r,"get"),r.isTouched()&&(n=r.value)}return n}getAtCell(e,t){const 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,s=null,o=null,i=null,a=null;null===e||null===t?(n=!0,s=0,i=this.countRows()-1):(s=Math.min(e.row,t.row),o=Math.min(e.col,t.col),i=Math.max(e.row,t.row),a=Math.max(e.col,t.col));const u=[];return(0,l.rangeEach)(s,i,(e=>{u.push(n?this.getAtRow(e,void 0,void 0,r):this.getAtRow(e,o,a,r))})),u}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return(0,i.countFirstRowKeys)(this.data)}destroy(){this.data=null,this.hot=null}};t.default=h},70400:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(38085));t.DataMap=s.default;var o=n(r(84544));t.MetaManager=o.default;var i=n(r(16213));t.metaSchemaFactory=i.default;var a=r(92117);t.replaceData=a.replaceData;var l=r(90066);t.DynamicCellMetaMod=l.DynamicCellMetaMod;var u=r(30084);t.ExtendMetaPropertiesMod=u.ExtendMetaPropertiesMod},84544:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(79626)),o=n(r(15198)),i=n(r(67257)),a=n(r(19736)),l=n(r(63806)),u=r(76163);class h{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new s.default(e),this.tableMeta=new o.default(this.globalMeta),this.columnMeta=new i.default(this.globalMeta),this.cellMeta=new a.default(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{visualRow:n,visualColumn:s}=r;const o=this.cellMeta.getMeta(e,t);return o.visualRow=n,o.visualCol=s,o.row=e,o.col=t,this.runLocalHooks("afterGetCellMeta",o),o}getCellMetaKeyValue(e,t,r){if("string"!=typeof r)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,r)}setCellMeta(e,t,r,n){this.cellMeta.setMeta(e,t,r,n)}updateCellMeta(e,t,r){this.cellMeta.updateMeta(e,t,r)}removeCellMeta(e,t,r){this.cellMeta.removeMeta(e,t,r)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,t)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,t)}createColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}t.default=h,(0,u.mixin)(h,l.default)},22358:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(98887),i=r(61530);let a;a=Symbol.iterator;t.default=class{constructor(e){(0,s.default)(this,"valueFactory",void 0),(0,s.default)(this,"data",[]),(0,s.default)(this,"index",[]),(0,s.default)(this,"holes",new Set),this.valueFactory=e}obtain(e){(0,i.assert)((()=>(0,i.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let r;if(t>=0)r=this.data[t],void 0===r&&(r=this.valueFactory(e),this.data[t]=r);else if(r=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=r,this.index[e]=t}else this.data.push(r),this.index[e]=this.data.length-1;return r}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,i.assert)((()=>(0,i.isUnsignedNumber)(e)||(0,i.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const r=[],n=this.data.length;for(let e=0;e<t;e++)r.push(n+e),this.data.push(void 0);const s=(0,i.isNullish)(e)?this.index.length:e;this.index=[...this.index.slice(0,s),...r,...this.index.slice(s)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,i.assert)((()=>(0,i.isUnsignedNumber)(e)||(0,i.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const r=this.index.splice((0,i.isNullish)(e)?this.index.length-t:e,t);for(let e=0;e<r.length;e++){const t=r[e];"number"==typeof t&&this.holes.add(t)}}size(){return this.data.length-this.holes.size}values(){return(0,o.arrayFilter)(this.data,((e,t)=>!this.holes.has(t)))[Symbol.iterator]()}entries(){const e=[];for(let t=0;t<this.data.length;t++){const r=this._getKeyByStorageIndex(t);-1!==r&&e.push([r,this.data[t]])}let t=0;return{next:()=>{if(t<e.length){const r=e[t];return t+=1,{value:r,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[a](){return this.entries()}}},19736:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(76163),i=r(61530),a=n(r(22358));t.default=class{constructor(e){(0,s.default)(this,"columnMeta",void 0),(0,s.default)(this,"metas",new a.default((()=>this._createRow()))),this.columnMeta=e}updateMeta(e,t,r){const n=this.getMeta(e,t);(0,o.extend)(n,r),(0,i.extendByMetaType)(n,r)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let r=0;r<this.metas.size();r++)this.metas.obtain(r).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let r=0;r<this.metas.size();r++)this.metas.obtain(r).remove(e,t)}getMeta(e,t,r){const n=this.metas.obtain(e).obtain(t);return void 0===r?n:n[r]}setMeta(e,t,r,n){var s;const o=this.metas.obtain(e).obtain(t);null===(s=o._automaticallyAssignedMetaProps)||void 0===s||s.delete(r),o[r]=n}removeMeta(e,t,r){delete this.metas.obtain(e).obtain(t)[r]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let r=0;r<t.length;r++)e.push(...t[r].values());return e}getMetasAtRow(e){(0,i.assert)((()=>(0,i.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=new Map(this.metas);return t.has(e)?Array.from(t.get(e).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new a.default((e=>this._createMeta(e)))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}},67257:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(76163),i=r(61530),a=n(r(22358));const l=["data","width"];t.default=class{constructor(e){(0,s.default)(this,"globalMeta",void 0),(0,s.default)(this,"metas",new a.default((()=>this._createMeta()))),this.globalMeta=e,this.metas=new a.default((()=>this._createMeta()))}updateMeta(e,t){const r=this.getMeta(e);(0,o.extend)(r,t),(0,i.extendByMetaType)(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(0,i.columnFactory)(this.globalMeta.getMetaConstructor(),l).prototype}}},79626:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(76163),i=r(61530),a=n(r(16213));t.default=class{constructor(e){(0,s.default)(this,"metaCtor",class{}),(0,s.default)(this,"meta",void 0),this.meta=this.metaCtor.prototype,(0,o.extend)(this.meta,(0,a.default)()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;(0,o.extend)(this.meta,e),(0,i.extendByMetaType)(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}},15198:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(76163),i=r(61530);t.default=class{constructor(e){(0,s.default)(this,"meta",void 0);const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){(0,o.extend)(this.meta,e),(0,i.extendByMetaType)(this.meta,e,e)}}},16213:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(97639),s=r(76163);t.default=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,enterBeginsEditing:!0,enterMoves:{col:0,row:1},fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(e){let t,r,s;for(t=0,r=this.countRows();t<r;t++)if(s=this.getDataAtCell(t,e),!1===(0,n.isEmpty)(s))return!1;return!0},isEmptyRow(e){let t,r,o,i;for(t=0,r=this.countCols();t<r;t++)if(o=this.getDataAtCell(e,t),!1===(0,n.isEmpty)(o))return"object"==typeof o&&(i=this.getCellMeta(e,t),(0,s.isObjectEqual)(this.getSchema()[i.prop],o));return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,mergeCells:!1,minCols:0,minRows:0,minSpareCols:0,minSpareRows:0,multiColumnSorting:void 0,navigableHeaders:!1,disableTabNavigation:!1,nestedHeaders:void 0,nestedRows:void 0,noWordWrapClassName:"htNoWrap",numericFormat:void 0,observeDOMVisibility:!0,outsideClickDeselects:!0,persistentState:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:void 0,renderer:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:void 0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",visibleRows:10,width:void 0,wordWrap:!0})},90066:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=n(r(54925)),i=r(76163),a=r(46029);t.DynamicCellMetaMod=class{constructor(e){(0,s.default)(this,"metaManager",void 0),(0,s.default)(this,"metaSyncMemo",new Map),this.metaManager=e,e.addLocalHook("afterGetCellMeta",(e=>this.extendCellMeta(e))),o.default.getSingleton().add("beforeRender",(e=>{e&&this.metaSyncMemo.clear()}),this.metaManager.hot)}extendCellMeta(e){var t;const{row:r,col:n}=e;if(null!==(t=this.metaSyncMemo.get(r))&&void 0!==t&&t.has(n))return;const{visualRow:s,visualCol:o}=e,l=this.metaManager.hot,u=l.colToProp(o);e.prop=u,l.runHooks("beforeGetCellMeta",s,o,e);const h=(0,i.hasOwnProperty)(e,"type")?e.type:null;let c=(0,a.isFunction)(e.cells)?e.cells(r,n,u):null;var d;h&&(c?c.type=null!==(d=c.type)&&void 0!==d?d:h:c={type:h});c&&this.metaManager.updateCellMeta(r,n,c),l.runHooks("afterGetCellMeta",s,o,e),this.metaSyncMemo.has(r)||this.metaSyncMemo.set(r,new Set),this.metaSyncMemo.get(r).add(n)}}},30084:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231));t.ExtendMetaPropertiesMod=class{constructor(e){(0,s.default)(this,"metaManager",void 0),(0,s.default)(this,"usageTracker",new Set),(0,s.default)(this,"propDescriptors",new Map([["ariaTags",{onChange(e,t,r){if(!r)throw new Error(`The \`${e}\` option can not be updated after the Handsontable instance was initialized.`)}}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){if(this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e)throw new Error("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.");if(this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart"))throw new Error("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{onChange(e,t,r){if(!r)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}}]])),this.metaManager=e,this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach(((e,t)=>{const{target:r,onChange:n=(()=>{})}=e,s="string"==typeof r,o=s?r:t,i=`_${o}`;this.metaManager.globalMeta.meta[i]=this.metaManager.globalMeta.meta[o],this.installPropWatcher(t,i,n),s&&this.installPropWatcher(r,i,n)}))}installPropWatcher(e,t,r){const n=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(s){const o=!n.usageTracker.has(e);n.usageTracker.add(e),r.call(n,e,s,o),this[t]=s},enumerable:!0,configurable:!0})}}},61530:(e,t,r)=>{"use strict";t.__esModule=!0,t.assert=function(e,t){if(!e())throw new Error(`Assertion failed: ${t}`)},t.columnFactory=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function r(){}(0,n.inherit)(r,e);for(let e=0;e<t.length;e++)r.prototype[t[e]]=void 0;return r},t.extendByMetaType=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const o="string"==typeof t.type?(0,s.getCellType)(t.type):t.type;e._automaticallyAssignedMetaProps&&(0,n.objectEach)(t,((t,r)=>{e._automaticallyAssignedMetaProps.delete(r)}));if(!(0,n.isObject)(o))return;r!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const i={};(0,n.objectEach)(o,((t,s)=>{var o;(function(e,t){var r;if("CELL_TYPE"===e)return!1;return(null===(r=t._automaticallyAssignedMetaProps)||void 0===r?void 0:r.has(e))||!(0,n.hasOwnProperty)(t,e)})(s,r)&&(i[s]=t,null===(o=e._automaticallyAssignedMetaProps)||void 0===o||o.add(s))})),(0,n.extend)(e,i)},t.isNullish=function(e){return null==e},t.isUnsignedNumber=function(e){return Number.isInteger(e)&&e>=0},r(60740);var n=r(76163),s=r(79321)},92117:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.replaceData=function(e,t,r,n){const{hotInstance:h,dataMap:c,dataSource:d,internalSource:f,source:p,metaManager:g,firstRun:m}=n,E=(0,s.toUpperCaseFirst)(f),y=h.getSettings();Array.isArray(y.dataSchema)?h.dataType="array":(0,o.isFunction)(y.dataSchema)?h.dataType="function":h.dataType="object";c&&c.destroy();e=h.runHooks(`before${E}`,e,m,p);const w=new i.default(h,e,g);if(t(w),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${f} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=w.getSchema();let r;e=[];let n=0,s=0;for(n=0,s=y.startRows;n<s;n++)if("object"!==h.dataType&&"function"!==h.dataType||!y.dataSchema)if("array"===h.dataType)r=(0,a.deepClone)(t[0]),e.push(r);else{r=[];for(let e=0,t=y.startCols;e<t;e++)r.push(null);e.push(r)}else r=(0,a.deepClone)(t),e.push(r)}}Array.isArray(e[0])&&(h.dataType="array");y.data=e,w.dataSource=e,d.data=e,d.dataType=h.dataType,d.colToProp=w.colToProp.bind(w),d.propToCol=w.propToCol.bind(w),d.countCachedColumns=w.countCachedColumns.bind(w),r(w),h.runHooks(`after${E}`,e,m,p),m||(h.runHooks("afterChange",null,f),h.render());h.getSettings().ariaTags&&(0,l.setAttribute)(h.rootElement,[(0,u.A11Y_ROWCOUNT)(h.countRows()),(0,u.A11Y_COLCOUNT)(h.countCols())])},r(95988),r(60740);var s=r(37913),o=r(46029),i=n(r(38085)),a=r(76163),l=r(49587),u=r(66862)},80940:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(49223),i=r(30369),a=r(16691),l=n(r(57340)),u=r(97639);function h(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const d="editorManager.navigation";t.SHORTCUTS_GROUP_NAVIGATION=d;var f=new WeakSet,p=new WeakSet;class g{constructor(e,t,r){h(this,p),h(this,f),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"tableMeta",void 0),(0,s.default)(this,"selection",void 0),(0,s.default)(this,"eventManager",void 0),(0,s.default)(this,"destroyed",!1),(0,s.default)(this,"lock",!1),(0,s.default)(this,"activeEditor",void 0),(0,s.default)(this,"cellProperties",void 0),this.hot=e,this.tableMeta=t,this.selection=r,this.eventManager=new l.default(e),this.hot.addHook("afterDocumentKeyDown",(e=>c(this,f,m).call(this,e))),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"compositionstart",(e=>{!this.destroyed&&this.hot.isListening()&&this.openEditor("",e)})),this.hot.view._wt.update("onCellDblClick",((e,t,r)=>c(this,p,E).call(this,e,t,r)))}lockEditor(){this.lock=!0}unlockEditor(){this.lock=!1}destroyEditor(e){this.lock||this.closeEditor(e)}getActiveEditor(){return this.activeEditor}prepareEditor(){if(this.lock)return;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,(e=>{e&&this.prepareEditor()}));const{highlight:e}=this.hot.getSelectedRangeLast();if(e.isHeader())return;const{row:t,col:r}=e,n=this.hot.runHooks("modifyGetCellCoords",t,r);let s=t,o=r;if(Array.isArray(n)&&([s,o]=n),this.cellProperties=this.hot.getCellMeta(s,o),!this.isCellEditable())return void this.clearActiveEditor();const i=this.hot.getCell(t,r,!0);if(i){const e=this.hot.getCellEditor(this.cellProperties),n=this.hot.colToProp(o),l=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(s),o);this.activeEditor=(0,a.getEditorInstance)(e,this.hot),this.activeEditor.prepare(t,r,n,i,l,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.isCellEditable()?(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(r&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))):this.clearActiveEditor()}closeEditor(e,t,r){this.activeEditor?this.activeEditor.finishEditing(e,t,r):r&&r(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.hot.getSelectedRangeLast();if(!e)return!1;const t=this.hot.getCellEditor(this.cellProperties),{row:r,col:n}=e.highlight,{rowIndexMapper:s,columnIndexMapper:o}=this.hot,i=s.isHidden(this.hot.toPhysicalRow(r))||o.isHidden(this.hot.toPhysicalColumn(n));return!(this.cellProperties.readOnly||!t||i)}moveSelectionAfterEnter(e){const t="function"==typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(event):this.tableMeta.enterMoves;e?this.selection.transformStart(-t.row,-t.col):this.selection.transformStart(t.row,t.col,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function m(e){const t=this.hot.getSelectedRangeLast();if(!this.hot.isListening()||!t||t.highlight.isHeader()||(0,i.isImmediatePropagationStopped)(e))return;const{keyCode:r}=e,n=(e.ctrlKey||e.metaKey)&&!e.altKey;if((!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&!((0,o.isFunctionKey)(r)||(0,o.isCtrlMetaKey)(r)||n||this.isEditorOpened())){const t=this.hot.getShortcutManager().getContext("editor"),r={runOnlyIf:()=>(0,u.isDefined)(this.hot.getSelected()),group:d};t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.hot.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.hot.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.hot.selection.transformStart(0,-1*this.hot.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.hot.selection.transformStart(0,this.hot.getDirectionFactor())}}],r),this.openEditor("",e)}}function E(e,t,r){"TD"===r.nodeName&&this.openEditor(null,e,!0)}const y=new WeakMap;g.getInstance=function(e,t,r){let n=y.get(e);return n||(n=new g(e,t,r),y.set(e,n)),n};var w=g;t.default=w},48036:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=n(r(42538)),i=r(12540),a=r(98887),l=r(49587),u=r(97639),h=r(37913),c=r(49223),d=r(78498),f=r(26031),p=r(66862);function g(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}const m="autocomplete";t.EDITOR_TYPE=m;var E=new WeakMap;class y extends i.HandsontableEditor{constructor(){super(...arguments),(0,s.default)(this,"query",null),(0,s.default)(this,"strippedChoices",[]),(0,s.default)(this,"rawChoices",[]),g(this,E,{writable:!0,value:this.hot.guid.slice(0,9)}),(0,s.default)(this,"sortByRelevance",(function(e,t,r){const n=[],s=[],o=e.length;let i,a,l,c,d=t.length;if(0===o){for(l=0;l<d;l++)s.push(l);return s}for(l=0;l<d;l++){if(a=(0,h.stripTags)((0,u.stringify)(t[l])),r)c=a.indexOf(e);else{const t=this.cellProperties.locale;c=a.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==c&&(i=a.length-c-o,n.push({baseIndex:l,index:c,charsLeft:i,value:a}))}for(n.sort(((e,t)=>{if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0})),l=0,d=n.length;l<d;l++)s.push(n[l].baseIndex);return s}))}static get EDITOR_TYPE(){return m}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,u.isDefined)(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),(0,l.addClass)(this.htContainer,"autocompleteEditor"),(0,l.addClass)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,p.A11Y_TEXT)(),(0,p.A11Y_COMBOBOX)(),(0,p.A11Y_HASPOPUP)("listbox"),(0,p.A11Y_AUTOCOMPLETE)()])}prepare(e,t,r,n,s,i){super.prepare(e,t,r,n,s,i),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,p.A11Y_EXPANDED)("false"),(0,p.A11Y_CONTROLS)(`${(0,o.default)(this,E)}-listbox-${e}-${t}`)])}open(){super.open();const e=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,r=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,n=null==r?void 0:r.length,{row:s,col:i}=this;this.showEditableElement(),this.focus();let a=(0,l.getScrollbarWidth)();0===a&&(0,d.isMacOS)()&&(a+=15),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.updateSettings({colWidths:e?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,width:e?(0,l.outerWidth)(this.TEXTAREA)+a:void 0,autoColumnSize:!0,renderer:(e,s,o,i,a,h,c)=>{(0,f.textRenderer)(e,s,o,i,a,h,c);const{filteringCaseSensitive:d,allowHtml:g,locale:m}=this.cellProperties,E=this.query;let y,w,C=(0,u.stringify)(h);C&&!g&&(y=!0===d?C.indexOf(E):C.toLocaleLowerCase(m).indexOf(E.toLocaleLowerCase(m)),-1!==y&&(w=C.substr(y,E.length),C=C.replace(w,`<strong>${w}</strong>`))),t&&(0,l.setAttribute)(s,[(0,p.A11Y_OPTION)(),...r?[(0,p.A11Y_SETSIZE)(n)]:[],...r?[(0,p.A11Y_POSINSET)(r.indexOf(h)+1)]:[],["id",`${this.htEditor.rootElement.id}_${o}-${i}`]]),s.innerHTML=C},afterSelection:(e,r)=>{if(t){const t=this.htEditor.getCell(e,r,!0);(0,l.setAttribute)(t,[(0,p.A11Y_SELECTED)()]),(0,l.setAttribute)(this.TEXTAREA,...(0,p.A11Y_ACTIVEDESCENDANT)(t.id))}}}),t&&((0,l.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,p.A11Y_PRESENTATION)()),(0,l.setAttribute)(this.htEditor.rootElement,[(0,p.A11Y_LISTBOX)(),(0,p.A11Y_LIVE)("polite"),(0,p.A11Y_RELEVANT)("text"),["id",`${(0,o.default)(this,E)}-listbox-${s}-${i}`]]),(0,l.setAttribute)(this.TEXTAREA,...(0,p.A11Y_EXPANDED)("true"))),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,p.A11Y_EXPANDED)("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){const t=this.cellProperties.source;this.query=e,"function"==typeof t?t.call(this.cellProperties,e,(e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))})):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){const t=(0,l.getCaretPosition)(this.TEXTAREA),r=(0,l.getSelectionEndPosition)(this.TEXTAREA),n=this.cellProperties.sortByRelevance,s=this.cellProperties.filter;let o=null,i=null,u=e;n&&(o=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),u,this.cellProperties.filteringCaseSensitive));const h=Array.isArray(o)?o.length:0;if(!1===s)h&&(i=o[0]);else{const e=[];for(let t=0,r=u.length;t<r&&!(n&&h<=t);t++)h?e.push(u[o[t]]):e.push(u[t]);i=0,u=e}this.strippedChoices=u,this.htEditor.loadData((0,a.pivot)([u])),0===u.length?this.htEditor.rootElement.style.display="none":(this.htEditor.rootElement.style.display="",this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(i)),this.hot.listen(),(0,l.setCaretPosition)(this.TEXTAREA,t,t===r?void 0:r)}flipDropdownIfNeeded(){const e=(0,l.getTrimmingContainer)(this.hot.view._wt.wtTable.TABLE),t=e===this.hot.rootWindow,r=this.cellProperties.preventOverflow;if(t||!t&&(r||"horizontal"===r))return!1;const n=(0,l.offset)(this.TEXTAREA),s=(0,l.outerHeight)(this.TEXTAREA),o=this.getDropdownHeight(),i=e.scrollTop,a=(0,l.outerHeight)(this.hot.view._wt.wtTable.THEAD),u=(0,l.offset)(e),h=n.top-u.top-a+i,c=e.scrollHeight-h-a-s,d=o>c&&h>c;return d?this.flipDropdown(o):this.unflipDropdown(),this.limitDropdownIfNeeded(d?h:c,o),d}limitDropdownIfNeeded(e,t){if(t>e){let r=0,n=0,s=0,o=null;do{s=this.htEditor.getRowHeight(n)||this.htEditor.view._wt.getSetting("defaultRowHeight"),r+=s,n+=1}while(r<e);o=r-s,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-o+"px"),this.setDropdownHeight(r-s)}}flipDropdown(e){const t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0}unflipDropdown(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.htEditor.flipped=void 0}updateDropdownHeight(){const e=this.htEditor.getColWidth(0)+(0,l.getScrollbarWidth)(this.hot.rootDocument)+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e})}highlightBestMatchingChoice(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getDropdownHeight(){const e=this.htEditor.getRowHeight(0)||23,t=this.cellProperties.visibleRows;return this.strippedChoices.length>=t?t*e:this.strippedChoices.length*e+8}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,r=(0,a.arrayMap)(e,(e=>(0,u.stringify)(e)));return(0,a.arrayMap)(r,(e=>t?e:(0,h.stripTags)(e)))}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),r=t?t.from.row:-1;let n=!1;return e===c.KEY_CODES.ARROW_DOWN&&r>0&&r<this.htEditor.countRows()-1&&(n=!0),e===c.KEY_CODES.ARROW_UP&&r>-1&&(n=!0),n}onBeforeKeyDown(e){if((0,c.isPrintableChar)(e.keyCode)||e.keyCode===c.KEY_CODES.BACKSPACE||e.keyCode===c.KEY_CODES.DELETE||e.keyCode===c.KEY_CODES.INSERT){let t=10;if(e.keyCode===c.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}),t)}}}t.AutocompleteEditor=y},16478:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(48036);t.EDITOR_TYPE=n.EDITOR_TYPE,t.AutocompleteEditor=n.AutocompleteEditor},23627:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(97639),i=r(76163),a=r(80940),l=n(r(94136)),u=r(49587);const h="base";t.EDITOR_TYPE=h;const c=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});t.EDITOR_STATE=c;const d="baseEditor";t.SHORTCUTS_GROUP_EDITOR=d;class f{static get EDITOR_TYPE(){return h}constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"state",c.VIRGIN),(0,s.default)(this,"_opened",!1),(0,s.default)(this,"_fullEditMode",!1),(0,s.default)(this,"_closeCallback",null),(0,s.default)(this,"TD",null),(0,s.default)(this,"row",null),(0,s.default)(this,"col",null),(0,s.default)(this,"prop",null),(0,s.default)(this,"originalValue",null),(0,s.default)(this,"cellProperties",null),this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){throw Error("Editor getValue() method unimplemented")}setValue(){throw Error("Editor setValue() method unimplemented")}open(){throw Error("Editor open() method unimplemented")}close(){throw Error("Editor close() method unimplemented")}prepare(e,t,r,n,s,o){this.TD=n,this.row=e,this.col=t,this.prop=r,this.originalValue=s,this.cellProperties=o,this.state=c.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let r,n,s,i;if(t){const e=this.hot.getSelectedLast();r=Math.max(Math.min(e[0],e[2]),0),n=Math.max(Math.min(e[1],e[3]),0),s=Math.max(e[0],e[2]),i=Math.max(e[1],e[3])}else[r,n,s,i]=[this.row,this.col,null,null];const a=this.hot.runHooks("modifyGetCellCoords",r,n);Array.isArray(a)&&([r,n]=a);const l=this.hot.getShortcutManager().getContext("editor"),u={runOnlyIf:()=>(0,o.isDefined)(this.hot.getSelected()),group:d};this.isInFullEditMode()&&l.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.hot.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.hot.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.hot.selection.transformStart(0,-1*this.hot.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.hot.selection.transformStart(0,this.hot.getDirectionFactor())}}],u),this.hot.populateFromArray(r,n,e,s,i,"edit")}beginEditing(e,t){if(this.state!==c.VIRGIN)return;const r=this.hot,n=r.rowIndexMapper.getRenderableFromVisualIndex(this.row),s=r.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(r.view.scrollViewport(r._createCellCoords(n,s)),this.state=c.EDITING,this.isInFullEditMode()){const t="string"==typeof e?e:(0,o.stringify)(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),r.view.render(),r.runHooks("afterBeginEditing",this.row,this.col)}finishEditing(e,t,r){let n;if(r){const e=this._closeCallback;this._closeCallback=t=>{e&&e(t),r(t),this.hot.view.render()}}if(this.isWaiting())return;const s=this.hot.getShortcutManager().getContext("editor");if(s.removeShortcutsByGroup(d),s.removeShortcutsByGroup(a.SHORTCUTS_GROUP_NAVIGATION),this.state!==c.VIRGIN){if(this.state===c.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();const r=this.getValue();n=this.cellProperties.trimWhitespace?[["string"==typeof r?String.prototype.trim.call(r||""):r]]:[[r]],this.state=c.WAITING,this.saveValue(n,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=c.FINISHED,this.discardEditor(e)})):(this.state=c.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=c.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===c.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=c.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=c.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===c.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:r,wtViewport:n}=this.hot.view._wt,s=this.hot.rootWindow,o=(0,u.offset)(t),i=(0,u.outerWidth)(t),a=(0,u.offset)(this.hot.rootElement),l=(0,u.outerWidth)(this.hot.rootElement),h=r.topOverlay.holder,c=r.inlineStartOverlay.holder,d=h!==s?h.scrollTop:0,f=c!==s?c.scrollLeft:0,p=s.innerWidth-a.left-l,{wtTable:g}=null!==(e=r.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,m=g.name,E=["master","inline_start"].includes(m)?d:0,y=["master","top","bottom"].includes(m)?f:0,w=o.top===a.top?0:1;let C=o.top-a.top-w-E,v=0;v=this.hot.isRtl()?s.innerWidth-o.left-i-p-1+y:o.left-a.left-1-y,["top","top_inline_start_corner"].includes(m)&&(C+=r.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(m)&&(v+=Math.abs(r.inlineStartOverlay.getOverlayOffset()));const R=this.hot.hasColHeaders(),S=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),T=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),N=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(R&&S<=0||S===N)&&(C+=1),T<=0&&(v+=1);const O=n.rowsRenderCalculator.startPosition,M=n.columnsRenderCalculator.startPosition,_=Math.abs(r.inlineStartOverlay.getScrollPosition()),A=r.topOverlay.getScrollPosition(),b=(0,u.getScrollbarWidth)(this.hot.rootDocument);let I=t.offsetTop;if(["inline_start","master"].includes(m)&&(I+=O-A),["bottom","bottom_inline_start_corner"].includes(m)){const{wtViewport:e,wtTable:t}=r.bottomOverlay.clone;I+=e.getWorkspaceHeight()-t.getHeight()-b}let x=t.offsetLeft;this.hot.isRtl()?(x=x>=0?g.getWidth()-t.offsetLeft:Math.abs(x),x+=M-_-i):["top","master","bottom"].includes(m)&&(x+=M-_);const L=(0,u.getComputedStyle)(this.TD,this.hot.rootWindow),P=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",D=parseInt(L[P],10)>0?0:1,k=parseInt(L.borderTopWidth,10)>0?0:1,H=(0,u.outerWidth)(t)+D,F=(0,u.outerHeight)(t)+k,U=(0,u.hasVerticalScrollbar)(h)?b:0,V=(0,u.hasHorizontalScrollbar)(c)?b:0,B=this.hot.view.maximumVisibleElementWidth(x)-U+D;return{top:C,start:v,height:F,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(I)-V+k,23),width:H,maxWidth:B}}getEditedCellsLayerClass(){switch(this.checkEditorSection()){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){const e=this.hot.countRows();let t="";return this.row<this.hot.getSettings().fixedRowsTop?t=this.col<this.hot.getSettings().fixedColumnsStart?"top-inline-start-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=e-this.hot.getSettings().fixedRowsBottom?t=this.col<this.hot.getSettings().fixedColumnsStart?"bottom-inline-start-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(t="inline-start"),t}}t.BaseEditor=f,(0,i.mixin)(f,l.default)},86446:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(23627);t.EDITOR_STATE=n.EDITOR_STATE,t.EDITOR_TYPE=n.EDITOR_TYPE,t.BaseEditor=n.BaseEditor},16571:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(86446),s=r(49587);const o="checkbox";t.EDITOR_TYPE=o;class i extends n.BaseEditor{static get EDITOR_TYPE(){return o}beginEditing(e,t){if(t&&"mouseup"===t.type){const e=this.TD.querySelector('input[type="checkbox"]');(0,s.hasClass)(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}t.CheckboxEditor=i},73388:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(16571);t.EDITOR_TYPE=n.EDITOR_TYPE,t.CheckboxEditor=n.CheckboxEditor},99588:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=n(r(22418)),i=n(r(91705)),a=r(64953),l=n(r(57340)),u=r(49587),h=r(66862),c=r(76163),d=r(49223);r(22442);const f="date";t.EDITOR_TYPE=f;const p="dateEditor";class g extends a.TextEditor{constructor(){super(...arguments),(0,s.default)(this,"defaultDateFormat","DD/MM/YYYY"),(0,s.default)(this,"isCellEdited",!1),(0,s.default)(this,"parentDestroyed",!1),(0,s.default)(this,"$datePicker",null)}static get EDITOR_TYPE(){return f}init(){if("function"!=typeof o.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof i.default)throw new Error("You need to include Pikaday to your project.");super.init(),this.hot.addHook("afterDestroy",(()=>{this.parentDestroyed=!0,this.destroyElements()}))}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),(0,u.addClass)(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker);const e=new l.default(this);e.addEventListener(this.datePicker,"mousedown",(e=>{(0,u.hasClass)(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()})),e.addEventListener(this.TEXTAREA,"keydown",(e=>{["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.code)&&e.preventDefault()}))}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,r,n,s,o){super.prepare(e,t,r,n,s,o)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager().getContext("editor");super.open(),this.showDatepicker(e),this.hot.getSettings().ariaTags&&(0,u.setAttribute)(this.TD,[(0,h.A11Y_EXPANDED)("true")]),t.addShortcut({keys:[["Enter"]],callback:e=>{e.stopPropagation()},group:p})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout((()=>{this.hot._refreshBorders()})),this.TD&&this.hot.getSettings().ariaTags&&(0,u.setAttribute)(this.TD,[(0,h.A11Y_EXPANDED)("false")]);this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(p),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){const e=this.originalValue;void 0!==e&&this.setValue(e)}super.finishEditing(e,t)}showDatepicker(e){const t=this.TD.getBoundingClientRect(),r=this.cellProperties.dateFormat||this.defaultDateFormat,n=this.hot.view.isMouseDown(),s=!!e&&(0,d.isFunctionKey)(e.keyCode);let a;this.datePicker.style.display="block",this.$datePicker=new i.default(this.getDatePickerConfig()),this.$datePicker._onInputFocus=function(){},this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+t.top+(0,u.outerHeight)(this.TD)}px`;let l=this.hot.rootWindow.pageXOffset;l=this.hot.isRtl()?t.right-(0,u.outerWidth)(this.datePicker):t.left,this.datePickerStyle.left=`${l}px`,this.originalValue?(a=this.originalValue,(0,o.default)(a,r,!0).isValid()&&this.$datePicker.setMoment((0,o.default)(a,r),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),s||n||this.setValue("")):this.cellProperties.defaultDate?(a=this.cellProperties.defaultDate,(0,o.default)(a,r,!0).isValid()&&this.$datePicker.setMoment((0,o.default)(a,r),!0),s||n||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){const e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,c.deepExtend)(t,this.cellProperties.datePickerConfig);const r=t.onSelect,n=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.format=t.format||this.defaultDateFormat,t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=(0,o.default)(t).format(this.cellProperties.dateFormat||this.defaultDateFormat)),this.setValue(t),r&&r()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),n&&n()},t}}t.DateEditor=g},92090:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(99588);t.EDITOR_TYPE=n.EDITOR_TYPE,t.DateEditor=n.DateEditor},72394:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(16478),o=n(r(54925));const i="dropdown";t.EDITOR_TYPE=i;class a extends s.AutocompleteEditor{static get EDITOR_TYPE(){return i}prepare(e,t,r,n,s,o){super.prepare(e,t,r,n,s,o),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}t.DropdownEditor=a,o.default.getSingleton().add("beforeValidate",(function(e,t,r){const n=this.getCellMeta(t,this.propToCol(r));n.editor===a&&void 0===n.strict&&(n.filter=!1,n.strict=!0)}))},28544:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(72394);t.EDITOR_TYPE=n.EDITOR_TYPE,t.DropdownEditor=n.DropdownEditor},11717:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953),s=r(49587),o=r(30369),i=r(76163),a=r(80940),l=r(66862);const u="handsontableEditor",h="handsontable";t.EDITOR_TYPE=h;class c extends n.TextEditor{static get EDITOR_TYPE(){return h}open(){super.open(),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),(0,s.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions(),this.hot.getSettings().ariaTags&&(0,s.setAttribute)(this.TD,[(0,l.A11Y_EXPANDED)("true")])}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,s.setAttribute)(this.TD,[(0,l.A11Y_EXPANDED)("false")])}prepare(e,t,r,n,s,o){super.prepare(e,t,r,n,s,o);const a=this,l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,afterOnCellMouseDown(e,t){const r=this.getSourceData(t.row,t.col);void 0!==r&&a.setValue(r),a.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&(0,i.extend)(l,o.handsontable),this.htOptions=l}beginEditing(e,t){const r=this.hot.getSettings().onBeginEditing;r&&!1===r()||super.beginEditing(e,t)}createElements(){super.createElements();const e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,r){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){const e=this.htEditor.getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,r)}assignHooks(){this.hot.addHook("afterDestroy",(()=>{this.htEditor&&this.htEditor.destroy()}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:u,relativeToGroup:a.SHORTCUTS_GROUP_NAVIGATION,position:"before"},r=(e,t)=>{const r=this.htEditor;if(void 0!==e&&(e<0||r.flipped&&e>r.countRows()-1?r.deselectCell():r.selectCell(e,0),r.getData().length))return t.preventDefault(),(0,o.stopImmediatePropagation)(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor;let n,s;return!t.getSelectedLast()&&t.flipped?n=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(s=t.getSelectedLast()[0],n=Math.max(0,s-1)):(s=t.getSelectedLast()[0],n=s-1)),r(n,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor;let n,s;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)n=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;s=t.getSelectedLast()[0],n=Math.min(e,s+1)}}else n=0;return r(n,e)},preventDefault:!1}],t)}unregisterShortcuts(){super.unregisterShortcuts();this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(u)}}t.HandsontableEditor=c},12540:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(11717);t.EDITOR_TYPE=n.EDITOR_TYPE,t.HandsontableEditor=n.HandsontableEditor},5944:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllEditors=function(){(0,p.registerEditor)(s.BaseEditor),(0,p.registerEditor)(n.AutocompleteEditor),(0,p.registerEditor)(o.CheckboxEditor),(0,p.registerEditor)(i.DateEditor),(0,p.registerEditor)(a.DropdownEditor),(0,p.registerEditor)(l.HandsontableEditor),(0,p.registerEditor)(u.NumericEditor),(0,p.registerEditor)(h.PasswordEditor),(0,p.registerEditor)(c.SelectEditor),(0,p.registerEditor)(d.TextEditor),(0,p.registerEditor)(f.TimeEditor)};var n=r(16478);t.AutocompleteEditor=n.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=n.EDITOR_TYPE;var s=r(86446);t.BaseEditor=s.BaseEditor,t.BASE_EDITOR=s.EDITOR_TYPE;var o=r(73388);t.CheckboxEditor=o.CheckboxEditor,t.CHECKBOX_EDITOR=o.EDITOR_TYPE;var i=r(92090);t.DateEditor=i.DateEditor,t.DATE_EDITOR=i.EDITOR_TYPE;var a=r(28544);t.DropdownEditor=a.DropdownEditor,t.DROPDOWN_EDITOR=a.EDITOR_TYPE;var l=r(12540);t.HandsontableEditor=l.HandsontableEditor,t.HANDSONTABLE_EDITOR=l.EDITOR_TYPE;var u=r(6618);t.NumericEditor=u.NumericEditor,t.NUMERIC_EDITOR=u.EDITOR_TYPE;var h=r(50647);t.PasswordEditor=h.PasswordEditor,t.PASSWORD_EDITOR=h.EDITOR_TYPE;var c=r(71177);t.SelectEditor=c.SelectEditor,t.SELECT_EDITOR=c.EDITOR_TYPE;var d=r(64953);t.TextEditor=d.TextEditor,t.TEXT_EDITOR=d.EDITOR_TYPE;var f=r(76219);t.TimeEditor=f.TimeEditor,t.TIME_EDITOR=f.EDITOR_TYPE;var p=r(16691);t.registerEditor=p.registerEditor,t.RegisteredEditor=p.RegisteredEditor,t._getEditorInstance=p._getEditorInstance,t.getEditor=p.getEditor,t.getEditorInstance=p.getEditorInstance,t.getRegisteredEditorNames=p.getRegisteredEditorNames,t.getRegisteredEditors=p.getRegisteredEditors,t.hasEditor=p.hasEditor},6618:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(43894);t.EDITOR_TYPE=n.EDITOR_TYPE,t.NumericEditor=n.NumericEditor},43894:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953);const s="numeric";t.EDITOR_TYPE=s;class o extends n.TextEditor{static get EDITOR_TYPE(){return s}}t.NumericEditor=o},50647:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(67925);t.EDITOR_TYPE=n.EDITOR_TYPE,t.PasswordEditor=n.PasswordEditor},67925:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953),s=r(49587);const o="password";t.EDITOR_TYPE=o;class i extends n.TextEditor{static get EDITOR_TYPE(){return o}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,(0,s.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}t.PasswordEditor=i},16691:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.RegisteredEditor=d,t.getEditorInstance=t._getEditorInstance=function(e,t){let r;if("function"==typeof e)i.get(e)||f(null,e),r=i.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');r=l(e)}if(!r)throw Error(`No editor registered under name "${e}"`);return r.getInstance(t)},t.getEditor=function(e){if("function"==typeof e)return e;if(!u(e))throw Error(`No registered editor found under "${e}" name`);return l(e).getConstructor()},t.registerEditor=f,r(60740);var s=n(r(54925)),o=n(r(31056));const i=new WeakMap,{register:a,getItem:l,hasItem:u,getNames:h,getValues:c}=(0,o.default)("editors");function d(e){const t={},r=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new r(e)),t[e.guid]},s.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function f(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);const r=new d(t);"string"==typeof e&&a(e,r),i.set(t,r)}t.getRegisteredEditors=c,t.getRegisteredEditorNames=h,t.hasEditor=u},71177:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(51692);t.EDITOR_TYPE=n.EDITOR_TYPE,t.SelectEditor=n.SelectEditor},51692:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(86446),s=r(49587),o=r(76163);const i="ht_editor_visible",a="selectEditor",l="select";t.EDITOR_TYPE=l;class u extends n.BaseEditor{static get EDITOR_TYPE(){return l}init(){this.select=this.hot.rootDocument.createElement("SELECT"),(0,s.addClass)(this.select,"htSelectEditor"),this.select.style.display="none",this.hot.rootElement.appendChild(this.select),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.select.style.display="";this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.select.style.display="none",(0,s.hasClass)(this.select,i)&&(0,s.removeClass)(this.select,i),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>this.refreshDimensions())),this.addHook("afterRowResize",(()=>this.refreshDimensions()))}prepare(e,t,r,n,i,a){super.prepare(e,t,r,n,i,a);const l=this.cellProperties.selectOptions;let u;u="function"==typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),(0,s.empty)(this.select),(0,o.objectEach)(u,((e,t)=>{const r=this.hot.rootDocument.createElement("OPTION");r.value=t,(0,s.fastInnerHTML)(r,e),this.select.appendChild(r)}))}prepareOptions(e){let t={};if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)t[e[r]]=e[r];else"object"==typeof e&&(t=e);return t}refreshValue(){const e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==n.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:r,height:o}=this.getEditedCellRect(),a=this.select.style;a.height=`${o}px`,a.width=`${r}px`,a.top=`${e}px`,a[this.hot.isRtl()?"right":"left"]=`${t}px`,a.margin="0px",(0,s.addClass)(this.select,i)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={group:a};!1!==this.isInFullEditMode()&&e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(a)}}t.SelectEditor=u},360:(e,t,r)=>{"use strict";t.__esModule=!0,t.updateCaretPosition=function(e,t){const r=(0,n.getCaretPosition)(t),s=t.value.split("\n");let o=r,i=0;for(let t=0;t<s.length;t++){const n=s[t];0!==t&&(i+=s[t-1].length+1);const a=i+n.length;if("home"===e?o=i:"end"===e&&(o=a),r<=a)break}(0,n.setCaretPosition)(t,o)};var n=r(49587)},64953:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(1219);t.EDITOR_TYPE=n.EDITOR_TYPE,t.TextEditor=n.TextEditor},1219:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(86446),i=n(r(57340)),a=r(78498),l=r(49587),u=r(57691),h=r(49223),c=r(63031),d=r(97639),f=r(80940),p=r(23627),g=r(360),m=r(66862);const E="ht_editor_hidden",y="textEditor",w="text";t.EDITOR_TYPE=w;class C extends o.BaseEditor{static get EDITOR_TYPE(){return w}constructor(e){super(e),(0,s.default)(this,"eventManager",new i.default(this)),(0,s.default)(this,"autoResize",(0,c.autoResize)()),(0,s.default)(this,"TEXTAREA",void 0),(0,s.default)(this,"textareaStyle",void 0),(0,s.default)(this,"TEXTAREA_PARENT",void 0),(0,s.default)(this,"textareaParentStyle",void 0),(0,s.default)(this,"layerClass",void 0),this.eventManager=new i.default(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",(()=>this.destroy()))}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this.refreshDimensions(),this.showEditableElement();this.hot.getShortcutManager().setActiveContextName("editor"),this.addHook("afterDocumentKeyDown",(e=>this.onAfterDocumentKeyDown(e))),this.registerShortcuts()}close(){this.autoResize.unObserve(),(0,l.isThisHotChild)(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts(),this.removeHooksByKey("afterDocumentKeyDown")}prepare(e,t,r,n,s,i){const a=this.state;if(super.prepare(e,t,r,n,s,i),!i.readOnly){this.refreshDimensions(!0);const{allowInvalid:e}=i;e&&(this.TEXTAREA.value=""),a!==o.EDITOR_STATE.FINISHED&&this.hideEditableElement()}}beginEditing(e,t){this.state===o.EDITOR_STATE.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),(0,l.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement("TEXTAREA"),(0,l.setAttribute)(this.TEXTAREA,[["data-hot-input",""],(0,m.A11Y_TABINDEX)(-1)]),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,m.A11Y_HIDDEN)()]),(0,l.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),(0,l.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),(0,l.hasClass)(this.TEXTAREA_PARENT,this.layerClass)&&(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,E),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){(0,a.isEdge)()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,E)}showEditableElement(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle[this.hot.isRtl()?"left":"right"]="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="",this.textareaStyle.overflowY="hidden";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;(0,u.rangeEach)(e.length-1,(r=>{const n=e[r];if((0,l.hasClass)(n,"handsontableEditor"))return t=!0,!1})),(0,l.hasClass)(this.TEXTAREA_PARENT,E)&&(0,l.removeClass)(this.TEXTAREA_PARENT,E),t?(this.layerClass="ht_editor_visible",(0,l.addClass)(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),(0,l.addClass)(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==o.EDITOR_STATE.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:r,width:n,maxWidth:s,height:i,maxHeight:a}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${r}px`,this.showEditableElement();const u=(0,l.getComputedStyle)(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=u.fontSize,this.TEXTAREA.style.fontFamily=u.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const h=(0,l.getComputedStyle)(this.TEXTAREA),c=parseInt(h.paddingLeft,10)+parseInt(h.paddingRight,10),d=parseInt(h.paddingTop,10)+parseInt(h.paddingBottom,10),f=n-c,p=i-d,g=s-c,m=a-d;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(f,g),minHeight:Math.min(p,m),maxWidth:g,maxHeight:m},!0)}bindEvents(){(0,a.isIOS)()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",(()=>this.finishEditing(!1))),this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>{this.refreshDimensions(),this.state===o.EDITOR_STATE.EDITING&&this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.state===o.EDITOR_STATE.EDITING&&this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={runOnlyIf:()=>(0,d.isDefined)(this.hot.getSelected()),group:y},r=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};e.addShortcuts([{keys:[["Tab"]],callback:e=>{const t=this.hot.getSettings(),r="function"==typeof t.tabMoves?t.tabMoves(e):t.tabMoves;this.hot.selection.transformStart(r.row,r.col,!0)}},{keys:[["Shift","Tab"]],callback:e=>{const t=this.hot.getSettings(),r="function"==typeof t.tabMoves?t.tabMoves(e):t.tabMoves;this.hot.selection.transformStart(-r.row,-r.col)}},{keys:[["Control","Enter"]],callback:()=>(r(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(r(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(r(),!1)},{keys:[["PageUp"]],callback:()=>{this.hot.selection.transformStart(-this.hot.countVisibleRows(),0)}},{keys:[["PageDown"]],callback:()=>{this.hot.selection.transformStart(this.hot.countVisibleRows(),0)}},{keys:[["Home"]],callback:(e,t)=>{let[r]=t;(0,g.updateCaretPosition)(r,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[r]=t;(0,g.updateCaretPosition)(r,this.TEXTAREA)}},{keys:[["Control/Meta","Z"]],preventDefault:!1,callback:()=>{this.hot._registerTimeout((()=>{this.autoResize.resize()}),10)}},{keys:[["Control/Meta","Shift","Z"]],preventDefault:!1,callback:()=>{this.hot._registerTimeout((()=>{this.autoResize.resize()}),10)}}],t)}unregisterShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");e.removeShortcutsByGroup(f.SHORTCUTS_GROUP_NAVIGATION),e.removeShortcutsByGroup(y),e.removeShortcutsByGroup(p.SHORTCUTS_GROUP_EDITOR)}onAfterDocumentKeyDown(e){-1===[h.KEY_CODES.ARROW_UP,h.KEY_CODES.ARROW_RIGHT,h.KEY_CODES.ARROW_DOWN,h.KEY_CODES.ARROW_LEFT].indexOf(e.keyCode)&&this.autoResize.resize(String.fromCharCode(e.keyCode))}}t.TextEditor=C},76219:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(98744);t.EDITOR_TYPE=n.EDITOR_TYPE,t.TimeEditor=n.TimeEditor},98744:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953);const s="time";t.EDITOR_TYPE=s;class o extends n.TextEditor{static get EDITOR_TYPE(){return s}prepare(e,t,r,n,s,o){super.prepare(e,t,r,n,s,o),this.TEXTAREA.dir="ltr"}}t.TimeEditor=o},57340:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getListenersCounter=function(){return i},r(95988);var s=n(r(93231)),o=r(30369);let i=0;var a=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,s.default)(this,"context",void 0),this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function s(e){r.call(this,function(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),(0,o.stopImmediatePropagation)(this)},e}(e))}return this.context.eventListeners.push({element:e,event:t,callback:r,callbackProxy:s,options:n,eventManager:this}),e.addEventListener(t,s,n),i+=1,()=>{this.removeEventListener(e,t,r)}}removeEventListener(e,t,r){let n,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.context.eventListeners.length;for(;o;)if(o-=1,n=this.context.eventListeners[o],n.event===t&&n.element===e){if(r&&r!==n.callback)continue;if(s&&n.eventManager!==this)continue;this.context.eventListeners.splice(o,1),n.element.removeEventListener(n.event,n.callbackProxy,n.options),i-=1}}clearEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let t=this.context.eventListeners.length;for(;t;){t-=1;const r=this.context.eventListeners[t];e&&r.eventManager!==this||(this.context.eventListeners.splice(t,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),i-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let r=e.document,n=e;r||(r=e.ownerDocument?e.ownerDocument:e,n=r.defaultView);const s={bubbles:!0,cancelable:"mousemove"!==t,view:n,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};let o;r.createEvent?(o=r.createEvent("MouseEvents"),o.initMouseEvent(t,s.bubbles,s.cancelable,s.view,s.detail,s.screenX,s.screenY,s.clientX,s.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget||r.body.parentNode)):o=r.createEventObject(),e.dispatchEvent?e.dispatchEvent(o):e.fireEvent(`on${t}`,o)}};t.default=a},14864:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),o=n(r(48427)),i=r(31990),a=r(49587);function l(e,t){h(e,t),t.add(e)}function u(e,t,r){h(e,t),t.set(e,r)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const d=Object.freeze({CELL:"cell",MIXED:"mixed"});var f=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,E=new WeakSet,y=new WeakSet,w=new WeakSet,C=new WeakSet;function v(){return(0,s.default)(this,f).getSelectedRangeLast().highlight}function R(){const e=c(this,E,v).call(this);return(0,s.default)(this,f).getCell(e.row,e.col,!0)}function S(){const e=c(this,y,R).call(this),{activeElement:t}=(0,s.default)(this,f).rootDocument;t&&(0,a.isOutsideInput)(t)&&t.blur(),this.focusOnHighlightedCell(e),this.getFocusMode()===d.MIXED&&"TD"===e.nodeName&&(0,s.default)(this,f).addHookOnce("afterSelectionEnd",(()=>{this.refocusToEditorTextarea()}))}function T(e){e.imeFastEdit&&this.getFocusMode()!==d.MIXED?this.setFocusMode(d.MIXED):e.imeFastEdit||this.getFocusMode()===d.CELL||this.setFocusMode(d.CELL)}t.FocusManager=class{constructor(e){var t=this;l(this,C),l(this,w),l(this,y),l(this,E),u(this,f,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:void 0}),u(this,g,{writable:!0,value:50}),u(this,m,{writable:!0,value:null});const r=e.getSettings();(0,o.default)(this,f,e),(0,o.default)(this,p,r.imeFastEdit?d.MIXED:d.CELL),(0,s.default)(this,f).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return c(t,C,T).call(t,...r)})),(0,s.default)(this,f).addHook("afterSelection",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return c(t,w,S).call(t,...r)}))}getFocusMode(){return(0,s.default)(this,p)}setFocusMode(e){Object.values(d).includes(e)?(0,o.default)(this,p,e):(0,i.warn)(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return(0,s.default)(this,g)}setRefocusDelay(e){(0,o.default)(this,g,e)}setRefocusElementGetter(e){(0,o.default)(this,m,e)}getRefocusElement(){return"function"==typeof(0,s.default)(this,m)?(0,s.default)(this,m).call(this):null===(e=(0,s.default)(this,f).getActiveEditor())||void 0===e?void 0:e.TEXTAREA;var e}focusOnHighlightedCell(e){var t;const r=c(this,E,v).call(this),n=e||c(this,y,R).call(this);let o=(0,s.default)(this,f).runHooks("modifyFocusedElement",r.row,r.col,n);o instanceof HTMLElement||(o=n),!o||null!==(t=(0,s.default)(this,f).getActiveEditor())&&void 0!==t&&t.isOpened()||o.focus({preventScroll:!0})}refocusToEditorTextarea(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,s.default)(this,g);const t=this.getRefocusElement();(0,s.default)(this,f).getSettings().imeFastEdit&&t&&(0,s.default)(this,f)._registerTimeout((()=>{t.select()}),e)}}},66862:(e,t)=>{"use strict";t.__esModule=!0;t.A11Y_TABINDEX=e=>["tabindex",e];t.A11Y_TREEGRID=()=>["role","treegrid"];t.A11Y_PRESENTATION=()=>["role","presentation"];t.A11Y_GRIDCELL=()=>["role","gridcell"];t.A11Y_ROWHEADER=()=>["role","rowheader"];t.A11Y_COLUMNHEADER=()=>["role","columnheader"];t.A11Y_ROW=()=>["role","row"];t.A11Y_MENU=()=>["role","menu"];t.A11Y_MENU_ITEM=()=>["role","menuitem"];t.A11Y_COMBOBOX=()=>["role","combobox"];t.A11Y_LISTBOX=()=>["role","listbox"];t.A11Y_OPTION=()=>["role","option"];t.A11Y_CHECKBOX=()=>["role","checkbox"];t.A11Y_SCOPE_COL=()=>["scope","col"];t.A11Y_SCOPE_ROW=()=>["scope","row"];t.A11Y_TEXT=()=>["type","text"];t.A11Y_LABEL=e=>["aria-label",e];t.A11Y_DESCRIPTION=e=>["aria-description",e];t.A11Y_HIDDEN=()=>["aria-hidden","true"];t.A11Y_DISABLED=()=>["aria-disabled","true"];t.A11Y_MULTISELECTABLE=()=>["aria-multiselectable","true"];t.A11Y_HASPOPUP=e=>["aria-haspopup",e];t.A11Y_ROWCOUNT=e=>["aria-rowcount",e];t.A11Y_COLCOUNT=e=>["aria-colcount",e];t.A11Y_ROWINDEX=e=>["aria-rowindex",e];t.A11Y_COLINDEX=e=>["aria-colindex",e];t.A11Y_EXPANDED=e=>["aria-expanded",e];t.A11Y_SORT=e=>["aria-sort",e];t.A11Y_READONLY=()=>["aria-readonly","true"];t.A11Y_INVALID=()=>["aria-invalid","true"];t.A11Y_CHECKED=e=>["aria-checked",e];t.A11Y_SELECTED=()=>["aria-selected","true"];t.A11Y_AUTOCOMPLETE=()=>["aria-autocomplete","list"];t.A11Y_CONTROLS=e=>["aria-controls",e];t.A11Y_ACTIVEDESCENDANT=e=>["aria-activedescendant",e];t.A11Y_LIVE=e=>["aria-live",e];t.A11Y_RELEVANT=e=>["aria-relevant",e];t.A11Y_SETSIZE=e=>["aria-setsize",e];t.A11Y_POSINSET=e=>["aria-posinset",e]},98887:(e,t,r)=>{"use strict";function n(e,t,r,n){let s=-1,o=e,i=r;Array.isArray(e)||(o=Array.from(e));const a=o.length;for(n&&a&&(s+=1,i=o[s]),s+=1;s<a;)i=t(i,o[s],s,o),s+=1;return i}function s(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));const s=n.length;for(;r<s&&!1!==t(n[r],r,n);)r+=1;return e}function o(e){return n(e,((e,t)=>e+t),0)}t.__esModule=!0,t.arrayAvg=function(e){if(!e.length)return 0;return o(e)/e.length},t.arrayEach=s,t.arrayFilter=function(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));const s=n.length,o=[];let i=-1;for(;r<s;){const e=n[r];t(e,r,n)&&(i+=1,o[i]=e),r+=1}return o},t.arrayFlatten=function e(t){return n(t,((t,r)=>t.concat(Array.isArray(r)?e(r):r)),[])},t.arrayMap=function(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));const s=n.length,o=[];let i=-1;for(;r<s;){const e=n[r];i+=1,o[i]=t(e,r,n),r+=1}return o},t.arrayMax=function(e){return n(e,((e,t)=>e>t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return n(e,((e,t)=>e<t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayReduce=n,t.arraySum=o,t.arrayUnique=function(e){const t=[];return s(e,(e=>{-1===t.indexOf(e)&&t.push(e)})),t},t.extendArray=function(e,t){const r=t.length;let n=0;for(;n<r;)e.push(t[n]),n+=1},t.getDifferenceOfArrays=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[n,...o]=[...t];let i=n;return s(o,(e=>{i=i.filter((t=>!e.includes(t)))})),i},t.getIntersectionOfArrays=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[n,...o]=[...t];let i=n;return s(o,(e=>{i=i.filter((t=>e.includes(t)))})),i},t.getUnionOfArrays=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[n,...o]=[...t],i=new Set(n);return s(o,(e=>{s(e,(e=>{i.has(e)||i.add(e)}))})),Array.from(i)},t.pivot=function(e){const t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;const r=e.length,n=e[0].length;for(let s=0;s<r;s++)for(let r=0;r<n;r++)t[r]||(t[r]=[]),t[r][s]=e[s][r];return t},t.stringToArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)},t.to2dArray=function(e){const t=e.length;let r=0;for(;r<t;)e[r]=[e[r]],r+=1},r(95988)},78498:(e,t,r)=>{"use strict";t.__esModule=!0,t.isChrome=function(){return o.chrome.value},t.isChromeWebKit=function(){return o.chromeWebKit.value},t.isEdge=function(){return o.edge.value},t.isEdgeWebKit=function(){return o.edgeWebKit.value},t.isFirefox=function(){return o.firefox.value},t.isFirefoxWebKit=function(){return o.firefoxWebKit.value},t.isIOS=function(){return i.ios.value},t.isIpadOS=function(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&i.mac.value},t.isLinuxOS=function(){return i.linux.value},t.isMacOS=function(){return i.mac.value},t.isMobileBrowser=function(){return o.mobile.value},t.isSafari=function(){return o.safari.value},t.isWindowsOS=function(){return i.win.value},t.setBrowserMeta=a,t.setPlatformMeta=l;var n=r(76163);const s=e=>{const t={value:!1,test:(r,n)=>{t.value=e(r,n)}};return t},o={chrome:s(((e,t)=>/Chrome/.test(e)&&/Google/.test(t))),chromeWebKit:s((e=>/CriOS/.test(e))),edge:s((e=>/Edge/.test(e))),edgeWebKit:s((e=>/EdgiOS/.test(e))),firefox:s((e=>/Firefox/.test(e))),firefoxWebKit:s((e=>/FxiOS/.test(e))),mobile:s((e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e))),safari:s(((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t)))},i={mac:s((e=>/^Mac/.test(e))),win:s((e=>/^Win/.test(e))),linux:s((e=>/^Linux/.test(e))),ios:s((e=>/iPhone|iPad|iPod/i.test(e)))};function a(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.objectEach)(o,(r=>{let{test:n}=r;n(e,t)}))}function l(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.objectEach)(i,(t=>{let{test:r}=t;r(e)}))}a(),l()},31990:(e,t,r)=>{"use strict";t.__esModule=!0,t.error=function(){(0,n.isDefined)(console)&&console.error(...arguments)},t.info=function(){(0,n.isDefined)(console)&&console.info(...arguments)},t.log=function(){(0,n.isDefined)(console)&&console.log(...arguments)},t.warn=function(){(0,n.isDefined)(console)&&console.warn(...arguments)};var n=r(97639)},56020:(e,t,r)=>{"use strict";t.__esModule=!0,t.countFirstRowKeys=function(e){let t=0;Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&(0,n.isObject)(e[0])&&(t=(0,n.deepObjectSize)(e[0])));return t},t.createEmptySpreadsheetData=function(e,t){const r=[];let n;for(let s=0;s<e;s++){n=[];for(let e=0;e<t;e++)n.push("");r.push(n)}return r},t.createSpreadsheetData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const r=[];let n,s;for(n=0;n<e;n++){const e=[];for(s=0;s<t;s++)e.push(i(s)+(n+1));r.push(e)}return r},t.createSpreadsheetObjectData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const r=[];let n,s;for(n=0;n<e;n++){const e={};for(s=0;s<t;s++)e[`prop${s}`]=i(s)+(n+1);r.push(e)}return r},t.dataRowToChangesArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e;const n=[];Array.isArray(e)&&Array.isArray(e[0])||(r=[e]);return r.forEach(((e,r)=>{Array.isArray(e)?e.forEach(((e,s)=>{n.push([r+t,s,e])})):Object.keys(e).forEach((s=>{n.push([r+t,s,e[s]])}))})),n},t.isArrayOfArrays=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>Array.isArray(e))))},t.isArrayOfObjects=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e)))},t.spreadsheetColumnIndex=function(e){let t=0;if(e)for(let r=0,n=e.length-1;r<e.length;r+=1,n-=1)t+=o**n*(s.indexOf(e[r])+1);return t-=1,t},t.spreadsheetColumnLabel=i,r(95988);var n=r(76163);const s="ABCDEFGHIJKLMNOPQRSTUVWXYZ",o=s.length;function i(e){let t,r=e+1,n="";for(;r>0;)t=(r-1)%o,n=String.fromCharCode(65+t)+n,r=parseInt((r-t)/o,10);return n}},46680:(e,t)=>{"use strict";t.__esModule=!0,t.getNormalizedDate=function(e){const t=new Date(e);if(!isNaN(new Date(`${e}T00:00`).getDate()))return new Date(t.getTime()+6e4*t.getTimezoneOffset());return t}},49587:(e,t,r)=>{"use strict";t.__esModule=!0,t.addClass=u,t.addEvent=function(e,t,r){e.addEventListener(t,r,!1)},t.appendElement=function(e,t){let{tagName:r,className:n,attributes:s}=t;const o=e.ownerDocument.createElement(r);n&&u(o,n);s&&s.length&&c(o,s);return e.appendChild(o),o},t.clearTextSelection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())},t.closest=i,t.closestDown=function(e,t,r){const n=[];let s=e;for(;s&&(s=i(s,t,r),s&&(!r||r.contains(s)));)n.push(s),s=s.host&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?s.host:s.parentNode;const o=n.length;return o?n[o-1]:null},t.empty=d,t.fastInnerHTML=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];f.test(t)?e.innerHTML=r?(0,n.sanitize)(t):t:p(e,t)},t.fastInnerText=p,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getComputedStyle=E,t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=o,t.getParent=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=-1,n=null,s=e;for(;null!==s;){if(r===t){n=s;break}s.host&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?s=s.host:(r+=1,s=s.parentNode)}return n},t.getParentWindow=function(e){return o(e)&&e.parent},t.getScrollLeft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return m(t);return e.scrollLeft},t.getScrollTop=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return g(t);return e.scrollTop},t.getScrollableElement=function(e){let t=e.ownerDocument,r=t?t.defaultView:void 0;t||(t=e.document?e.document:e,r=t.defaultView);const n=["auto","scroll"];let s=e.parentNode;for(;s&&s.style&&t.body!==s;){let{overflow:e,overflowX:t,overflowY:o}=s.style;if([e,t,o].includes("scroll"))return s;if(({overflow:e,overflowX:t,overflowY:o}=r.getComputedStyle(s)),n.includes(e)||n.includes(t)||n.includes(o))return s;if(s.clientHeight<=s.scrollHeight+1&&(n.includes(o)||n.includes(e)))return s;if(s.clientWidth<=s.scrollWidth+1&&(n.includes(t)||n.includes(e)))return s;s=s.parentNode}return r},t.getScrollbarWidth=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;void 0===y&&(y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.createElement("div");t.style.height="200px",t.style.width="100%";const r=e.createElement("div");r.style.boxSizing="content-box",r.style.height="150px",r.style.left="0px",r.style.overflow="hidden",r.style.position="absolute",r.style.top="0px",r.style.width="200px",r.style.visibility="hidden",r.appendChild(t),(e.body||e.documentElement).appendChild(r);const n=t.offsetWidth;r.style.overflow="scroll";let s=t.offsetWidth;n===s&&(s=r.clientWidth);return(e.body||e.documentElement).removeChild(r),n-s}(e));return y},t.getSelectionEndPosition=function(e){if(e.selectionEnd)return e.selectionEnd;return 0},t.getSelectionText=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document;let r="";e.getSelection?r=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(r=t.selection.createRange().text);return r},t.getStyle=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===r)return"width"===t?`${r.innerWidth}px`:"height"===t?`${r.innerHeight}px`:void 0;const n=e.style[t];if(""!==n&&void 0!==n)return n;const s=E(e,r);if(""!==s[t]&&void 0!==s[t])return s[t]},t.getTrimmingContainer=function(e){const t=e.ownerDocument,r=t.defaultView;let n=e.parentNode;for(;n&&n.style&&t.body!==n;){if("visible"!==n.style.overflow&&""!==n.style.overflow)return n;const e=E(n,r),t=["scroll","hidden","auto"],s=e.getPropertyValue("overflow"),o=e.getPropertyValue("overflow-y"),i=e.getPropertyValue("overflow-x");if(t.includes(s)||t.includes(o)||t.includes(i))return n;n=n.parentNode}return r},t.getWindowScrollLeft=m,t.getWindowScrollTop=g,t.hasAccessToParentWindow=function(e){return!!Object.getPrototypeOf(e.parent)},t.hasClass=function(e,t){if(void 0===e.classList||"string"!=typeof t||""===t)return!1;return e.classList.contains(t)},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.index=function(e){let t=0,r=e;if(r.previousSibling)for(;r=r.previousSibling;)t+=1;return t},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.isChildOf=function(e,t){let r=e.parentNode,n=[];"string"==typeof t?n=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):n.push(t);for(;null!==r;){if(n.indexOf(r)>-1)return!0;r=r.parentNode}return!1},t.isDetached=function(e){return!e.parentNode},t.isInput=w,t.isOutsideInput=C,t.isThisHotChild=function(e,t){const r=e.closest(".handsontable");return!!r&&(r.parentNode===t||r===t)},t.isVisible=function e(t){const r=t.ownerDocument.documentElement;let n=t;for(;n!==r;){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n.host){if(n.host.impl)return e(n.host.impl);if(n.host)return e(n.host);throw new Error("Lost in Web Components world")}return!1}if("none"===E(n).display)return!1;n=n.parentNode}return!0},t.makeElementContentEditableAndSelectItsContent=v,t.matchesCSSRules=function(e,t){const{selectorText:r}=t;let n=!1;t.type===CSSRule.STYLE_RULE&&r&&(e.msMatchesSelector?n=e.msMatchesSelector(r):e.matches&&(n=e.matches(r)));return n},t.observeVisibilityChangeOnce=function(e,t){new IntersectionObserver(((r,n)=>{r.forEach((r=>{r.isIntersecting&&null!==e.offsetParent&&(t(),n.unobserve(e))}))}),{root:e.ownerDocument.body}).observe(e)},t.offset=function(e){const t=e.ownerDocument,r=t.defaultView,n=t.documentElement;let s,o,i,a=e;s=a.offsetLeft,o=a.offsetTop,i=a;for(;(a=a.offsetParent)&&a!==t.body&&"offsetLeft"in a;)s+=a.offsetLeft,o+=a.offsetTop,i=a;i&&"fixed"===i.style.position&&(s+=r.pageXOffset||n.scrollLeft,o+=r.pageYOffset||n.scrollTop);return{left:s,top:o}},t.outerHeight=function(e){return e.offsetHeight},t.outerWidth=function(e){return e.offsetWidth},t.overlayContainsElement=function(e,t,r){const n=r.parentElement.querySelector(`.ht_clone_${e}`);return n?n.contains(t):null},t.removeAttribute=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);const{regexFree:r,regexes:n}=l(t,!0);r.forEach((t=>{""!==t&&e.removeAttribute(t)})),n.forEach((t=>{e.getAttributeNames().forEach((r=>{t.test(r)&&e.removeAttribute(r)}))}))},t.removeClass=h,t.removeContentEditableFromElementAndDeselect=R,t.removeEvent=function(e,t,r){e.removeEventListener(t,r,!1)},t.removeTextNodes=function e(t){if(3===t.nodeType)t.parentNode.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1){const r=t.childNodes;for(let t=r.length-1;t>=0;t--)e(r[t])}},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")},t.runWithSelectedContendEditableElement=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];v(e,r),t(),R(e,r)},t.selectElementIfAllowed=function(e){C(e.ownerDocument.activeElement)||e.select()},t.setAttribute=c,t.setCaretPosition=function(e,t,r){void 0===r&&(r=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,r)}catch(n){const s=e.parentNode,o=s.style.display;s.style.display="block",e.setSelectionRange(t,r),s.style.display=o}}},t.setOverlayPosition=function(e,t,r){e.style.transform=`translate3d(${t},${r},0)`},r(95988),r(60740);var n=r(37913),s=r(66862);function o(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:n,DOCUMENT_FRAGMENT_NODE:s}=Node;let o=e;for(;null!=o&&o!==r;){const{nodeType:e,nodeName:r}=o;if(e===n&&(t.includes(r)||t.includes(o)))return o;const{host:i}=o;o=i&&e===s?i:o.parentNode}return null}function a(e){return e&&e.length?e.filter((e=>!!e)):[]}function l(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];const r=[],n=[];return n.push(...e.filter((e=>{const n=e instanceof RegExp;return n&&t&&r.push(e),!n}))),t?{regexFree:n,regexes:r}:n}function u(e,t){"string"==typeof t&&(t=t.split(" ")),(t=a(t)).length>0&&e.classList.add(...t)}function h(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:n}=l(t,!0);r=a(r),r.length>0&&e.classList.remove(...r),n.forEach((t=>{e.classList.forEach((r=>{t.test(r)&&e.classList.remove(r)}))}))}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,r]]),t.forEach((t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)}))}function d(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const f=/(<(.*)>|&(.*);)/;function p(e,t){const r=e.firstChild;r&&3===r.nodeType&&null===r.nextSibling?r.textContent=t:(d(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function g(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function m(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}let y;function w(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function C(e){return w(e)&&!1===e.hasAttribute("data-hot-input")}function v(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=e.ownerDocument,o=n.createRange(),i=n.defaultView.getSelection();c(e,"contenteditable",!0),r&&c(e,...(0,s.A11Y_HIDDEN)()),t&&u(e,"invisibleSelection"),o.selectNodeContents(e),i.removeAllRanges(),i.addRange(o)}function R(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),r.removeAllRanges(),t&&h(e,"invisibleSelection"),e.removeAttribute("contenteditable")}t.HTML_CHARACTERS=f},30369:(e,t)=>{"use strict";t.__esModule=!0,t.isImmediatePropagationStopped=function(e){return!1===e.isImmediatePropagationEnabled},t.isLeftClick=function(e){return 0===e.button},t.isRightClick=function(e){return 2===e.button},t.offsetRelativeTo=function(e,t){const r={x:e.offsetX,y:e.offsetY};let n=e.target;if(!(t instanceof HTMLElement)||n!==t&&n.contains(t))return r;for(;n!==t;)r.x+=n.offsetLeft,r.y+=n.offsetTop,n=n.offsetParent;return r},t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}},6022:(e,t)=>{"use strict";let r;t.__esModule=!0,t.cancelAnimationFrame=function(e){window.cancelAnimationFrame(e)},t.getComparisonFunction=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r)return r;r="object"==typeof Intl?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?(e,t)=>`${e}`.localeCompare(t):(e,t)=>e===t?0:e>t?-1:1;return r},t.isTouchSupported=function(){return"ontouchstart"in window},t.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)}},46029:(e,t,r)=>{"use strict";t.__esModule=!0,t.curry=function(e){const t=e.length;return function r(n){return function(){for(var s=arguments.length,o=new Array(s),i=0;i<s;i++)o[i]=arguments[i];const a=n.concat(o);let l;return l=a.length>=t?e.apply(this,a):r(a),l}}([])},t.curryRight=function(e){const t=e.length;return function r(n){return function(){for(var s=arguments.length,o=new Array(s),i=0;i<s;i++)o[i]=arguments[i];const a=n.concat(o.reverse());let l;return l=a.length>=t?e.apply(this,a):r(a),l}}([])},t.debounce=function(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=null;return function(){for(var s=arguments.length,o=new Array(s),i=0;i<s;i++)o[i]=arguments[i];return n&&clearTimeout(n),n=setTimeout((()=>{t=e.apply(this,o)}),r),t}},t.fastCall=function(e,t,r,n,o,i,a,l){if((0,s.isDefined)(l))return e.call(t,r,n,o,i,a,l);if((0,s.isDefined)(a))return e.call(t,r,n,o,i,a);if((0,s.isDefined)(i))return e.call(t,r,n,o,i);if((0,s.isDefined)(o))return e.call(t,r,n,o);if((0,s.isDefined)(n))return e.call(t,r,n);if((0,s.isDefined)(r))return e.call(t,r);return e.call(t)},t.isFunction=function(e){return"function"==typeof e},t.partial=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return e.apply(this,r.concat(n))}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[s,...o]=t;return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.arrayReduce)(o,((e,t)=>t(e)),s.apply(this,t))}},t.throttle=o,t.throttleAfterHits=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const n=o(e,t);let s=r;function i(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return s?(s-=1,e.apply(this,r)):n.apply(this,r)}return i.clearHits=function(){s=r},i};var n=r(98887),s=r(97639);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=0;const n={lastCallThrottled:!0};let s=null;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];const l=Date.now();let u=!1;n.lastCallThrottled=!0,r||(r=l,u=!0);const h=t-(l-r);return u?(n.lastCallThrottled=!1,e.apply(this,i)):(s&&clearTimeout(s),s=setTimeout((()=>{n.lastCallThrottled=!1,e.apply(this,i),r=0,s=void 0}),h)),n}}},97639:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t._injectProductInfo=function(e,t){const r=!a(e),n="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),o="0.0.0-next-7b93b7d-20231107";let i,w="invalid",C="invalid";const v=function(e){let t=[][l],r=t;if(e[l]!==d("Z"))return!1;for(let t="",n="B<H4P+".split(""),s=d(n.shift());s;s=d(n.shift()||"A"))--s<""[l]?r|=(h(`${h(u(t)+(u(c(e,Math.abs(s),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=c(e,s,s?1===n[l]?9:8:6);return r===t}(e=f(e||""));if(r||n||v)if(v){const t=(0,s.default)("31/08/2023","DD/MM/YYYY"),r=Math.floor(t.toDate().getTime()/864e5),n=p(e);i=(0,s.default)(864e5*(n+1),"x").format("MMMM DD, YYYY"),r>n?(w="expired",C="expired"):(w="valid",C="valid")}else n?(w="non_commercial",C="valid"):(w="invalid",C="invalid");else w="missing",C="missing";g()&&(w="valid",C="valid");if(!m&&"valid"!==w){E[w]({keyValidityDate:i,hotVersion:o})&&console["non_commercial"===w?"info":"warn"](E[w]({keyValidityDate:i,hotVersion:o})),m=!0}if("valid"!==C&&t.parentNode){if(y[C]({keyValidityDate:i,hotVersion:o})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=y[C]({keyValidityDate:i,hotVersion:o}),t.parentNode.insertBefore(e,t.nextSibling)}}},t.isDefined=function(e){return void 0!==e},t.isEmpty=a,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isUndefined=i,t.stringify=function(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};var s=n(r(22418)),o=r(45561);function i(e){return void 0===e}function a(e){return null===e||""===e||i(e)}const l="length",u=e=>parseInt(e,16),h=e=>parseInt(e,10),c=(e,t,r)=>e.substr(t,r),d=e=>e.codePointAt(0)-65,f=e=>`${e}`.replace(/\-/g,""),p=e=>u(c(f(e),u("12"),d("F")))/(u(c(f(e),d("B"),~~![][l]))||9),g=()=>"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host);let m=!1;const E={invalid:()=>o.toSingleLine`
920
+ the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&(0,u.setAttribute)(this.rootNode,[(0,h.A11Y_PRESENTATION)()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let n=0;n<e;n++){this.orderView.render();const e=this.orderView.getCurrentNode(),s=this.table.renderedRowToSource(n);var t,r;if(this.table.isAriaEnabled())(0,u.setAttribute)(e,[(0,h.A11Y_ROW)(),(0,h.A11Y_ROWINDEX)(s+(null!==(t=null===(r=this.table.rowUtils)||void 0===r||null===(r=r.dataAccessObject)||void 0===r?void 0:r.columnHeaders.length)&&void 0!==t?t:0)+1)])}this.orderView.end()}}t.default=d},92548:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.default)(this,"rootNode",void 0),(0,s.default)(this,"rootDocument",void 0),(0,s.default)(this,"rowHeaders",null),(0,s.default)(this,"columnHeaders",null),(0,s.default)(this,"colGroup",null),(0,s.default)(this,"rows",null),(0,s.default)(this,"cells",null),(0,s.default)(this,"rowFilter",null),(0,s.default)(this,"columnFilter",null),(0,s.default)(this,"rowUtils",null),(0,s.default)(this,"columnUtils",null),(0,s.default)(this,"rowsToRender",0),(0,s.default)(this,"columnsToRender",0),(0,s.default)(this,"rowHeaderFunctions",[]),(0,s.default)(this,"rowHeadersCount",0),(0,s.default)(this,"columnHeaderFunctions",[]),(0,s.default)(this,"columnHeadersCount",0),(0,s.default)(this,"cellRenderer",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=t}setAxisUtils(e,t){this.rowUtils=e,this.columnUtils=t}setViewportSize(e,t){this.rowsToRender=e,this.columnsToRender=t}setFilters(e,t){this.rowFilter=e,this.columnFilter=t}setHeaderContentRenderers(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}setRenderers(){let{rowHeaders:e,columnHeaders:t,colGroup:r,rows:n,cells:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),r.setTable(this),n.setTable(this),s.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=r,this.rows=n,this.cells=s}renderedRowToSource(e){return this.rowFilter.renderedToSource(e)}renderedColumnToSource(e){return this.columnFilter.renderedToSource(e)}isAriaEnabled(){return this.rowUtils.wtSettings.getSetting("ariaTags")}render(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:e,rows:t}=this;for(let r=0;r<e;r++){const e=t.getRenderedNode(r);if(e.firstChild){const t=this.renderedRowToSource(r),n=this.rowUtils.getHeight(t);e.firstChild.style.height=n?n-1+"px":""}}}}},53843:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(49587);var i=class{constructor(e){(0,s.default)(this,"dataAccessObject",void 0),(0,s.default)(this,"lastScrolledColumnPos",-1),(0,s.default)(this,"lastScrolledRowPos",-1),this.dataAccessObject=e}scrollViewport(e,t,r,n,s){const o=this.scrollViewportHorizontally(e.col,r,s),i=this.scrollViewportVertically(e.row,t,n);return o||i}scrollViewportHorizontally(e,t,r){const{drawn:n,totalColumns:s}=this.dataAccessObject;if(!n||!Number.isInteger(e)||e<0||e>s)return!1;const o=this.getFirstVisibleColumn(),i=this.getLastVisibleColumn(),a=void 0===t&&void 0===r,{fixedColumnsStart:l,inlineStartOverlay:u}=this.dataAccessObject;if(a&&e<l)return!1;let h=!1;return e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e),-1===o?h=u.scrollTo(e,a?e>this.lastScrolledColumnPos:t):(a&&(e<o||e>i)||!a)&&(h=u.scrollTo(e,a?e>i:t)),h&&(this.lastScrolledColumnPos=e),h}scrollViewportVertically(e,t,r){const{drawn:n,totalRows:s}=this.dataAccessObject;if(!n||!Number.isInteger(e)||e<0||e>s)return!1;const o=this.getFirstVisibleRow(),i=this.getLastVisibleRow(),a=void 0===t&&void 0===r,{fixedRowsBottom:l,fixedRowsTop:u,topOverlay:h}=this.dataAccessObject;if(a&&(e<u||e>s-l-1))return!1;let c=!1;return e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e),-1===o?c=h.scrollTo(e,a?e>this.lastScrolledRowPos:r):(a&&(e<o||e>i)||!a)&&(c=h.scrollTo(e,a?e>i:r)),c&&(this.lastScrolledRowPos=e),c}getFirstVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:r,totalRows:n,fixedRowsTop:s,rootWindow:i}=this.dataAccessObject;let a=t.getFirstVisibleRow();if(e.mainTableScrollableElement===i){const l=(0,o.offset)(t.wtRootElement),u=(0,o.innerHeight)(t.hider),h=(0,o.innerHeight)(i),c=(0,o.getScrollTop)(i,i);if(l.top+u-h<=c){let t=r.getColumnHeaderHeight();t+=e.sumCellSizes(0,s);for(let r=n;r>0;r--)if(t+=e.sumCellSizes(r-1,r),l.top+u-t<=c){a=r;break}}}return a}getLastVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:r,totalRows:n,rootWindow:s}=this.dataAccessObject;let i=t.getLastVisibleRow();if(e.mainTableScrollableElement===s){const a=(0,o.offset)(t.wtRootElement),l=(0,o.getScrollTop)(s,s);if(a.top>l){const t=(0,o.innerHeight)(s);let u=r.getColumnHeaderHeight();for(let r=1;r<=n;r++)if(u+=e.sumCellSizes(r-1,r),a.top+u-l>=t){i=r-2;break}}}return i}getFirstVisibleColumn(){const{inlineStartOverlay:e,wtTable:t,wtViewport:r,totalColumns:n,rootWindow:s}=this.dataAccessObject;let i=t.getFirstVisibleColumn();if(e.mainTableScrollableElement===s){const a=(0,o.offset)(t.wtRootElement),l=(0,o.innerWidth)(t.hider),u=(0,o.innerWidth)(s),h=Math.abs((0,o.getScrollLeft)(s,s));if(a.left+l-u<=h){let t=r.getRowHeaderWidth();for(let r=n;r>0;r--)if(t+=e.sumCellSizes(r-1,r),a.left+l-t<=h){i=r;break}}}return i}getLastVisibleColumn(){const{wtSettings:e,inlineStartOverlay:t,wtTable:r,wtViewport:n,totalColumns:s,rootWindow:i}=this.dataAccessObject;let a=r.getLastVisibleColumn();if(t.mainTableScrollableElement===i){let l=null;if(e.getSetting("rtlMode")){const e=r.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;l=Math.abs(e.right-t)}else{l=(0,o.offset)(r.wtRootElement).left}const u=Math.abs((0,o.getScrollLeft)(i,i));if(l>u){const e=(0,o.innerWidth)(i);let r=n.getRowHeaderWidth();for(let n=1;n<=s;n++)if(r+=t.sumCellSizes(n-1,n),l+r-u>=e){a=n-2;break}}}return a}};t.default=i},57253:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(49587),s=r(30369),o=r(76163),i=r(78498),a=r(14201);var l=class{constructor(e,t){t&&(this.eventManager=e.eventManager,this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.bottom=null,this.start=null,this.end=null,this.topStyle=null,this.bottomStyle=null,this.startStyle=null,this.endStyle=null,this.cornerDefaultStyle=a.CORNER_DEFAULT_STYLE,this.cornerCenterPointOffset=-parseInt(this.cornerDefaultStyle.width,10)/2,this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())}registerListeners(){const e=this.wot.rootDocument.body;this.eventManager.addEventListener(e,"mousedown",(()=>this.onMouseDown())),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()));for(let e=0,t=this.main.childNodes.length;e<t;e++){const t=this.main.childNodes[e];this.eventManager.addEventListener(t,"mouseenter",(t=>this.onMouseEnter(t,this.main.childNodes[e])))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(e,t){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;e.preventDefault(),(0,s.stopImmediatePropagation)(e);const r=this,n=this.wot.rootDocument.body,o=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(n,"mousemove",(function e(s){var i;((i=s).clientY<Math.floor(o.top)||i.clientY>Math.ceil(o.top+o.height)||i.clientX<Math.floor(o.left)||i.clientX>Math.ceil(o.left+o.width))&&(r.eventManager.removeEventListener(n,"mousemove",e),t.style.display="block")}))}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const r=["top","start","bottom","end","corner"];let n=this.main.style;n.position="absolute",n.top=0,n.left=0;for(let s=0;s<5;s++){const o=r[s],i=t.createElement("div");i.className=`wtBorder ${this.settings.className||""}`,this.settings[o]&&this.settings[o].hide&&(i.className+=" hidden"),n=i.style,n.backgroundColor=this.settings[o]&&this.settings[o].color?this.settings[o].color:e.border.color,n.height=this.settings[o]&&this.settings[o].width?`${this.settings[o].width}px`:`${e.border.width}px`,n.width=this.settings[o]&&this.settings[o].width?`${this.settings[o].width}px`:`${e.border.width}px`,this.main.appendChild(i)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,i.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:s}=this.wot;let o=s.bordersHolder;o||(o=t.createElement("div"),o.className="htBorders",s.bordersHolder=o,s.spreader.appendChild(o)),o.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:e}=this.wot;this.selectionHandles={top:e.createElement("DIV"),topHitArea:e.createElement("DIV"),bottom:e.createElement("DIV"),bottomHitArea:e.createElement("DIV")};this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};const t={position:"absolute",height:"40px",width:"40px","border-radius":`${parseInt(40/1.5,10)}px`};(0,o.objectEach)(t,((e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e}));const r={position:"absolute",height:"10px",width:"10px","border-radius":`${parseInt(10/1.5,10)}px`,background:"#F5F5FF",border:"1px solid #4285c8"};(0,o.objectEach)(r,((e,t)=>{this.selectionHandles.styles.bottom[t]=e,this.selectionHandles.styles.top[t]=e})),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}isPartRange(e,t){const r=this.wot.selectionManager.getAreaSelection();return!(!r.cellRange||e===r.cellRange.to.row&&t===r.cellRange.to.col)}updateMultipleSelectionHandlesPosition(e,t,r,n,s,o){const i=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:a,topHitArea:l,bottom:u,bottomHitArea:h}=this.selectionHandles.styles,c=parseInt(a.borderWidth,10),d=parseInt(a.width,10),f=parseInt(l.width,10),p=this.wot.wtTable.getWidth(),g=this.wot.wtTable.getHeight();a.top=`${parseInt(r-d-1,10)}px`,a[i]=`${parseInt(n-d-1,10)}px`,l.top=`${parseInt(r-f/4*3,10)}px`,l[i]=`${parseInt(n-f/4*3,10)}px`;const m=Math.min(parseInt(n+s,10),p-d-2*c),E=Math.min(parseInt(n+s-f/4,10),p-f-2*c);u[i]=`${m}px`,h[i]=`${E}px`;const y=Math.min(parseInt(r+o,10),g-d-2*c),w=Math.min(parseInt(r+o-f/4,10),g-f-2*c);u.top=`${y}px`,h.top=`${w}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(a.display="block",l.display="block",this.isPartRange(e,t)?(u.display="none",h.display="none"):(u.display="block",h.display="block")):(a.display="none",u.display="none",l.display="none",h.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(a.zIndex="9999",l.zIndex="9999"):(a.zIndex="",l.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:r,rootWindow:s}=this.wot;let o,a,l,u,h,c;const d=t.getRenderedRowsCount();for(let r=0;r<d;r+=1){const n=t.rowFilter.renderedToSource(r);if(n>=e[0]&&n<=e[2]){o=n,h=e[0];break}}for(let r=d-1;r>=0;r-=1){const n=t.rowFilter.renderedToSource(r);if(n>=e[0]&&n<=e[2]){a=n;break}}const f=t.getRenderedColumnsCount();for(let r=0;r<f;r+=1){const n=t.columnFilter.renderedToSource(r);if(n>=e[1]&&n<=e[3]){l=n,c=e[1];break}}for(let r=f-1;r>=0;r-=1){const n=t.columnFilter.renderedToSource(r);if(n>=e[1]&&n<=e[3]){u=n;break}}if(void 0===o||void 0===l)return void this.disappear();let p=t.getCell(this.wot.createCellCoords(o,l));const g=o!==a||l!==u,m=g?t.getCell(this.wot.createCellCoords(a,u)):p,E=(0,n.offset)(p),y=g?(0,n.offset)(m):E,w=(0,n.offset)(t.TABLE),C=(0,n.outerWidth)(t.TABLE),v=E.top,R=E.left,S=this.wot.wtSettings.getSetting("rtlMode");let T=0,N=0;if(S){const e=(0,n.outerWidth)(p),t=s.innerWidth-w.left-C;N=R+e-y.left,T=s.innerWidth-R-e-t-1}else N=y.left+(0,n.outerWidth)(m)-R,T=R-w.left-1;if(this.isEntireColumnSelected(o,a)){const e=this.getDimensionsFromHeader("columns",l,u,h,w);let t=null;e&&([t,T,N]=e),t&&(p=t)}let O=v-w.top-1,M=y.top+(0,n.outerHeight)(m)-v;if(this.isEntireRowSelected(l,u)){const e=this.getDimensionsFromHeader("rows",o,a,c,w);let t=null;e&&([t,O,M]=e),t&&(p=t)}const _=(0,n.getComputedStyle)(p,s);parseInt(_.borderTopWidth,10)>0&&(O+=1,M=M>0?M-1:0),parseInt(_[S?"borderRightWidth":"borderLeftWidth"],10)>0&&(T+=1,N=N>0?N-1:0);const A=S?"right":"left";this.topStyle.top=`${O}px`,this.topStyle[A]=`${T}px`,this.topStyle.width=`${N}px`,this.topStyle.display="block",this.startStyle.top=`${O}px`,this.startStyle[A]=`${T}px`,this.startStyle.height=`${M}px`,this.startStyle.display="block";const b=Math.floor(this.settings.border.width/2);this.bottomStyle.top=O+M-b+"px",this.bottomStyle[A]=`${T}px`,this.bottomStyle.width=`${N}px`,this.bottomStyle.display="block",this.endStyle.top=`${O}px`,this.endStyle[A]=T+N-b+"px",this.endStyle.height=`${M+1}px`,this.endStyle.display="block";let I=this.settings.border.cornerVisible;I="function"==typeof I?I(this.settings.layerLevel):I;const x=this.wot.getSetting("onModifyGetCellCoords",a,u);let[L,P]=[a,u];if(x&&Array.isArray(x)&&([,,L,P]=x),(0,i.isMobileBrowser)()||!I||this.isPartRange(L,P))this.cornerStyle.display="none";else{this.cornerStyle.top=O+M+this.cornerCenterPointOffset-1+"px",this.cornerStyle[A]=T+N+this.cornerCenterPointOffset-1+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=(0,n.getTrimmingContainer)(t.TABLE);const o=e===s;o&&(e=r.documentElement);const i=parseInt(this.cornerDefaultStyle.width,10)/2,l=parseInt(this.cornerDefaultStyle.height,10)/2;if(u===this.wot.getSetting("totalColumns")-1){const t=o?m.getBoundingClientRect().left:m.offsetLeft;let r=!1,s=0;S?(s=t-parseInt(this.cornerDefaultStyle.width,10)/2,r=s<0):(s=t+(0,n.outerWidth)(m)+parseInt(this.cornerDefaultStyle.width,10)/2,r=s>=(0,n.innerWidth)(e)),r&&(this.cornerStyle[A]=`${Math.floor(T+N+this.cornerCenterPointOffset-i)}px`,this.cornerStyle[S?"borderLeftWidth":"borderRightWidth"]=0)}if(a===this.wot.getSetting("totalRows")-1){(o?m.getBoundingClientRect().top:m.offsetTop)+(0,n.outerHeight)(m)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,n.innerHeight)(e)&&(this.cornerStyle.top=`${Math.floor(O+M+this.cornerCenterPointOffset-l)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,i.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(a,u,O,T,N,M)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,r,s,o){const{wtTable:i}=this.wot,a=i.wtRootElement.parentNode;let l=null,u=null,h=null,c=null,d=null,f=null,p=null,g=null;switch(e){case"rows":l=function(){return i.getRowHeader(...arguments)},u=function(){return(0,n.outerHeight)(...arguments)},h="ht__selection--rows",f="top";break;case"columns":l=function(){return i.getColumnHeader(...arguments)},u=function(){return(0,n.outerWidth)(...arguments)},h="ht__selection--columns",f="left"}if(a.classList.contains(h)){const e=this.wot.getSetting("columnHeaders").length;if(p=l(t,e-s),g=l(r,e-s),!p||!g)return!1;const i=(0,n.offset)(p),a=(0,n.offset)(g);return p&&g&&(c=i[f]-o[f]-1,d=a[f]+u(g)-i[f]),[p,c,d]}return!1}changeBorderStyle(e,t){const r=this[e].style,s=t[e];!s||s.hide?(0,n.addClass)(this[e],"hidden"):((0,n.hasClass)(this[e],"hidden")&&(0,n.removeClass)(this[e],"hidden"),r.backgroundColor=s.color,"top"!==e&&"bottom"!==e||(r.height=`${s.width}px`),"start"!==e&&"end"!==e||(r.width=`${s.width}px`))}changeBorderToDefaultStyle(e){const t=1,r="#000",n=this[e].style;n.backgroundColor=r,n.width=`${t}px`,n.height=`${t}px`}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?(0,n.addClass)(this[e],"hidden"):(0,n.removeClass)(this[e],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",(0,i.isMobileBrowser)()&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}};t.default=l},14201:(e,t)=>{"use strict";t.__esModule=!0;const r=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"});t.CORNER_DEFAULT_STYLE=r},90484:(e,t)=>{"use strict";t.__esModule=!0;t.ACTIVE_HEADER_TYPE="active-header";t.HEADER_TYPE="header";t.AREA_TYPE="area";t.FOCUS_TYPE="focus";t.FILL_TYPE="fill";t.ROW_TYPE="row";t.COLUMN_TYPE="column";t.CUSTOM_SELECTION_TYPE="custom-selection"},403:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s={SelectionManager:!0,Selection:!0},o=n(r(73864));t.Selection=o.default;var i=r(90484);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===i[e]||(t[e]=i[e]))}));var a=r(14201);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}));var l=r(62489);t.SelectionManager=l.SelectionManager},62489:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,r(44062);var s=n(r(42538)),o=n(r(48427)),i=r(49587),a=r(13136),l=n(r(57253));function u(e,t,r){h(e,t),t.set(e,r)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var c=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,E=new WeakSet;function y(){const e=(0,s.default)(this,p).get((0,s.default)(this,c)),t=(0,s.default)(this,c).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let r=0;r<t.length;r++)e.add(t[r]);e.forEach((e=>{var t,r;const n=(0,s.default)(this,c).wtTable.TABLE.querySelectorAll(`.${e}`);let o=[];Array.isArray(null===(t=(0,s.default)(this,d).options)||void 0===t?void 0:t.cellAttributes)&&(o=(0,s.default)(this,d).options.cellAttributes.map((e=>e[0]))),Array.isArray(null===(r=(0,s.default)(this,d).options)||void 0===r?void 0:r.headerAttributes)&&(o=[...o,...(0,s.default)(this,d).options.headerAttributes.map((e=>e[0]))]);for(let t=0,r=n.length;t<r;t++)(0,i.removeClass)(n[t],e),(0,i.removeAttribute)(n[t],o)})),e.clear()}t.SelectionManager=class{constructor(e){var t,r;h(t=this,r=E),r.add(t),u(this,c,{writable:!0,value:void 0}),u(this,d,{writable:!0,value:void 0}),u(this,f,{writable:!0,value:new a.SelectionScanner}),u(this,p,{writable:!0,value:new WeakMap}),u(this,g,{writable:!0,value:new WeakSet}),u(this,m,{writable:!0,value:new Map}),(0,o.default)(this,d,e)}setActiveOverlay(e){return(0,o.default)(this,c,e),(0,s.default)(this,f).setActiveOverlay((0,s.default)(this,c)),(0,s.default)(this,p).has((0,s.default)(this,c))||(0,s.default)(this,p).set((0,s.default)(this,c),new Set),this}getFocusSelection(){return null!==(0,s.default)(this,d)?(0,s.default)(this,d).getFocus():null}getAreaSelection(){return null!==(0,s.default)(this,d)?(0,s.default)(this,d).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if((0,s.default)(this,m).has(e)){const t=(0,s.default)(this,m).get(e);if(t.has((0,s.default)(this,c)))return t.get((0,s.default)(this,c));const r=new l.default((0,s.default)(this,c),e.settings);return t.set((0,s.default)(this,c),r),r}const t=new l.default((0,s.default)(this,c),e.settings);return(0,s.default)(this,m).set(e,new Map([[(0,s.default)(this,c),t]])),t}getBorderInstances(e){var t,r;return Array.from(null!==(t=null===(r=(0,s.default)(this,m).get(e))||void 0===r?void 0:r.values())&&void 0!==t?t:[])}destroyBorders(e){(0,s.default)(this,m).get(e).forEach((e=>e.destroy())),(0,s.default)(this,m).delete(e)}render(e){if(null===(0,s.default)(this,d))return;e&&function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,E,y).call(this);const t=Array.from((0,s.default)(this,d)),r=new Map;for(let e=0;e<t.length;e++){const n=t[e],{className:o,createLayers:i,selectionType:a}=n.settings;(0,s.default)(this,g).has(n)||((0,s.default)(this,g).add(n),n.addLocalHook("destroy",(()=>this.destroyBorders(n))));const l=this.getBorderInstance(n);if(n.isEmpty()){null==l||l.disappear();continue}if(o){(0,s.default)(this,f).setActiveSelection(n).scan().forEach((e=>{if(r.has(e)){const t=r.get(e);t.has(o)&&!0===i?t.set(o,t.get(o)+1):t.set(o,1)}else r.set(e,new Map([[o,1]]))}))}const u=n.getCorners();(0,s.default)(this,c).getSetting("onBeforeDrawBorders",u,a),null==l||l.appear(u)}r.forEach(((e,t)=>{var r,n;const o=Array.from(e).map((e=>{let[t,r]=e;return 1===r?t:[t,...Array.from({length:r-1},((e,r)=>`${t}-${r+1}`))]})).flat();o.forEach((e=>(0,s.default)(this,p).get((0,s.default)(this,c)).add(e))),(0,i.addClass)(t,o),"TD"===t.nodeName&&Array.isArray(null===(r=(0,s.default)(this,d).options)||void 0===r?void 0:r.cellAttributes)?(0,i.setAttribute)(t,(0,s.default)(this,d).options.cellAttributes):"TH"===t.nodeName&&Array.isArray(null===(n=(0,s.default)(this,d).options)||void 0===n?void 0:n.headerAttributes)&&(0,i.setAttribute)(t,(0,s.default)(this,d).options.headerAttributes)}))}}},13136:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),o=n(r(48427)),i=r(49587);function a(e,t,r){l(e,t),t.set(e,r)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var h=new WeakMap,c=new WeakMap,d=new WeakSet;function f(e){const{wtTable:t}=(0,s.default)(this,c),r=t.getRenderedRowsCount(),n=t.getRenderedColumnsCount();for(let s=0;s<r;s+=1){const r=t.rowFilter.renderedToSource(s);for(let s=0;s<n;s+=1)e(r,t.columnFilter.renderedToSource(s))}}t.SelectionScanner=class{constructor(){var e,t;l(e=this,t=d),t.add(e),a(this,h,{writable:!0,value:void 0}),a(this,c,{writable:!0,value:void 0})}setActiveOverlay(e){return(0,o.default)(this,c,e),this}setActiveSelection(e){return(0,o.default)(this,h,e),this}scan(){const e=(0,s.default)(this,h).settings.selectionType,t=new Set;return"active-header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"area"===e?this.scanCellsRange((e=>t.add(e))):"focus"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e))),this.scanCellsRange((e=>t.add(e)))):"fill"===e?this.scanCellsRange((e=>t.add(e))):"header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"row"===e?(this.scanRowsInHeadersRange((e=>t.add(e))),this.scanRowsInCellsRange((e=>t.add(e)))):"column"===e&&(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanColumnsInCellsRange((e=>t.add(e)))),t}scanColumnsInHeadersRange(e){const[t,r,n,o]=(0,s.default)(this,h).getCorners(),{wtTable:i}=(0,s.default)(this,c),a=i.getRenderedColumnsCount(),l=i.getColumnHeadersCount();let u=0;for(let d=-i.getRowHeadersCount();d<a;d++){const a=i.columnFilter.renderedToSource(d);if(!(a<r||a>o)){for(let d=-l;d<0;d++){if(d<t||d>n)continue;const f=d+l;let p=i.getColumnHeader(a,f);const g=(0,s.default)(this,c).getSetting("onBeforeHighlightingColumnHeader",a,f,{selectionType:(0,s.default)(this,h).settings.selectionType,columnCursor:u,selectionWidth:o-r+1});null!==g&&(g!==a&&(p=i.getColumnHeader(g,f)),e(p))}u+=1}}}scanRowsInHeadersRange(e){const[t,r,n,o]=(0,s.default)(this,h).getCorners(),{wtTable:i}=(0,s.default)(this,c),a=i.getRenderedRowsCount(),l=i.getRowHeadersCount();let u=0;for(let d=-i.getColumnHeadersCount();d<a;d++){const a=i.rowFilter.renderedToSource(d);if(!(a<t||a>n)){for(let d=-l;d<0;d++){if(d<r||d>o)continue;const f=d+l;let p=i.getRowHeader(a,f);const g=(0,s.default)(this,c).getSetting("onBeforeHighlightingRowHeader",a,f,{selectionType:(0,s.default)(this,h).settings.selectionType,rowCursor:u,selectionHeight:n-t+1});null!==g&&(g!==a&&(p=i.getRowHeader(g,f)),e(p))}u+=1}}}scanCellsRange(e){const[t,r,n,o]=(0,s.default)(this,h).getCorners(),{wtTable:a}=(0,s.default)(this,c);u(this,d,f).call(this,((l,u)=>{if(l>=t&&l<=n&&u>=r&&u<=o){const t=a.getCell((0,s.default)(this,c).createCellCoords(l,u)),r=(0,s.default)(this,c).getSetting("onAfterDrawSelection",l,u,(0,s.default)(this,h).settings.layerLevel);"string"==typeof r&&(0,i.addClass)(t,r),e(t)}}))}scanRowsInCellsRange(e){const[t,,r]=(0,s.default)(this,h).getCorners(),{wtTable:n}=(0,s.default)(this,c);u(this,d,f).call(this,((o,i)=>{if(o>=t&&o<=r){const t=n.getCell((0,s.default)(this,c).createCellCoords(o,i));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,r]=(0,s.default)(this,h).getCorners(),{wtTable:n}=(0,s.default)(this,c);u(this,d,f).call(this,((o,i)=>{if(i>=t&&i<=r){const t=n.getCell((0,s.default)(this,c).createCellCoords(o,i));e(t)}}))}}},73864:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(76163),o=n(r(63806));class i{constructor(e,t){this.settings=e,this.cellRange=t||null}isEmpty(){return null===this.cellRange}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row,e.col,t.row,t.col]}destroy(){this.runLocalHooks("destroy")}}(0,s.mixin)(i,o.default);var a=i;t.default=a},39373:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(49587),i=r(76163);t.default=class{constructor(e){(0,s.default)(this,"settings",{}),(0,s.default)(this,"defaults",Object.freeze(this.getDefaults())),(0,i.objectEach)(this.defaults,((t,r)=>{if(void 0!==e[r])this.settings[r]=e[r];else{if(void 0===t)throw new Error(`A required setting "${r}" was not provided`);this.settings[r]=t}}))}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,freezeOverlays:!1,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders:()=>[],columnHeaders:()=>[],totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,r)=>{const n=this.getSetting("data",e,t);(0,o.fastInnerText)(r,null==n?"":n)},columnWidth(){},rowHeight(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onBeforeViewportScrollHorizontally:e=>e,onBeforeViewportScrollVertically:e=>e,onScrollHorizontally:null,onScrollVertically:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:e=>e,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:e=>e,onBeforeHighlightingColumnHeader:e=>e,onWindowResize:null,onContainerElementResize:null,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1,ariaTags:!0}}update(e,t){return void 0===t?(0,i.objectEach)(e,((e,t)=>{this.settings[t]=e})):this.settings[e]=t,this}getSetting(e,t,r,n,s){return"function"==typeof this.settings[e]?this.settings[e](t,r,n,s):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}getSettingPure(e){return this.settings[e]}has(e){return!!this.settings[e]}}},58304:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=r(49587),i=r(46029),a=n(r(17976)),l=n(r(76191)),u=r(84355),h=n(r(66830)),c=n(r(18365)),d=r(24658),f=r(66862);var p=class{constructor(e,t,r,n,i){(0,s.default)(this,"wtSettings",null),(0,s.default)(this,"domBindings",void 0),(0,s.default)(this,"TBODY",null),(0,s.default)(this,"THEAD",null),(0,s.default)(this,"COLGROUP",null),(0,s.default)(this,"hasTableHeight",!0),(0,s.default)(this,"hasTableWidth",!0),(0,s.default)(this,"isTableVisible",!1),(0,s.default)(this,"tableOffset",0),(0,s.default)(this,"holderOffset",0),this.domBindings=r,this.isMaster="master"===i,this.name=i,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=n,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=r.rootTable,(0,o.removeTextNodes)(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;const a=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",(()=>this._modifyRowHeaderWidth(a))),this.rowUtils=new c.default(this.dataAccessObject,this.wtSettings),this.columnUtils=new h.default(this.dataAccessObject,this.wtSettings),this.tableRenderer=new u.Renderer({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer")})}is(e){return this.name===e}fixTableDomTree(){const e=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(e){const t=e.parentNode;let r;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,o.hasClass)(t,"wtHolder")||(r=this.domBindings.rootDocument.createElement("div"),r.className="wtSpreader",t&&t.insertBefore(r,e),r.appendChild(e)),r.style.position="relative",this.wtSettings.getSetting("ariaTags")&&(0,o.setAttribute)(r,[(0,f.A11Y_PRESENTATION)()]),r}createHider(e){const t=e.parentNode;let r;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,o.hasClass)(t,"wtHolder")||(r=this.domBindings.rootDocument.createElement("div"),r.className="wtHider",t&&t.insertBefore(r,e),r.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,o.setAttribute)(r,[(0,f.A11Y_PRESENTATION)()]),r}createHolder(e){const t=e.parentNode;let r;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,o.hasClass)(t,"wtHolder")||(r=this.domBindings.rootDocument.createElement("div"),r.style.position="relative",r.className="wtHolder",t&&t.insertBefore(r,e),this.isMaster&&(r.parentNode.className+="ht_master handsontable",r.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&(0,o.setAttribute)(r.parentNode,[(0,f.A11Y_PRESENTATION)()])),r.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,o.setAttribute)(r,[(0,f.A11Y_PRESENTATION)()]),r}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:r,wtViewport:n}=this.dataAccessObject,s=t.getSetting("totalRows"),i=t.getSetting("totalColumns"),u=t.getSetting("rowHeaders"),h=u.length,c=t.getSetting("columnHeaders"),f=c.length;let p=!1,g=e;if(this.isMaster&&(this.holderOffset=(0,o.offset)(this.holder),g=n.createRenderCalculators(g),h&&!t.getSetting("fixedColumnsStart"))){const e=r.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(g=!1)}if(this.isMaster&&(p=r.updateStateOfRendering()),g)this.isMaster&&n.createVisibleCalculators(),r&&r.refresh(!0);else{this.isMaster?this.tableOffset=(0,o.offset)(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=s>0?this.getFirstRenderedRow():0,t=i>0?this.getFirstRenderedColumn():0;this.rowFilter=new l.default(e,s,f),this.columnFilter=new a.default(t,i,h);let r=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),r=!0!==e.skipRender}if(r){let e;if(this.tableRenderer.setHeaderContentRenderers(u,c),(this.is(d.CLONE_BOTTOM)||this.is(d.CLONE_BOTTOM_INLINE_START_CORNER))&&this.tableRenderer.setHeaderContentRenderers(u,[]),this.resetOversizedRows(),this.tableRenderer.setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(e=this.dataAccessObject.workspaceWidth,this.dataAccessObject.wtViewport.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(d.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.dataAccessObject.wtViewport.createVisibleCalculators(),this.dataAccessObject.wtOverlays.refresh(!1),this.dataAccessObject.wtOverlays.applyToDOM();const t=(0,o.outerWidth)(this.hider),r=(0,o.outerWidth)(this.TABLE);0!==t&&r!==t&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),e!==this.dataAccessObject.wtViewport.getWorkspaceWidth()&&(this.dataAccessObject.wtViewport.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wtSettings.getSetting("onDraw",!0)}else this.is(d.CLONE_BOTTOM)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let m=!1;return this.isMaster&&(m=r.topOverlay.resetFixedPosition(),r.bottomOverlay.clone&&(m=r.bottomOverlay.resetFixedPosition()||m),m=r.inlineStartOverlay.resetFixedPosition()||m,r.topInlineStartCornerOverlay&&r.topInlineStartCornerOverlay.resetFixedPosition(),r.bottomInlineStartCornerOverlay&&r.bottomInlineStartCornerOverlay.clone&&r.bottomInlineStartCornerOverlay.resetFixedPosition()),m?(r.refreshAll(),r.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(g),p&&r.syncScrollWithMaster(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let r=this.wtSettings.getSetting("columnHeaders").length;const n=this.wtSettings.getSetting("defaultRowHeight");let s,i,a;const l=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;r;)r-=1,s=this.getColumnHeaderHeight(r),i=this.getColumnHeader(t,r),i&&(a=(0,o.innerHeight)(i),(!s&&n<a||s<a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=a),Array.isArray(l)?null!==l[r]&&void 0!==l[r]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=l[r]):isNaN(l)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=l),this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]<(l[r]||l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=l[r]||l))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,r=this.dataAccessObject.wtViewport.oversizedColumnHeaders;for(let n=0,s=e.getSetting("columnHeaders").length;n<s;n++)if(r[n]){if(!t[n]||0===t[n].childNodes.length)return;t[n].childNodes[0].style.height=`${r[n]}px`}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(d.CLONE_BOTTOM))&&!e.getSetting("externalRowCalculator")){const e=this.getRenderedRowsCount();for(let r=0;r<e;r++){const e=this.rowFilter.renderedToSource(r);t.oversizedRows&&t.oversizedRows[e]&&(t.oversizedRows[e]=void 0)}}}getCell(e){let t=e.row,r=e.col;const n=this.wtSettings.getSetting("onModifyGetCellCoords",t,r);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;const s=this.getRow(t);if(!s&&t>=0)throw new Error("TR was expected to be rendered but is not");const o=s.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(r)];if(!o&&r>=0)throw new Error("TD or TH was expected to be rendered but is not");return o}getRow(e){let t=null,r=null;var n,s;e<0?(t=null===(n=this.rowFilter)||void 0===n?void 0:n.sourceRowToVisibleColHeadedRow(e),r=this.THEAD):(t=null===(s=this.rowFilter)||void 0===s?void 0:s.sourceToRendered(e),r=this.TBODY);return void 0!==t&&void 0!==r&&(!(r.childNodes.length<t+1)&&r.childNodes[t])}getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=this.THEAD.childNodes[t];return null==r?void 0:r.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],r=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach((e=>{const n=e.childNodes[r];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;const r=this.rowFilter.sourceToRendered(e),n=r<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):r,s=(r<0?this.THEAD:this.TBODY).childNodes[n];return null==s?void 0:s.childNodes[t]}getRowHeaders(e){const t=[],r=this.wtSettings.getSetting("rowHeaders").length;for(let n=0;n<r;n++){const r=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],s=null==r?void 0:r.childNodes[n];s&&t.push(s)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,o.closest)(t,["TD","TH"])),null===t)return null;const r=t.parentNode,n=r.parentNode;let s=(0,o.index)(r),i=t.cellIndex;if((0,o.overlayContainsElement)(d.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,o.overlayContainsElement)(d.CLONE_TOP,t,this.wtRootElement))"THEAD"===n.nodeName&&(s-=n.childNodes.length);else if((0,o.overlayContainsElement)(d.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)||(0,o.overlayContainsElement)(d.CLONE_BOTTOM,t,this.wtRootElement)){s=this.wtSettings.getSetting("totalRows")-n.childNodes.length+s}else s=n===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(s):this.rowFilter.renderedToSource(s);return i=(0,o.overlayContainsElement)(d.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,o.overlayContainsElement)(d.CLONE_INLINE_START,t,this.wtRootElement)||(0,o.overlayContainsElement)(d.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(i):this.columnFilter.visibleRowHeadedColumnToSourceColumn(i),this.wot.createCellCoords(s,i)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;let t,r,n,s,i;if(e*this.wtSettings.getSetting("defaultRowHeight")!==(0,o.innerHeight)(this.TBODY)-1||this.wtSettings.getSetting("fixedRowsBottom"))for(;e;)e-=1,n=this.rowFilter.renderedToSource(e),t=this.getRowHeight(n),s=this.getTrForRow(n),i=s.querySelector("th"),r=i?(0,o.innerHeight)(i):(0,o.innerHeight)(s)-1,(!t&&this.wtSettings.getSetting("defaultRowHeight")<r||t<r)&&(r+=1,this.dataAccessObject.wtViewport.oversizedRows[n]=r)}getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}isColumnHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("rowHeaders").length;return Math.abs(e)<=t}isRowHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("columnHeaders").length;return Math.abs(e)<=t}isRowBeforeRenderedRows(e){const t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}isRowAfterRenderedRows(e){return e>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(e){const t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}isColumnAfterRenderedColumns(e){return this.columnFilter&&e>this.getLastRenderedColumn()}isColumnAfterViewport(e){return this.columnFilter&&e>this.getLastVisibleColumn()}isRowAfterViewport(e){return this.rowFilter&&e>this.getLastVisibleRow()}isColumnBeforeViewport(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}isLastRowFullyVisible(){return this.getLastVisibleRow()===this.getLastRenderedRow()}isLastColumnFullyVisible(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}allRowsInViewport(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}allColumnsInViewport(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}getRowHeight(e){return this.rowUtils.getHeight(e)}getColumnHeaderHeight(e){return this.columnUtils.getHeaderHeight(e)}getColumnWidth(e){return this.columnUtils.getWidth(e)}getStretchedColumnWidth(e){return this.columnUtils.getStretchedColumnWidth(e)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return(0,o.outerWidth)(this.TABLE)}getHeight(){return(0,o.outerHeight)(this.TABLE)}getTotalWidth(){const e=(0,o.outerWidth)(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=(0,o.outerHeight)(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return(0,o.isVisible)(this.TABLE)}_modifyRowHeaderWidth(e){let t=(0,i.isFunction)(e)?e():null;return Array.isArray(t)?(t=[...t],t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t}_correctRowHeaderWidth(e){let t=e;return"number"!=typeof e&&(t=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}};t.default=p},84218:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),o=n(r(3148)),i=n(r(27972)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_BOTTOM)}}(0,a.mixin)(u,o.default),(0,a.mixin)(u,i.default);var h=u;t.default=h},37917:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),o=n(r(3148)),i=n(r(29185)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_BOTTOM_INLINE_START_CORNER)}}(0,a.mixin)(u,o.default),(0,a.mixin)(u,i.default);var h=u;t.default=h},68215:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),o=n(r(46962)),i=n(r(29185)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_INLINE_START)}}(0,a.mixin)(u,o.default),(0,a.mixin)(u,i.default);var h=u;t.default=h},58454:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(49587),o=n(r(58304)),i=n(r(46962)),a=n(r(27972)),l=r(76163);class u extends o.default{constructor(e,t,r,n){super(e,t,r,n,"master")}alignOverlaysWithTrimmingContainer(){const e=(0,s.getTrimmingContainer)(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t){this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{const r=e.parentElement,n=(0,s.getStyle)(e,"height",t),o=(0,s.getStyle)(e,"overflow",t),i=this.holder.style,{scrollWidth:a,scrollHeight:l}=e;let u=e.offsetWidth,h=e.offsetHeight;if(r&&["auto","hidden","scroll"].includes(o)){const n=e.cloneNode(!1);n.style.overflow="auto",n.style.position="absolute",e.nextElementSibling?r.insertBefore(n,e.nextElementSibling):r.appendChild(n);const o=parseInt((0,s.getComputedStyle)(n,t).height,10);r.removeChild(n),0===o&&(h=0)}h=Math.min(h,l),i.height="auto"===n?"auto":`${h}px`,u=Math.min(u,a),i.width=`${u}px`,i.overflow="",this.hasTableHeight="auto"===i.height||h>0,this.hasTableWidth=u>0}this.isTableVisible=(0,s.isVisible)(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,r="master",n=e.getSetting("columnHeaders").length;if(n&&!t.hasOversizedColumnHeadersMarked[r]){const s=e.getSetting("rowHeaders").length,o=this.getRenderedColumnsCount();for(let e=0;e<n;e++)for(let e=-1*s;e<o;e++)this.markIfOversizedColumnHeader(e);t.hasOversizedColumnHeadersMarked[r]=!0}}}(0,l.mixin)(u,i.default),(0,l.mixin)(u,a.default);var h=u;t.default=h},27972:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getLastRenderedColumn(){const e=this.dataAccessObject.endColumnRendered;return null===e?-1:e},getLastVisibleColumn(){const e=this.dataAccessObject.endColumnVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,r(76163).defineGetter)(n,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});var s=n;t.default=s},46962:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getLastRenderedRow(){const e=this.dataAccessObject.endRowRendered;return null===e?-1:e},getLastVisibleRow(){const e=this.dataAccessObject.endRowVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,r(76163).defineGetter)(n,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});var s=n;t.default=s},29185:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedColumn(){return 0===this.wtSettings.getSetting("totalColumns")?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){const e=this.wtSettings.getSetting("totalColumns");return Math.min(this.wtSettings.getSetting("fixedColumnsStart"),e)},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,r(76163).defineGetter)(n,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});var s=n;t.default=s},3148:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),r=e-t;return 0===e||0===t?-1:r<0?0:r},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount:()=>0};(0,r(76163).defineGetter)(n,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});var s=n;t.default=s},75237:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedRow(){return 0===this.wtSettings.getSetting("totalRows")?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsTop"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,r(76163).defineGetter)(n,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});var s=n;t.default=s},54472:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),o=n(r(75237)),i=n(r(27972)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_TOP)}}(0,a.mixin)(u,o.default),(0,a.mixin)(u,i.default);var h=u;t.default=h},34868:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),o=n(r(75237)),i=n(r(29185)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_TOP_INLINE_START_CORNER)}}(0,a.mixin)(u,o.default),(0,a.mixin)(u,i.default);var h=u;t.default=h},66830:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(49587);t.default=class{constructor(e,t){(0,s.default)(this,"dataAccessObject",void 0),(0,s.default)(this,"wtSettings",void 0),(0,s.default)(this,"headerWidths",new Map),this.dataAccessObject=e,this.wtSettings=t}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getStretchedColumnWidth(e){const t=this.dataAccessObject.wtViewport.columnsRenderCalculator;let r=this.getWidth(e);if(t){const n=t.getStretchedColumnWidth(e,r);n&&(r=n)}return r}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const r=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==r&&(t=t?Math.max(t,r):r),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}calculateWidths(){const{wtSettings:e}=this,{wtTable:t,wtViewport:r,cloneSource:n}=this.dataAccessObject,s=n?n.wtTable.holder:t.holder,i=s.offsetHeight<s.scrollHeight?(0,o.getScrollbarWidth)():0;let a=e.getSetting("rowHeaderWidth");if(r.columnsRenderCalculator.refreshStretching(r.getViewportWidth()-i),a=e.getSetting("onModifyRowHeaderWidth",a),null!=a){const t=e.getSetting("rowHeaders").length,r=e.getSetting("defaultColumnWidth");for(let e=0;e<t;e++){let t=Array.isArray(a)?a[e]:a;t=null==t?r:t,this.headerWidths.set(e,t)}}}}},88929:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(e){(0,s.default)(this,"nodeType",void 0),this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}},79208:(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0;t.WORKING_SPACE_TOP=1;t.WORKING_SPACE_BOTTOM=2},32512:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(69191));t.OrderView=s.default;var o=n(r(81004));t.SharedOrderView=o.default},81004:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(69191));class o extends s.default{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}}t.default=o},69191:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(79208),i=n(r(72844));t.default=class{constructor(e,t,r){(0,s.default)(this,"rootNode",void 0),(0,s.default)(this,"nodesPool",void 0),(0,s.default)(this,"sizeSet",new i.default),(0,s.default)(this,"childNodeType",void 0),(0,s.default)(this,"visualIndex",0),(0,s.default)(this,"collectedNodes",[]),this.rootNode=e,this.nodesPool=t,this.childNodeType=r.toUpperCase()}setSize(e){return this.sizeSet.setSize(e),this}setOffset(e){return this.sizeSet.setOffset(e),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}getCurrentNode(){const e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}getRenderedChildCount(){const{rootNode:e,sizeSet:t}=this;let r=0;if(this.isSharedViewSet()){let n=e.firstElementChild;for(;n;){if(n.tagName===this.childNodeType)r+=1;else if(t.isPlaceOn(o.WORKING_SPACE_TOP))break;n=n.nextElementSibling}}else r=e.childElementCount;return r}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this,r=this.isSharedViewSet(),{nextSize:n}=t.getViewSize();let s=this.getRenderedChildCount();for(;s<n;){const n=this.nodesPool();!r||r&&t.isPlaceOn(o.WORKING_SPACE_BOTTOM)?e.appendChild(n):e.insertBefore(n,e.firstChild),s+=1}const i=r&&t.isPlaceOn(o.WORKING_SPACE_TOP);for(;s>n;)e.removeChild(i?e.firstChild:e.lastChild),s-=1}render(){const{rootNode:e,sizeSet:t}=this;let r=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(o.WORKING_SPACE_BOTTOM)&&(r+=t.sharedSize.nextSize);let n=e.childNodes[r];if(n.tagName!==this.childNodeType){const t=this.nodesPool();e.replaceChild(t,n),n=t}this.collectedNodes.push(n),this.visualIndex+=1}end(){}}},53566:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(){(0,s.default)(this,"currentSize",0),(0,s.default)(this,"nextSize",0),(0,s.default)(this,"currentOffset",0),(0,s.default)(this,"nextOffset",0)}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}},72844:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=n(r(53566)),i=r(79208);t.default=class{constructor(){(0,s.default)(this,"size",new o.default),(0,s.default)(this,"workingSpace",i.WORKING_SPACE_ALL),(0,s.default)(this,"sharedSize",null)}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof o.default}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=i.WORKING_SPACE_TOP,e.workingSpace=i.WORKING_SPACE_BOTTOM,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=i.WORKING_SPACE_BOTTOM,e.workingSpace=i.WORKING_SPACE_TOP,this.sharedSize=e.getViewSize()}}},18365:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(e,t){(0,s.default)(this,"dataAccessObject",void 0),(0,s.default)(this,"wtSettings",void 0),this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const r=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==r&&(t=void 0===t?r:Math.max(t,r)),t}}},55778:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(49587),s=r(76163),o=r(10933);var i=class{constructor(e,t,r,n,s){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=r,this.wtTable=s,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=n,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",(()=>{this.clientHeight=this.getWorkspaceHeight()}))}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let r=0;if(t===this.domBindings.rootWindow)r=e.documentElement.clientHeight;else{r=(0,n.outerHeight)(t)>0&&t.clientHeight>0?t.clientHeight:1/0}return r}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:r}=this.domBindings,s=this.dataAccessObject.inlineStartOverlayTrimmingContainer,o=t.documentElement.offsetWidth,i=e.getSetting("totalColumns"),a=e.getSetting("preventOverflow"),l=e.getSetting("rtlMode"),u=this.wtTable.TABLE.getBoundingClientRect(),h=o-(l?u.right-o:u.left);let c,d;if(a)return(0,n.outerWidth)(this.wtTable.wtRootElement);if(c=e.getSetting("freezeOverlays")?Math.min(h,o):Math.min(this.getContainerFillWidth(),h,o),s===r&&i>0&&this.sumColumnWidths(0,i-1)>c)return t.documentElement.clientWidth;if(s!==r&&(d=(0,n.getStyle)(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",r),"scroll"===d||"hidden"===d||"auto"===d))return Math.max(c,s.clientWidth);const f=e.getSetting("stretchH");return"none"!==f&&f?c:Math.max(c,(0,n.outerWidth)(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let r=0,n=e;for(;n<t;)r+=this.wtTable.getColumnWidth(n),n+=1;return r}getContainerFillWidth(){if(this.containerWidth)return this.containerWidth;const e=this.wtTable.holder,t=this.domBindings.rootDocument.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);const r=t.offsetWidth;return this.containerWidth=r,e.removeChild(t),r}getWorkspaceOffset(){return(0,n.offset)(this.wtTable.TABLE)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,n.outerHeight)(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getRowHeaderWidth(){const e=this.wtSettings.getSetting("rowHeaderWidth"),t=this.wtSettings.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(let r=0,n=t.length;r<n;r++)this.rowHeaderWidth+=e[r]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let r=0,s=t.length;r<s;r++)e?(this.rowHeaderWidth+=(0,n.outerWidth)(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.RENDER_TYPE;const{wtSettings:t,wtTable:r}=this;let s,i,a;this.rowHeaderWidth=NaN,s=t.getSetting("renderAllRows")&&e===o.RENDER_TYPE?1/0:this.getViewportHeight();let l=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const u=t.getSetting("fixedRowsTop"),h=t.getSetting("fixedRowsBottom"),c=t.getSetting("totalRows");return u&&l>=0&&(a=this.dataAccessObject.topOverlay.sumCellSizes(0,u),l+=a,s-=a),h&&this.dataAccessObject.bottomOverlay.clone&&(a=this.dataAccessObject.bottomOverlay.sumCellSizes(c-h,c),s-=a),i=r.holder.clientHeight===r.holder.offsetHeight?0:(0,n.getScrollbarWidth)(this.domBindings.rootDocument),new o.ViewportRowsCalculator({viewportHeight:s,scrollOffset:l,totalRows:t.getSetting("totalRows"),rowHeightFn:e=>r.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),calculationType:e,horizontalScrollbarHeight:i})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.RENDER_TYPE;const{wtSettings:t,wtTable:r}=this;let s=this.getViewportWidth(),i=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const a=t.getSetting("fixedColumnsStart");if(a&&i>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,a);i+=e,s-=e}return r.holder.clientWidth!==r.holder.offsetWidth&&(s-=(0,n.getScrollbarWidth)(this.domBindings.rootDocument)),new o.ViewportColumnsCalculator({viewportWidth:s,scrollOffset:i,totalColumns:t.getSetting("totalColumns"),columnWidthFn:e=>r.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),calculationType:e,stretchMode:t.getSetting("stretchH"),stretchingColumnWidthFn:(e,r)=>t.getSetting("onBeforeStretchingColumnWidth",e,r),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createRenderCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){const t=this.createRowsCalculator(o.FULLY_VISIBLE_TYPE),r=this.createColumnsCalculator(o.FULLY_VISIBLE_TYPE);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(r)||(e=!1)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(o.RENDER_TYPE),this.columnsRenderCalculator=this.createColumnsCalculator(o.RENDER_TYPE)),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}createVisibleCalculators(){this.rowsVisibleCalculator=this.createRowsCalculator(o.FULLY_VISIBLE_TYPE),this.columnsVisibleCalculator=this.createColumnsCalculator(o.FULLY_VISIBLE_TYPE)}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;const{startRow:t,endRow:r,isVisibleInTrimmingContainer:n}=e;if(null===t&&null===r)return!n;const{startRow:s,endRow:o}=this.rowsRenderCalculator;return!(t<s||t===s&&t>0)&&!(r>o||r===o&&r<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;const{startColumn:t,endColumn:r,isVisibleInTrimmingContainer:n}=e;if(null===t&&null===r)return!n;const{startColumn:s,endColumn:o}=this.columnsRenderCalculator;return!(t<s||t===s&&t>0)&&!(r>o||r===o&&r<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){(0,s.objectEach)(this.hasOversizedColumnHeadersMarked,((e,t,r)=>{r[t]=void 0}))}};t.default=i},73421:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(16247),r(25671),r(97796),r(36662);var s=n(r(40898)),o=r(83059),i=r(70400),a=n(r(54925)),l=r(19310),u=r(79321),h=r(44575),c=r(86446),d=r(94699);function f(e,t){const r=new s.default(e,t||{},o.rootInstanceSymbol);return r.init(),r}t.CellCoords=d.CellCoords,t.CellRange=d.CellRange,(0,u.registerCellType)(h.TextCellType),f.editors={BaseEditor:c.BaseEditor},f.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new s.default(e,t,o.rootInstanceSymbol)},f.DefaultSettings=(0,i.metaSchemaFactory)(),f.hooks=a.default.getSingleton(),f.CellCoords=d.CellCoords,f.CellRange=d.CellRange,f.packageName="handsontable",f.buildDate="08/11/2023 12:10:54",f.version="0.0.0-next-5f253b5-20231108",f.languages={dictionaryKeys:l.dictionaryKeys,getLanguageDictionary:l.getLanguageDictionary,getLanguagesDictionaries:l.getLanguagesDictionaries,registerLanguageDictionary:l.registerLanguageDictionary,getTranslatedPhrase:l.getTranslatedPhrase};var p=f;t.default=p},90078:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(16478),s=r(20395),o=r(78420);const i="autocomplete";t.CELL_TYPE=i;const a={CELL_TYPE:i,editor:n.AutocompleteEditor,renderer:s.autocompleteRenderer,validator:o.autocompleteValidator};t.AutocompleteCellType=a},1544:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(90078);t.AutocompleteCellType=n.AutocompleteCellType,t.CELL_TYPE=n.CELL_TYPE},19992:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(73388),s=r(30201);const o="checkbox";t.CELL_TYPE=o;const i={CELL_TYPE:o,editor:n.CheckboxEditor,renderer:s.checkboxRenderer};t.CheckboxCellType=i},17177:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(19992);t.CELL_TYPE=n.CELL_TYPE,t.CheckboxCellType=n.CheckboxCellType},55261:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(92090),s=r(61795),o=r(63322);const i="date";t.CELL_TYPE=i;const a={CELL_TYPE:i,editor:n.DateEditor,renderer:s.dateRenderer,validator:o.dateValidator};t.DateCellType=a},69364:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(55261);t.CELL_TYPE=n.CELL_TYPE,t.DateCellType=n.DateCellType},93534:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(28544),s=r(20395),o=r(78420);const i="dropdown";t.CELL_TYPE=i;const a={CELL_TYPE:i,editor:n.DropdownEditor,renderer:s.autocompleteRenderer,validator:o.autocompleteValidator};t.DropdownCellType=a},29329:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(93534);t.CELL_TYPE=n.CELL_TYPE,t.DropdownCellType=n.DropdownCellType},37007:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(12540),s=r(75067);const o="handsontable";t.CELL_TYPE=o;const i={CELL_TYPE:o,editor:n.HandsontableEditor,renderer:s.handsontableRenderer};t.HandsontableCellType=i},26737:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(37007);t.CELL_TYPE=n.CELL_TYPE,t.HandsontableCellType=n.HandsontableCellType},419:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,f.registerCellType)(n.AutocompleteCellType),(0,f.registerCellType)(s.CheckboxCellType),(0,f.registerCellType)(o.DateCellType),(0,f.registerCellType)(i.DropdownCellType),(0,f.registerCellType)(a.HandsontableCellType),(0,f.registerCellType)(l.NumericCellType),(0,f.registerCellType)(u.PasswordCellType),(0,f.registerCellType)(h.SelectCellType),(0,f.registerCellType)(c.TextCellType),(0,f.registerCellType)(d.TimeCellType)};var n=r(1544);t.AutocompleteCellType=n.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=n.CELL_TYPE;var s=r(17177);t.CheckboxCellType=s.CheckboxCellType,t.CHECKBOX_TYPE=s.CELL_TYPE;var o=r(69364);t.DateCellType=o.DateCellType,t.DATE_TYPE=o.CELL_TYPE;var i=r(29329);t.DropdownCellType=i.DropdownCellType,t.DROPDOWN_TYPE=i.CELL_TYPE;var a=r(26737);t.HandsontableCellType=a.HandsontableCellType,t.HANDSONTABLE_TYPE=a.CELL_TYPE;var l=r(59854);t.NumericCellType=l.NumericCellType,t.NUMERIC_TYPE=l.CELL_TYPE;var u=r(97839);t.PasswordCellType=u.PasswordCellType,t.PASSWORD_TYPE=u.CELL_TYPE;var h=r(85e3);t.SelectCellType=h.SelectCellType,t.SELECT_TYPE=h.CELL_TYPE;var c=r(44575);t.TextCellType=c.TextCellType,t.TEXT_TYPE=c.CELL_TYPE;var d=r(738);t.TimeCellType=d.TimeCellType,t.TIME_TYPE=d.CELL_TYPE;var f=r(79321);t.registerCellType=f.registerCellType,t.getCellType=f.getCellType,t.getRegisteredCellTypeNames=f.getRegisteredCellTypeNames,t.getRegisteredCellTypes=f.getRegisteredCellTypes,t.hasCellType=f.hasCellType},59854:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(57846);t.CELL_TYPE=n.CELL_TYPE,t.NumericCellType=n.NumericCellType},57846:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(6618),s=r(94350),o=r(22905);const i="numeric";t.CELL_TYPE=i;const a={CELL_TYPE:i,editor:n.NumericEditor,renderer:s.numericRenderer,validator:o.numericValidator,dataType:"number"};t.NumericCellType=a},97839:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(28204);t.CELL_TYPE=n.CELL_TYPE,t.PasswordCellType=n.PasswordCellType},28204:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(50647),s=r(32991);const o="password";t.CELL_TYPE=o;const i={CELL_TYPE:o,editor:n.PasswordEditor,renderer:s.passwordRenderer,copyable:!1};t.PasswordCellType=i},79321:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getCellType=function(e){if(!h(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return u(e)},t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);const{editor:r,renderer:n,validator:s}=t;r&&(0,o.registerEditor)(e,r);n&&(0,i.registerRenderer)(e,n);s&&(0,a.registerValidator)(e,s);l(e,t)},r(60740);var s=n(r(31056)),o=r(16691),i=r(36996),a=r(59340);const{register:l,getItem:u,hasItem:h,getNames:c,getValues:d}=(0,s.default)("cellTypes");t.getRegisteredCellTypes=d,t.getRegisteredCellTypeNames=c,t.hasCellType=h},85e3:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(59139);t.CELL_TYPE=n.CELL_TYPE,t.SelectCellType=n.SelectCellType},59139:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(71177),s=r(9126);const o="select";t.CELL_TYPE=o;const i={CELL_TYPE:o,editor:n.SelectEditor,renderer:s.selectRenderer};t.SelectCellType=i},44575:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(89294);t.CELL_TYPE=n.CELL_TYPE,t.TextCellType=n.TextCellType},89294:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953),s=r(26031);const o="text";t.CELL_TYPE=o;const i={CELL_TYPE:o,editor:n.TextEditor,renderer:s.textRenderer};t.TextCellType=i},738:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(59115);t.CELL_TYPE=n.CELL_TYPE,t.TimeCellType=n.TimeCellType},59115:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(76219),s=r(78279),o=r(85137);const i="time";t.CELL_TYPE=i;const a={CELL_TYPE:i,editor:n.TimeEditor,renderer:s.timeRenderer,validator:o.timeValidator};t.TimeCellType=a},40898:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.default=function(e,t){var r,n=this;let H=arguments.length>2&&void 0!==arguments[2]&&arguments[2],F=!1,U=this;const V=new u.default(U);let B,W,Y,G,j,z=!0;(0,T.hasValidParameter)(H)&&(0,T.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const $=null!==(r=null==t?void 0:t.layoutDirection)&&void 0!==r?r:"inherit",K=["rtl","ltr"].includes($)?$:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",K),this.isRtl=function(){return"rtl"===K},this.isLtr=function(){return!U.isRtl()},this.getDirectionFactor=function(){return U.isLtr()?1:-1},t.language=(0,M.getValidLanguageCode)(t.language);const X=new b.MetaManager(U,t,[b.DynamicCellMetaMod,b.ExtendMetaPropertiesMod]),q=X.getTableMeta(),Q=X.getGlobalMeta(),Z=(0,x.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,T.isRootInstance)(this)&&(0,i._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,y.randomString)()}`,k.set(this.guid,this),this.columnIndexMapper=new S.IndexMapper,this.rowIndexMapper=new S.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{U.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{U.runHooks("afterRowSequenceChange",e)})),W=new v.default(U),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let J=new A.Selection(q,{rowIndexMapper:U.rowIndexMapper,columnIndexMapper:U.columnIndexMapper,countCols:()=>U.countCols(),countRows:()=>U.countRows(),propToCol:e=>B.propToCol(e),isEditorOpened:()=>!!U.getActiveEditor()&&U.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),getShortcutManager:()=>U.getShortcutManager(),createCellCoords:(e,t)=>U._createCellCoords(e,t),createCellRange:(e,t,r)=>U._createCellRange(e,t,r),visualToRenderableCoords:e=>{const{row:t,col:r}=e;return U._createCellCoords(t>=0?U.rowIndexMapper.getRenderableFromVisualIndex(t):t,r>=0?U.columnIndexMapper.getRenderableFromVisualIndex(r):r)},renderableToVisualCoords:e=>{const{row:t,col:r}=e;return U._createCellCoords(t>=0?U.rowIndexMapper.getVisualFromRenderableIndex(t):t,r>=0?U.columnIndexMapper.getVisualFromRenderableIndex(r):r)},isDisabledCellSelection:(e,t)=>e<0||t<0?U.getSettings().disableVisualSelection:U.getCellMeta(e,t).disableVisualSelection});this.selection=J;const ee=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function te(e){const t=(0,_.normalizeLanguageCode)(e);(0,M.hasLanguageDictionary)(t)?(U.runHooks("beforeLanguageChange",t),Q.language=t,U.runHooks("afterLanguageChange",t)):(0,_.warnUserAboutLanguageRegistration)(e)}function re(e,t){const r="className"===e?U.rootElement:U.table;if(z)(0,s.addClass)(r,t);else{let n=[],o=[];Q[e]&&(n=Array.isArray(Q[e])?Q[e]:(0,d.stringToArray)(Q[e])),t&&(o=Array.isArray(t)?t:(0,d.stringToArray)(t));const i=(0,d.getDifferenceOfArrays)(n,o),a=(0,d.getDifferenceOfArrays)(o,n);i.length&&(0,s.removeClass)(r,i),a.length&&(0,s.addClass)(r,a)}Q[e]=t}function ne(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function se(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function oe(e,t,r){if(!e.length)return;const n=U.getActiveEditor(),o=new ne;let i=!0;o.onQueueEmpty=e=>{n&&i&&n.cancelChanges(),r(e)};for(let r=e.length-1;r>=0;r--){const[n,a,,l]=e[r],u=B.propToCol(a),h=U.getCellMeta(n,u);"numeric"===h.type&&"string"==typeof l&&(0,w.isNumericLike)(l)&&(e[r][3]=se(l)),U.getCellValidator(h)&&(o.addValidatorToQueue(),U.validateCell(e[r][3],h,function(t,r){return function(n){if("boolean"!=typeof n)throw new Error("Validation error: result is not boolean");if(!1===n&&!1===r.allowInvalid){i=!1,e.splice(t,1),r.valid=!0;const n=U.getCell(r.visualRow,r.visualCol);null!==n&&(0,s.removeClass)(n,q.invalidCellClassName)}o.removeValidatorFormQueue()}}(r,h),t))}o.checkIfQueueIsEmpty()}function ie(e,t){let r=e.length-1;if(r<0)return;for(;r>=0;r--){let n=!1;if(null!==e[r]){if(null!==e[r][2]&&void 0!==e[r][2]||null!==e[r][3]&&void 0!==e[r][3]){if(q.allowInsertRow)for(;e[r][0]>U.countRows()-1;){const{delta:e}=B.createRow(void 0,void 0,{source:t});if(0===e){n=!0;break}}if("array"===U.dataType&&(!q.columns||0===q.columns.length)&&q.allowInsertColumn)for(;B.propToCol(e[r][1])>U.countCols()-1;){const{delta:e}=B.createCol(void 0,void 0,{source:t});if(0===e){n=!0;break}}n||B.set(e[r][0],e[r][1],e[r][3])}}else e.splice(r,1)}U.forceFullRender=!0,Y.adjustRowsAndCols(),U.runHooks("beforeChangeRender",e,t),G.lockEditor(),U._refreshBorders(null),G.unlockEditor(),U.view.adjustElementsSize(),U.runHooks("afterChange",e,t||"edit");const n=U.getActiveEditor();n&&(0,i.isDefined)(n.refreshValue)&&n.refreshValue()}function ae(e,t,r){return Array.isArray(e)?e:[[e,t,r]]}function le(e,t){const r=U.getActiveEditor(),n=U.runHooks("beforeChange",e,t||"edit"),s=e.filter((e=>null!==e));return!1===n||0===s.length?(r&&r.cancelChanges(),[]):s}this.columnIndexMapper.addLocalHook("cacheUpdated",ee),this.rowIndexMapper.addLocalHook("cacheUpdated",ee),this.selection.addLocalHook("afterSetRangeEnd",(e=>{const t=(0,h.createObjectPropListener)(!1),r=this.selection.getSelectedRange(),{from:n,to:o}=r.current(),i=r.size()-1;this.runHooks("afterSelection",n.row,n.col,o.row,o.col,t,i),this.runHooks("afterSelectionByProp",n.row,U.colToProp(n.col),o.row,U.colToProp(o.col),t,i);let a=!0;F&&(a=!1),t.isTouched()&&(a=!t.value);const l=this.selection.selectedRange.current(),u=this.selection.isSelectedByAnyHeader(),c=this.selection.isSelectedByRowHeader(),d=this.selection.isSelectedByColumnHeader();if(!1!==a)if(u)c?this.scrollViewportTo({row:e.row}):d&&this.scrollViewportTo({col:e.col});else if(l&&!this.selection.isMultiple()){const{row:e,col:t}=l.from;e<0&&t>=0?this.scrollViewportTo({col:t}):t<0&&e>=0?this.scrollViewportTo({row:e}):this.scrollViewportTo({row:e,col:t})}else this.scrollViewportTo(e.toObject());c&&d?(0,s.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):c?((0,s.removeClass)(this.rootElement,"ht__selection--columns"),(0,s.addClass)(this.rootElement,"ht__selection--rows")):d?((0,s.removeClass)(this.rootElement,"ht__selection--rows"),(0,s.addClass)(this.rootElement,"ht__selection--columns")):(0,s.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(e=>{const t=e.length-1,{from:r,to:n}=e[t];this.runHooks("afterSelectionEnd",r.row,r.col,n.row,n.col,t),this.runHooks("afterSelectionEndByProp",r.row,U.colToProp(r.col),n.row,U.colToProp(n.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("afterDeselect",(()=>{G.destroyEditor(),this._refreshBorders(),(0,s.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")})),this.selection.addLocalHook("beforeHighlightSet",(()=>this.runHooks("beforeSelectionHighlightSet"))).addLocalHook("beforeSetRangeStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSetRangeStart",...t)})).addLocalHook("beforeSetRangeStartOnly",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSetRangeStartOnly",...t)})).addLocalHook("beforeSetRangeEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSetRangeEnd",...t)})).addLocalHook("beforeSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSelectColumns",...t)})).addLocalHook("afterSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterSelectColumns",...t)})).addLocalHook("beforeSelectRows",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSelectRows",...t)})).addLocalHook("afterSelectRows",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterSelectRows",...t)})).addLocalHook("beforeModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("modifyTransformStart",...t)})).addLocalHook("afterModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterModifyTransformStart",...t)})).addLocalHook("beforeModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("modifyTransformEnd",...t)})).addLocalHook("afterModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterModifyTransformEnd",...t)})).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeRowWrap",...t)})).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeColumnWrap",...t)})).addLocalHook("insertRowRequire",(e=>this.alter("insert_row_above",e,1,"auto"))).addLocalHook("insertColRequire",(e=>this.alter("insert_col_start",e,1,"auto"))),Y={alter(e,t){var r,n;let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;const l=e=>{if(0===e.length)return[];const t=[...e];t.sort(((e,t)=>{let[r]=e,[n]=t;return r===n?0:r>n?1:-1}));return(0,d.arrayReduce)(t,((e,t)=>{let[r,n]=t;const s=e[e.length-1],[o,i]=s,a=o+i;if(r<=a){const e=Math.max(n-(a-r),0);s[1]+=e}else e.push([r,n]);return e}),[t[0]])};switch(e){case"insert_row_below":case"insert_row_above":const a=U.countSourceRows();if(q.maxRows===a)return;const u="insert_row_below"===e?"below":"above";t=null!==(r=t)&&void 0!==r?r:"below"===u?a:0;const{delta:h,startPhysicalIndex:c}=B.createRow(t,s,{source:o,mode:u});if(h){const e=J.selectedRange.current(),t=null==e?void 0:e.from,r=null==t?void 0:t.row,n=U.toVisualRow(c);if(J.isSelectedByCorner())J.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,i.isDefined)(r)&&r>=n){const{row:n,col:s}=e.to;let o=t.col;J.isSelectedByRowHeader()&&(o=-1),J.getSelectedRange().pop(),J.setRangeStartOnly(U._createCellCoords(r+h,o),!0),J.setRangeEnd(U._createCellCoords(n+h,s))}else U._refreshBorders()}break;case"insert_col_start":case"insert_col_end":const f="insert_col_end"===e?"end":"start";t=null!==(n=t)&&void 0!==n?n:"end"===f?U.countSourceCols():0;const{delta:p,startPhysicalIndex:g}=B.createCol(t,s,{source:o,mode:f});if(p){if(Array.isArray(q.colHeaders)){const e=[U.toVisualColumn(g),0];e.length+=p,Array.prototype.splice.apply(q.colHeaders,e)}const e=J.selectedRange.current(),t=null==e?void 0:e.from,r=null==t?void 0:t.col,n=U.toVisualColumn(g);if(J.isSelectedByCorner())J.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,i.isDefined)(r)&&r>=n){const{row:n,col:s}=e.to;let o=t.row;J.isSelectedByColumnHeader()&&(o=-1),J.getSelectedRange().pop(),J.setRangeStartOnly(U._createCellCoords(o,r+p),!0),J.setRangeEnd(U._createCellCoords(n,s+p))}else U._refreshBorders()}break;case"remove_row":const m=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[r,n]=e;const s=(0,i.isEmpty)(r)?U.countRows()-1:Math.max(r-t,0);Number.isInteger(r)&&(r=Math.max(r-t,0));if(!B.removeRow(r,n,o))return;const a=U.countRows(),l=q.fixedRowsTop;l>=s+1&&(q.fixedRowsTop-=Math.min(n,l-s));const u=q.fixedRowsBottom;u&&s>=a-u&&(q.fixedRowsBottom-=Math.min(n,u)),t+=n}))};Array.isArray(t)?m(l(t)):m([[t,s]]),Y.adjustRowsAndCols(),U._refreshBorders();break;case"remove_col":const E=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[r,n]=e;const s=(0,i.isEmpty)(r)?U.countCols()-1:Math.max(r-t,0);let a=U.toPhysicalColumn(s);Number.isInteger(r)&&(r=Math.max(r-t,0));if(!B.removeCol(r,n,o))return;const l=q.fixedColumnsStart;l>=s+1&&(q.fixedColumnsStart-=Math.min(n,l-s)),Array.isArray(q.colHeaders)&&(void 0===a&&(a=-1),q.colHeaders.splice(a,n)),t+=n}))};Array.isArray(t)?E(l(t)):E([[t,s]]),Y.adjustRowsAndCols(),U._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}a||Y.adjustRowsAndCols()},adjustRowsAndCols(){const e=q.minRows,t=q.minSpareRows,r=q.minCols,n=q.minSpareCols;if(0===U.countRows()&&0===U.countCols()&&J.deselect(),e){const t=U.countRows();t<e&&B.createRow(t,e-t,{source:"auto"})}if(t){const e=U.countEmptyRows(!0);if(e<t){const r=t-e,n=Math.min(r,q.maxRows-U.countSourceRows());B.createRow(U.countRows(),n,{source:"auto"})}}{let e;(r||n)&&(e=U.countEmptyCols(!0));let t=U.countCols();if(r&&!q.columns&&t<r){const n=r-t;e+=n,B.createCol(t,n,{source:"auto"})}if(n&&!q.columns&&"array"===U.dataType&&e<n){t=U.countCols();const r=n-e,s=Math.min(r,q.maxCols-t);B.createCol(t,s,{source:"auto"})}}if(J.isSelected()){const e=U.countRows(),t=U.countCols();(0,d.arrayEach)(J.selectedRange,(r=>{let n=!1,s=r.from.row,o=r.from.col,i=r.to.row,a=r.to.col;s>e-1?(s=e-1,n=!0,i>s&&(i=s)):i>e-1&&(i=e-1,n=!0,s>i&&(s=i)),o>t-1?(o=t-1,n=!0,a>o&&(a=o)):a>t-1&&(a=t-1,n=!0,o>a&&(o=a)),n&&U.selectCell(s,o,i,a)}))}U.view&&U.view.adjustElementsSize()},populateFromArray(e,t,r,n,s){let o,i,a,l;const u=[],c={},f=[],p=e.row,g=e.col;if(i=t.length,0===i)return!1;let m=0,E=0;switch((0,h.isObject)(r)&&(m=r.col-g+1,E=r.row-p+1),s){case"shift_down":const s=(0,d.pivot)(t),y=s.length,w=Math.max(y,m),C=U.getData().slice(p),v=(0,d.pivot)(C).slice(g,g+w);for(a=0;a<w;a+=1)if(a<y){for(o=0,i=s[a].length;o<E-i;o+=1)s[a].push(s[a][o%i]);a<v.length?f.push(s[a].concat(v[a])):f.push(s[a].concat(new Array(C.length).fill(null)))}else f.push(s[a%y].concat(v[a]));U.populateFromArray(p,g,(0,d.pivot)(f));break;case"shift_right":const R=t.length,S=Math.max(R,E),T=U.getData().slice(p).map((e=>e.slice(g)));for(o=0;o<S;o+=1)if(o<R){for(a=0,l=t[o].length;a<m-l;a+=1)t[o].push(t[o][a%l]);if(o<T.length)for(let e=0;e<T[o].length;e+=1)t[o].push(T[o][e]);else t[o].push(...new Array(T[0].length).fill(null))}else t.push(t[o%i].slice(0,S).concat(T[o]));U.populateFromArray(p,g,t);break;default:c.row=e.row,c.col=e.col;let N,O=0,M=0,_=!0;const A=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=t[e%t.length];return null!==r?n[r%n.length]:n},b=t.length,I=r?r.row-e.row+1:0;for(i=r?I:Math.max(b,I),o=0;o<i&&!(r&&c.row>r.row&&I>b||!q.allowInsertRow&&c.row>U.countRows()-1||c.row>=q.maxRows);o++){const t=o-O,s=A(t).length,d=r?r.col-e.col+1:0;if(l=r?d:Math.max(s,d),c.col=e.col,N=U.getCellMeta(c.row,c.col),"CopyPaste.paste"!==n&&"Autofill.fill"!==n||!N.skipRowOnPaste){for(M=0,a=0;a<l&&!(r&&c.col>r.col&&d>s||!q.allowInsertColumn&&c.col>U.countCols()-1||c.col>=q.maxCols);a++){if(N=U.getCellMeta(c.row,c.col),("CopyPaste.paste"===n||"Autofill.fill"===n)&&N.skipColumnOnPaste){M+=1,c.col+=1,l+=1;continue}if(N.readOnly&&"UndoRedo.undo"!==n){c.col+=1;continue}let e=A(t,a-M),r=U.getDataAtCell(c.row,c.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===r&&(r=[]),null===r||"object"!=typeof r)_=!1;else{const t=(0,h.duckSchema)(Array.isArray(r)?r:r[0]||r),n=(0,h.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,h.isObjectEqual)(t,n)||Array.isArray(t)&&Array.isArray(n)?e=(0,h.deepClone)(e):_=!1}else null!==r&&"object"==typeof r&&(_=!1);_&&u.push([c.row,c.col,e]),_=!0,c.col+=1}c.row+=1}else O+=1,c.row+=1,i+=1}U.setDataAtCell(u,null,null,n||"populateFromArray")}}},this.init=function(){W.setData(q.data),U.runHooks("beforeInit"),((0,a.isMobileBrowser)()||(0,a.isIpadOS)())&&(0,s.addClass)(U.rootElement,"mobile"),this.updateSettings(q,!0),this.view=new C.default(this),G=l.default.getInstance(U,q,J),j=new c.FocusManager(U),(0,T.isRootInstance)(this)&&(0,I.installFocusCatcher)(U),U.runHooks("init"),this.forceFullRender=!0,this.view.render(),z&&null===U.rootElement.offsetParent&&(0,s.observeVisibilityChangeOnce)(U.rootElement,(()=>{U.view._wt.wtOverlays.updateLastSpreaderSize(),U.render(),U.view.adjustElementsSize()})),"object"==typeof z&&(U.runHooks("afterChange",z[0],z[1]),z=!1),U.runHooks("afterInit")},this._createCellCoords=function(e,t){return U.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,r){return U.view._wt.createCellRange(e,t,r)},this.validateCell=function(e,t,r,n){let s=U.getCellValidator(t);function a(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])||!0===t.hidden)return void r(e);const n=t.visualCol,s=t.visualRow,o=U.getCell(s,n,!0);if(o&&"TH"!==o.nodeName){const e=U.rowIndexMapper.getRenderableFromVisualIndex(s),t=U.columnIndexMapper.getRenderableFromVisualIndex(n);U.view._wt.getSetting("cellRenderer",e,t,o)}r(e)}var l;(0,i.isRegExp)(s)&&(l=s,s=function(e,t){t(l.test(e))}),(0,o.isFunction)(s)?(e=U.runHooks("beforeValidate",e,t.visualRow,t.prop,n),U._registerImmediate((()=>{s.call(t,e,(r=>{U&&(r=U.runHooks("afterValidate",r,e,t.visualRow,t.prop,n),t.valid=r,a(r),U.runHooks("postAfterValidate",r,e,t.visualRow,t.prop,n))}))}))):U._registerImmediate((()=>{t.valid=!0,a(t.valid,!1)}))},this.setDataAtCell=function(e,t,r,n){const s=ae(e,t,r),o=[];let i,a,l,u=n;for(i=0,a=s.length;i<a;i++){if("object"!=typeof s[i])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof s[i][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");l=s[i][1]>=this.countCols()?s[i][1]:B.colToProp(s[i][1]),o.push([s[i][0],l,W.getAtCell(this.toPhysicalRow(s[i][0]),s[i][1]),s[i][2]])}u||"object"!=typeof e||(u=t);const h=le(o,n);U.runHooks("afterSetDataAtCell",h,u),oe(h,u,(()=>{ie(h,u)}))},this.setDataAtRowProp=function(e,t,r,n){const s=ae(e,t,r),o=[];let i,a,l=n;for(i=0,a=s.length;i<a;i++)o.push([s[i][0],s[i][1],W.getAtCell(this.toPhysicalRow(s[i][0]),s[i][1]),s[i][2]]);l||"object"!=typeof e||(l=t);const u=le(o,n);U.runHooks("afterSetDataAtRowProp",u,l),oe(u,l,(()=>{ie(u,l)}))},this.listen=function(){U&&!U.isListening()&&(k.forEach((e=>{U!==e&&e.unlisten()})),D=U.guid,U.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(D=null,U.runHooks("afterUnlisten"))},this.isListening=function(){return D===U.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];U._refreshBorders(e,t)},this.populateFromArray=function(e,t,r,n,s,o,i){if("object"!=typeof r||"object"!=typeof r[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const a="number"==typeof n?U._createCellCoords(n,s):null;return Y.populateFromArray(U._createCellCoords(e,t),r,a,o,i)},this.spliceCol=function(e,t,r){for(var n=arguments.length,s=new Array(n>3?n-3:0),o=3;o<n;o++)s[o-3]=arguments[o];return B.spliceCol(e,t,r,...s)},this.spliceRow=function(e,t,r){for(var n=arguments.length,s=new Array(n>3?n-3:0),o=3;o<n;o++)s[o-3]=arguments[o];return B.spliceRow(e,t,r,...s)},this.getSelected=function(){if(J.isSelected())return(0,d.arrayMap)(J.getSelectedRange(),(e=>{let{from:t,to:r}=e;return[t.row,t.col,r.row,r.col]}))},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(J.isSelected())return Array.from(J.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!J.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,d.arrayEach)(J.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const r=e.getTopStartCorner(),n=e.getBottomEndCorner();(0,w.rangeEach)(r.row,n.row,(e=>{(0,w.rangeEach)(r.col,n.col,(r=>{this.getCellMeta(e,r).readOnly||t.push([e,r,null])}))}))})),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||(this.renderCall?this.render():this._refreshBorders(null))},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||(G.lockEditor(),this._refreshBorders(null),G.unlockEditor()))},this.batchRender=function(e){this.suspendRender();const t=e();return this.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const r=e();return this.resumeExecution(t),r},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!U.view)return;const{width:e,height:t}=U.view.getLastSize(),{width:r,height:n}=U.rootElement.getBoundingClientRect(),s=r!==e||n!==t;!1===U.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:r,height:n},s)||((s||U.view._wt.wtOverlays.scrollableElement===U.rootWindow)&&(U.view.setLastSize(r,n),U.render()),U.runHooks("afterRefreshDimensions",{width:e,height:t},{width:r,height:n},s))},this.updateData=function(e,t){(0,b.replaceData)(e,(e=>{B=e}),(e=>{B=e,U.columnIndexMapper.fitToLength(this.getInitialColumnCount()),U.rowIndexMapper.fitToLength(this.countSourceRows()),Y.adjustRowsAndCols()}),{hotInstance:U,dataMap:B,dataSource:W,internalSource:"updateData",source:t,metaManager:X,firstRun:z})},this.loadData=function(e,t){(0,b.replaceData)(e,(e=>{B=e}),(()=>{X.clearCellsCache(),U.initIndexMappers(),Y.adjustRowsAndCols(),z&&(z=[null,"loadData"])}),{hotInstance:U,dataMap:B,dataSource:W,internalSource:"loadData",source:t,metaManager:X,firstRun:z})},this.getInitialColumnCount=function(){const e=q.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,o.isFunction)(e))if("array"===U.dataType){const r=this.countSourceCols();for(let n=0;n<r;n+=1)e(n)&&(t+=1)}else"object"!==U.dataType&&"function"!==U.dataType||(t=B.colToPropCache.length);else if((0,i.isDefined)(q.dataSchema)){const e=B.getSchema();t=Array.isArray(e)?e.length:(0,h.deepObjectSize)(e)}else t=this.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,r,n){return(0,i.isUndefined)(e)?B.getAll():B.getRange(U._createCellCoords(e,t),U._createCellCoords(r,n),B.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,r,n){return B.getCopyableText(U._createCellCoords(e,t),U._createCellCoords(r,n))},this.getCopyableData=function(e,t){return B.getCopyable(e,B.colToProp(t))},this.getSchema=function(){return B.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=(z?U.loadData:U.updateData).bind(this);let n,s,a=!1;if((0,i.isDefined)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,i.isDefined)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,i.isDefined)(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(n in e)"data"===n||("language"===n?te(e.language):"className"===n?re("className",e.className):"tableClassName"===n&&U.table?(re("tableClassName",e.tableClassName),U.view._wt.wtOverlays.syncOverlayTableClassNames()):O.default.getSingleton().isRegistered(n)||O.default.getSingleton().isDeprecated(n)?((0,o.isFunction)(e[n])||Array.isArray(e[n]))&&(e[n].initialHook=!0,U.addHook(n,e[n])):!t&&(0,h.hasOwnProperty)(e,n)&&(Q[n]=e[n]));void 0===e.data&&void 0===q.data?r(null,"updateSettings"):void 0!==e.data?r(e.data,"updateSettings"):void 0!==e.columns&&(B.createMap(),U.initIndexMappers());const l=U.countCols(),u=q.columns;if(u&&(0,o.isFunction)(u)&&(a=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||X.clearCache(),l>0)for(n=0,s=0;n<l;n++){if(u){const e=a?u(n):u[s];e&&X.updateColumnMeta(s,e)}s+=1}(0,i.isDefined)(e.cell)&&(0,h.objectEach)(e.cell,(e=>{U.setCellMetaObject(e.row,e.col,e)})),U.runHooks("afterCellMetaReset");let c=U.rootElement.style.height;""!==c&&(c=parseInt(U.rootElement.style.height,10));let d=e.height;if((0,o.isFunction)(d)&&(d=d()),t){U.rootElement.getAttribute("style")&&U.rootElement.setAttribute("data-initialstyle",U.rootElement.getAttribute("style"))}if(null===d){const e=U.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?U.rootElement.setAttribute("style",e):(U.rootElement.style.height="",U.rootElement.style.overflow="")}else void 0!==d&&(U.rootElement.style.height=isNaN(d)?`${d}`:`${d}px`,U.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,o.isFunction)(t)&&(t=t()),U.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(U.view&&(U.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),U.view._wt.exportSettingsAsClassNames()),U.runHooks("afterUpdateSettings",e)),Y.adjustRowsAndCols(),U.view&&!z&&(U.forceFullRender=!0,G.lockEditor(),U._refreshBorders(null),U.view._wt.wtOverlays.adjustElementsSize(),G.unlockEditor()),t||!U.view||""!==c&&""!==d&&void 0!==d||c===d||U.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=U.getSelectedLast();if(q.getValue){if((0,o.isFunction)(q.getValue))return q.getValue.call(U);if(e)return U.getData()[e[0][0]][q.getValue]}else if(e)return U.getDataAtCell(e[0],e[1])},this.getSettings=function(){return q},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,r,n,s){Y.alter(e,t,r,n,s)},this.getCell=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t,s=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;n=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;s=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===s||null===n?null:U.view.getCellAtCoords(U._createCellCoords(s,n),r)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:r,col:n}=t;let s=r,o=n;return r>=0&&(s=this.rowIndexMapper.getVisualFromRenderableIndex(r)),n>=0&&(o=this.columnIndexMapper.getVisualFromRenderableIndex(n)),U._createCellCoords(s,o)},this.colToProp=function(e){return B.colToProp(e)},this.propToCol=function(e){return B.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return B.get(e,B.colToProp(t))},this.getDataAtRowProp=function(e,t){return B.get(e,t)},this.getDataAtCol=function(e){const t=[],r=B.getRange(U._createCellCoords(0,e),U._createCellCoords(q.data.length-1,e),B.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){const t=[],r=B.getRange(U._createCellCoords(0,B.propToCol(e)),U._createCellCoords(q.data.length-1,B.propToCol(e)),B.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){let s;return s=void 0===e?W.getData():W.getByRange(U._createCellCoords(e,t),U._createCellCoords(r,n)),s},this.getSourceDataArray=function(e,t,r,n){let s;return s=void 0===e?W.getData(!0):W.getByRange(U._createCellCoords(e,t),U._createCellCoords(r,n),!0),s},this.getSourceDataAtCol=function(e){return W.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,r,n){const s=ae(e,t,r),o=this.hasHook("afterSetSourceDataAtCell"),a=[];o&&(0,d.arrayEach)(s,(e=>{let[t,r,n]=e;a.push([t,r,W.getAtCell(t,r),n])})),(0,d.arrayEach)(s,(e=>{let[t,r,n]=e;W.setAtCell(t,r,n)})),o&&this.runHooks("afterSetSourceDataAtCell",a,n),this.render();const l=U.getActiveEditor();l&&(0,i.isDefined)(l.refreshValue)&&l.refreshValue()},this.getSourceDataAtRow=function(e){return W.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return W.getAtCell(e,t)},this.getDataAtRow=function(e){return B.getRange(U._createCellCoords(e,0),U._createCellCoords(e,this.countCols()-1),B.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,r,n){const s=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,r,n],[o,i]=s;let[,,a,l]=s,u=null,h=null;void 0===a&&(a=o),void 0===l&&(l=i);let c="mixed";return(0,w.rangeEach)(Math.max(Math.min(o,a),0),Math.max(o,a),(e=>{let t=!0;return(0,w.rangeEach)(Math.max(Math.min(i,l),0),Math.max(i,l),(r=>{const n=this.getCellMeta(e,r);return h=n.type,u?t=u===h:u=h,t})),c=t?h:"mixed",t})),c},this.removeCellMeta=function(e,t,r){const[n,s]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let o=X.getCellMetaKeyValue(n,s,r);!1!==U.runHooks("beforeRemoveCellMeta",e,t,r,o)&&(X.removeCellMeta(n,s,r),U.runHooks("afterRemoveCellMeta",e,t,r,o)),o=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];if(n.length>0&&!Array.isArray(n[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");t>0&&X.removeRow(this.toPhysicalRow(e),t),n.length>0&&(0,d.arrayEach)(n.reverse(),(t=>{X.createRow(this.toPhysicalRow(e)),(0,d.arrayEach)(t,((t,r)=>this.setCellMetaObject(e,r,t)))})),U.render()},this.setCellMetaObject=function(e,t,r){"object"==typeof r&&(0,h.objectEach)(r,((r,n)=>{this.setCellMeta(e,t,n,r)}))},this.setCellMeta=function(e,t,r,n){if(!1===U.runHooks("beforeSetCellMeta",e,t,r,n))return;let s=e,o=t;e<this.countRows()&&(s=this.toPhysicalRow(e)),t<this.countCols()&&(o=this.toPhysicalColumn(t)),X.setCellMeta(s,o,r,n),U.runHooks("afterSetCellMeta",e,t,r,n)},this.getCellsMeta=function(){return X.getCellsMeta()},this.getCellMeta=function(e,t){let r=this.toPhysicalRow(e),n=this.toPhysicalColumn(t);return null===r&&(r=e),null===n&&(n=t),X.getCellMeta(r,n,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return X.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===U.dataType||q.columns)},this.getCellRenderer=function(e,t){const r="number"==typeof e?U.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof r?(0,g.getRenderer)(r):(0,i.isUndefined)(r)?(0,g.getRenderer)("text"):r},this.getCellEditor=function(e,t){const r="number"==typeof e?U.getCellMeta(e,t).editor:e.editor;return"string"==typeof r?(0,m.getEditor)(r):(0,i.isUndefined)(r)?(0,m.getEditor)("text"):r},this.getCellValidator=function(e,t){const r="number"==typeof e?U.getCellMeta(e,t).validator:e.validator;return"string"==typeof r?(0,E.getValidator)(r):r},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,r){const n=new ne;e&&(n.onQueueEmpty=e);let s=U.countRows()-1;for(;s>=0;){if(void 0!==t&&-1===t.indexOf(s)){s-=1;continue}let e=U.countCols()-1;for(;e>=0;)void 0===r||-1!==r.indexOf(e)?(n.addValidatorToQueue(),U.validateCell(U.getDataAtCell(s,e),U.getCellMeta(s,e),(e=>{if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(n.valid=!1),n.removeValidatorFormQueue()}),"validateCells"),e-=1):e-=1;s-=1}n.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=q.rowHeaders,r=e;return void 0!==r&&(r=U.runHooks("modifyRowHeader",r)),void 0===r?(t=[],(0,w.rangeEach)(U.countRows()-1,(e=>{t.push(U.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[r]?t=t[r]:(0,o.isFunction)(t)?t=t(r):t&&"string"!=typeof t&&"number"!=typeof t&&(t=r+1),t},this.hasRowHeaders=function(){return!!q.rowHeaders},this.hasColHeaders=function(){if(void 0!==q.colHeaders&&null!==q.colHeaders)return!!q.colHeaders;for(let e=0,t=U.countCols();e<t;e++)if(U.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const r=U.runHooks("modifyColHeader",e);if(void 0===r){const e=[],t=U.countCols();for(let r=0;r<t;r++)e.push(U.getColHeader(r));return e}let n=q.colHeaders;const s=U.toPhysicalColumn(r),i=function(e){const t=[],r=U.countCols();let n=0;for(;n<r;n++)(0,o.isFunction)(q.columns)&&q.columns(n)&&t.push(n);return t[e]}(s);return!1===q.colHeaders?n=null:q.columns&&(0,o.isFunction)(q.columns)&&q.columns(i)&&q.columns(i).title?n=q.columns(i).title:q.columns&&q.columns[s]&&q.columns[s].title?n=q.columns[s].title:Array.isArray(q.colHeaders)&&void 0!==q.colHeaders[s]?n=q.colHeaders[s]:(0,o.isFunction)(q.colHeaders)?n=q.colHeaders(s):q.colHeaders&&"string"!=typeof q.colHeaders&&"number"!=typeof q.colHeaders&&(n=(0,R.spreadsheetColumnLabel)(r)),n=U.runHooks("modifyColumnHeaderValue",n,e,t),n},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=U.getCellMeta(0,e).width}if(void 0!==t&&t!==q.width||(t=q.colWidths),null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getColWidth=function(e){let t=U._getColWidthFromSettings(e);return t=U.runHooks("modifyColWidth",t,e),void 0===t&&(t=N.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=q.rowHeights;if(null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){let t=U._getRowHeightFromSettings(e);return t=U.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return W.countRows()},this.countSourceCols=function(){return W.countFirstRowKeys()},this.countRows=function(){return B.getLength()},this.countCols=function(){const e=q.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return U.view._wt.drawn?U.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return U.view._wt.drawn?U.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return U.view._wt.drawn?U.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return U.view._wt.drawn?U.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(U.countRows()-1,(r=>{if(U.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(0,w.rangeEachReverse)(U.countCols()-1,(r=>{if(U.isEmptyCol(r))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return q.isEmptyRow.call(U,e)},this.isEmptyCol=function(e){return q.isEmptyCol.call(U,e)},this.selectCell=function(e,t,r,n){let s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,i.isUndefined)(e)&&!(0,i.isUndefined)(t)&&this.selectCells([[e,t,r,n]],s,o)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(F=!0);const r=J.selectCells(e);return r&&t&&U.listen(),F=!1,r},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 J.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 J.selectRows(e,t,r)},this.deselectCell=function(){J.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;F=!0,J.selectAll(e,t,r),F=!1};const ue=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(){let e,t,r,n,{row:s,col:o,verticalSnap:i,horizontalSnap:a,considerHiddenIndexes:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==i&&(e="top"===i,t=!e),void 0!==a&&(r="start"===a,n=!r);let u=s,h=o;if(void 0===l||l){const e=Number.isInteger(s)&&s>=0,t=Number.isInteger(o)&&o>=0,r=e?ue(this.rowIndexMapper,s):void 0,n=t?ue(this.columnIndexMapper,o):void 0;if(null===r||null===n)return!1;u=e?U.rowIndexMapper.getRenderableFromVisualIndex(r):s,h=t?U.columnIndexMapper.getRenderableFromVisualIndex(n):o}const c=Number.isInteger(u),d=Number.isInteger(h);return c&&u>=0&&d&&h>=0?U.view.scrollViewport(U._createCellCoords(u,h),e,n,t,r):c&&u>=0&&(d&&h<0||!d)?U.view.scrollViewportVertically(u,e,t):!!(d&&h>=0&&(c&&u<0||!c))&&U.view.scrollViewportHorizontally(h,n,r)},this.scrollToFocusedCell=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};if(!this.selection.isSelected())return;this.addHookOnce("afterScroll",e);const{highlight:t}=this.getSelectedRangeLast();this.scrollViewportTo(t.toObject())?this.view.render():(this.removeHook("afterScroll",e),this._registerImmediate((()=>e())))},this.destroy=function(){if(U._clearTimeouts(),U._clearImmediates(),U.view&&U.view.destroy(),W&&W.destroy(),W=null,this.getShortcutManager().destroy(),X.clearCache(),k.delete(this.guid),(0,T.isRootInstance)(U)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,s.empty)(U.rootElement),V.destroy(),G&&G.destroy(),U.batchExecution((()=>{U.rowIndexMapper.unregisterAll(),U.columnIndexMapper.unregisterAll(),Z.getItems().forEach((e=>{let[,t]=e;t.destroy()})),Z.clear(),U.runHooks("afterDestroy")}),!0),O.default.getSingleton().destroy(U),(0,h.objectEach)(U,((e,t,r)=>{var n;(0,o.isFunction)(e)?r[t]=(n=t,()=>{throw new Error(`The "${n}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(r[t]=null)})),U.isDestroyed=!0,B&&B.destroy(),B=null,Y=null,J=null,G=null,U=null},this.getActiveEditor=function(){return G.getActiveEditor()},this.getPlugin=function(e){const t=(0,y.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:Z.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:Z.getId(e)},this.getInstance=function(){return U},this.addHook=function(e,t){O.default.getSingleton().add(e,t,U)},this.hasHook=function(e){return O.default.getSingleton().has(e,U)||O.default.getSingleton().has(e)},this.addHookOnce=function(e,t){O.default.getSingleton().once(e,t,U)},this.removeHook=function(e,t){O.default.getSingleton().remove(e,t,U)},this.runHooks=function(e,t,r,n,s,o,i){return O.default.getSingleton().run(U,e,t,r,n,s,o,i)},this.getTranslatedPhrase=function(e,t){return(0,M.getTranslatedPhrase)(q.language,e,t)},this.toHTML=()=>(0,f.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,f.instanceToHTML)(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,d.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,d.arrayEach)(this.immediates,(e=>{clearImmediate(e)}))},this._refreshBorders=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];G.destroyEditor(e),U.view.render(),t&&J.isSelected()&&G.prepareEditor()},this._getEditorManager=function(){return G},this.isRtl=function(){return"rtl"===U.rootWindow.getComputedStyle(U.rootElement).direction},this.isLtr=function(){return!U.isRtl()},this.getDirectionFactor=function(){return U.isLtr()?1:-1};const he=(0,L.createShortcutManager)({handleEvent:()=>U.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||U.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&he.releasePressedKeys()})),this.getShortcutManager=function(){return he},this.getFocusManager=function(){return j},(0,p.getPluginsNames)().forEach((e=>{const t=(0,p.getPlugin)(e);Z.addItem(e,new t(this))})),(0,P.registerAllShortcutContexts)(U),he.setActiveContextName("grid"),O.default.getSingleton().run(U,"construct")},r(95988),r(60740),r(6282);var s=r(49587),o=r(46029),i=r(97639),a=r(78498),l=n(r(80940)),u=n(r(57340)),h=r(76163),c=r(14864),d=r(98887),f=r(65795),p=r(5280),g=r(36996),m=r(16691),E=r(59340),y=r(37913),w=r(57691),C=n(r(26969)),v=n(r(36129)),R=r(56020),S=r(41789),T=r(83059),N=r(94699),O=n(r(54925)),M=r(19310),_=r(6415),A=r(79055),b=r(70400),I=r(47378),x=r(8815),L=r(48120),P=r(51377);let D=null;const k=new Map;new Set},39785:(e,t,r)=>{"use strict";t.__esModule=!0,t.installFocusDetector=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=e.rootElement,n=o(e),s=o(e);return n.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromTop())),s.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromBottom())),r.firstChild.before(n),r.lastChild.after(s),{activate(){e._registerTimeout((()=>{n.tabIndex=0,s.tabIndex=0}),10)},deactivate(){e._registerTimeout((()=>{n.tabIndex=-1,s.tabIndex=-1}),10)}}};var n=r(49587),s=r(66862);function o(e){const t=e.rootDocument.createElement("input");return t.type="text",t.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&(0,n.setAttribute)(t,[(0,s.A11Y_PRESENTATION)()]),t}},90376:(e,t,r)=>{"use strict";t.__esModule=!0,t.installFocusCatcher=function(e){let t;const{activate:r,deactivate:a}=(0,s.installFocusDetector)(e,{onFocusFromTop(){var r;const n=null!==(r=t)&&void 0!==r?r:o(e);n&&(e.runHooks("modifyFocusOnTabNavigation","from_above",n),e.selectCell(n.row,n.col)),e.listen()},onFocusFromBottom(){var r;const n=null!==(r=t)&&void 0!==r?r:i(e);n&&(e.runHooks("modifyFocusOnTabNavigation","from_below",n),e.selectCell(n.row,n.col)),e.listen()}}),l={wrapped:!1,flipped:!1};e.addHook("afterListen",(()=>a())),e.addHook("afterUnlisten",(()=>r())),e.addHook("afterSelection",(()=>{var r;t=null===(r=e.getSelectedRangeLast())||void 0===r?void 0:r.highlight})),e.addHook("beforeRowWrap",((e,t,r)=>{l.wrapped=!0,l.flipped=r})),e.getShortcutManager().getContext("grid").addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:r=>{const{disableTabNavigation:n,autoWrapRow:s}=e.getSettings();if(n||!e.selection.isSelected()||s&&l.wrapped&&l.flipped||!s&&l.wrapped)return s&&l.wrapped&&l.flipped&&(t=r.shiftKey?o(e):i(e)),l.wrapped=!1,l.flipped=!1,e.deselectCell(),e.unlisten(),!1;r.preventDefault()},runOnlyIf:()=>!e.getSettings().minSpareCols,preventDefault:!1,stopPropagation:!1,position:"after",relativeToGroup:n.GRID_GROUP,group:"focusCatcher"})};var n=r(51377),s=r(39785);function o(e){const{rowIndexMapper:t,columnIndexMapper:r}=e,{navigableHeaders:n}=e.getSettings();let s=n&&e.countColHeaders()>0?-e.countColHeaders():0,o=n&&e.countRowHeaders()>0?-e.countRowHeaders():0;return 0===s&&(s=t.getVisualFromRenderableIndex(s)),0===o&&(o=r.getVisualFromRenderableIndex(o)),null===s||null===o?null:e._createCellCoords(s,o)}function i(e){var t,r;const{rowIndexMapper:n,columnIndexMapper:s}=e,{navigableHeaders:o}=e.getSettings();let i=n.getRenderableIndexesLength()-1,a=s.getRenderableIndexesLength()-1;if(i<0){if(!o||0===e.countColHeaders())return null;i=-1}if(a<0){if(!o||0===e.countColHeaders())return null;a=-1}return e._createCellCoords(null!==(t=n.getVisualFromRenderableIndex(i))&&void 0!==t?t:i,null!==(r=s.getVisualFromRenderableIndex(a))&&void 0!==r?r:a)}},47378:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(90376);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},38085:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=r(32313),i=r(56020),a=r(76163),l=r(98887),u=r(57691),h=r(97639);class c{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,r){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"metaManager",void 0),(0,s.default)(this,"tableMeta",void 0),(0,s.default)(this,"dataSource",void 0),(0,s.default)(this,"duckSchema",void 0),(0,s.default)(this,"colToPropCache",void 0),(0,s.default)(this,"propToColCache",void 0),this.hot=e,this.metaManager=r,this.tableMeta=r.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),this.createMap()}createMap(){const e=this.getSchema();if(void 0===e)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");const t=this.tableMeta.columns;let r;if(this.colToPropCache=[],this.propToColCache=new Map,t){let n=0,s=0,o=!1;if("function"==typeof t){const t=(0,a.deepObjectSize)(e);n=t>0?t:this.countFirstRowKeys(),o=!0}else{const e=this.tableMeta.maxCols;n=Math.min(e,t.length)}for(r=0;r<n;r++){const e=o?t(r):t[r];if((0,a.isObject)(e)){if(void 0!==e.data){const t=o?s:r;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}s+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return(0,i.countFirstRowKeys)(this.dataSource)}recursiveDuckColumns(e,t,r){let n,s=t,o=r;return void 0===s&&(s=0,o=""),"object"!=typeof e||Array.isArray(e)||(0,a.objectEach)(e,((e,t)=>{null===e?(n=o+t,this.colToPropCache.push(n),this.propToColCache.set(n,s),s+=1):s=this.recursiveDuckColumns(e,s,`${t}.`)})),s}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.hot.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&(0,h.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,h.isDefined)(t))return this.hot.toVisualColumn(t);const r=this.hot.toVisualColumn(e);return null===r?e:r}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?(0,a.duckSchema)(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]:{};const s=this.hot.countSourceRows();let o=s,i=0,l=e;("number"!=typeof l||l>=s)&&(l=s),l<this.hot.countRows()&&(o=this.hot.toPhysicalRow(l));if(!1===this.hot.runHooks("beforeCreateRow",l,t,r)||null===o)return{delta:0};const h=this.tableMeta.maxRows,c=this.getSchema().length,d=[];for(;i<t&&s+i<h;){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=(0,a.deepClone)(this.getSchema()):(e=[],(0,u.rangeEach)(c-1,(()=>e.push(null)))):"function"===this.hot.dataType?e=this.tableMeta.dataSchema(l+i):(e={},(0,a.deepExtend)(e,this.getSchema())),d.push(e),i+=1}this.hot.rowIndexMapper.insertIndexes(l,i),"below"===n&&(o=Math.min(o+1,s)),this.spliceData(o,0,d);const f=this.hot.toVisualRow(o);return this.hot.countSourceRows()===d.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),i>0&&(null==e?this.metaManager.createRow(null,i):"auto"!==r&&this.metaManager.createRow(o,t)),this.hot.runHooks("afterCreateRow",f,i,r),this.hot.forceFullRender=!0,{delta:i,startPhysicalIndex:o}}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]:{};if(!this.hot.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");const s=this.dataSource,o=this.tableMeta.maxCols,i=this.hot.countSourceCols();let a=e;("number"!=typeof a||a>=i)&&(a=i);if(!1===this.hot.runHooks("beforeCreateCol",a,t,r))return{delta:0};let l=i;a<this.hot.countCols()&&(l=this.hot.toPhysicalColumn(a));const u=this.hot.countSourceRows();let h=this.hot.countCols(),c=0,d=l;"end"===n&&(d=Math.min(d+1,i));const f=d;for(;c<t&&h<o;){if("number"!=typeof a||a>=h)if(u>0)for(let e=0;e<u;e+=1)void 0===s[e]&&(s[e]=[]),s[e].push(null);else s.push([null]);else for(let e=0;e<u;e++)s[e].splice(d,0,null);c+=1,d+=1,h+=1}this.hot.columnIndexMapper.insertIndexes(a,c),c>0&&(null==e?this.metaManager.createColumn(null,c):"auto"!==r&&this.metaManager.createColumn(f,t));const p=this.hot.toVisualColumn(f);return this.hot.runHooks("afterCreateCol",p,c,r),this.hot.forceFullRender=!0,this.refreshDuckSchema(),{delta:c,startPhysicalIndex:f}}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;const s=this.visualRowsToPhysical(n,t),o=this.hot.countSourceRows();n=(o+n)%o;if(!1===this.hot.runHooks("beforeRemoveRow",n,s.length,s,r))return!1;const i=s.length;if(this.filterData(n,i,s),n<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(s);const e=(0,h.isDefined)(this.tableMeta.columns)||(0,h.isDefined)(this.tableMeta.dataSchema);0===this.hot.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.hot.columnIndexMapper.setIndexesSequence([])}return s.slice(0).sort(((e,t)=>t-e)).forEach((e=>{this.metaManager.removeRow(e,1)})),this.hot.runHooks("afterRemoveRow",n,i,s,r),this.hot.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;if("object"===this.hot.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let n="number"!=typeof e?-t:e;n=(this.hot.countCols()+n)%this.hot.countCols();const s=this.visualColumnsToPhysical(n,t),o=s.slice(0).sort(((e,t)=>t-e));if(!1===this.hot.runHooks("beforeRemoveCol",n,t,s,r))return!1;let i=!0;const a=o.length,l=this.dataSource;for(let e=0;e<a;e++)i&&s[0]!==s[e]-e&&(i=!1);if(i)for(let e=0,r=this.hot.countSourceRows();e<r;e++)l[e].splice(s[0],t),0===e&&this.metaManager.removeColumn(s[0],t);else for(let e=0,t=this.hot.countSourceRows();e<t;e++)for(let t=0;t<a;t++)l[e].splice(o[t],1),0===e&&this.metaManager.removeColumn(o[t],1);return n<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(s),0===this.hot.columnIndexMapper.getNotTrimmedIndexesLength()&&this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",n,t,s,r),this.hot.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,r){const n=this.hot.getDataAtCol(e),s=n.slice(t,t+r),o=n.slice(t+r);for(var i=arguments.length,a=new Array(i>3?i-3:0),u=3;u<i;u++)a[u-3]=arguments[u];(0,l.extendArray)(a,o);let h=0;for(;h<r;)a.push(null),h+=1;return(0,l.to2dArray)(a),this.hot.populateFromArray(t,e,a,null,null,"spliceCol"),s}spliceRow(e,t,r){const n=this.hot.getSourceDataAtRow(e),s=n.slice(t,t+r),o=n.slice(t+r);for(var i=arguments.length,a=new Array(i>3?i-3:0),u=3;u<i;u++)a[u-3]=arguments[u];(0,l.extendArray)(a,o);let h=0;for(;h<r;)a.push(null),h+=1;return this.hot.populateFromArray(e,t,[a],null,null,"spliceRow"),s}spliceData(e,t,r){if(!1!==this.hot.runHooks("beforeDataSplice",e,t,r)){const t=[...this.dataSource.slice(0,e),...r,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach((e=>this.dataSource.push(e)))}}filterData(e,t,r){let n=this.hot.runHooks("filterData",e,t,r);!1===Array.isArray(n)&&(n=this.dataSource.filter(((e,t)=>-1===r.indexOf(t)))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,n)}get(e,t){const r=this.hot.toPhysicalRow(e);let n=this.dataSource[r];const s=this.hot.runHooks("modifyRowData",r);n=isNaN(s)?s:n;let o=null;if(n&&n.hasOwnProperty&&(0,a.hasOwnProperty)(n,t))o=n[t];else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let r=n;if(!r)return null;for(let t=0,n=e.length;t<n;t++)if(r=r[e[t]],void 0===r)return null;o=r}else"function"==typeof t&&(o=t(this.dataSource.slice(r,r+1)[0]));if(this.hot.hasHook("modifyData")){const e=(0,a.createObjectPropListener)(o);this.hot.runHooks("modifyData",r,this.propToCol(t),e,"get"),e.isTouched()&&(o=e.value)}return o}getCopyable(e,t){return this.hot.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,r){const n=this.hot.toPhysicalRow(e);let s=r,o=this.dataSource[n];const i=this.hot.runHooks("modifyRowData",n);if(o=isNaN(i)?i:o,this.hot.hasHook("modifyData")){const e=(0,a.createObjectPropListener)(s);this.hot.runHooks("modifyData",n,this.propToCol(t),e,"set"),e.isTouched()&&(s=e.value)}if(o&&o.hasOwnProperty&&(0,a.hasOwnProperty)(o,t))o[t]=s;else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let r,n=o,i=0;for(i=0,r=e.length-1;i<r;i++)void 0===n[e[i]]&&(n[e[i]]={}),n=n[e[i]];n[e[i]]=s}else"function"==typeof t?t(this.dataSource.slice(n,n+1)[0],s):o[t]=s}visualRowsToPhysical(e,t){const r=this.hot.countSourceRows(),n=[];let s,o=(r+e)%r,i=t;for(;o<r&&i;)s=this.hot.toPhysicalRow(o),n.push(s),i-=1,o+=1;return n}visualColumnsToPhysical(e,t){const r=this.hot.countCols(),n=[];let s=(r+e)%r,o=t;for(;s<r&&o;){const e=this.hot.toPhysicalColumn(s);n.push(e),o-=1,s+=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(){const e=this.tableMeta.maxRows;let t;t=e<0||0===e?0:e||1/0;const r=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(r,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return e.row-t.row!=0||this.hot.countSourceRows()?this.getRange(e,t,c.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,r){const n=[];let s,o,i;const a=this.tableMeta.maxRows,l=this.tableMeta.maxCols;if(0===a||0===l)return[];const u=r===c.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,h=Math.min(Math.max(a-1,0),Math.max(e.row,t.row)),d=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(s=Math.min(e.row,t.row);s<=h;s++){i=[];const r=s>=0?this.hot.toPhysicalRow(s):s;for(o=Math.min(e.col,t.col);o<=d&&null!==r;o++)i.push(u.call(this,s,this.colToProp(o)));null!==r&&n.push(i)}return n}getText(e,t){return(0,o.stringify)(this.getRange(e,t,c.DESTINATION_RENDERER))}getCopyableText(e,t){return(0,o.stringify)(this.getRange(e,t,c.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.hot=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}var d=c;t.default=d},36129:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(76163),i=r(56020),a=r(98887),l=r(57691),u=r(46029);var h=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,s.default)(this,"hot",void 0),(0,s.default)(this,"data",void 0),(0,s.default)(this,"dataType","array"),(0,s.default)(this,"colToProp",(()=>{})),(0,s.default)(this,"propToCol",(()=>{})),this.hot=e,this.data=t}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,e):this.data}setData(e){this.data=e}getAtColumn(e){const t=[];return(0,a.arrayEach)(this.data,((r,n)=>{const s=this.getAtCell(n,e);t.push(s)})),t}getAtRow(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=void 0===t&&void 0===r;let i=null,a=null;if(i=this.modifyRowData(e),Array.isArray(i))a=[],s?i.forEach(((t,r)=>{a[r]=this.getAtPhysicalCell(e,r,i)})):(0,l.rangeEach)(t,r,(r=>{a[r-t]=this.getAtPhysicalCell(e,r,i)}));else if((0,o.isObject)(i)||(0,u.isFunction)(i))if(a=n?[]:{},!s||n){const s=0,u=this.countFirstRowKeys()-1;(0,l.rangeEach)(s,u,(l=>{const h=this.colToProp(l);if(l>=(t||s)&&l<=(r||u)&&!Number.isInteger(h)){const t=this.getAtPhysicalCell(e,h,i);n?a.push(t):(0,o.setProperty)(a,h,t)}}))}else(0,o.objectEach)(i,((t,r)=>{(0,o.setProperty)(a,r,this.getAtPhysicalCell(e,r,i))}));return a}setAtCell(e,t,r){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const n=(0,o.createObjectPropListener)(r);this.hot.runHooks("modifySourceData",e,t,n,"set"),n.isTouched()&&(r=n.value)}Number.isInteger(t)?this.data[e][t]=r:(0,o.setProperty)(this.data[e],t,r)}}getAtPhysicalCell(e,t,r){let n=null;if(r&&(n="string"==typeof t?(0,o.getProperty)(r,t):"function"==typeof t?t(r):r[t]),this.hot.hasHook("modifySourceData")){const r=(0,o.createObjectPropListener)(n);this.hot.runHooks("modifySourceData",e,t,r,"get"),r.isTouched()&&(n=r.value)}return n}getAtCell(e,t){const 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,s=null,o=null,i=null,a=null;null===e||null===t?(n=!0,s=0,i=this.countRows()-1):(s=Math.min(e.row,t.row),o=Math.min(e.col,t.col),i=Math.max(e.row,t.row),a=Math.max(e.col,t.col));const u=[];return(0,l.rangeEach)(s,i,(e=>{u.push(n?this.getAtRow(e,void 0,void 0,r):this.getAtRow(e,o,a,r))})),u}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return(0,i.countFirstRowKeys)(this.data)}destroy(){this.data=null,this.hot=null}};t.default=h},70400:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(38085));t.DataMap=s.default;var o=n(r(84544));t.MetaManager=o.default;var i=n(r(16213));t.metaSchemaFactory=i.default;var a=r(92117);t.replaceData=a.replaceData;var l=r(90066);t.DynamicCellMetaMod=l.DynamicCellMetaMod;var u=r(30084);t.ExtendMetaPropertiesMod=u.ExtendMetaPropertiesMod},84544:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(79626)),o=n(r(15198)),i=n(r(67257)),a=n(r(19736)),l=n(r(63806)),u=r(76163);class h{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new s.default(e),this.tableMeta=new o.default(this.globalMeta),this.columnMeta=new i.default(this.globalMeta),this.cellMeta=new a.default(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{visualRow:n,visualColumn:s}=r;const o=this.cellMeta.getMeta(e,t);return o.visualRow=n,o.visualCol=s,o.row=e,o.col=t,this.runLocalHooks("afterGetCellMeta",o),o}getCellMetaKeyValue(e,t,r){if("string"!=typeof r)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,r)}setCellMeta(e,t,r,n){this.cellMeta.setMeta(e,t,r,n)}updateCellMeta(e,t,r){this.cellMeta.updateMeta(e,t,r)}removeCellMeta(e,t,r){this.cellMeta.removeMeta(e,t,r)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,t)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,t)}createColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}t.default=h,(0,u.mixin)(h,l.default)},22358:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(98887),i=r(61530);let a;a=Symbol.iterator;t.default=class{constructor(e){(0,s.default)(this,"valueFactory",void 0),(0,s.default)(this,"data",[]),(0,s.default)(this,"index",[]),(0,s.default)(this,"holes",new Set),this.valueFactory=e}obtain(e){(0,i.assert)((()=>(0,i.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let r;if(t>=0)r=this.data[t],void 0===r&&(r=this.valueFactory(e),this.data[t]=r);else if(r=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=r,this.index[e]=t}else this.data.push(r),this.index[e]=this.data.length-1;return r}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,i.assert)((()=>(0,i.isUnsignedNumber)(e)||(0,i.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const r=[],n=this.data.length;for(let e=0;e<t;e++)r.push(n+e),this.data.push(void 0);const s=(0,i.isNullish)(e)?this.index.length:e;this.index=[...this.index.slice(0,s),...r,...this.index.slice(s)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,i.assert)((()=>(0,i.isUnsignedNumber)(e)||(0,i.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const r=this.index.splice((0,i.isNullish)(e)?this.index.length-t:e,t);for(let e=0;e<r.length;e++){const t=r[e];"number"==typeof t&&this.holes.add(t)}}size(){return this.data.length-this.holes.size}values(){return(0,o.arrayFilter)(this.data,((e,t)=>!this.holes.has(t)))[Symbol.iterator]()}entries(){const e=[];for(let t=0;t<this.data.length;t++){const r=this._getKeyByStorageIndex(t);-1!==r&&e.push([r,this.data[t]])}let t=0;return{next:()=>{if(t<e.length){const r=e[t];return t+=1,{value:r,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[a](){return this.entries()}}},19736:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(76163),i=r(61530),a=n(r(22358));t.default=class{constructor(e){(0,s.default)(this,"columnMeta",void 0),(0,s.default)(this,"metas",new a.default((()=>this._createRow()))),this.columnMeta=e}updateMeta(e,t,r){const n=this.getMeta(e,t);(0,o.extend)(n,r),(0,i.extendByMetaType)(n,r)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let r=0;r<this.metas.size();r++)this.metas.obtain(r).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let r=0;r<this.metas.size();r++)this.metas.obtain(r).remove(e,t)}getMeta(e,t,r){const n=this.metas.obtain(e).obtain(t);return void 0===r?n:n[r]}setMeta(e,t,r,n){var s;const o=this.metas.obtain(e).obtain(t);null===(s=o._automaticallyAssignedMetaProps)||void 0===s||s.delete(r),o[r]=n}removeMeta(e,t,r){delete this.metas.obtain(e).obtain(t)[r]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let r=0;r<t.length;r++)e.push(...t[r].values());return e}getMetasAtRow(e){(0,i.assert)((()=>(0,i.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=new Map(this.metas);return t.has(e)?Array.from(t.get(e).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new a.default((e=>this._createMeta(e)))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}},67257:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(76163),i=r(61530),a=n(r(22358));const l=["data","width"];t.default=class{constructor(e){(0,s.default)(this,"globalMeta",void 0),(0,s.default)(this,"metas",new a.default((()=>this._createMeta()))),this.globalMeta=e,this.metas=new a.default((()=>this._createMeta()))}updateMeta(e,t){const r=this.getMeta(e);(0,o.extend)(r,t),(0,i.extendByMetaType)(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(0,i.columnFactory)(this.globalMeta.getMetaConstructor(),l).prototype}}},79626:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(76163),i=r(61530),a=n(r(16213));t.default=class{constructor(e){(0,s.default)(this,"metaCtor",class{}),(0,s.default)(this,"meta",void 0),this.meta=this.metaCtor.prototype,(0,o.extend)(this.meta,(0,a.default)()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;(0,o.extend)(this.meta,e),(0,i.extendByMetaType)(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}},15198:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(76163),i=r(61530);t.default=class{constructor(e){(0,s.default)(this,"meta",void 0);const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){(0,o.extend)(this.meta,e),(0,i.extendByMetaType)(this.meta,e,e)}}},16213:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(97639),s=r(76163);t.default=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,enterBeginsEditing:!0,enterMoves:{col:0,row:1},fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(e){let t,r,s;for(t=0,r=this.countRows();t<r;t++)if(s=this.getDataAtCell(t,e),!1===(0,n.isEmpty)(s))return!1;return!0},isEmptyRow(e){let t,r,o,i;for(t=0,r=this.countCols();t<r;t++)if(o=this.getDataAtCell(e,t),!1===(0,n.isEmpty)(o))return"object"==typeof o&&(i=this.getCellMeta(e,t),(0,s.isObjectEqual)(this.getSchema()[i.prop],o));return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,mergeCells:!1,minCols:0,minRows:0,minSpareCols:0,minSpareRows:0,multiColumnSorting:void 0,navigableHeaders:!1,disableTabNavigation:!1,nestedHeaders:void 0,nestedRows:void 0,noWordWrapClassName:"htNoWrap",numericFormat:void 0,observeDOMVisibility:!0,outsideClickDeselects:!0,persistentState:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:void 0,renderer:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:void 0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",visibleRows:10,width:void 0,wordWrap:!0})},90066:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=n(r(54925)),i=r(76163),a=r(46029);t.DynamicCellMetaMod=class{constructor(e){(0,s.default)(this,"metaManager",void 0),(0,s.default)(this,"metaSyncMemo",new Map),this.metaManager=e,e.addLocalHook("afterGetCellMeta",(e=>this.extendCellMeta(e))),o.default.getSingleton().add("beforeRender",(e=>{e&&this.metaSyncMemo.clear()}),this.metaManager.hot)}extendCellMeta(e){var t;const{row:r,col:n}=e;if(null!==(t=this.metaSyncMemo.get(r))&&void 0!==t&&t.has(n))return;const{visualRow:s,visualCol:o}=e,l=this.metaManager.hot,u=l.colToProp(o);e.prop=u,l.runHooks("beforeGetCellMeta",s,o,e);const h=(0,i.hasOwnProperty)(e,"type")?e.type:null;let c=(0,a.isFunction)(e.cells)?e.cells(r,n,u):null;var d;h&&(c?c.type=null!==(d=c.type)&&void 0!==d?d:h:c={type:h});c&&this.metaManager.updateCellMeta(r,n,c),l.runHooks("afterGetCellMeta",s,o,e),this.metaSyncMemo.has(r)||this.metaSyncMemo.set(r,new Set),this.metaSyncMemo.get(r).add(n)}}},30084:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231));t.ExtendMetaPropertiesMod=class{constructor(e){(0,s.default)(this,"metaManager",void 0),(0,s.default)(this,"usageTracker",new Set),(0,s.default)(this,"propDescriptors",new Map([["ariaTags",{onChange(e,t,r){if(!r)throw new Error(`The \`${e}\` option can not be updated after the Handsontable instance was initialized.`)}}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){if(this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e)throw new Error("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.");if(this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart"))throw new Error("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{onChange(e,t,r){if(!r)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}}]])),this.metaManager=e,this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach(((e,t)=>{const{target:r,onChange:n=(()=>{})}=e,s="string"==typeof r,o=s?r:t,i=`_${o}`;this.metaManager.globalMeta.meta[i]=this.metaManager.globalMeta.meta[o],this.installPropWatcher(t,i,n),s&&this.installPropWatcher(r,i,n)}))}installPropWatcher(e,t,r){const n=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(s){const o=!n.usageTracker.has(e);n.usageTracker.add(e),r.call(n,e,s,o),this[t]=s},enumerable:!0,configurable:!0})}}},61530:(e,t,r)=>{"use strict";t.__esModule=!0,t.assert=function(e,t){if(!e())throw new Error(`Assertion failed: ${t}`)},t.columnFactory=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function r(){}(0,n.inherit)(r,e);for(let e=0;e<t.length;e++)r.prototype[t[e]]=void 0;return r},t.extendByMetaType=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const o="string"==typeof t.type?(0,s.getCellType)(t.type):t.type;e._automaticallyAssignedMetaProps&&(0,n.objectEach)(t,((t,r)=>{e._automaticallyAssignedMetaProps.delete(r)}));if(!(0,n.isObject)(o))return;r!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const i={};(0,n.objectEach)(o,((t,s)=>{var o;(function(e,t){var r;if("CELL_TYPE"===e)return!1;return(null===(r=t._automaticallyAssignedMetaProps)||void 0===r?void 0:r.has(e))||!(0,n.hasOwnProperty)(t,e)})(s,r)&&(i[s]=t,null===(o=e._automaticallyAssignedMetaProps)||void 0===o||o.add(s))})),(0,n.extend)(e,i)},t.isNullish=function(e){return null==e},t.isUnsignedNumber=function(e){return Number.isInteger(e)&&e>=0},r(60740);var n=r(76163),s=r(79321)},92117:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.replaceData=function(e,t,r,n){const{hotInstance:h,dataMap:c,dataSource:d,internalSource:f,source:p,metaManager:g,firstRun:m}=n,E=(0,s.toUpperCaseFirst)(f),y=h.getSettings();Array.isArray(y.dataSchema)?h.dataType="array":(0,o.isFunction)(y.dataSchema)?h.dataType="function":h.dataType="object";c&&c.destroy();e=h.runHooks(`before${E}`,e,m,p);const w=new i.default(h,e,g);if(t(w),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${f} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=w.getSchema();let r;e=[];let n=0,s=0;for(n=0,s=y.startRows;n<s;n++)if("object"!==h.dataType&&"function"!==h.dataType||!y.dataSchema)if("array"===h.dataType)r=(0,a.deepClone)(t[0]),e.push(r);else{r=[];for(let e=0,t=y.startCols;e<t;e++)r.push(null);e.push(r)}else r=(0,a.deepClone)(t),e.push(r)}}Array.isArray(e[0])&&(h.dataType="array");y.data=e,w.dataSource=e,d.data=e,d.dataType=h.dataType,d.colToProp=w.colToProp.bind(w),d.propToCol=w.propToCol.bind(w),d.countCachedColumns=w.countCachedColumns.bind(w),r(w),h.runHooks(`after${E}`,e,m,p),m||(h.runHooks("afterChange",null,f),h.render());h.getSettings().ariaTags&&(0,l.setAttribute)(h.rootElement,[(0,u.A11Y_ROWCOUNT)(h.countRows()),(0,u.A11Y_COLCOUNT)(h.countCols())])},r(95988),r(60740);var s=r(37913),o=r(46029),i=n(r(38085)),a=r(76163),l=r(49587),u=r(66862)},80940:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(49223),i=r(30369),a=r(16691),l=n(r(57340)),u=r(97639);function h(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const d="editorManager.navigation";t.SHORTCUTS_GROUP_NAVIGATION=d;var f=new WeakSet,p=new WeakSet;class g{constructor(e,t,r){h(this,p),h(this,f),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"tableMeta",void 0),(0,s.default)(this,"selection",void 0),(0,s.default)(this,"eventManager",void 0),(0,s.default)(this,"destroyed",!1),(0,s.default)(this,"lock",!1),(0,s.default)(this,"activeEditor",void 0),(0,s.default)(this,"cellProperties",void 0),this.hot=e,this.tableMeta=t,this.selection=r,this.eventManager=new l.default(e),this.hot.addHook("afterDocumentKeyDown",(e=>c(this,f,m).call(this,e))),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"compositionstart",(e=>{!this.destroyed&&this.hot.isListening()&&this.openEditor("",e)})),this.hot.view._wt.update("onCellDblClick",((e,t,r)=>c(this,p,E).call(this,e,t,r)))}lockEditor(){this.lock=!0}unlockEditor(){this.lock=!1}destroyEditor(e){this.lock||this.closeEditor(e)}getActiveEditor(){return this.activeEditor}prepareEditor(){if(this.lock)return;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,(e=>{e&&this.prepareEditor()}));const{highlight:e}=this.hot.getSelectedRangeLast();if(e.isHeader())return;const{row:t,col:r}=e,n=this.hot.runHooks("modifyGetCellCoords",t,r);let s=t,o=r;if(Array.isArray(n)&&([s,o]=n),this.cellProperties=this.hot.getCellMeta(s,o),!this.isCellEditable())return void this.clearActiveEditor();const i=this.hot.getCell(t,r,!0);if(i){const e=this.hot.getCellEditor(this.cellProperties),n=this.hot.colToProp(o),l=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(s),o);this.activeEditor=(0,a.getEditorInstance)(e,this.hot),this.activeEditor.prepare(t,r,n,i,l,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.isCellEditable()?(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(r&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))):this.clearActiveEditor()}closeEditor(e,t,r){this.activeEditor?this.activeEditor.finishEditing(e,t,r):r&&r(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.hot.getSelectedRangeLast();if(!e)return!1;const t=this.hot.getCellEditor(this.cellProperties),{row:r,col:n}=e.highlight,{rowIndexMapper:s,columnIndexMapper:o}=this.hot,i=s.isHidden(this.hot.toPhysicalRow(r))||o.isHidden(this.hot.toPhysicalColumn(n));return!(this.cellProperties.readOnly||!t||i)}moveSelectionAfterEnter(e){const t="function"==typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(event):this.tableMeta.enterMoves;e?this.selection.transformStart(-t.row,-t.col):this.selection.transformStart(t.row,t.col,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function m(e){const t=this.hot.getSelectedRangeLast();if(!this.hot.isListening()||!t||t.highlight.isHeader()||(0,i.isImmediatePropagationStopped)(e))return;const{keyCode:r}=e,n=(e.ctrlKey||e.metaKey)&&!e.altKey;if((!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&!((0,o.isFunctionKey)(r)||(0,o.isCtrlMetaKey)(r)||n||this.isEditorOpened())){const t=this.hot.getShortcutManager().getContext("editor"),r={runOnlyIf:()=>(0,u.isDefined)(this.hot.getSelected()),group:d};t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.hot.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.hot.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.hot.selection.transformStart(0,-1*this.hot.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.hot.selection.transformStart(0,this.hot.getDirectionFactor())}}],r),this.openEditor("",e)}}function E(e,t,r){"TD"===r.nodeName&&this.openEditor(null,e,!0)}const y=new WeakMap;g.getInstance=function(e,t,r){let n=y.get(e);return n||(n=new g(e,t,r),y.set(e,n)),n};var w=g;t.default=w},48036:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=n(r(42538)),i=r(12540),a=r(98887),l=r(49587),u=r(97639),h=r(37913),c=r(49223),d=r(78498),f=r(26031),p=r(66862);function g(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}const m="autocomplete";t.EDITOR_TYPE=m;var E=new WeakMap;class y extends i.HandsontableEditor{constructor(){super(...arguments),(0,s.default)(this,"query",null),(0,s.default)(this,"strippedChoices",[]),(0,s.default)(this,"rawChoices",[]),g(this,E,{writable:!0,value:this.hot.guid.slice(0,9)}),(0,s.default)(this,"sortByRelevance",(function(e,t,r){const n=[],s=[],o=e.length;let i,a,l,c,d=t.length;if(0===o){for(l=0;l<d;l++)s.push(l);return s}for(l=0;l<d;l++){if(a=(0,h.stripTags)((0,u.stringify)(t[l])),r)c=a.indexOf(e);else{const t=this.cellProperties.locale;c=a.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==c&&(i=a.length-c-o,n.push({baseIndex:l,index:c,charsLeft:i,value:a}))}for(n.sort(((e,t)=>{if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0})),l=0,d=n.length;l<d;l++)s.push(n[l].baseIndex);return s}))}static get EDITOR_TYPE(){return m}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,u.isDefined)(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),(0,l.addClass)(this.htContainer,"autocompleteEditor"),(0,l.addClass)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,p.A11Y_TEXT)(),(0,p.A11Y_COMBOBOX)(),(0,p.A11Y_HASPOPUP)("listbox"),(0,p.A11Y_AUTOCOMPLETE)()])}prepare(e,t,r,n,s,i){super.prepare(e,t,r,n,s,i),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,p.A11Y_EXPANDED)("false"),(0,p.A11Y_CONTROLS)(`${(0,o.default)(this,E)}-listbox-${e}-${t}`)])}open(){super.open();const e=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,r=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,n=null==r?void 0:r.length,{row:s,col:i}=this;this.showEditableElement(),this.focus();let a=(0,l.getScrollbarWidth)();0===a&&(0,d.isMacOS)()&&(a+=15),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.updateSettings({colWidths:e?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,width:e?(0,l.outerWidth)(this.TEXTAREA)+a:void 0,autoColumnSize:!0,renderer:(e,s,o,i,a,h,c)=>{(0,f.textRenderer)(e,s,o,i,a,h,c);const{filteringCaseSensitive:d,allowHtml:g,locale:m}=this.cellProperties,E=this.query;let y,w,C=(0,u.stringify)(h);C&&!g&&(y=!0===d?C.indexOf(E):C.toLocaleLowerCase(m).indexOf(E.toLocaleLowerCase(m)),-1!==y&&(w=C.substr(y,E.length),C=C.replace(w,`<strong>${w}</strong>`))),t&&(0,l.setAttribute)(s,[(0,p.A11Y_OPTION)(),...r?[(0,p.A11Y_SETSIZE)(n)]:[],...r?[(0,p.A11Y_POSINSET)(r.indexOf(h)+1)]:[],["id",`${this.htEditor.rootElement.id}_${o}-${i}`]]),s.innerHTML=C},afterSelection:(e,r)=>{if(t){const t=this.htEditor.getCell(e,r,!0);(0,l.setAttribute)(t,[(0,p.A11Y_SELECTED)()]),(0,l.setAttribute)(this.TEXTAREA,...(0,p.A11Y_ACTIVEDESCENDANT)(t.id))}}}),t&&((0,l.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,p.A11Y_PRESENTATION)()),(0,l.setAttribute)(this.htEditor.rootElement,[(0,p.A11Y_LISTBOX)(),(0,p.A11Y_LIVE)("polite"),(0,p.A11Y_RELEVANT)("text"),["id",`${(0,o.default)(this,E)}-listbox-${s}-${i}`]]),(0,l.setAttribute)(this.TEXTAREA,...(0,p.A11Y_EXPANDED)("true"))),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,p.A11Y_EXPANDED)("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){const t=this.cellProperties.source;this.query=e,"function"==typeof t?t.call(this.cellProperties,e,(e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))})):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){const t=(0,l.getCaretPosition)(this.TEXTAREA),r=(0,l.getSelectionEndPosition)(this.TEXTAREA),n=this.cellProperties.sortByRelevance,s=this.cellProperties.filter;let o=null,i=null,u=e;n&&(o=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),u,this.cellProperties.filteringCaseSensitive));const h=Array.isArray(o)?o.length:0;if(!1===s)h&&(i=o[0]);else{const e=[];for(let t=0,r=u.length;t<r&&!(n&&h<=t);t++)h?e.push(u[o[t]]):e.push(u[t]);i=0,u=e}this.strippedChoices=u,this.htEditor.loadData((0,a.pivot)([u])),0===u.length?this.htEditor.rootElement.style.display="none":(this.htEditor.rootElement.style.display="",this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(i)),this.hot.listen(),(0,l.setCaretPosition)(this.TEXTAREA,t,t===r?void 0:r)}flipDropdownIfNeeded(){const e=(0,l.getTrimmingContainer)(this.hot.view._wt.wtTable.TABLE),t=e===this.hot.rootWindow,r=this.cellProperties.preventOverflow;if(t||!t&&(r||"horizontal"===r))return!1;const n=(0,l.offset)(this.TEXTAREA),s=(0,l.outerHeight)(this.TEXTAREA),o=this.getDropdownHeight(),i=e.scrollTop,a=(0,l.outerHeight)(this.hot.view._wt.wtTable.THEAD),u=(0,l.offset)(e),h=n.top-u.top-a+i,c=e.scrollHeight-h-a-s,d=o>c&&h>c;return d?this.flipDropdown(o):this.unflipDropdown(),this.limitDropdownIfNeeded(d?h:c,o),d}limitDropdownIfNeeded(e,t){if(t>e){let r=0,n=0,s=0,o=null;do{s=this.htEditor.getRowHeight(n)||this.htEditor.view._wt.getSetting("defaultRowHeight"),r+=s,n+=1}while(r<e);o=r-s,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-o+"px"),this.setDropdownHeight(r-s)}}flipDropdown(e){const t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0}unflipDropdown(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.htEditor.flipped=void 0}updateDropdownHeight(){const e=this.htEditor.getColWidth(0)+(0,l.getScrollbarWidth)(this.hot.rootDocument)+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e})}highlightBestMatchingChoice(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getDropdownHeight(){const e=this.htEditor.getRowHeight(0)||23,t=this.cellProperties.visibleRows;return this.strippedChoices.length>=t?t*e:this.strippedChoices.length*e+8}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,r=(0,a.arrayMap)(e,(e=>(0,u.stringify)(e)));return(0,a.arrayMap)(r,(e=>t?e:(0,h.stripTags)(e)))}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),r=t?t.from.row:-1;let n=!1;return e===c.KEY_CODES.ARROW_DOWN&&r>0&&r<this.htEditor.countRows()-1&&(n=!0),e===c.KEY_CODES.ARROW_UP&&r>-1&&(n=!0),n}onBeforeKeyDown(e){if((0,c.isPrintableChar)(e.keyCode)||e.keyCode===c.KEY_CODES.BACKSPACE||e.keyCode===c.KEY_CODES.DELETE||e.keyCode===c.KEY_CODES.INSERT){let t=10;if(e.keyCode===c.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}),t)}}}t.AutocompleteEditor=y},16478:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(48036);t.EDITOR_TYPE=n.EDITOR_TYPE,t.AutocompleteEditor=n.AutocompleteEditor},23627:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(97639),i=r(76163),a=r(80940),l=n(r(94136)),u=r(49587);const h="base";t.EDITOR_TYPE=h;const c=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});t.EDITOR_STATE=c;const d="baseEditor";t.SHORTCUTS_GROUP_EDITOR=d;class f{static get EDITOR_TYPE(){return h}constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"state",c.VIRGIN),(0,s.default)(this,"_opened",!1),(0,s.default)(this,"_fullEditMode",!1),(0,s.default)(this,"_closeCallback",null),(0,s.default)(this,"TD",null),(0,s.default)(this,"row",null),(0,s.default)(this,"col",null),(0,s.default)(this,"prop",null),(0,s.default)(this,"originalValue",null),(0,s.default)(this,"cellProperties",null),this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){throw Error("Editor getValue() method unimplemented")}setValue(){throw Error("Editor setValue() method unimplemented")}open(){throw Error("Editor open() method unimplemented")}close(){throw Error("Editor close() method unimplemented")}prepare(e,t,r,n,s,o){this.TD=n,this.row=e,this.col=t,this.prop=r,this.originalValue=s,this.cellProperties=o,this.state=c.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let r,n,s,i;if(t){const e=this.hot.getSelectedLast();r=Math.max(Math.min(e[0],e[2]),0),n=Math.max(Math.min(e[1],e[3]),0),s=Math.max(e[0],e[2]),i=Math.max(e[1],e[3])}else[r,n,s,i]=[this.row,this.col,null,null];const a=this.hot.runHooks("modifyGetCellCoords",r,n);Array.isArray(a)&&([r,n]=a);const l=this.hot.getShortcutManager().getContext("editor"),u={runOnlyIf:()=>(0,o.isDefined)(this.hot.getSelected()),group:d};this.isInFullEditMode()&&l.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.hot.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.hot.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.hot.selection.transformStart(0,-1*this.hot.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.hot.selection.transformStart(0,this.hot.getDirectionFactor())}}],u),this.hot.populateFromArray(r,n,e,s,i,"edit")}beginEditing(e,t){if(this.state!==c.VIRGIN)return;const r=this.hot,n=r.rowIndexMapper.getRenderableFromVisualIndex(this.row),s=r.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(r.view.scrollViewport(r._createCellCoords(n,s)),this.state=c.EDITING,this.isInFullEditMode()){const t="string"==typeof e?e:(0,o.stringify)(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),r.view.render(),r.runHooks("afterBeginEditing",this.row,this.col)}finishEditing(e,t,r){let n;if(r){const e=this._closeCallback;this._closeCallback=t=>{e&&e(t),r(t),this.hot.view.render()}}if(this.isWaiting())return;const s=this.hot.getShortcutManager().getContext("editor");if(s.removeShortcutsByGroup(d),s.removeShortcutsByGroup(a.SHORTCUTS_GROUP_NAVIGATION),this.state!==c.VIRGIN){if(this.state===c.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();const r=this.getValue();n=this.cellProperties.trimWhitespace?[["string"==typeof r?String.prototype.trim.call(r||""):r]]:[[r]],this.state=c.WAITING,this.saveValue(n,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=c.FINISHED,this.discardEditor(e)})):(this.state=c.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=c.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===c.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=c.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=c.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===c.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:r,wtViewport:n}=this.hot.view._wt,s=this.hot.rootWindow,o=(0,u.offset)(t),i=(0,u.outerWidth)(t),a=(0,u.offset)(this.hot.rootElement),l=(0,u.outerWidth)(this.hot.rootElement),h=r.topOverlay.holder,c=r.inlineStartOverlay.holder,d=h!==s?h.scrollTop:0,f=c!==s?c.scrollLeft:0,p=s.innerWidth-a.left-l,{wtTable:g}=null!==(e=r.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,m=g.name,E=["master","inline_start"].includes(m)?d:0,y=["master","top","bottom"].includes(m)?f:0,w=o.top===a.top?0:1;let C=o.top-a.top-w-E,v=0;v=this.hot.isRtl()?s.innerWidth-o.left-i-p-1+y:o.left-a.left-1-y,["top","top_inline_start_corner"].includes(m)&&(C+=r.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(m)&&(v+=Math.abs(r.inlineStartOverlay.getOverlayOffset()));const R=this.hot.hasColHeaders(),S=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),T=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),N=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(R&&S<=0||S===N)&&(C+=1),T<=0&&(v+=1);const O=n.rowsRenderCalculator.startPosition,M=n.columnsRenderCalculator.startPosition,_=Math.abs(r.inlineStartOverlay.getScrollPosition()),A=r.topOverlay.getScrollPosition(),b=(0,u.getScrollbarWidth)(this.hot.rootDocument);let I=t.offsetTop;if(["inline_start","master"].includes(m)&&(I+=O-A),["bottom","bottom_inline_start_corner"].includes(m)){const{wtViewport:e,wtTable:t}=r.bottomOverlay.clone;I+=e.getWorkspaceHeight()-t.getHeight()-b}let x=t.offsetLeft;this.hot.isRtl()?(x=x>=0?g.getWidth()-t.offsetLeft:Math.abs(x),x+=M-_-i):["top","master","bottom"].includes(m)&&(x+=M-_);const L=(0,u.getComputedStyle)(this.TD,this.hot.rootWindow),P=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",D=parseInt(L[P],10)>0?0:1,k=parseInt(L.borderTopWidth,10)>0?0:1,H=(0,u.outerWidth)(t)+D,F=(0,u.outerHeight)(t)+k,U=(0,u.hasVerticalScrollbar)(h)?b:0,V=(0,u.hasHorizontalScrollbar)(c)?b:0,B=this.hot.view.maximumVisibleElementWidth(x)-U+D;return{top:C,start:v,height:F,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(I)-V+k,23),width:H,maxWidth:B}}getEditedCellsLayerClass(){switch(this.checkEditorSection()){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){const e=this.hot.countRows();let t="";return this.row<this.hot.getSettings().fixedRowsTop?t=this.col<this.hot.getSettings().fixedColumnsStart?"top-inline-start-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=e-this.hot.getSettings().fixedRowsBottom?t=this.col<this.hot.getSettings().fixedColumnsStart?"bottom-inline-start-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(t="inline-start"),t}}t.BaseEditor=f,(0,i.mixin)(f,l.default)},86446:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(23627);t.EDITOR_STATE=n.EDITOR_STATE,t.EDITOR_TYPE=n.EDITOR_TYPE,t.BaseEditor=n.BaseEditor},16571:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(86446),s=r(49587);const o="checkbox";t.EDITOR_TYPE=o;class i extends n.BaseEditor{static get EDITOR_TYPE(){return o}beginEditing(e,t){if(t&&"mouseup"===t.type){const e=this.TD.querySelector('input[type="checkbox"]');(0,s.hasClass)(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}t.CheckboxEditor=i},73388:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(16571);t.EDITOR_TYPE=n.EDITOR_TYPE,t.CheckboxEditor=n.CheckboxEditor},99588:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=n(r(22418)),i=n(r(91705)),a=r(64953),l=n(r(57340)),u=r(49587),h=r(66862),c=r(76163),d=r(49223);r(22442);const f="date";t.EDITOR_TYPE=f;const p="dateEditor";class g extends a.TextEditor{constructor(){super(...arguments),(0,s.default)(this,"defaultDateFormat","DD/MM/YYYY"),(0,s.default)(this,"isCellEdited",!1),(0,s.default)(this,"parentDestroyed",!1),(0,s.default)(this,"$datePicker",null)}static get EDITOR_TYPE(){return f}init(){if("function"!=typeof o.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof i.default)throw new Error("You need to include Pikaday to your project.");super.init(),this.hot.addHook("afterDestroy",(()=>{this.parentDestroyed=!0,this.destroyElements()}))}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),(0,u.addClass)(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker);const e=new l.default(this);e.addEventListener(this.datePicker,"mousedown",(e=>{(0,u.hasClass)(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()})),e.addEventListener(this.TEXTAREA,"keydown",(e=>{["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.code)&&e.preventDefault()}))}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,r,n,s,o){super.prepare(e,t,r,n,s,o)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager().getContext("editor");super.open(),this.showDatepicker(e),this.hot.getSettings().ariaTags&&(0,u.setAttribute)(this.TD,[(0,h.A11Y_EXPANDED)("true")]),t.addShortcut({keys:[["Enter"]],callback:e=>{e.stopPropagation()},group:p})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout((()=>{this.hot._refreshBorders()})),this.TD&&this.hot.getSettings().ariaTags&&(0,u.setAttribute)(this.TD,[(0,h.A11Y_EXPANDED)("false")]);this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(p),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){const e=this.originalValue;void 0!==e&&this.setValue(e)}super.finishEditing(e,t)}showDatepicker(e){const t=this.TD.getBoundingClientRect(),r=this.cellProperties.dateFormat||this.defaultDateFormat,n=this.hot.view.isMouseDown(),s=!!e&&(0,d.isFunctionKey)(e.keyCode);let a;this.datePicker.style.display="block",this.$datePicker=new i.default(this.getDatePickerConfig()),this.$datePicker._onInputFocus=function(){},this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+t.top+(0,u.outerHeight)(this.TD)}px`;let l=this.hot.rootWindow.pageXOffset;l=this.hot.isRtl()?t.right-(0,u.outerWidth)(this.datePicker):t.left,this.datePickerStyle.left=`${l}px`,this.originalValue?(a=this.originalValue,(0,o.default)(a,r,!0).isValid()&&this.$datePicker.setMoment((0,o.default)(a,r),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),s||n||this.setValue("")):this.cellProperties.defaultDate?(a=this.cellProperties.defaultDate,(0,o.default)(a,r,!0).isValid()&&this.$datePicker.setMoment((0,o.default)(a,r),!0),s||n||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){const e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,c.deepExtend)(t,this.cellProperties.datePickerConfig);const r=t.onSelect,n=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.format=t.format||this.defaultDateFormat,t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=(0,o.default)(t).format(this.cellProperties.dateFormat||this.defaultDateFormat)),this.setValue(t),r&&r()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),n&&n()},t}}t.DateEditor=g},92090:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(99588);t.EDITOR_TYPE=n.EDITOR_TYPE,t.DateEditor=n.DateEditor},72394:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(16478),o=n(r(54925));const i="dropdown";t.EDITOR_TYPE=i;class a extends s.AutocompleteEditor{static get EDITOR_TYPE(){return i}prepare(e,t,r,n,s,o){super.prepare(e,t,r,n,s,o),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}t.DropdownEditor=a,o.default.getSingleton().add("beforeValidate",(function(e,t,r){const n=this.getCellMeta(t,this.propToCol(r));n.editor===a&&void 0===n.strict&&(n.filter=!1,n.strict=!0)}))},28544:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(72394);t.EDITOR_TYPE=n.EDITOR_TYPE,t.DropdownEditor=n.DropdownEditor},11717:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953),s=r(49587),o=r(30369),i=r(76163),a=r(80940),l=r(66862);const u="handsontableEditor",h="handsontable";t.EDITOR_TYPE=h;class c extends n.TextEditor{static get EDITOR_TYPE(){return h}open(){super.open(),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),(0,s.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions(),this.hot.getSettings().ariaTags&&(0,s.setAttribute)(this.TD,[(0,l.A11Y_EXPANDED)("true")])}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,s.setAttribute)(this.TD,[(0,l.A11Y_EXPANDED)("false")])}prepare(e,t,r,n,s,o){super.prepare(e,t,r,n,s,o);const a=this,l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,afterOnCellMouseDown(e,t){const r=this.getSourceData(t.row,t.col);void 0!==r&&a.setValue(r),a.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&(0,i.extend)(l,o.handsontable),this.htOptions=l}beginEditing(e,t){const r=this.hot.getSettings().onBeginEditing;r&&!1===r()||super.beginEditing(e,t)}createElements(){super.createElements();const e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,r){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){const e=this.htEditor.getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,r)}assignHooks(){this.hot.addHook("afterDestroy",(()=>{this.htEditor&&this.htEditor.destroy()}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:u,relativeToGroup:a.SHORTCUTS_GROUP_NAVIGATION,position:"before"},r=(e,t)=>{const r=this.htEditor;if(void 0!==e&&(e<0||r.flipped&&e>r.countRows()-1?r.deselectCell():r.selectCell(e,0),r.getData().length))return t.preventDefault(),(0,o.stopImmediatePropagation)(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor;let n,s;return!t.getSelectedLast()&&t.flipped?n=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(s=t.getSelectedLast()[0],n=Math.max(0,s-1)):(s=t.getSelectedLast()[0],n=s-1)),r(n,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor;let n,s;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)n=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;s=t.getSelectedLast()[0],n=Math.min(e,s+1)}}else n=0;return r(n,e)},preventDefault:!1}],t)}unregisterShortcuts(){super.unregisterShortcuts();this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(u)}}t.HandsontableEditor=c},12540:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(11717);t.EDITOR_TYPE=n.EDITOR_TYPE,t.HandsontableEditor=n.HandsontableEditor},5944:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllEditors=function(){(0,p.registerEditor)(s.BaseEditor),(0,p.registerEditor)(n.AutocompleteEditor),(0,p.registerEditor)(o.CheckboxEditor),(0,p.registerEditor)(i.DateEditor),(0,p.registerEditor)(a.DropdownEditor),(0,p.registerEditor)(l.HandsontableEditor),(0,p.registerEditor)(u.NumericEditor),(0,p.registerEditor)(h.PasswordEditor),(0,p.registerEditor)(c.SelectEditor),(0,p.registerEditor)(d.TextEditor),(0,p.registerEditor)(f.TimeEditor)};var n=r(16478);t.AutocompleteEditor=n.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=n.EDITOR_TYPE;var s=r(86446);t.BaseEditor=s.BaseEditor,t.BASE_EDITOR=s.EDITOR_TYPE;var o=r(73388);t.CheckboxEditor=o.CheckboxEditor,t.CHECKBOX_EDITOR=o.EDITOR_TYPE;var i=r(92090);t.DateEditor=i.DateEditor,t.DATE_EDITOR=i.EDITOR_TYPE;var a=r(28544);t.DropdownEditor=a.DropdownEditor,t.DROPDOWN_EDITOR=a.EDITOR_TYPE;var l=r(12540);t.HandsontableEditor=l.HandsontableEditor,t.HANDSONTABLE_EDITOR=l.EDITOR_TYPE;var u=r(6618);t.NumericEditor=u.NumericEditor,t.NUMERIC_EDITOR=u.EDITOR_TYPE;var h=r(50647);t.PasswordEditor=h.PasswordEditor,t.PASSWORD_EDITOR=h.EDITOR_TYPE;var c=r(71177);t.SelectEditor=c.SelectEditor,t.SELECT_EDITOR=c.EDITOR_TYPE;var d=r(64953);t.TextEditor=d.TextEditor,t.TEXT_EDITOR=d.EDITOR_TYPE;var f=r(76219);t.TimeEditor=f.TimeEditor,t.TIME_EDITOR=f.EDITOR_TYPE;var p=r(16691);t.registerEditor=p.registerEditor,t.RegisteredEditor=p.RegisteredEditor,t._getEditorInstance=p._getEditorInstance,t.getEditor=p.getEditor,t.getEditorInstance=p.getEditorInstance,t.getRegisteredEditorNames=p.getRegisteredEditorNames,t.getRegisteredEditors=p.getRegisteredEditors,t.hasEditor=p.hasEditor},6618:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(43894);t.EDITOR_TYPE=n.EDITOR_TYPE,t.NumericEditor=n.NumericEditor},43894:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953);const s="numeric";t.EDITOR_TYPE=s;class o extends n.TextEditor{static get EDITOR_TYPE(){return s}}t.NumericEditor=o},50647:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(67925);t.EDITOR_TYPE=n.EDITOR_TYPE,t.PasswordEditor=n.PasswordEditor},67925:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953),s=r(49587);const o="password";t.EDITOR_TYPE=o;class i extends n.TextEditor{static get EDITOR_TYPE(){return o}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,(0,s.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}t.PasswordEditor=i},16691:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.RegisteredEditor=d,t.getEditorInstance=t._getEditorInstance=function(e,t){let r;if("function"==typeof e)i.get(e)||f(null,e),r=i.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');r=l(e)}if(!r)throw Error(`No editor registered under name "${e}"`);return r.getInstance(t)},t.getEditor=function(e){if("function"==typeof e)return e;if(!u(e))throw Error(`No registered editor found under "${e}" name`);return l(e).getConstructor()},t.registerEditor=f,r(60740);var s=n(r(54925)),o=n(r(31056));const i=new WeakMap,{register:a,getItem:l,hasItem:u,getNames:h,getValues:c}=(0,o.default)("editors");function d(e){const t={},r=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new r(e)),t[e.guid]},s.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function f(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);const r=new d(t);"string"==typeof e&&a(e,r),i.set(t,r)}t.getRegisteredEditors=c,t.getRegisteredEditorNames=h,t.hasEditor=u},71177:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(51692);t.EDITOR_TYPE=n.EDITOR_TYPE,t.SelectEditor=n.SelectEditor},51692:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(86446),s=r(49587),o=r(76163);const i="ht_editor_visible",a="selectEditor",l="select";t.EDITOR_TYPE=l;class u extends n.BaseEditor{static get EDITOR_TYPE(){return l}init(){this.select=this.hot.rootDocument.createElement("SELECT"),(0,s.addClass)(this.select,"htSelectEditor"),this.select.style.display="none",this.hot.rootElement.appendChild(this.select),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.select.style.display="";this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.select.style.display="none",(0,s.hasClass)(this.select,i)&&(0,s.removeClass)(this.select,i),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>this.refreshDimensions())),this.addHook("afterRowResize",(()=>this.refreshDimensions()))}prepare(e,t,r,n,i,a){super.prepare(e,t,r,n,i,a);const l=this.cellProperties.selectOptions;let u;u="function"==typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),(0,s.empty)(this.select),(0,o.objectEach)(u,((e,t)=>{const r=this.hot.rootDocument.createElement("OPTION");r.value=t,(0,s.fastInnerHTML)(r,e),this.select.appendChild(r)}))}prepareOptions(e){let t={};if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)t[e[r]]=e[r];else"object"==typeof e&&(t=e);return t}refreshValue(){const e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==n.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:r,height:o}=this.getEditedCellRect(),a=this.select.style;a.height=`${o}px`,a.width=`${r}px`,a.top=`${e}px`,a[this.hot.isRtl()?"right":"left"]=`${t}px`,a.margin="0px",(0,s.addClass)(this.select,i)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={group:a};!1!==this.isInFullEditMode()&&e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(a)}}t.SelectEditor=u},360:(e,t,r)=>{"use strict";t.__esModule=!0,t.updateCaretPosition=function(e,t){const r=(0,n.getCaretPosition)(t),s=t.value.split("\n");let o=r,i=0;for(let t=0;t<s.length;t++){const n=s[t];0!==t&&(i+=s[t-1].length+1);const a=i+n.length;if("home"===e?o=i:"end"===e&&(o=a),r<=a)break}(0,n.setCaretPosition)(t,o)};var n=r(49587)},64953:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(1219);t.EDITOR_TYPE=n.EDITOR_TYPE,t.TextEditor=n.TextEditor},1219:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(86446),i=n(r(57340)),a=r(78498),l=r(49587),u=r(57691),h=r(49223),c=r(63031),d=r(97639),f=r(80940),p=r(23627),g=r(360),m=r(66862);const E="ht_editor_hidden",y="textEditor",w="text";t.EDITOR_TYPE=w;class C extends o.BaseEditor{static get EDITOR_TYPE(){return w}constructor(e){super(e),(0,s.default)(this,"eventManager",new i.default(this)),(0,s.default)(this,"autoResize",(0,c.autoResize)()),(0,s.default)(this,"TEXTAREA",void 0),(0,s.default)(this,"textareaStyle",void 0),(0,s.default)(this,"TEXTAREA_PARENT",void 0),(0,s.default)(this,"textareaParentStyle",void 0),(0,s.default)(this,"layerClass",void 0),this.eventManager=new i.default(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",(()=>this.destroy()))}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this.refreshDimensions(),this.showEditableElement();this.hot.getShortcutManager().setActiveContextName("editor"),this.addHook("afterDocumentKeyDown",(e=>this.onAfterDocumentKeyDown(e))),this.registerShortcuts()}close(){this.autoResize.unObserve(),(0,l.isThisHotChild)(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts(),this.removeHooksByKey("afterDocumentKeyDown")}prepare(e,t,r,n,s,i){const a=this.state;if(super.prepare(e,t,r,n,s,i),!i.readOnly){this.refreshDimensions(!0);const{allowInvalid:e}=i;e&&(this.TEXTAREA.value=""),a!==o.EDITOR_STATE.FINISHED&&this.hideEditableElement()}}beginEditing(e,t){this.state===o.EDITOR_STATE.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),(0,l.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement("TEXTAREA"),(0,l.setAttribute)(this.TEXTAREA,[["data-hot-input",""],(0,m.A11Y_TABINDEX)(-1)]),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,m.A11Y_HIDDEN)()]),(0,l.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),(0,l.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),(0,l.hasClass)(this.TEXTAREA_PARENT,this.layerClass)&&(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,E),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){(0,a.isEdge)()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,E)}showEditableElement(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle[this.hot.isRtl()?"left":"right"]="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="",this.textareaStyle.overflowY="hidden";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;(0,u.rangeEach)(e.length-1,(r=>{const n=e[r];if((0,l.hasClass)(n,"handsontableEditor"))return t=!0,!1})),(0,l.hasClass)(this.TEXTAREA_PARENT,E)&&(0,l.removeClass)(this.TEXTAREA_PARENT,E),t?(this.layerClass="ht_editor_visible",(0,l.addClass)(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),(0,l.addClass)(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==o.EDITOR_STATE.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:r,width:n,maxWidth:s,height:i,maxHeight:a}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${r}px`,this.showEditableElement();const u=(0,l.getComputedStyle)(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=u.fontSize,this.TEXTAREA.style.fontFamily=u.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const h=(0,l.getComputedStyle)(this.TEXTAREA),c=parseInt(h.paddingLeft,10)+parseInt(h.paddingRight,10),d=parseInt(h.paddingTop,10)+parseInt(h.paddingBottom,10),f=n-c,p=i-d,g=s-c,m=a-d;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(f,g),minHeight:Math.min(p,m),maxWidth:g,maxHeight:m},!0)}bindEvents(){(0,a.isIOS)()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",(()=>this.finishEditing(!1))),this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>{this.refreshDimensions(),this.state===o.EDITOR_STATE.EDITING&&this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.state===o.EDITOR_STATE.EDITING&&this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={runOnlyIf:()=>(0,d.isDefined)(this.hot.getSelected()),group:y},r=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};e.addShortcuts([{keys:[["Tab"]],callback:e=>{const t=this.hot.getSettings(),r="function"==typeof t.tabMoves?t.tabMoves(e):t.tabMoves;this.hot.selection.transformStart(r.row,r.col,!0)}},{keys:[["Shift","Tab"]],callback:e=>{const t=this.hot.getSettings(),r="function"==typeof t.tabMoves?t.tabMoves(e):t.tabMoves;this.hot.selection.transformStart(-r.row,-r.col)}},{keys:[["Control","Enter"]],callback:()=>(r(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(r(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(r(),!1)},{keys:[["PageUp"]],callback:()=>{this.hot.selection.transformStart(-this.hot.countVisibleRows(),0)}},{keys:[["PageDown"]],callback:()=>{this.hot.selection.transformStart(this.hot.countVisibleRows(),0)}},{keys:[["Home"]],callback:(e,t)=>{let[r]=t;(0,g.updateCaretPosition)(r,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[r]=t;(0,g.updateCaretPosition)(r,this.TEXTAREA)}},{keys:[["Control/Meta","Z"]],preventDefault:!1,callback:()=>{this.hot._registerTimeout((()=>{this.autoResize.resize()}),10)}},{keys:[["Control/Meta","Shift","Z"]],preventDefault:!1,callback:()=>{this.hot._registerTimeout((()=>{this.autoResize.resize()}),10)}}],t)}unregisterShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");e.removeShortcutsByGroup(f.SHORTCUTS_GROUP_NAVIGATION),e.removeShortcutsByGroup(y),e.removeShortcutsByGroup(p.SHORTCUTS_GROUP_EDITOR)}onAfterDocumentKeyDown(e){-1===[h.KEY_CODES.ARROW_UP,h.KEY_CODES.ARROW_RIGHT,h.KEY_CODES.ARROW_DOWN,h.KEY_CODES.ARROW_LEFT].indexOf(e.keyCode)&&this.autoResize.resize(String.fromCharCode(e.keyCode))}}t.TextEditor=C},76219:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(98744);t.EDITOR_TYPE=n.EDITOR_TYPE,t.TimeEditor=n.TimeEditor},98744:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953);const s="time";t.EDITOR_TYPE=s;class o extends n.TextEditor{static get EDITOR_TYPE(){return s}prepare(e,t,r,n,s,o){super.prepare(e,t,r,n,s,o),this.TEXTAREA.dir="ltr"}}t.TimeEditor=o},57340:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getListenersCounter=function(){return i},r(95988);var s=n(r(93231)),o=r(30369);let i=0;var a=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,s.default)(this,"context",void 0),this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function s(e){r.call(this,function(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),(0,o.stopImmediatePropagation)(this)},e}(e))}return this.context.eventListeners.push({element:e,event:t,callback:r,callbackProxy:s,options:n,eventManager:this}),e.addEventListener(t,s,n),i+=1,()=>{this.removeEventListener(e,t,r)}}removeEventListener(e,t,r){let n,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.context.eventListeners.length;for(;o;)if(o-=1,n=this.context.eventListeners[o],n.event===t&&n.element===e){if(r&&r!==n.callback)continue;if(s&&n.eventManager!==this)continue;this.context.eventListeners.splice(o,1),n.element.removeEventListener(n.event,n.callbackProxy,n.options),i-=1}}clearEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let t=this.context.eventListeners.length;for(;t;){t-=1;const r=this.context.eventListeners[t];e&&r.eventManager!==this||(this.context.eventListeners.splice(t,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),i-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let r=e.document,n=e;r||(r=e.ownerDocument?e.ownerDocument:e,n=r.defaultView);const s={bubbles:!0,cancelable:"mousemove"!==t,view:n,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};let o;r.createEvent?(o=r.createEvent("MouseEvents"),o.initMouseEvent(t,s.bubbles,s.cancelable,s.view,s.detail,s.screenX,s.screenY,s.clientX,s.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget||r.body.parentNode)):o=r.createEventObject(),e.dispatchEvent?e.dispatchEvent(o):e.fireEvent(`on${t}`,o)}};t.default=a},14864:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),o=n(r(48427)),i=r(31990),a=r(49587);function l(e,t){h(e,t),t.add(e)}function u(e,t,r){h(e,t),t.set(e,r)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const d=Object.freeze({CELL:"cell",MIXED:"mixed"});var f=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,E=new WeakSet,y=new WeakSet,w=new WeakSet,C=new WeakSet;function v(){return(0,s.default)(this,f).getSelectedRangeLast().highlight}function R(){const e=c(this,E,v).call(this);return(0,s.default)(this,f).getCell(e.row,e.col,!0)}function S(){const e=c(this,y,R).call(this),{activeElement:t}=(0,s.default)(this,f).rootDocument;t&&(0,a.isOutsideInput)(t)&&t.blur(),this.focusOnHighlightedCell(e),this.getFocusMode()===d.MIXED&&"TD"===e.nodeName&&(0,s.default)(this,f).addHookOnce("afterSelectionEnd",(()=>{this.refocusToEditorTextarea()}))}function T(e){e.imeFastEdit&&this.getFocusMode()!==d.MIXED?this.setFocusMode(d.MIXED):e.imeFastEdit||this.getFocusMode()===d.CELL||this.setFocusMode(d.CELL)}t.FocusManager=class{constructor(e){var t=this;l(this,C),l(this,w),l(this,y),l(this,E),u(this,f,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:void 0}),u(this,g,{writable:!0,value:50}),u(this,m,{writable:!0,value:null});const r=e.getSettings();(0,o.default)(this,f,e),(0,o.default)(this,p,r.imeFastEdit?d.MIXED:d.CELL),(0,s.default)(this,f).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return c(t,C,T).call(t,...r)})),(0,s.default)(this,f).addHook("afterSelection",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return c(t,w,S).call(t,...r)}))}getFocusMode(){return(0,s.default)(this,p)}setFocusMode(e){Object.values(d).includes(e)?(0,o.default)(this,p,e):(0,i.warn)(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return(0,s.default)(this,g)}setRefocusDelay(e){(0,o.default)(this,g,e)}setRefocusElementGetter(e){(0,o.default)(this,m,e)}getRefocusElement(){return"function"==typeof(0,s.default)(this,m)?(0,s.default)(this,m).call(this):null===(e=(0,s.default)(this,f).getActiveEditor())||void 0===e?void 0:e.TEXTAREA;var e}focusOnHighlightedCell(e){var t;const r=c(this,E,v).call(this),n=e||c(this,y,R).call(this);let o=(0,s.default)(this,f).runHooks("modifyFocusedElement",r.row,r.col,n);o instanceof HTMLElement||(o=n),!o||null!==(t=(0,s.default)(this,f).getActiveEditor())&&void 0!==t&&t.isOpened()||o.focus({preventScroll:!0})}refocusToEditorTextarea(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,s.default)(this,g);const t=this.getRefocusElement();(0,s.default)(this,f).getSettings().imeFastEdit&&t&&(0,s.default)(this,f)._registerTimeout((()=>{t.select()}),e)}}},66862:(e,t)=>{"use strict";t.__esModule=!0;t.A11Y_TABINDEX=e=>["tabindex",e];t.A11Y_TREEGRID=()=>["role","treegrid"];t.A11Y_PRESENTATION=()=>["role","presentation"];t.A11Y_GRIDCELL=()=>["role","gridcell"];t.A11Y_ROWHEADER=()=>["role","rowheader"];t.A11Y_COLUMNHEADER=()=>["role","columnheader"];t.A11Y_ROW=()=>["role","row"];t.A11Y_MENU=()=>["role","menu"];t.A11Y_MENU_ITEM=()=>["role","menuitem"];t.A11Y_COMBOBOX=()=>["role","combobox"];t.A11Y_LISTBOX=()=>["role","listbox"];t.A11Y_OPTION=()=>["role","option"];t.A11Y_CHECKBOX=()=>["role","checkbox"];t.A11Y_SCOPE_COL=()=>["scope","col"];t.A11Y_SCOPE_ROW=()=>["scope","row"];t.A11Y_TEXT=()=>["type","text"];t.A11Y_LABEL=e=>["aria-label",e];t.A11Y_DESCRIPTION=e=>["aria-description",e];t.A11Y_HIDDEN=()=>["aria-hidden","true"];t.A11Y_DISABLED=()=>["aria-disabled","true"];t.A11Y_MULTISELECTABLE=()=>["aria-multiselectable","true"];t.A11Y_HASPOPUP=e=>["aria-haspopup",e];t.A11Y_ROWCOUNT=e=>["aria-rowcount",e];t.A11Y_COLCOUNT=e=>["aria-colcount",e];t.A11Y_ROWINDEX=e=>["aria-rowindex",e];t.A11Y_COLINDEX=e=>["aria-colindex",e];t.A11Y_EXPANDED=e=>["aria-expanded",e];t.A11Y_SORT=e=>["aria-sort",e];t.A11Y_READONLY=()=>["aria-readonly","true"];t.A11Y_INVALID=()=>["aria-invalid","true"];t.A11Y_CHECKED=e=>["aria-checked",e];t.A11Y_SELECTED=()=>["aria-selected","true"];t.A11Y_AUTOCOMPLETE=()=>["aria-autocomplete","list"];t.A11Y_CONTROLS=e=>["aria-controls",e];t.A11Y_ACTIVEDESCENDANT=e=>["aria-activedescendant",e];t.A11Y_LIVE=e=>["aria-live",e];t.A11Y_RELEVANT=e=>["aria-relevant",e];t.A11Y_SETSIZE=e=>["aria-setsize",e];t.A11Y_POSINSET=e=>["aria-posinset",e]},98887:(e,t,r)=>{"use strict";function n(e,t,r,n){let s=-1,o=e,i=r;Array.isArray(e)||(o=Array.from(e));const a=o.length;for(n&&a&&(s+=1,i=o[s]),s+=1;s<a;)i=t(i,o[s],s,o),s+=1;return i}function s(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));const s=n.length;for(;r<s&&!1!==t(n[r],r,n);)r+=1;return e}function o(e){return n(e,((e,t)=>e+t),0)}t.__esModule=!0,t.arrayAvg=function(e){if(!e.length)return 0;return o(e)/e.length},t.arrayEach=s,t.arrayFilter=function(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));const s=n.length,o=[];let i=-1;for(;r<s;){const e=n[r];t(e,r,n)&&(i+=1,o[i]=e),r+=1}return o},t.arrayFlatten=function e(t){return n(t,((t,r)=>t.concat(Array.isArray(r)?e(r):r)),[])},t.arrayMap=function(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));const s=n.length,o=[];let i=-1;for(;r<s;){const e=n[r];i+=1,o[i]=t(e,r,n),r+=1}return o},t.arrayMax=function(e){return n(e,((e,t)=>e>t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return n(e,((e,t)=>e<t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayReduce=n,t.arraySum=o,t.arrayUnique=function(e){const t=[];return s(e,(e=>{-1===t.indexOf(e)&&t.push(e)})),t},t.extendArray=function(e,t){const r=t.length;let n=0;for(;n<r;)e.push(t[n]),n+=1},t.getDifferenceOfArrays=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[n,...o]=[...t];let i=n;return s(o,(e=>{i=i.filter((t=>!e.includes(t)))})),i},t.getIntersectionOfArrays=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[n,...o]=[...t];let i=n;return s(o,(e=>{i=i.filter((t=>e.includes(t)))})),i},t.getUnionOfArrays=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[n,...o]=[...t],i=new Set(n);return s(o,(e=>{s(e,(e=>{i.has(e)||i.add(e)}))})),Array.from(i)},t.pivot=function(e){const t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;const r=e.length,n=e[0].length;for(let s=0;s<r;s++)for(let r=0;r<n;r++)t[r]||(t[r]=[]),t[r][s]=e[s][r];return t},t.stringToArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)},t.to2dArray=function(e){const t=e.length;let r=0;for(;r<t;)e[r]=[e[r]],r+=1},r(95988)},78498:(e,t,r)=>{"use strict";t.__esModule=!0,t.isChrome=function(){return o.chrome.value},t.isChromeWebKit=function(){return o.chromeWebKit.value},t.isEdge=function(){return o.edge.value},t.isEdgeWebKit=function(){return o.edgeWebKit.value},t.isFirefox=function(){return o.firefox.value},t.isFirefoxWebKit=function(){return o.firefoxWebKit.value},t.isIOS=function(){return i.ios.value},t.isIpadOS=function(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&i.mac.value},t.isLinuxOS=function(){return i.linux.value},t.isMacOS=function(){return i.mac.value},t.isMobileBrowser=function(){return o.mobile.value},t.isSafari=function(){return o.safari.value},t.isWindowsOS=function(){return i.win.value},t.setBrowserMeta=a,t.setPlatformMeta=l;var n=r(76163);const s=e=>{const t={value:!1,test:(r,n)=>{t.value=e(r,n)}};return t},o={chrome:s(((e,t)=>/Chrome/.test(e)&&/Google/.test(t))),chromeWebKit:s((e=>/CriOS/.test(e))),edge:s((e=>/Edge/.test(e))),edgeWebKit:s((e=>/EdgiOS/.test(e))),firefox:s((e=>/Firefox/.test(e))),firefoxWebKit:s((e=>/FxiOS/.test(e))),mobile:s((e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e))),safari:s(((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t)))},i={mac:s((e=>/^Mac/.test(e))),win:s((e=>/^Win/.test(e))),linux:s((e=>/^Linux/.test(e))),ios:s((e=>/iPhone|iPad|iPod/i.test(e)))};function a(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.objectEach)(o,(r=>{let{test:n}=r;n(e,t)}))}function l(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.objectEach)(i,(t=>{let{test:r}=t;r(e)}))}a(),l()},31990:(e,t,r)=>{"use strict";t.__esModule=!0,t.error=function(){(0,n.isDefined)(console)&&console.error(...arguments)},t.info=function(){(0,n.isDefined)(console)&&console.info(...arguments)},t.log=function(){(0,n.isDefined)(console)&&console.log(...arguments)},t.warn=function(){(0,n.isDefined)(console)&&console.warn(...arguments)};var n=r(97639)},56020:(e,t,r)=>{"use strict";t.__esModule=!0,t.countFirstRowKeys=function(e){let t=0;Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&(0,n.isObject)(e[0])&&(t=(0,n.deepObjectSize)(e[0])));return t},t.createEmptySpreadsheetData=function(e,t){const r=[];let n;for(let s=0;s<e;s++){n=[];for(let e=0;e<t;e++)n.push("");r.push(n)}return r},t.createSpreadsheetData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const r=[];let n,s;for(n=0;n<e;n++){const e=[];for(s=0;s<t;s++)e.push(i(s)+(n+1));r.push(e)}return r},t.createSpreadsheetObjectData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const r=[];let n,s;for(n=0;n<e;n++){const e={};for(s=0;s<t;s++)e[`prop${s}`]=i(s)+(n+1);r.push(e)}return r},t.dataRowToChangesArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e;const n=[];Array.isArray(e)&&Array.isArray(e[0])||(r=[e]);return r.forEach(((e,r)=>{Array.isArray(e)?e.forEach(((e,s)=>{n.push([r+t,s,e])})):Object.keys(e).forEach((s=>{n.push([r+t,s,e[s]])}))})),n},t.isArrayOfArrays=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>Array.isArray(e))))},t.isArrayOfObjects=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e)))},t.spreadsheetColumnIndex=function(e){let t=0;if(e)for(let r=0,n=e.length-1;r<e.length;r+=1,n-=1)t+=o**n*(s.indexOf(e[r])+1);return t-=1,t},t.spreadsheetColumnLabel=i,r(95988);var n=r(76163);const s="ABCDEFGHIJKLMNOPQRSTUVWXYZ",o=s.length;function i(e){let t,r=e+1,n="";for(;r>0;)t=(r-1)%o,n=String.fromCharCode(65+t)+n,r=parseInt((r-t)/o,10);return n}},46680:(e,t)=>{"use strict";t.__esModule=!0,t.getNormalizedDate=function(e){const t=new Date(e);if(!isNaN(new Date(`${e}T00:00`).getDate()))return new Date(t.getTime()+6e4*t.getTimezoneOffset());return t}},49587:(e,t,r)=>{"use strict";t.__esModule=!0,t.addClass=u,t.addEvent=function(e,t,r){e.addEventListener(t,r,!1)},t.appendElement=function(e,t){let{tagName:r,className:n,attributes:s}=t;const o=e.ownerDocument.createElement(r);n&&u(o,n);s&&s.length&&c(o,s);return e.appendChild(o),o},t.clearTextSelection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())},t.closest=i,t.closestDown=function(e,t,r){const n=[];let s=e;for(;s&&(s=i(s,t,r),s&&(!r||r.contains(s)));)n.push(s),s=s.host&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?s.host:s.parentNode;const o=n.length;return o?n[o-1]:null},t.empty=d,t.fastInnerHTML=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];f.test(t)?e.innerHTML=r?(0,n.sanitize)(t):t:p(e,t)},t.fastInnerText=p,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getComputedStyle=E,t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=o,t.getParent=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=-1,n=null,s=e;for(;null!==s;){if(r===t){n=s;break}s.host&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?s=s.host:(r+=1,s=s.parentNode)}return n},t.getParentWindow=function(e){return o(e)&&e.parent},t.getScrollLeft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return m(t);return e.scrollLeft},t.getScrollTop=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return g(t);return e.scrollTop},t.getScrollableElement=function(e){let t=e.ownerDocument,r=t?t.defaultView:void 0;t||(t=e.document?e.document:e,r=t.defaultView);const n=["auto","scroll"];let s=e.parentNode;for(;s&&s.style&&t.body!==s;){let{overflow:e,overflowX:t,overflowY:o}=s.style;if([e,t,o].includes("scroll"))return s;if(({overflow:e,overflowX:t,overflowY:o}=r.getComputedStyle(s)),n.includes(e)||n.includes(t)||n.includes(o))return s;if(s.clientHeight<=s.scrollHeight+1&&(n.includes(o)||n.includes(e)))return s;if(s.clientWidth<=s.scrollWidth+1&&(n.includes(t)||n.includes(e)))return s;s=s.parentNode}return r},t.getScrollbarWidth=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;void 0===y&&(y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.createElement("div");t.style.height="200px",t.style.width="100%";const r=e.createElement("div");r.style.boxSizing="content-box",r.style.height="150px",r.style.left="0px",r.style.overflow="hidden",r.style.position="absolute",r.style.top="0px",r.style.width="200px",r.style.visibility="hidden",r.appendChild(t),(e.body||e.documentElement).appendChild(r);const n=t.offsetWidth;r.style.overflow="scroll";let s=t.offsetWidth;n===s&&(s=r.clientWidth);return(e.body||e.documentElement).removeChild(r),n-s}(e));return y},t.getSelectionEndPosition=function(e){if(e.selectionEnd)return e.selectionEnd;return 0},t.getSelectionText=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document;let r="";e.getSelection?r=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(r=t.selection.createRange().text);return r},t.getStyle=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===r)return"width"===t?`${r.innerWidth}px`:"height"===t?`${r.innerHeight}px`:void 0;const n=e.style[t];if(""!==n&&void 0!==n)return n;const s=E(e,r);if(""!==s[t]&&void 0!==s[t])return s[t]},t.getTrimmingContainer=function(e){const t=e.ownerDocument,r=t.defaultView;let n=e.parentNode;for(;n&&n.style&&t.body!==n;){if("visible"!==n.style.overflow&&""!==n.style.overflow)return n;const e=E(n,r),t=["scroll","hidden","auto"],s=e.getPropertyValue("overflow"),o=e.getPropertyValue("overflow-y"),i=e.getPropertyValue("overflow-x");if(t.includes(s)||t.includes(o)||t.includes(i))return n;n=n.parentNode}return r},t.getWindowScrollLeft=m,t.getWindowScrollTop=g,t.hasAccessToParentWindow=function(e){return!!Object.getPrototypeOf(e.parent)},t.hasClass=function(e,t){if(void 0===e.classList||"string"!=typeof t||""===t)return!1;return e.classList.contains(t)},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.index=function(e){let t=0,r=e;if(r.previousSibling)for(;r=r.previousSibling;)t+=1;return t},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.isChildOf=function(e,t){let r=e.parentNode,n=[];"string"==typeof t?n=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):n.push(t);for(;null!==r;){if(n.indexOf(r)>-1)return!0;r=r.parentNode}return!1},t.isDetached=function(e){return!e.parentNode},t.isInput=w,t.isOutsideInput=C,t.isThisHotChild=function(e,t){const r=e.closest(".handsontable");return!!r&&(r.parentNode===t||r===t)},t.isVisible=function e(t){const r=t.ownerDocument.documentElement;let n=t;for(;n!==r;){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n.host){if(n.host.impl)return e(n.host.impl);if(n.host)return e(n.host);throw new Error("Lost in Web Components world")}return!1}if("none"===E(n).display)return!1;n=n.parentNode}return!0},t.makeElementContentEditableAndSelectItsContent=v,t.matchesCSSRules=function(e,t){const{selectorText:r}=t;let n=!1;t.type===CSSRule.STYLE_RULE&&r&&(e.msMatchesSelector?n=e.msMatchesSelector(r):e.matches&&(n=e.matches(r)));return n},t.observeVisibilityChangeOnce=function(e,t){new IntersectionObserver(((r,n)=>{r.forEach((r=>{r.isIntersecting&&null!==e.offsetParent&&(t(),n.unobserve(e))}))}),{root:e.ownerDocument.body}).observe(e)},t.offset=function(e){const t=e.ownerDocument,r=t.defaultView,n=t.documentElement;let s,o,i,a=e;s=a.offsetLeft,o=a.offsetTop,i=a;for(;(a=a.offsetParent)&&a!==t.body&&"offsetLeft"in a;)s+=a.offsetLeft,o+=a.offsetTop,i=a;i&&"fixed"===i.style.position&&(s+=r.pageXOffset||n.scrollLeft,o+=r.pageYOffset||n.scrollTop);return{left:s,top:o}},t.outerHeight=function(e){return e.offsetHeight},t.outerWidth=function(e){return e.offsetWidth},t.overlayContainsElement=function(e,t,r){const n=r.parentElement.querySelector(`.ht_clone_${e}`);return n?n.contains(t):null},t.removeAttribute=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);const{regexFree:r,regexes:n}=l(t,!0);r.forEach((t=>{""!==t&&e.removeAttribute(t)})),n.forEach((t=>{e.getAttributeNames().forEach((r=>{t.test(r)&&e.removeAttribute(r)}))}))},t.removeClass=h,t.removeContentEditableFromElementAndDeselect=R,t.removeEvent=function(e,t,r){e.removeEventListener(t,r,!1)},t.removeTextNodes=function e(t){if(3===t.nodeType)t.parentNode.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1){const r=t.childNodes;for(let t=r.length-1;t>=0;t--)e(r[t])}},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")},t.runWithSelectedContendEditableElement=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];v(e,r),t(),R(e,r)},t.selectElementIfAllowed=function(e){C(e.ownerDocument.activeElement)||e.select()},t.setAttribute=c,t.setCaretPosition=function(e,t,r){void 0===r&&(r=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,r)}catch(n){const s=e.parentNode,o=s.style.display;s.style.display="block",e.setSelectionRange(t,r),s.style.display=o}}},t.setOverlayPosition=function(e,t,r){e.style.transform=`translate3d(${t},${r},0)`},r(95988),r(60740);var n=r(37913),s=r(66862);function o(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:n,DOCUMENT_FRAGMENT_NODE:s}=Node;let o=e;for(;null!=o&&o!==r;){const{nodeType:e,nodeName:r}=o;if(e===n&&(t.includes(r)||t.includes(o)))return o;const{host:i}=o;o=i&&e===s?i:o.parentNode}return null}function a(e){return e&&e.length?e.filter((e=>!!e)):[]}function l(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];const r=[],n=[];return n.push(...e.filter((e=>{const n=e instanceof RegExp;return n&&t&&r.push(e),!n}))),t?{regexFree:n,regexes:r}:n}function u(e,t){"string"==typeof t&&(t=t.split(" ")),(t=a(t)).length>0&&e.classList.add(...t)}function h(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:n}=l(t,!0);r=a(r),r.length>0&&e.classList.remove(...r),n.forEach((t=>{e.classList.forEach((r=>{t.test(r)&&e.classList.remove(r)}))}))}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,r]]),t.forEach((t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)}))}function d(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const f=/(<(.*)>|&(.*);)/;function p(e,t){const r=e.firstChild;r&&3===r.nodeType&&null===r.nextSibling?r.textContent=t:(d(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function g(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function m(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}let y;function w(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function C(e){return w(e)&&!1===e.hasAttribute("data-hot-input")}function v(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=e.ownerDocument,o=n.createRange(),i=n.defaultView.getSelection();c(e,"contenteditable",!0),r&&c(e,...(0,s.A11Y_HIDDEN)()),t&&u(e,"invisibleSelection"),o.selectNodeContents(e),i.removeAllRanges(),i.addRange(o)}function R(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),r.removeAllRanges(),t&&h(e,"invisibleSelection"),e.removeAttribute("contenteditable")}t.HTML_CHARACTERS=f},30369:(e,t)=>{"use strict";t.__esModule=!0,t.isImmediatePropagationStopped=function(e){return!1===e.isImmediatePropagationEnabled},t.isLeftClick=function(e){return 0===e.button},t.isRightClick=function(e){return 2===e.button},t.offsetRelativeTo=function(e,t){const r={x:e.offsetX,y:e.offsetY};let n=e.target;if(!(t instanceof HTMLElement)||n!==t&&n.contains(t))return r;for(;n!==t;)r.x+=n.offsetLeft,r.y+=n.offsetTop,n=n.offsetParent;return r},t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}},6022:(e,t)=>{"use strict";let r;t.__esModule=!0,t.cancelAnimationFrame=function(e){window.cancelAnimationFrame(e)},t.getComparisonFunction=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r)return r;r="object"==typeof Intl?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?(e,t)=>`${e}`.localeCompare(t):(e,t)=>e===t?0:e>t?-1:1;return r},t.isTouchSupported=function(){return"ontouchstart"in window},t.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)}},46029:(e,t,r)=>{"use strict";t.__esModule=!0,t.curry=function(e){const t=e.length;return function r(n){return function(){for(var s=arguments.length,o=new Array(s),i=0;i<s;i++)o[i]=arguments[i];const a=n.concat(o);let l;return l=a.length>=t?e.apply(this,a):r(a),l}}([])},t.curryRight=function(e){const t=e.length;return function r(n){return function(){for(var s=arguments.length,o=new Array(s),i=0;i<s;i++)o[i]=arguments[i];const a=n.concat(o.reverse());let l;return l=a.length>=t?e.apply(this,a):r(a),l}}([])},t.debounce=function(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=null;return function(){for(var s=arguments.length,o=new Array(s),i=0;i<s;i++)o[i]=arguments[i];return n&&clearTimeout(n),n=setTimeout((()=>{t=e.apply(this,o)}),r),t}},t.fastCall=function(e,t,r,n,o,i,a,l){if((0,s.isDefined)(l))return e.call(t,r,n,o,i,a,l);if((0,s.isDefined)(a))return e.call(t,r,n,o,i,a);if((0,s.isDefined)(i))return e.call(t,r,n,o,i);if((0,s.isDefined)(o))return e.call(t,r,n,o);if((0,s.isDefined)(n))return e.call(t,r,n);if((0,s.isDefined)(r))return e.call(t,r);return e.call(t)},t.isFunction=function(e){return"function"==typeof e},t.partial=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return e.apply(this,r.concat(n))}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[s,...o]=t;return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.arrayReduce)(o,((e,t)=>t(e)),s.apply(this,t))}},t.throttle=o,t.throttleAfterHits=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const n=o(e,t);let s=r;function i(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return s?(s-=1,e.apply(this,r)):n.apply(this,r)}return i.clearHits=function(){s=r},i};var n=r(98887),s=r(97639);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=0;const n={lastCallThrottled:!0};let s=null;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];const l=Date.now();let u=!1;n.lastCallThrottled=!0,r||(r=l,u=!0);const h=t-(l-r);return u?(n.lastCallThrottled=!1,e.apply(this,i)):(s&&clearTimeout(s),s=setTimeout((()=>{n.lastCallThrottled=!1,e.apply(this,i),r=0,s=void 0}),h)),n}}},97639:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t._injectProductInfo=function(e,t){const r=!a(e),n="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),o="0.0.0-next-5f253b5-20231108";let i,w="invalid",C="invalid";const v=function(e){let t=[][l],r=t;if(e[l]!==d("Z"))return!1;for(let t="",n="B<H4P+".split(""),s=d(n.shift());s;s=d(n.shift()||"A"))--s<""[l]?r|=(h(`${h(u(t)+(u(c(e,Math.abs(s),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=c(e,s,s?1===n[l]?9:8:6);return r===t}(e=f(e||""));if(r||n||v)if(v){const t=(0,s.default)("31/08/2023","DD/MM/YYYY"),r=Math.floor(t.toDate().getTime()/864e5),n=p(e);i=(0,s.default)(864e5*(n+1),"x").format("MMMM DD, YYYY"),r>n?(w="expired",C="expired"):(w="valid",C="valid")}else n?(w="non_commercial",C="valid"):(w="invalid",C="invalid");else w="missing",C="missing";g()&&(w="valid",C="valid");if(!m&&"valid"!==w){E[w]({keyValidityDate:i,hotVersion:o})&&console["non_commercial"===w?"info":"warn"](E[w]({keyValidityDate:i,hotVersion:o})),m=!0}if("valid"!==C&&t.parentNode){if(y[C]({keyValidityDate:i,hotVersion:o})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=y[C]({keyValidityDate:i,hotVersion:o}),t.parentNode.insertBefore(e,t.nextSibling)}}},t.isDefined=function(e){return void 0!==e},t.isEmpty=a,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isUndefined=i,t.stringify=function(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};var s=n(r(22418)),o=r(45561);function i(e){return void 0===e}function a(e){return null===e||""===e||i(e)}const l="length",u=e=>parseInt(e,16),h=e=>parseInt(e,10),c=(e,t,r)=>e.substr(t,r),d=e=>e.codePointAt(0)-65,f=e=>`${e}`.replace(/\-/g,""),p=e=>u(c(f(e),u("12"),d("F")))/(u(c(f(e),d("B"),~~![][l]))||9),g=()=>"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host);let m=!1;const E={invalid:()=>o.toSingleLine`
921
921
  The license key for Handsontable is invalid.\x20
922
922
  If you need any help, contact us at support@handsontable.com.`,expired:e=>{let{keyValidityDate:t,hotVersion:r}=e;return o.toSingleLine`
923
923
  The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
@@ -948,8 +948,8 @@ s.version="2.29.4",o(Xr),s.fn=uo,s.min=Jr,s.max=en,s.now=tn,s.utc=g,s.unix=ho,s.
948
948
  */(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}var o={languageCode:"en-US",[n.CONTEXTMENU_ITEMS_NO_ITEMS]:"No available options",[n.CONTEXTMENU_ITEMS_ROW_ABOVE]:"Insert row above",[n.CONTEXTMENU_ITEMS_ROW_BELOW]:"Insert row below",[n.CONTEXTMENU_ITEMS_INSERT_LEFT]:"Insert column left",[n.CONTEXTMENU_ITEMS_INSERT_RIGHT]:"Insert column right",[n.CONTEXTMENU_ITEMS_REMOVE_ROW]:["Remove row","Remove rows"],[n.CONTEXTMENU_ITEMS_REMOVE_COLUMN]:["Remove column","Remove columns"],[n.CONTEXTMENU_ITEMS_UNDO]:"Undo",[n.CONTEXTMENU_ITEMS_REDO]:"Redo",[n.CONTEXTMENU_ITEMS_READ_ONLY]:"Read only",[n.CONTEXTMENU_ITEMS_CLEAR_COLUMN]:"Clear column",[n.CONTEXTMENU_ITEMS_ALIGNMENT]:"Alignment",[n.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT]:"Left",[n.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER]:"Center",[n.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT]:"Right",[n.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY]:"Justify",[n.CONTEXTMENU_ITEMS_ALIGNMENT_TOP]:"Top",[n.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE]:"Middle",[n.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM]:"Bottom",[n.CONTEXTMENU_ITEMS_FREEZE_COLUMN]:"Freeze column",[n.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN]:"Unfreeze column",[n.CONTEXTMENU_ITEMS_BORDERS]:"Borders",[n.CONTEXTMENU_ITEMS_BORDERS_TOP]:"Top",[n.CONTEXTMENU_ITEMS_BORDERS_RIGHT]:"Right",[n.CONTEXTMENU_ITEMS_BORDERS_BOTTOM]:"Bottom",[n.CONTEXTMENU_ITEMS_BORDERS_LEFT]:"Left",[n.CONTEXTMENU_ITEMS_REMOVE_BORDERS]:"Remove border(s)",[n.CONTEXTMENU_ITEMS_ADD_COMMENT]:"Add comment",[n.CONTEXTMENU_ITEMS_EDIT_COMMENT]:"Edit comment",[n.CONTEXTMENU_ITEMS_REMOVE_COMMENT]:"Delete comment",[n.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT]:"Read-only comment",[n.CONTEXTMENU_ITEMS_MERGE_CELLS]:"Merge cells",[n.CONTEXTMENU_ITEMS_UNMERGE_CELLS]:"Unmerge cells",[n.CONTEXTMENU_ITEMS_COPY]:"Copy",[n.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS]:["Copy with header","Copy with headers"],[n.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS]:["Copy with group header","Copy with group headers"],[n.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY]:["Copy header only","Copy headers only"],[n.CONTEXTMENU_ITEMS_CUT]:"Cut",[n.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD]:"Insert child row",[n.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD]:"Detach from parent",[n.CONTEXTMENU_ITEMS_HIDE_COLUMN]:["Hide column","Hide columns"],[n.CONTEXTMENU_ITEMS_SHOW_COLUMN]:["Show column","Show columns"],[n.CONTEXTMENU_ITEMS_HIDE_ROW]:["Hide row","Hide rows"],[n.CONTEXTMENU_ITEMS_SHOW_ROW]:["Show row","Show rows"],[n.FILTERS_CONDITIONS_NONE]:"None",[n.FILTERS_CONDITIONS_EMPTY]:"Is empty",[n.FILTERS_CONDITIONS_NOT_EMPTY]:"Is not empty",[n.FILTERS_CONDITIONS_EQUAL]:"Is equal to",[n.FILTERS_CONDITIONS_NOT_EQUAL]:"Is not equal to",[n.FILTERS_CONDITIONS_BEGINS_WITH]:"Begins with",[n.FILTERS_CONDITIONS_ENDS_WITH]:"Ends with",[n.FILTERS_CONDITIONS_CONTAINS]:"Contains",[n.FILTERS_CONDITIONS_NOT_CONTAIN]:"Does not contain",[n.FILTERS_CONDITIONS_GREATER_THAN]:"Greater than",[n.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL]:"Greater than or equal to",[n.FILTERS_CONDITIONS_LESS_THAN]:"Less than",[n.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL]:"Less than or equal to",[n.FILTERS_CONDITIONS_BETWEEN]:"Is between",[n.FILTERS_CONDITIONS_NOT_BETWEEN]:"Is not between",[n.FILTERS_CONDITIONS_AFTER]:"After",[n.FILTERS_CONDITIONS_BEFORE]:"Before",[n.FILTERS_CONDITIONS_TODAY]:"Today",[n.FILTERS_CONDITIONS_TOMORROW]:"Tomorrow",[n.FILTERS_CONDITIONS_YESTERDAY]:"Yesterday",[n.FILTERS_VALUES_BLANK_CELLS]:"Blank cells",[n.FILTERS_DIVS_FILTER_BY_CONDITION]:"Filter by condition",[n.FILTERS_DIVS_FILTER_BY_VALUE]:"Filter by value",[n.FILTERS_LABELS_CONJUNCTION]:"And",[n.FILTERS_LABELS_DISJUNCTION]:"Or",[n.FILTERS_BUTTONS_SELECT_ALL]:"Select all",[n.FILTERS_BUTTONS_CLEAR]:"Clear",[n.FILTERS_BUTTONS_OK]:"OK",[n.FILTERS_BUTTONS_CANCEL]:"Cancel",[n.FILTERS_BUTTONS_PLACEHOLDER_SEARCH]:"Search",[n.FILTERS_BUTTONS_PLACEHOLDER_VALUE]:"Value",[n.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE]:"Second value",[n.CHECKBOX_CHECKED]:"Checked",[n.CHECKBOX_UNCHECKED]:"Unchecked",[n.COLUMN_HEADER_DESCRIPTION_EXPAND_COLUMN]:"Press ENTER to expand column.",[n.COLUMN_HEADER_DESCRIPTION_COLLAPSE_COLUMN]:"Press ENTER to collapse column.",[n.COLUMN_HEADER_DESCRIPTION_SORT_ROWS]:"Press ENTER to change sorting.",[n.COLUMN_HEADER_LABEL_MULTI_COLUMN_SORT_ORDER]:"Multi-column sorting order:",[n.COLUMN_HEADER_LABEL_OPEN_MENU]:"Press CTRL/CMD+ENTER to open menu.",[n.COLUMN_HEADER_LABEL_BEFORE_HIDDEN_COLUMN]:"The next column is hidden.",[n.COLUMN_HEADER_LABEL_AFTER_HIDDEN_COLUMN]:"The previous column is hidden.",[n.ROW_HEADER_DESCRIPTION_EXPAND_ROW]:"Press ENTER to expand row.",[n.ROW_HEADER_DESCRIPTION_COLLAPSE_ROW]:"Press ENTER to collapse row.",[n.ROW_HEADER_LABEL_BEFORE_HIDDEN_ROW]:"The next row is hidden.",[n.ROW_HEADER_LABEL_AFTER_HIDDEN_ROW]:"The previous row is hidden."};t.default=o},48551:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getPhraseFormatters=t.getAll=function(){return a()},t.registerPhraseFormatter=t.register=l;var s=n(r(31056)),o=n(r(65625));const{register:i,getValues:a}=(0,s.default)("phraseFormatters");function l(e,t){i(e,t)}l("pluralize",o.default)},65625:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t){if(Array.isArray(e)&&Number.isInteger(t))return e[t];return e}},19310:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getDefaultLanguageDictionary=function(){return h.default},t.getLanguageDictionary=w,t.getLanguagesDictionaries=function(){return E()},t.getTranslatedPhrase=function(e,t,r){const n=w(e);if(null===n)return null;const s=n[t];if((0,i.isUndefined)(s))return null;const a=function(e,t){let r=e;return(0,o.arrayEach)((0,u.getPhraseFormatters)(),(n=>{r=n(e,t)})),r}(s,r);if(Array.isArray(a))return a[0];return a},t.getValidLanguageCode=function(e){let t=(0,a.normalizeLanguageCode)(e);C(t)||(t=f,(0,a.warnUserAboutLanguageRegistration)(e));return t},t.hasLanguageDictionary=C,t.registerLanguageDictionary=y;var s=r(76163),o=r(98887),i=r(97639),a=r(6415),l=n(r(31056)),u=r(48551),h=n(r(8797));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}const d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497));t.dictionaryKeys=d;const f=h.default.languageCode;t.DEFAULT_LANGUAGE_CODE=f;const{register:p,getItem:g,hasItem:m,getValues:E}=(0,l.default)("languagesDictionaries");function y(e,t){let r=e,n=t;return(0,s.isObject)(e)&&(n=e,r=n.languageCode),function(e,t){e!==f&&(0,a.extendNotExistingKeys)(t,g(f))}(r,n),p(r,(0,s.deepClone)(n)),(0,s.deepClone)(n)}function w(e){return C(e)?(0,s.deepClone)(g(e)):null}function C(e){return m(e)}y(h.default)},6415:(e,t,r)=>{"use strict";t.__esModule=!0,t.createCellHeadersRange=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,[s,o]=[r,n];e>t&&([s,o]=[o,s]);return`${s}-${o}`},t.extendNotExistingKeys=function(e,t){return(0,s.objectEach)(t,((t,r)=>{(0,n.isUndefined)(e[r])&&(e[r]=t)})),e},t.normalizeLanguageCode=function(e){const t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(e);if(t)return`${t[1].toLowerCase()}-${t[2].toUpperCase()}`;return e},t.warnUserAboutLanguageRegistration=function(e){(0,n.isDefined)(e)&&(0,o.error)(i.toSingleLine`Language with code "${e}" was not found. You should register particular language\x20
949
949
  before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)};var n=r(97639),s=r(76163),o=r(31990),i=r(45561)},21709:(e,t,r)=>{"use strict";var n=r(73203);var s=k(r(73421));s.CellCoords,s.CellRange;var o,i,a,l,u,h=r(87396),c=k(r(57340)),d=r(41789),f=n(r(59622)),p=n(r(46998)),g=k(r(65795)),m=k(r(98887)),E=k(r(78498)),y=k(r(56020)),w=k(r(46680)),C=k(r(6022)),v=k(r(46029)),R=k(r(97639)),S=k(r(57691)),T=k(r(76163)),N=k(r(37913)),O=k(r(49223)),M=k(r(49587)),_=k(r(30369)),A=r(16691),b=r(36996),I=r(59340),x=r(79321),L=r(5280),P=r(33997);function D(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(D=function(e){return e?r:t})(e)}function k(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=D(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(0,h.registerAllModules)(),(0,f.default)(s.default),s.default.__GhostTable=p.default,s.default._getListenersCounter=c.getListenersCounter,s.default._getRegisteredMapsCounter=d.getRegisteredMapsCounter,s.default.EventManager=c.default;const H=[m,E,y,w,C,v,R,S,T,N,O,g],F=[M,_];s.default.helper={},s.default.dom={},m.arrayEach(H,(e=>{m.arrayEach(Object.getOwnPropertyNames(e),(t=>{"_"!==t.charAt(0)&&(s.default.helper[t]=e[t])}))})),m.arrayEach(F,(e=>{m.arrayEach(Object.getOwnPropertyNames(e),(t=>{"_"!==t.charAt(0)&&(s.default.dom[t]=e[t])}))})),s.default.cellTypes=null!==(o=s.default.cellTypes)&&void 0!==o?o:{},m.arrayEach((0,x.getRegisteredCellTypeNames)(),(e=>{s.default.cellTypes[e]=(0,x.getCellType)(e)})),s.default.cellTypes.registerCellType=x.registerCellType,s.default.cellTypes.getCellType=x.getCellType,s.default.editors=null!==(i=s.default.editors)&&void 0!==i?i:{},m.arrayEach((0,A.getRegisteredEditorNames)(),(e=>{s.default.editors[`${N.toUpperCaseFirst(e)}Editor`]=(0,A.getEditor)(e)})),s.default.editors.registerEditor=A.registerEditor,s.default.editors.getEditor=A.getEditor,s.default.renderers=null!==(a=s.default.renderers)&&void 0!==a?a:{},m.arrayEach((0,b.getRegisteredRendererNames)(),(e=>{const t=(0,b.getRenderer)(e);"base"===e&&(s.default.renderers.cellDecorator=t),s.default.renderers[`${N.toUpperCaseFirst(e)}Renderer`]=t})),s.default.renderers.registerRenderer=b.registerRenderer,s.default.renderers.getRenderer=b.getRenderer,s.default.validators=null!==(l=s.default.validators)&&void 0!==l?l:{},m.arrayEach((0,I.getRegisteredValidatorNames)(),(e=>{s.default.validators[`${N.toUpperCaseFirst(e)}Validator`]=(0,I.getValidator)(e)})),s.default.validators.registerValidator=I.registerValidator,s.default.validators.getValidator=I.getValidator,s.default.plugins=null!==(u=s.default.plugins)&&void 0!==u?u:{},m.arrayEach((0,L.getPluginsNames)(),(e=>{s.default.plugins[e]=(0,L.getPlugin)(e)})),s.default.plugins[`${N.toUpperCaseFirst(P.BasePlugin.PLUGIN_KEY)}Plugin`]=P.BasePlugin,s.default.plugins.registerPlugin=L.registerPlugin,s.default.plugins.getPlugin=L.getPlugin;var U=s.default;t.default=U},94136:(e,t,r)=>{"use strict";t.__esModule=!0,r(95988);var n=r(98887),s=r(76163);const o={_hooksStorage:Object.create(null),addHook(e,t){return this._hooksStorage[e]||(this._hooksStorage[e]=[]),this.hot.addHook(e,t),this._hooksStorage[e].push(t),this},removeHooksByKey(e){(0,n.arrayEach)(this._hooksStorage[e]||[],(t=>{this.hot.removeHook(e,t)}))},clearHooks(){(0,s.objectEach)(this._hooksStorage,((e,t)=>this.removeHooksByKey(t))),this._hooksStorage={}}};(0,s.defineGetter)(o,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});var i=o;t.default=i},63806:(e,t,r)=>{"use strict";t.__esModule=!0,r(95988);var n=r(76163),s=r(46029);const o={_localHooks:Object.create(null),addLocalHook(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks(e,t,r,n,o,i,a){if(this._localHooks[e]){const l=this._localHooks[e].length;for(let u=0;u<l;u++)(0,s.fastCall)(this._localHooks[e][u],this,t,r,n,o,i,a)}},clearLocalHooks(){return this._localHooks={},this}};(0,n.defineGetter)(o,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});var i=o;t.default=i},54925:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(98887),i=r(76163),a=r(37913),l=r(31990),u=r(45561),h=r(46029);const c=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","afterRowSequenceChange","beforeViewportScrollVertically","beforeViewportScrollHorizontally","beforeViewportScroll","afterScrollHorizontally","afterScrollVertically","afterScroll","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeViewRender","afterViewRender","beforeRender","afterRender","beforeRowWrap","beforeColumnWrap","beforeSetCellMeta","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeSelectionHighlightSet","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyFocusedElement","modifyRowHeader","modifyRowHeight","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyFocusOnTabNavigation","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","persistentStateLoad","persistentStateReset","persistentStateSave","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnFreeze","afterColumnFreeze","beforeColumnMove","afterColumnMove","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","modifyColumnHeaderValue","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","modifyTransformStart","modifyTransformEnd","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],d=u.toSingleLine`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
950
950
  Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
951
- learn about the migration path.`,f=new Map([["modifyRow","8.0.0"],["modifyCol","8.0.0"],["unmodifyRow","8.0.0"],["unmodifyCol","8.0.0"],["skipLengthCache","8.0.0"],["hiddenColumn","8.0.0"],["hiddenRow","8.0.0"]]),p=new Map([[]]);class g{static getSingleton(){return m}constructor(){(0,s.default)(this,"globalBucket",void 0),this.globalBucket=this.createEmptyBucket()}createEmptyBucket(){const e=Object.create(null);return(0,o.arrayEach)(c,(t=>e[t]=[])),e}getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))(0,o.arrayEach)(t,(t=>this.add(e,t,r)));else{f.has(e)&&(0,l.warn)((0,a.substitute)(d,{hookName:e,removedInVersion:f.get(e)})),p.has(e)&&(0,l.warn)(p.get(e));const n=this.getBucket(r);if(void 0===n[e]&&(this.register(e),n[e]=[]),t.skip=!1,-1===n[e].indexOf(t)){let r=!1;t.initialHook&&(0,o.arrayEach)(n[e],((s,o)=>{if(s.initialHook)return n[e][o]=t,r=!0,!1})),r||n[e].push(t)}}return this}once(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?(0,o.arrayEach)(t,(t=>this.once(e,t,r))):(t.runOnce=!0,this.add(e,t,r))}remove(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=this.getBucket(r);return void 0!==n[e]&&n[e].indexOf(t)>=0&&(t.skip=!0,!0)}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=this.getBucket(t);return!(void 0===r[e]||!r[e].length)}run(e,t,r,n,s,o,i,a){{const l=this.globalBucket[t],u=l?l.length:0;let c=0;if(u)for(;c<u;){if(!l[c]||l[c].skip){c+=1;continue}const u=(0,h.fastCall)(l[c],e,r,n,s,o,i,a);void 0!==u&&(r=u),l[c]&&l[c].runOnce&&this.remove(t,l[c]),c+=1}}{const l=this.getBucket(e)[t],u=l?l.length:0;let c=0;if(u)for(;c<u;){if(!l[c]||l[c].skip){c+=1;continue}const u=(0,h.fastCall)(l[c],e,r,n,s,o,i,a);void 0!==u&&(r=u),l[c]&&l[c].runOnce&&this.remove(t,l[c],e),c+=1}}return r}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,i.objectEach)(this.getBucket(e),((e,t,r)=>r[t].length=0))}register(e){this.isRegistered(e)||c.push(e)}deregister(e){this.isRegistered(e)&&c.splice(c.indexOf(e),1)}isDeprecated(e){return p.has(e)||f.has(e)}isRegistered(e){return c.indexOf(e)>=0}getRegistered(){return c}}const m=new g;var E=g;t.default=E},6671:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=n(r(48427)),i=n(r(42538)),a=r(33997),l=r(98887),u=r(6022),h=n(r(46998)),c=n(r(54925)),d=r(76163),f=r(57691),p=n(r(30240)),g=r(37913),m=r(94699),E=r(41789),y=r(97639);function w(e,t){C(e,t),t.add(e)}function C(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}c.default.getSingleton().register("modifyAutoColumnSizeSeed");const R="autoColumnSize";t.PLUGIN_KEY=R;t.PLUGIN_PRIORITY=10;var S=new WeakMap,T=new WeakSet,N=new WeakSet,O=new WeakSet,M=new WeakSet,_=new WeakSet,A=new WeakSet;class b extends a.BasePlugin{static get PLUGIN_KEY(){return R}static get PLUGIN_PRIORITY(){return 10}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}constructor(e){var t,r,n;super(e),w(this,A),w(this,_),w(this,M),w(this,O),w(this,N),w(this,T),(0,s.default)(this,"ghostTable",new h.default(this.hot)),(0,s.default)(this,"samplesGenerator",new p.default(((e,t)=>{const r=this.hot.getCellMeta(e,t);let n="";r.spanned||(n=this.hot.getDataAtCell(e,t));let s="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(s=this.hot.runHooks("modifyAutoColumnSizeSeed",s,r,n)),{value:n,bundleSeed:s}}))),(0,s.default)(this,"firstCalculation",!0),(0,s.default)(this,"inProgress",!1),(0,s.default)(this,"measuredColumns",0),(0,s.default)(this,"columnWidthsMap",new E.PhysicalIndexToValueMap),n={writable:!0,value:[]},C(t=this,r=S),r.set(t,n),this.hot.columnIndexMapper.registerMap("autoColumnSize",this.columnWidthsMap),this.addHook("beforeColumnResize",((e,t,r)=>v(this,M,P).call(this,e,t,r)))}isEnabled(){return!1!==this.hot.getSettings()[R]&&!this.hot.getSettings().colWidths}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[R];t&&null!==t.useHeaders&&void 0!==t.useHeaders&&this.ghostTable.setSetting("useHeaders",t.useHeaders),this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v(e,N,x).call(e,...r)})),this.addHook("beforeChangeRender",(e=>v(this,O,L).call(this,e))),this.addHook("afterFormulasValuesUpdate",(e=>v(this,A,k).call(this,e))),this.addHook("beforeViewRender",(e=>v(this,T,I).call(this,e))),this.addHook("modifyColWidth",((e,t)=>this.getColumnWidth(t,e))),this.addHook("afterInit",(()=>v(this,_,D).call(this))),super.enablePlugin()}updatePlugin(){const e=this.findColumnsWhereHeaderWasChanged();e.length&&(this.clearCache(e),this.calculateVisibleColumnsWidth()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",((e,t,r)=>v(this,M,P).call(this,e,t,r)))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const e=this.hot.renderCall,t=this.getFirstVisibleColumn(),r=this.getLastVisibleColumn();-1!==t&&-1!==r&&this.calculateColumnsWidth({from:t,to:r},void 0,e)}calculateColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n="number"==typeof e?{from:e,to:e}:e,s="number"==typeof t?{from:t,to:t}:t;(0,f.rangeEach)(n.from,n.to,(e=>{let t=this.hot.toPhysicalColumn(e);if(null===t&&(t=e),r||null===this.columnWidthsMap.getValueAtIndex(t)&&!this.hot._getColWidthFromSettings(t)){const t=this.samplesGenerator.generateColumnSamples(e,s);(0,l.arrayEach)(t,(e=>{let[t,r]=e;return this.ghostTable.addColumn(t,r)}))}})),this.ghostTable.columns.length&&(this.hot.batchExecution((()=>{this.ghostTable.getWidths(((e,t)=>{const r=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(r,t)}))}),!0),this.measuredColumns=n.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=0;const r=this.hot.countCols()-1;let n=null;this.inProgress=!0;const s=()=>{if(!this.hot)return(0,u.cancelAnimationFrame)(n),void(this.inProgress=!1);this.calculateColumnsWidth({from:t,to:Math.min(t+b.CALCULATION_STEP,r)},e),t=t+b.CALCULATION_STEP+1,t<r?n=(0,u.requestAnimationFrame)(s):((0,u.cancelAnimationFrame)(n),this.inProgress=!1,this.hot.view.adjustElementsSize())},o=this.getSyncCalculationLimit();this.firstCalculation&&o>=0&&(this.calculateColumnsWidth({from:0,to:o},e),this.firstCalculation=!1,t=o+1),t<r?s():this.inProgress=!1}setSamplingOptions(){const e=this.hot.getSettings()[R],t=e&&(0,d.hasOwnProperty)(e,"samplingRatio")?e.samplingRatio:void 0,r=e&&(0,d.hasOwnProperty)(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),r&&this.samplesGenerator.setAllowDuplicates(r)}recalculateAllColumnsWidth(){this.hot.view&&this.hot.view._wt.wtTable.isVisible()&&(this.clearCache(),this.calculateAllColumnsWidth())}getSyncCalculationLimit(){const e=this.hot.getSettings()[R];let t=b.SYNC_CALCULATION_LIMIT;const r=this.hot.countCols()-1;return(0,d.isObject)(e)&&(t=e.syncLimit,(0,g.isPercentValue)(t)?t=(0,f.valueAccordingPercent)(r,t):t>>=0),Math.min(t,r)}getColumnWidth(e){let t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return void 0===r&&(r=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e)),t&&"number"==typeof r&&(r=Math.max(r,m.ViewportColumnsCalculator.DEFAULT_WIDTH))),r}getFirstVisibleColumn(){const e=this.hot.view._wt;if(e.wtViewport.columnsVisibleCalculator){const t=e.wtTable.getFirstVisibleColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}if(e.wtViewport.columnsRenderCalculator){const t=e.wtTable.getFirstRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}getLastVisibleColumn(){const e=this.hot.view._wt;if(e.wtViewport.columnsVisibleCalculator){const t=e.wtTable.getLastVisibleColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}if(e.wtViewport.columnsRenderCalculator){const t=e.wtTable.getLastRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}findColumnsWhereHeaderWasChanged(){const e=this.hot.getColHeader();return(0,l.arrayReduce)(e,((e,t,r)=>{const n=(0,i.default)(this,S).length;return(n-1<r||(0,i.default)(this,S)[r]!==t)&&e.push(r),n-1<r?(0,i.default)(this,S).push(t):(0,i.default)(this,S)[r]=t,e}),[])}clearCache(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.length?this.hot.batchExecution((()=>{(0,l.arrayEach)(e,(e=>{this.columnWidthsMap.setValueAtIndex(e,null)}))}),!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!(0,l.arrayFilter)(this.columnWidthsMap.getValues().slice(0,this.measuredColumns),(e=>null===e)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function I(){this.calculateVisibleColumnsWidth(),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth()}function x(){this.hot.view?this.recalculateAllColumnsWidth():setTimeout((()=>{this.hot&&this.recalculateAllColumnsWidth()}),0)}function L(e){const t=(0,l.arrayMap)(e,(e=>{let[,t]=e;return this.hot.toPhysicalColumn(this.hot.propToCol(t))}));this.clearCache(Array.from(new Set(t)))}function P(e,t,r){let n=e;return r&&(this.calculateColumnsWidth(t,void 0,!0),n=this.getColumnWidth(t,void 0,!1)),n}function D(){(0,o.default)(this,S,this.hot.getColHeader())}function k(e){const t=(0,l.arrayFilter)(e,(e=>{var t;return(0,y.isDefined)(null===(t=e.address)||void 0===t?void 0:t.col)})),r=(0,l.arrayMap)(t,(e=>e.address.col));this.clearCache(Array.from(new Set(r)))}t.AutoColumnSize=b},87070:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(6671);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.AutoColumnSize=n.AutoColumnSize},49737:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(33997),i=r(98887),a=r(6022),l=r(49587),u=n(r(46998)),h=r(76163),c=r(57691),d=n(r(30240)),f=r(37913),p=r(41789);function g(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function m(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const E="autoRowSize";t.PLUGIN_KEY=E;t.PLUGIN_PRIORITY=40;var y=new WeakSet,w=new WeakSet,C=new WeakSet,v=new WeakSet;class R extends o.BasePlugin{static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return 40}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(e){super(e),g(this,v),g(this,C),g(this,w),g(this,y),(0,s.default)(this,"headerHeight",null),(0,s.default)(this,"ghostTable",new u.default(this.hot)),(0,s.default)(this,"samplesGenerator",new d.default(((e,t)=>{if(e>=0&&t>=0){if(this.hot.getCellMeta(e,t).hidden)return!1}let r;return e>=0?r=this.hot.getDataAtCell(e,t):-1===e&&(r=this.hot.getColHeader(t)),{value:r}}))),(0,s.default)(this,"firstCalculation",!0),(0,s.default)(this,"inProgress",!1),(0,s.default)(this,"measuredRows",0),(0,s.default)(this,"rowHeightsMap",new p.PhysicalIndexToValueMap),this.hot.rowIndexMapper.registerMap("autoRowSize",this.rowHeightsMap),this.addHook("beforeRowResize",((e,t,r)=>m(this,w,T).call(this,e,t,r)))}isEnabled(){const e=this.hot.getSettings()[E];return!0===e||(0,h.isObject)(e)}enablePlugin(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m(e,C,N).call(e,...r)})),this.addHook("beforeChangeRender",(e=>m(this,v,O).call(this,e))),this.addHook("beforeColumnResize",(()=>this.recalculateAllRowsHeight())),this.addHook("beforeViewRender",(e=>m(this,y,S).call(this,e))),this.addHook("modifyRowHeight",((e,t)=>this.getRowHeight(t,e))),this.addHook("modifyColumnHeaderHeight",(()=>this.getColumnHeaderHeight())),super.enablePlugin())}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",((e,t,r)=>m(this,w,T).call(this,e,t,r)))}calculateRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n="number"==typeof e?{from:e,to:e}:e,s="number"==typeof t?{from:t,to:t}:t;if(null!==this.hot.getColHeader(0)){const e=this.samplesGenerator.generateRowSamples(-1,s);this.ghostTable.addColumnHeadersRow(e.get(-1))}(0,c.rangeEach)(n.from,n.to,(e=>{if(r||null===this.rowHeightsMap.getValueAtIndex(e)){const t=this.samplesGenerator.generateRowSamples(e,s);(0,i.arrayEach)(t,(e=>{let[t,r]=e;return this.ghostTable.addRow(t,r)}))}})),this.ghostTable.rows.length&&(this.hot.batchExecution((()=>{this.ghostTable.getHeights(((e,t)=>{e<0?this.headerHeight=t:this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(e),t)}))}),!0),this.measuredRows=n.to+1,this.ghostTable.clean())}calculateAllRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=0;const r=this.hot.countRows()-1;let n=null;this.inProgress=!0;const s=()=>{if(!this.hot)return(0,a.cancelAnimationFrame)(n),void(this.inProgress=!1);this.calculateRowsHeight({from:t,to:Math.min(t+R.CALCULATION_STEP,r)},e),t=t+R.CALCULATION_STEP+1,t<r?n=(0,a.requestAnimationFrame)(s):((0,a.cancelAnimationFrame)(n),this.inProgress=!1,this.hot.view.adjustElementsSize(!0),this.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender&&this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw())},o=this.getSyncCalculationLimit();this.firstCalculation&&o>=0&&(this.calculateRowsHeight({from:0,to:o},e),this.firstCalculation=!1,t=o+1),t<r?s():(this.inProgress=!1,this.hot.view.adjustElementsSize(!1))}setSamplingOptions(){const e=this.hot.getSettings()[E],t=e&&(0,h.hasOwnProperty)(e,"samplingRatio")?e.samplingRatio:void 0,r=e&&(0,h.hasOwnProperty)(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),r&&this.samplesGenerator.setAllowDuplicates(r)}recalculateAllRowsHeight(){(0,l.isVisible)(this.hot.view._wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllRowsHeight())}getSyncCalculationLimit(){const e=this.hot.getSettings()[E];let t=R.SYNC_CALCULATION_LIMIT;const r=this.hot.countRows()-1;return(0,h.isObject)(e)&&(t=e.syncLimit,(0,f.isPercentValue)(t)?t=(0,c.valueAccordingPercent)(r,t):t>>=0),Math.min(t,r)}getRowHeight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const r=e<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(e));let n=t;return null!==r&&r>(t||0)&&(n=r),n}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){const e=this.hot.view._wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getFirstVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getFirstRenderedRow():-1}getLastVisibleRow(){const e=this.hot.view._wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getLastVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getLastRenderedRow():-1}clearCache(){this.headerHeight=null,this.rowHeightsMap.init()}clearCacheByRange(e){const{from:t,to:r}="number"==typeof e?{from:e,to:e}:e;this.hot.batchExecution((()=>{(0,c.rangeEach)(Math.min(t,r),Math.max(t,r),(e=>{this.rowHeightsMap.setValueAtIndex(e,null)}))}),!0)}isNeedRecalculate(){return!!(0,i.arrayFilter)(this.rowHeightsMap.getValues().slice(0,this.measuredRows),(e=>null===e)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function S(){const e=this.hot.renderCall,t=this.hot.getSettings().fixedRowsBottom,r=this.getFirstVisibleRow(),n=this.getLastVisibleRow();if(-1!==r&&-1!==n){if(this.calculateRowsHeight({from:r,to:n},void 0,e),t){const e=this.hot.countRows()-1;this.calculateRowsHeight({from:e-t,to:e})}this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()}}function T(e,t,r){let n=e;return r&&(this.calculateRowsHeight(t,void 0,!0),n=this.getRowHeight(t)),n}function N(){this.hot.view?this.recalculateAllRowsHeight():this.hot._registerTimeout((()=>{this.hot&&this.recalculateAllRowsHeight()}))}function O(e){let t=null;1===e.length?t=e[0][0]:e.length>1&&(t={from:e[0][0],to:e[e.length-1][0]}),null!==t&&this.clearCacheByRange(t)}t.AutoRowSize=R},12987:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(49737);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.AutoRowSize=n.AutoRowSize},31422:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(33997),i=n(r(54925)),a=r(49587),l=r(98887),u=r(34488);function h(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}i.default.getSingleton().register("modifyAutofillRange"),i.default.getSingleton().register("beforeAutofill"),i.default.getSingleton().register("afterAutofill");const d="autofill";t.PLUGIN_KEY=d;t.PLUGIN_PRIORITY=20;const f=["fillHandle"];var p=new WeakSet,g=new WeakSet,m=new WeakSet,E=new WeakSet,y=new WeakSet;class w extends o.BasePlugin{constructor(){super(...arguments),h(this,y),h(this,E),h(this,m),h(this,g),h(this,p),(0,s.default)(this,"addingStarted",!1),(0,s.default)(this,"mouseDownOnCellCorner",!1),(0,s.default)(this,"mouseDragOutside",!1),(0,s.default)(this,"handleDraggedCells",0),(0,s.default)(this,"directions",[]),(0,s.default)(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return 20}static get SETTING_KEYS(){return[d,...f]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",(e=>c(this,g,v).call(this,e))),this.addHook("afterOnCellCornerDblClick",(e=>c(this,p,C).call(this,e))),this.addHook("beforeOnCellMouseOver",((e,t)=>c(this,m,R).call(this,t))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(){const e=this.hot.getSelectedRangeLast(),{row:t,col:r}=e.getTopStartCorner(),{row:n,col:s}=e.getBottomEndCorner(),o=this.hot.runHooks("modifyCopyableRange",[{startRow:t,startCol:r,endRow:n,endCol:s}]),i=[],a=[],u=[];return(0,l.arrayEach)(o,(e=>{for(let t=e.startRow;t<=e.endRow;t+=1)-1===i.indexOf(t)&&i.push(t);for(let t=e.startCol;t<=e.endCol;t+=1)-1===a.indexOf(t)&&a.push(t)})),(0,l.arrayEach)(i,(e=>{const t=[];(0,l.arrayEach)(a,(r=>{t.push(this.hot.getCopyableData(e,r))})),u.push(t)})),u}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[e,t,r,n]=this.hot.selection.highlight.getFill().getVisualCorners(),s=this.hot.getSelectedRangeLast(),o=s.getTopStartCorner(),i=s.getBottomEndCorner();this.resetSelectionOfDraggedArea();const a=[o.row,o.col,i.row,i.col],l=this.hot.runHooks("modifyAutofillRange",[Math.min(o.row,e),Math.min(o.col,t),Math.max(i.row,r),Math.max(i.col,n)],a),{directionOfDrag:h,startOfDragCoords:c,endOfDragCoords:d}=(0,u.getDragDirectionAndRange)(a,l,((e,t)=>this.hot._createCellCoords(e,t)));if(c&&c.row>-1&&c.col>-1){const e=this.getSelectionData(),t=s.clone(),r=this.hot._createCellRange(c,c,d),n=this.hot.runHooks("beforeAutofill",e,t,r,h);if(!1===n)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let o=n;const i=n;if(["up","left"].indexOf(h)>-1&&(1!==i.length||0!==i[0].length))if(o=[],"up"===h){const e=d.row-c.row+1,t=e%i.length;for(let r=0;r<e;r++)o.push(i[(r+(i.length-t))%i.length])}else{const e=d.col-c.col+1,t=e%i[0].length;for(let r=0;r<i.length;r++){o.push([]);for(let n=0;n<e;n++)o[r].push(i[r][(n+(i[r].length-t))%i[r].length])}}this.hot.populateFromArray(c.row,c.col,o,d.row,d.col,`${this.pluginName}.fill`,null),this.setSelection(l),this.hot.runHooks("afterAutofill",o,t,r,h),this.hot.render()}else this.hot._refreshBorders();return!0}reduceSelectionAreaIfNeeded(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e}getCoordsOfDragAndDropBorders(e){const t=this.hot.getSelectedRangeLast(),r=t.getBottomEndCorner();let n=e;if(this.directions.includes(u.DIRECTIONS.vertical)&&this.directions.includes(u.DIRECTIONS.horizontal)){const s=t.getTopStartCorner();(r.col<=e.col||s.col>=e.col)&&(n=this.hot._createCellCoords(r.row,e.col)),(r.row<e.row||s.row>e.row)&&(n=this.hot._createCellCoords(e.row,r.col))}else if(this.directions.includes(u.DIRECTIONS.vertical))n=this.hot._createCellCoords(e.row,r.col);else{if(!this.directions.includes(u.DIRECTIONS.horizontal))return;n=this.hot._createCellCoords(r.row,e.col)}return this.reduceSelectionAreaIfNeeded(n)}showBorder(e){const t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}addRow(){this.hot._registerTimeout((()=>{this.hot.alter("insert_row_below",void 0,1,`${this.pluginName}.fill`),this.addingStarted=!1}),200)}addNewRowIfNeeded(){if(!this.hot.selection.highlight.getFill().isEmpty()&&!1===this.addingStarted&&this.autoInsertRow){const e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getVisualCorners(),r=this.hot.countRows();e[2]<r-1&&t[2]===r-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(e){const t=this.hot.getData(),r=this.hot.countRows();let n;for(let s=e[2]+1;s<r;s++){for(let r=e[1];r<=e[3];r++){if(t[s][r])return-1}const r=t[s][e[1]-1],o=t[s][e[3]+1];(r||o)&&(n=s)}return n}addSelectionFromStartAreaToSpecificRowIndex(e,t){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(e[0],e[1])).add(this.hot._createCellCoords(t,e[3])).commit()}setSelection(e){this.hot.selectCell(...(0,l.arrayMap)(e,(e=>Math.max(e,0))),!1,!1)}selectAdjacent(){const e=this.hot.getSelectedLast(),t=this.getIndexOfLastAdjacentFilledInRow(e);return-1!==t&&void 0!==t&&(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(e){const{documentElement:t}=this.hot.rootDocument,r=(0,a.offset)(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+(0,a.outerHeight)(this.hot.table),n=(0,a.offset)(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+(0,a.outerWidth)(this.hot.table);return e.clientY>r&&e.clientX<=n}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",(()=>c(this,E,S).call(this))),this.eventManager.addEventListener(e,"mousemove",(e=>c(this,y,T).call(this,e)))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const e=(0,u.getMappedFillHandleSetting)(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}destroy(){super.destroy()}}function C(){this.selectAdjacent()&&this.fillIn()}function v(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function R(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}function S(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function T(e){const t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&t?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}t.Autofill=w},56996:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(31422);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.Autofill=n.Autofill},34488:(e,t,r)=>{"use strict";t.__esModule=!0,t.getDragDirectionAndRange=function(e,t,r){let n,s,o;t[0]===e[0]&&t[1]<e[1]?(o="left",n=r(t[0],t[1]),s=r(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(o="right",n=r(t[0],e[3]+1),s=r(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(o="up",n=r(t[0],t[1]),s=r(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(o="down",n=r(e[2]+1,t[1]),s=r(t[2],t[3]));n&&n.normalize();s&&s.normalize();return{directionOfDrag:o,startOfDragCoords:n,endOfDragCoords:s}},t.getMappedFillHandleSetting=function(e){const t={};!0===e?(t.directions=Object.keys(o),t.autoInsertRow=!0):(0,n.isObject)(e)?((0,s.isDefined)(e.autoInsertRow)?e.direction===o.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,(0,s.isDefined)(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(o)):"string"==typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1);return t};var n=r(76163),s=r(97639);const o={horizontal:"horizontal",vertical:"vertical"};t.DIRECTIONS=o},46462:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=n(r(42538)),i=r(76163),a=r(98887),l=r(5280),u=r(79321),h=r(16691),c=r(36996),d=r(59340),f=n(r(57340));function p(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}const g=new Map([["plugin",l.hasPlugin],["cell-type",u.hasCellType],["editor",h.hasEditor],["renderer",c.hasRenderer],["validator",d.hasValidator]]),m="base";t.PLUGIN_KEY=m;const E=[];let y=null;var w=new WeakMap,C=new WeakSet;function v(e){if(!e)return!1;const t=this.constructor.SETTING_KEYS;if("boolean"==typeof t)return t;for(let r=0;r<t.length;r++)if(void 0!==e[t[r]])return!0;return!1}t.BasePlugin=class{static get PLUGIN_KEY(){return m}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}constructor(e){var t,r;p(t=this,r=C),r.add(t),(0,s.default)(this,"eventManager",new f.default(this)),(0,s.default)(this,"pluginName",null),(0,s.default)(this,"pluginsInitializedCallbacks",[]),(0,s.default)(this,"isPluginsReady",!1),(0,s.default)(this,"enabled",!1),(0,s.default)(this,"initialized",!1),function(e,t,r){p(e,t),t.set(e,r)}(this,w,{writable:!0,value:{}}),(0,i.defineGetter)(this,"hot",e,{writable:!1}),y=null,this.hot.addHook("afterPluginsInitialized",(()=>this.onAfterPluginsInitialized())),this.hot.addHook("afterUpdateSettings",(e=>this.onUpdateSettings(e))),this.hot.addHook("beforeInit",(()=>this.init()))}init(){this.pluginName=this.hot.getPluginName(this);const e=this.constructor.PLUGIN_DEPS,t=Array.isArray(e)?e:[];if(t.length>0){const e=[];if(t.forEach((t=>{const[r,n]=t.split(":");if(!g.has(r))throw new Error(`Unknown plugin dependency type "${r}" was found.`);g.get(r)(n)||e.push(` - ${n} (${r})`)})),e.length>0){const t=[`The ${this.pluginName} plugin requires the following modules:\n`,`${e.join("\n")}\n`].join("");E.push(t)}}y||(y=(0,l.getPluginsNames)()),y.indexOf("UndoRedo")>=0&&y.splice(y.indexOf("UndoRedo"),1),y.indexOf(this.pluginName)>=0&&y.splice(y.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",(()=>{this.isEnabled&&this.isEnabled()&&this.enablePlugin()}));if(0===y.length){if(E.length>0){const e=[`${E.join("\n")}\n`,"You have to import and register them manually."].join("");throw new Error(e)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}enablePlugin(){this.enabled=!0}disablePlugin(){this.eventManager&&this.eventManager.clear(),this.clearHooks(),this.enabled=!1}addHook(e,t){(0,o.default)(this,w)[e]=(0,o.default)(this,w)[e]||[];const r=(0,o.default)(this,w)[e];this.hot.addHook(e,t),r.push(t),(0,o.default)(this,w)[e]=r}removeHooks(e){(0,a.arrayEach)((0,o.default)(this,w)[e]||[],(t=>{this.hot.removeHook(e,t)}))}clearHooks(){const e=(0,o.default)(this,w);(0,i.objectEach)(e,((e,t)=>this.removeHooks(t))),e.length=0}callOnPluginsReady(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}onAfterPluginsInitialized(){(0,a.arrayEach)(this.pluginsInitializedCallbacks,(e=>e())),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(e){const t=function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,C,v).call(this,e);this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&t&&this.updatePlugin(e))}updatePlugin(){}destroy(){this.eventManager&&this.eventManager.destroy(),this.clearHooks(),(0,i.objectEach)(this,((e,t)=>{"hot"!==t&&(this[t]=null)})),delete this.t,delete this.hot}}},33997:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(46462);t.PLUGIN_KEY=n.PLUGIN_KEY,t.BasePlugin=n.BasePlugin},14027:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(33997),i=n(r(50998)),a=n(r(27862));function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}const u="bindRowsWithHeaders";t.PLUGIN_KEY=u;t.PLUGIN_PRIORITY=210;const h=new Map([["loose",i.default],["strict",a.default]]);var c=new WeakSet;class d extends o.BasePlugin{constructor(){super(...arguments),l(this,c),(0,s.default)(this,"headerIndexes",null)}static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return 210}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){if(this.enabled)return;let e=this.hot.getSettings()[u];"string"!=typeof e&&(e="loose");const t=h.get(e);this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",(e=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,c,f).call(this,e))),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}}function f(e){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(e))}t.BindRowsWithHeaders=d},26298:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(14027);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.BindRowsWithHeaders=n.BindRowsWithHeaders},50998:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(41789);const{getListWithInsertedItems:s,getListWithRemovedItems:o}=(0,n.alterUtilsFactory)("physicallyIndexed");class i extends n.IndexMap{constructor(){super((e=>e))}insert(e,t){const r=(0,n.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=s(r,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=o(this.indexedValues,e);this.indexedValues=(0,n.getDecreasedIndexes)(t,e),super.remove(e)}}var a=i;t.default=a},27862:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(41789);const{getListWithInsertedItems:s,getListWithRemovedItems:o}=(0,n.alterUtilsFactory)("physicallyIndexed");class i extends n.IndexMap{constructor(){super((e=>e))}insert(e,t){this.indexedValues=s(this.indexedValues,e,t,((e,t)=>this.getNextValue(t))),super.insert(e,t)}remove(e){this.indexedValues=o(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}}var a=i;t.default=a},82295:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=n(r(42538)),i=n(r(48427)),a=r(33997),l=r(98887),u=r(57691),h=r(31990),c=r(49587),d=r(30369),f=r(66862),p=r(497);function g(e,t){m(e,t),t.add(e)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function E(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const y="collapsibleColumns";t.PLUGIN_KEY=y;t.PLUGIN_PRIORITY=290;const w=["nestedHeaders"],C="collapsibleIndicator",v=y,R=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var S=new WeakMap,T=new WeakSet,N=new WeakSet,O=new WeakSet,M=new WeakSet;class _ extends a.BasePlugin{constructor(){var e,t,r;super(...arguments),g(this,M),g(this,O),g(this,N),g(this,T),(0,s.default)(this,"nestedHeadersPlugin",null),(0,s.default)(this,"headerStateManager",null),r={writable:!0,value:null},m(e=this,t=S),t.set(e,r)}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return 290}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[y,...w]}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||(0,h.warn)("You need to configure the Nested Headers plugin in order to use collapsible headers."),(0,i.default)(this,S,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",(()=>E(this,O,I).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E(e,M,x).call(e,...r)})),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E(e,T,A).call(e,...r)})),this.addHook("beforeOnCellMouseDown",((e,t,r)=>E(this,N,b).call(this,e,t,r))),this.registerShortcuts(),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){const{collapsibleColumns:e}=this.hot.getSettings();"boolean"==typeof e?this.headerStateManager.mapState((e=>({collapsible:e.origColspan>1}))):Array.isArray(e)&&(this.headerStateManager.mapState((()=>({collapsible:!1}))),this.headerStateManager.mergeStateWith(e))}super.updatePlugin()}}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),(0,i.default)(this,S,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{var e;const{row:t,col:r}=this.hot.getSelectedRangeLast().highlight,{collapsible:n,isCollapsed:s,columnIndex:o}=null!==(e=this.headerStateManager.getHeaderTreeNodeData(t,r))&&void 0!==e?e:{};n&&(s?this.expandSection({row:t,col:o}):this.collapseSection({row:t,col:o}))},runOnlyIf:()=>{var e;return null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader()},group:v})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(v)}clearButtons(){if(!this.hot.view)return;const e=this.hot.view._wt.getSetting("columnHeaders").length,t=this.hot.view._wt.wtTable.THEAD,r=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,n=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,s=function(e){e&&e.parentNode.removeChild(e)};(0,u.rangeEach)(0,e-1,(e=>{const o=t.childNodes[e],i=r.childNodes[e],a=n?n.childNodes[e]:null;(0,u.rangeEach)(0,o.childNodes.length-1,(e=>{let t=o.childNodes[e].querySelector(`.${C}`);s(t),i&&i.childNodes[e]&&(t=i.childNodes[e].querySelector(`.${C}`),s(t)),n&&a&&a.childNodes[e]&&(t=a.childNodes[e].querySelector(`.${C}`),s(t))}))}),!0)}expandSection(e){this.toggleCollapsibleSection([e],"expand")}collapseSection(e){this.toggleCollapsibleSection([e],"collapse")}toggleAllCollapsibleSections(e){const t=this.headerStateManager.mapNodes((t=>{const{collapsible:r,origColspan:n,headerLevel:s,columnIndex:o,isCollapsed:i}=t;if(!0===r&&n>1&&(i&&"expand"===e||!i&&"collapse"===e))return{row:this.headerStateManager.levelToRowCoords(s),col:o}}));this.toggleCollapsibleSection(t,e)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(e,t){if(!R.has(t))throw new Error(`Unsupported action is passed (${t}).`);if(!Array.isArray(e))return;const r=(0,l.arrayFilter)(e,(e=>{let{row:t}=e;return t<0}));let n=r.length>0;(0,l.arrayEach)(r,(e=>{var r;let{row:s,col:o}=e;const{collapsible:i,isCollapsed:a}=null!==(r=this.headerStateManager.getHeaderSettings(s,o))&&void 0!==r?r:{};if(!i||a&&"collapse"===t||!a&&"expand"===t)return n=!1,!1}));const s=[],i=[];n&&(0,l.arrayEach)(r,(e=>{let{row:r,col:n}=e;const{colspanCompensation:o,affectedColumns:a,rollbackModification:l}=this.headerStateManager.triggerNodeModification(t,r,n);o>0&&(i.push(...a),s.push(l))}));const a=this.getCollapsedColumns();let u=[];"collapse"===t?u=(0,l.arrayUnique)([...a,...i]):"expand"===t&&(u=(0,l.arrayFilter)(a,(e=>!i.includes(e))));const h=R.get(t);if(!1===this.hot.runHooks(h.beforeHook,a,u,n))return void(0,l.arrayEach)(s,(e=>{e()}));this.hot.batchExecution((()=>{(0,l.arrayEach)(i,(e=>{(0,o.default)(this,S).setValueAtIndex(this.hot.toPhysicalColumn(e),h.hideColumn)}))}),!0);const c=this.getCollapsedColumns().length!==a.length;this.hot.runHooks(h.afterHook,a,u,n,c),this.hot.render(),this.hot.view.adjustElementsSize(!0)}getCollapsedColumns(){return(0,o.default)(this,S).getHiddenIndexes()}destroy(){(0,i.default)(this,S,null),super.destroy()}}function A(e,t,r){var n;const{collapsible:s,origColspan:o,isCollapsed:i}=null!==(n=this.headerStateManager.getHeaderSettings(r,e))&&void 0!==n?n:{},a=s&&o>1&&e>=this.hot.getSettings().fixedColumnsStart,l=this.hot.getSettings().ariaTags;let u=t.querySelector(`.${C}`);var h;((0,c.removeAttribute)(t,[(0,f.A11Y_EXPANDED)("")[0]]),a)?(u||(u=this.hot.rootDocument.createElement("div"),(0,c.addClass)(u,C),t.querySelector("div:first-child").appendChild(u)),(0,c.removeClass)(u,["collapsed","expanded"]),i?((0,c.addClass)(u,"collapsed"),(0,c.fastInnerText)(u,"+"),l&&(0,c.setAttribute)(t,[(0,f.A11Y_EXPANDED)(!1),(0,f.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(p.COLUMN_HEADER_DESCRIPTION_EXPAND_COLUMN))])):((0,c.addClass)(u,"expanded"),(0,c.fastInnerText)(u,"-"),l&&(0,c.setAttribute)(t,[(0,f.A11Y_EXPANDED)(!0),(0,f.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(p.COLUMN_HEADER_DESCRIPTION_COLLAPSE_COLUMN))])),l&&(0,c.setAttribute)(u,...(0,f.A11Y_HIDDEN)())):null===(h=u)||void 0===h||h.remove()}function b(e,t){(0,c.hasClass)(e.target,C)&&((0,c.hasClass)(e.target,"expanded")?(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"collapse")):(0,c.hasClass)(e.target,"collapsed")&&(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"expand")),(0,d.stopImmediatePropagation)(e))}function I(){this.updatePlugin()}function x(e,t){t||this.updatePlugin()}t.CollapsibleColumns=_},85792:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(82295);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.CollapsibleColumns=n.CollapsibleColumns},13500:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(49587),i=r(97639),a=r(76163),l=r(46029),u=r(98887),h=r(33997),c=r(41789),d=n(r(54925)),f=r(82801),p=r(95262),g=r(90838),m=r(16766),E=r(10185),y=r(66862),w=r(497);function C(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function v(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const R="columnSorting";t.PLUGIN_KEY=R;t.PLUGIN_PRIORITY=50;const S="append";t.APPEND_COLUMN_CONFIG_STRATEGY=S;const T="replace";t.REPLACE_COLUMN_CONFIG_STRATEGY=T;const N=R,O="columnSortingIndicator";(0,E.registerRootComparator)(R,m.rootComparator),d.default.getSingleton().register("beforeColumnSort"),d.default.getSingleton().register("afterColumnSort");var M=new WeakSet,_=new WeakSet,A=new WeakSet,b=new WeakSet;class I extends h.BasePlugin{constructor(){super(...arguments),C(this,b),C(this,A),C(this,_),C(this,M),(0,s.default)(this,"columnStatesManager",null),(0,s.default)(this,"columnMetaCache",null),(0,s.default)(this,"pluginKey",R),(0,s.default)(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return R}static get PLUGIN_PRIORITY(){return 50}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var e=this;this.enabled||(this.columnStatesManager=new f.ColumnStatesManager(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=new c.PhysicalIndexToValueMap((e=>{let t=this.hot.toVisualColumn(e);return null===t&&(t=e),this.getMergedPluginSettings(t)})),this.hot.columnIndexMapper.registerMap(`${this.pluginKey}.columnMeta`,this.columnMetaCache),this.addHook("afterGetColHeader",((e,t)=>v(this,_,L).call(this,e,t))),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v(e,b,D).call(e,...r)})),this.addHook("afterOnCellMouseDown",((e,t)=>this.onAfterOnCellMouseDown(e,t))),this.addHook("afterInit",(()=>v(this,M,x).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v(e,A,P).call(e,...r)})),this.hot.view&&v(this,M,x).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(e,t)=>{const r=(0,p.getHeaderSpanElement)(t);!1!==(0,p.isFirstLevelColumnHeader)(e,t)&&null!==r&&this.updateHeaderClasses(r)};this.hot.addHook("afterGetColHeader",e),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("afterGetColHeader",e)})),this.hot.batchExecution((()=>{null!==this.indexesSequenceCache&&(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginKey))}),!0),this.hot.columnIndexMapper.unregisterMap(`${this.pluginKey}.columnMeta`),this.columnStatesManager.destroy(),this.columnMetaCache=null,this.columnStatesManager=null,this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();-1===e.row&&e.col>=0&&this.sort(this.getColumnNextConfig(e.col))},runOnlyIf:()=>{var e;return null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader()},group:N})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(N)}sort(e){const t=this.getSortConfig(),r=this.getNormalizedSortConfigs(e),n=this.areValidSortConfigs(r);!1!==this.hot.runHooks("beforeColumnSort",t,r,n)&&(0===t.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new c.IndexesSequence),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),n&&(this.columnStatesManager.setSortStates(r),this.sortByPresetSortStates(r),this.saveAllSortSettings(r)),this.hot.runHooks("afterColumnSort",t,n?r:t,n),n&&(this.hot.render(),this.hot.forceFullRender=!1,this.hot.view.render()))}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(e){return(0,i.isDefined)(e)?this.columnStatesManager.getColumnSortState(e):this.columnStatesManager.getSortStates()}setSortConfig(e){const t=this.getNormalizedSortConfigs(e);this.areValidSortConfigs(t)&&this.columnStatesManager.setSortStates(t)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e]}areValidSortConfigs(e){const t=this.hot.countCols();return(0,p.areValidSortStates)(e)&&e.every((e=>{let{column:r}=e;return r<=t&&r>=0}))}saveAllSortSettings(e){const t=this.columnStatesManager.getAllColumnsProperties();t.initialConfig=(0,u.arrayMap)(e,(e=>{let{column:t,...r}=e;return{column:this.hot.toPhysicalColumn(t),...r}})),this.hot.runHooks("persistentStateSave","columnSorting",t)}getAllSavedSortSettings(){const e={};this.hot.runHooks("persistentStateLoad","columnSorting",e);const t=e.value,r=e=>{let{column:t,...r}=e;return{column:this.hot.toVisualColumn(t),...r}};return(0,i.isDefined)(t)&&Array.isArray(t.initialConfig)&&(t.initialConfig=(0,u.arrayMap)(t.initialConfig,r)),t}getColumnNextConfig(e){const t=this.columnStatesManager.getSortOrderOfColumn(e);if((0,i.isDefined)(t)){const r=(0,p.getNextSortOrder)(t);return(0,i.isDefined)(r)?{column:e,sortOrder:r}:void 0}const r=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<r)return{column:e,sortOrder:(0,p.getNextSortOrder)()}}getNextSortConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S;const r=this.columnStatesManager.getIndexOfColumnInSortQueue(e),n=-1!==r,s=this.getSortConfig(),o=this.getColumnNextConfig(e);if(n){if((0,i.isUndefined)(o))return[...s.slice(0,r),...s.slice(r+1)];if(t===S)return[...s.slice(0,r),...s.slice(r+1),o];if(t===T)return[...s.slice(0,r),o,...s.slice(r+1)]}return(0,i.isDefined)(o)?s.concat(o):s}getPluginColumnConfig(e){if((0,a.isObject)(e)){const t=e[this.pluginKey];if((0,a.isObject)(t))return t}return{}}getMergedPluginSettings(e){const t=this.hot.getSettings()[this.pluginKey],r=this.columnStatesManager.getAllColumnsProperties(),n=this.hot.getCellMeta(0,e),s=Object.getPrototypeOf(n);return Array.isArray(s.columns)?Object.assign(r,t,this.getPluginColumnConfig(s.columns[e])):(0,l.isFunction)(s.columns)?Object.assign(r,t,this.getPluginColumnConfig(s.columns(e))):Object.assign(r,t)}getFirstCellSettings(e){const t=this.hot.getCellMeta(0,e),r=Object.create(t);return r[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(e)),r}getNumberOfRowsToSort(e){const t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}sortByPresetSortStates(e){if(0===e.length)return void this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues());const t=[],r=this.hot.countRows(),n=t=>(0,u.arrayMap)(e,(e=>this.hot.getDataAtCell(t,e.column)));for(let e=0;e<this.getNumberOfRowsToSort(r);e+=1)t.push([this.hot.toPhysicalRow(e)].concat(n(e)));const s=(0,u.arrayMap)(t,(e=>e[0]));(0,E.sort)(t,this.pluginKey,(0,u.arrayMap)(e,(e=>e.sortOrder)),(0,u.arrayMap)(e,(e=>this.getFirstCellSettings(e.column))));for(let e=t.length;e<r;e+=1)t.push([e].concat(n(e)));const o=(0,u.arrayMap)(t,(e=>e[0])),i=new Map((0,u.arrayMap)(s,((e,t)=>[e,o[t]]))),a=(0,u.arrayMap)(this.hot.rowIndexMapper.getIndexesSequence(),(e=>i.has(e)?i.get(e):e));this.hot.rowIndexMapper.setIndexesSequence(a)}sortBySettings(e){if((0,a.isObject)(e)){this.columnStatesManager.updateAllColumnsProperties(e);const t=e.initialConfig;(Array.isArray(t)||(0,a.isObject)(t))&&this.sort(t)}else this.hot.render()}updateHeaderClasses(e){if((0,o.removeClass)(e,(0,g.getClassesToRemove)(e)),!1!==this.enabled){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];(0,o.addClass)(e,(0,g.getClassesToAdd)(...r))}}updateSortingIndicator(e,t){const r=this.getFirstCellSettings(e)[this.pluginKey],n=this.hot.getSettings().ariaTags,s=r.indicator,i=this.columnStatesManager.isColumnSorted(e),a=t.querySelector(`.${O}`);s&&i&&!a&&(0,o.appendElement)(t,{tagName:"div",className:O,attributes:n?[(0,y.A11Y_HIDDEN)()]:[]})}onUpdateSettings(e){super.onUpdateSettings(),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),(0,i.isDefined)(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}wasClickableHeaderClicked(e,t){return this.getFirstCellSettings(t)[this.pluginKey].headerAction&&"SPAN"===e.target.nodeName}onAfterOnCellMouseDown(e,t){!1!==(0,p.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col)),this.sort(this.getColumnNextConfig(t.col)))}destroy(){var e;null===(e=this.columnStatesManager)||void 0===e||e.destroy(),super.destroy()}}function x(){const e=this.getAllSavedSortSettings();if((0,a.isObject)(e))this.sortBySettings(e);else{const e=this.hot.getSettings()[this.pluginKey];this.sortBySettings(e)}}function L(e,t){const r=(0,p.getHeaderSpanElement)(t);if(!1===(0,p.isFirstLevelColumnHeader)(e,t)||null===r)return;const n=this.getFirstCellSettings(e)[this.pluginKey],s=this.hot.getSettings().ariaTags,i=n.indicator,a=n.headerAction,l=this.columnStatesManager.getSortOrderOfColumn(e);this.updateHeaderClasses(r,this.columnStatesManager,e,i,a),this.updateSortingIndicator(e,r),s&&(0,o.setAttribute)(t,[(0,y.A11Y_SORT)(l?`${l}ending`:"none"),(0,y.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(w.COLUMN_HEADER_DESCRIPTION_SORT_ROWS))])}function P(e){!0===e&&this.hot.view&&v(this,M,x).call(this)}function D(e,t,r,n){!1!==(0,p.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(n.column=!0)}t.ColumnSorting=I},82801:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(76163),i=r(41789),a=r(97639);const l=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];t.ColumnStatesManager=class{constructor(e,t){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"sortingStates",new i.LinkedPhysicalIndexToValueMap),(0,s.default)(this,"sortEmptyCells",false),(0,s.default)(this,"indicator",true),(0,s.default)(this,"headerAction",true),(0,s.default)(this,"compareFunctionFactory",void 0),(0,s.default)(this,"mapName",void 0),this.hot=e,this.mapName=t,this.hot.columnIndexMapper.registerMap(t,this.sortingStates)}updateAllColumnsProperties(e){(0,o.isObject)(e)&&(0,o.objectEach)(e,((e,t)=>{l.includes(t)&&(this[t]=e)}))}getAllColumnsProperties(){const e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"==typeof this.compareFunctionFactory&&(e.compareFunctionFactory=this.compareFunctionFactory),e}getSortOrderOfColumn(e){var t;return null===(t=this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))||void 0===t?void 0:t.sortOrder}getIndexOfColumnInSortQueue(e){return e=this.hot.toPhysicalColumn(e),this.sortingStates.getEntries().findIndex((t=>{let[r]=t;return r===e}))}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return 0===this.getNumberOfSortedColumns()}isColumnSorted(e){return(0,o.isObject)(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))}getSortStates(){if(null===this.sortingStates)return[];return this.sortingStates.getEntries().map((e=>{let[t,r]=e;return{column:this.hot.toVisualColumn(t),...r}}))}getColumnSortState(e){const t=this.getSortOrderOfColumn(e);if((0,a.isDefined)(t))return{column:e,sortOrder:t}}setSortStates(e){this.sortingStates.clear();for(let t=0;t<e.length;t+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(e[t].column),{sortOrder:e[t].sortOrder})}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}}},90838:(e,t,r)=>{"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,r,s){const u=[i];s&&u.push(a);if(!1===r)return u.push(o),u;const h=e.getSortOrderOfColumn(t);(0,n.isDefined)(h)&&u.push(l.get(h));return u},t.getClassesToRemove=function(){return Array.from(l.values()).concat(a,o,i)},r(95988);var n=r(97639),s=r(95262);const o="indicatorDisabled",i="columnSorting",a="sortAction",l=new Map([[s.ASC_SORT_STATE,"ascending"],[s.DESC_SORT_STATE,"descending"]])},8540:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(13500);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ColumnSorting=n.ColumnSorting,t.APPEND_COLUMN_CONFIG_STRATEGY=n.APPEND_COLUMN_CONFIG_STRATEGY,t.REPLACE_COLUMN_CONFIG_STRATEGY=n.REPLACE_COLUMN_CONFIG_STRATEGY},16766:(e,t,r)=>{"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(r,s){const[,...o]=r,[,...i]=s;return function(r){const s=e[r],a=t[r],l=o[r],u=i[r],h=a.columnSorting;return(h.compareFunctionFactory?h.compareFunctionFactory:(0,n.getCompareFunctionFactory)(a.type))(s,a,h)(l,u)}(0)}};var n=r(10185)},59891:(e,t,r)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,r){const i=t.checkedTemplate,a=t.uncheckedTemplate,{sortEmptyCells:l}=r;return function(u,h){const c=(0,o.isEmpty)(u),d=(0,o.isEmpty)(h),f=c?a:u,p=d?a:h,g=f===a||f===i,m=p===a||p===i;if(!1===l){if(c&&!1===d)return n.FIRST_AFTER_SECOND;if(!1===c&&d)return n.FIRST_BEFORE_SECOND}return!1===g&&m?"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:g&&!1===m?"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:!1===g&&!1===m?(0,s.compareFunctionFactory)(e,t,r)(u,h):f===a&&p===i?"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:f===i&&p===a?"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:n.DO_NOT_SWAP}};var n=r(10185),s=r(73180),o=r(97639);t.COLUMN_DATA_TYPE="checkbox"},35789:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.compareFunctionFactory=function(e,t,r){return function(n,a){const{sortEmptyCells:l}=r;if(n===a)return i.DO_NOT_SWAP;if((0,o.isEmpty)(n))return(0,o.isEmpty)(a)?i.DO_NOT_SWAP:l&&"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND;if((0,o.isEmpty)(a))return l&&"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND;const u=t.dateFormat,h=(0,s.default)(n,u),c=(0,s.default)(a,u);return h.isValid()?c.isValid()?c.isAfter(h)?"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:c.isBefore(h)?"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:i.DO_NOT_SWAP:i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND}};var s=n(r(22418)),o=r(97639),i=r(10185);t.COLUMN_DATA_TYPE="date"},73180:(e,t,r)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,r){const o=t.locale;return function(t,i){const{sortEmptyCells:a}=r;return"string"==typeof t&&(t=t.toLocaleLowerCase(o)),"string"==typeof i&&(i=i.toLocaleLowerCase(o)),t===i?s.DO_NOT_SWAP:(0,n.isEmpty)(t)?(0,n.isEmpty)(i)?s.DO_NOT_SWAP:a&&"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:(0,n.isEmpty)(i)?a&&"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:isNaN(t)&&!isNaN(i)?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:!isNaN(t)&&isNaN(i)?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:(isNaN(t)||isNaN(i)||(t=parseFloat(t),i=parseFloat(i)),t<i?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:t>i?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:s.DO_NOT_SWAP)}};var n=r(97639),s=r(10185);t.COLUMN_DATA_TYPE="default"},33068:(e,t,r)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,r){return function(t,o){const i=parseFloat(t),a=parseFloat(o),{sortEmptyCells:l}=r;if(i===a||isNaN(i)&&isNaN(a))return s.DO_NOT_SWAP;if(l){if((0,n.isEmpty)(t))return"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND;if((0,n.isEmpty)(o))return"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND}return isNaN(i)?s.FIRST_AFTER_SECOND:isNaN(a)?s.FIRST_BEFORE_SECOND:i<a?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:i>a?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:s.DO_NOT_SWAP}};var n=r(97639),s=r(10185);t.COLUMN_DATA_TYPE="numeric"},9972:(e,t,r)=>{"use strict";t.__esModule=!0,t.sort=function(e,t){const r=(0,n.getRootComparator)(t);for(var s=arguments.length,o=new Array(s>2?s-2:0),i=2;i<s;i++)o[i-2]=arguments[i];e.sort(r(...o))};var n=r(64602);t.DO_NOT_SWAP=0;t.FIRST_BEFORE_SECOND=-1;t.FIRST_AFTER_SECOND=1},10185:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64602);t.registerRootComparator=n.registerRootComparator,t.getRootComparator=n.getRootComparator,t.getCompareFunctionFactory=n.getCompareFunctionFactory;var s=r(9972);t.FIRST_AFTER_SECOND=s.FIRST_AFTER_SECOND,t.FIRST_BEFORE_SECOND=s.FIRST_BEFORE_SECOND,t.DO_NOT_SWAP=s.DO_NOT_SWAP,t.sort=s.sort},64602:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getCompareFunctionFactory=function(e){if(c(e))return h(e);return h(s.COLUMN_DATA_TYPE)};var s=r(73180),o=r(33068),i=r(59891),a=r(35789),l=n(r(31056));const{register:u,getItem:h,hasItem:c}=(0,l.default)("sorting.compareFunctionFactory"),{register:d,getItem:f}=(0,l.default)("sorting.mainSortComparator");t.getRootComparator=f,t.registerRootComparator=d,u(o.COLUMN_DATA_TYPE,o.compareFunctionFactory),u(i.COLUMN_DATA_TYPE,i.compareFunctionFactory),u(a.COLUMN_DATA_TYPE,a.compareFunctionFactory),u(s.COLUMN_DATA_TYPE,s.compareFunctionFactory)},95262:(e,t,r)=>{"use strict";t.__esModule=!0,t.areValidSortStates=function(e){if(e.some((e=>!1===function(e){if(!1===(0,n.isObject)(e))return!1;const{column:t,sortOrder:r}=e;return Number.isInteger(t)&&[o,i].includes(r)}(e))))return!1;const t=e.map((e=>{let{column:t}=e;return t}));return new Set(t).size===t.length},t.getHeaderSpanElement=function(e){return e.querySelector(`.${a}`)},t.getNextSortOrder=function(e){if(e===i)return;if(e===o)return i;return o},t.isFirstLevelColumnHeader=function(e,t){if(e<0||!t.parentNode)return!1;const r=t.parentNode.parentNode.childNodes;if(Array.from(r).indexOf(t.parentNode)-r.length!=-1)return!1;return!0},t.wasHeaderClickedProperly=function(e,t,r){return-1===e&&t>=0&&!1===(0,s.isRightClick)(r)};var n=r(76163),s=r(30369);const o="asc";t.ASC_SORT_STATE=o;const i="desc";t.DESC_SORT_STATE=i;const a="colHeader";t.HEADER_SPAN_CLASS=a},83659:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(33997),i=r(76163),a=n(r(95883)),l=r(45561),u=r(1178);function h(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const d="columnSummary";t.PLUGIN_KEY=d;t.PLUGIN_PRIORITY=220;var f=new WeakSet,p=new WeakSet,g=new WeakSet;class m extends o.BasePlugin{constructor(){super(...arguments),h(this,g),h(this,p),h(this,f),(0,s.default)(this,"endpoints",null)}static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return 220}isEnabled(){return!!this.hot.getSettings()[d]}enablePlugin(){var e=this;this.enabled||(this.settings=this.hot.getSettings()[d],this.endpoints=new a.default(this,this.settings),this.addHook("afterInit",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c(e,f,E).call(e,...r)})),this.addHook("afterChange",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c(e,p,y).call(e,...r)})),this.addHook("beforeCreateRow",((e,t,r)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_row",e,t,null,r))),this.addHook("beforeCreateCol",((e,t,r)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_col",e,t,null,r))),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.endpoints.resetSetupBeforeStructureAlteration("remove_row",...r)})),this.addHook("beforeRemoveCol",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.endpoints.resetSetupBeforeStructureAlteration("remove_col",...r)})),this.addHook("afterCreateRow",((e,t,r)=>this.endpoints.resetSetupAfterStructureAlteration("insert_row",e,t,null,r))),this.addHook("afterCreateCol",((e,t,r)=>this.endpoints.resetSetupAfterStructureAlteration("insert_col",e,t,null,r))),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.endpoints.resetSetupAfterStructureAlteration("remove_row",...r)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.endpoints.resetSetupAfterStructureAlteration("remove_col",...r)})),this.addHook("afterRowMove",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c(e,g,w).call(e,...r)})),super.enablePlugin())}disablePlugin(){this.endpoints=null,this.settings=null,this.currentEndpoint=null}calculate(e){switch(e.type.toLowerCase()){case"sum":e.result=this.calculateSum(e);break;case"min":case"max":e.result=this.calculateMinMax(e,e.type);break;case"count":e.result=this.countEntries(e);break;case"average":e.result=this.calculateAverage(e);break;case"custom":e.result=e.customFunction.call(this,e)}}calculateSum(e){let t=0;return(0,i.objectEach)(e.ranges,(r=>{t+=this.getPartialSum(r,e.sourceColumn)})),t}getPartialSum(e,t){let r=0,n=e[1]||e[0],s=null,o=0;do{if(s=this.getCellValue(n,t),s=(0,u.isNullishOrNaN)(s)?null:s,null!==s){const e=(`${s}`.split(".")[1]||[]).length||1;e>o&&(o=e)}r+=s||0,n-=1}while(n>=e[0]);return Math.round(r*10**o)/10**o}calculateMinMax(e,t){let r=null;return(0,i.objectEach)(e.ranges,(n=>{const s=this.getPartialMinMax(n,e.sourceColumn,t);if(null===r&&null!==s&&(r=s),null!==s)switch(t){case"min":r=Math.min(r,s);break;case"max":r=Math.max(r,s)}})),null===r?"Not enough data":r}getPartialMinMax(e,t,r){let n,s=null,o=e[1]||e[0];do{if(n=this.getCellValue(o,t),n=(0,u.isNullishOrNaN)(n)?null:n,null===s)s=n;else if(null!==n)switch(r){case"min":s=Math.min(s,n);break;case"max":s=Math.max(s,n)}o-=1}while(o>=e[0]);return s}countEmpty(e,t){let r,n=0,s=e[1]||e[0];do{r=this.getCellValue(s,t),r=(0,u.isNullishOrNaN)(r)?null:r,null===r&&(n+=1),s-=1}while(s>=e[0]);return n}countEntries(e){let t=0;const r=e.ranges;return(0,i.objectEach)(r,(r=>{const n=void 0===r[1]?1:r[1]-r[0]+1,s=this.countEmpty(r,e.sourceColumn);t+=n,t-=s})),t}calculateAverage(e){return this.calculateSum(e)/this.countEntries(e)}getCellValue(e,t){const r=this.hot.toVisualRow(e),n=this.hot.toVisualColumn(t);let s=this.hot.getSourceDataAtCell(e,t),o="";if(null!==r&&null!==n&&(o=this.hot.getCellMeta(r,n).className||""),o.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof s&&(s=s.replace(/,/,".")),s=parseFloat(s)),isNaN(s)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(l.toSingleLine`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
952
- numeric format. Cannot do the calculation.`);return s}}function E(){this.endpoints.endpoints=this.endpoints.parseSettings(),this.endpoints.refreshAllEndpoints(!0)}function y(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function w(e,t){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}t.ColumnSummary=m},95883:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=r(98887),i=r(31990);var a=class{constructor(e,t){(0,s.default)(this,"plugin",void 0),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"endpoints",[]),(0,s.default)(this,"settings",void 0),(0,s.default)(this,"settingsType","array"),(0,s.default)(this,"currentEndpoint",null),(0,s.default)(this,"cellsToSetCache",[]),this.plugin=e,this.hot=this.plugin.hot,this.settings=t}getEndpoint(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(e){return this.parseSettings(e.call(this))}parseSettings(e){const t=[];let r=e;if(r||"function"!=typeof this.settings)return r||(r=this.settings),(0,o.arrayEach)(r,(e=>{const r={};this.assignSetting(e,r,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(e,r,"reversedRowCoords",!1),this.assignSetting(e,r,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,r,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,r,"sourceColumn",e.destinationColumn),this.assignSetting(e,r,"type","sum"),this.assignSetting(e,r,"forceNumeric",!1),this.assignSetting(e,r,"suppressDataTypeErrors",!0),this.assignSetting(e,r,"suppressDataTypeErrors",!0),this.assignSetting(e,r,"customFunction",null),this.assignSetting(e,r,"readOnly",!0),this.assignSetting(e,r,"roundFloat",!1),t.push(r)})),t;this.settingsType="function"}assignSetting(e,t,r,n){if("ranges"!==r||void 0!==e[r]){if("ranges"!==r||0!==e[r].length)if(void 0===e[r]){if(n instanceof Error)throw n;t[r]=n}else"destinationRow"===r&&t.reversedRowCoords?t[r]=this.hot.countRows()-e[r]-1:t[r]=e[r]}else t[r]=n}resetSetupBeforeStructureAlteration(e,t,r){if("function"!==this.settingsType)return;const n=e.indexOf("row")>-1?"row":"col",s=this.getAllEndpoints();(0,o.arrayEach)(s,(s=>{"row"===n&&s.destinationRow>=t&&("insert_row"===e?s.alterRowOffset=r:"remove_row"===e&&(s.alterRowOffset=-1*r)),"col"===n&&s.destinationColumn>=t&&("insert_col"===e?s.alterColumnOffset=r:"remove_col"===e&&(s.alterColumnOffset=-1*r))})),this.resetAllEndpoints(s,!1)}resetSetupAfterStructureAlteration(e,t,r,n,s){let i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"===this.settingsType){const e=()=>(this.hot.removeHook("beforeViewRender",e),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",e)}const a=e.indexOf("row")>-1?"row":"col",l=e.indexOf("remove")>-1?-1:1,u=this.getAllEndpoints(),h=0===e.indexOf("move_row"),c=t;(0,o.arrayEach)(u,(e=>{"row"===a&&e.destinationRow>=c&&(e.alterRowOffset=l*r),"col"===a&&e.destinationColumn>=c&&(e.alterColumnOffset=l*r)})),this.resetAllEndpoints(u,!h),h?(0,o.arrayEach)(u,(e=>{this.extendEndpointRanges(e,c,n[0],n.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)})):(0,o.arrayEach)(u,(e=>{this.shiftEndpointCoordinates(e,c)})),i&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,r,n){(0,o.arrayEach)(e.ranges,(e=>{e[1]&&(t>=e[0]&&t<=e[1]?r>e[1]?e[1]+=n:r<e[0]&&(e[0]-=n):r>=e[0]&&r<=e[1]&&(e[1]-=n,t<=e[0]&&(e[0]+=1,e[1]+=1)))}))}recreatePhysicalRanges(e){const t=e.ranges,r=[],n=[];(0,o.arrayEach)(t,(e=>{const t=[];if(e[1])for(let r=e[0];r<=e[1];r++)t.push(this.hot.toPhysicalRow(r));else t.push(this.hot.toPhysicalRow(e[0]));n.push(t)})),(0,o.arrayEach)(n,(e=>{let t=[];(0,o.arrayEach)(e,((n,s)=>{0===s?t.push(n):e[s]!==e[s-1]+1&&(t.push(e[s-1]),r.push(t),t=[],t.push(n)),s===e.length-1&&(t.push(n),r.push(t))}))})),e.ranges=r}shiftEndpointCoordinates(e,t){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,(0,o.arrayEach)(e.ranges,(r=>{(0,o.arrayEach)(r,((n,s)=>{n>=t&&(r[s]+=e.alterRowOffset||0)}))}))):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}resetAllEndpoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.some((e=>{const t=e.alterRowOffset||0,r=e.alterColumnOffset||0;return e.destinationRow+t>=this.hot.countRows()||e.destinationColumn+r>=this.hot.countCols()}))||(this.cellsToSetCache=[],(0,o.arrayEach)(e,(e=>{this.resetEndpointValue(e,t)})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],(0,o.arrayEach)(this.getAllEndpoints(),(e=>{this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e,"init")})),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(e){const t=[];this.cellsToSetCache=[],(0,o.arrayEach)(e,((e,r,n)=>{`${e[2]||""}`!=`${e[3]}`&&(0,o.arrayEach)(this.getAllEndpoints(),((e,s)=>{this.hot.propToCol(n[r][1])===e.sourceColumn&&-1===t.indexOf(s)&&t.push(s)}))})),(0,o.arrayEach)(t,(e=>{this.refreshEndpoint(this.getEndpoint(e))})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshEndpoint(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}resetEndpointValue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=e.alterRowOffset||0,n=e.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(t?r:0)),this.hot.toVisualColumn(e.destinationColumn+(t?n:0)),""])}setEndpointValue(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const s=this.hot.toVisualRow(e.destinationRow);if(null!==s){const r=this.hot.getCellMeta(s,e.destinationColumn);"init"!==t&&r.readOnly===e.readOnly||(r.readOnly=e.readOnly,r.className="columnSummaryResult")}e.roundFloat&&!isNaN(e.result)&&(e.result=e.result.toFixed(e.roundFloat)),r?this.hot.setDataAtCell(n,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([n,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}throwOutOfBoundsWarning(){(0,i.warn)("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}};t.default=a},75001:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(83659);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ColumnSummary=n.ColumnSummary},1178:(e,t)=>{"use strict";t.__esModule=!0,t.isNullishOrNaN=function(e){return null==e||isNaN(e)}},4780:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(49587);class i{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}constructor(e,t){(0,s.default)(this,"rootDocument",void 0),(0,s.default)(this,"isRtl",!1),(0,s.default)(this,"container",null),(0,s.default)(this,"editor",void 0),(0,s.default)(this,"editorStyle",void 0),(0,s.default)(this,"hidden",!0),this.rootDocument=e,this.isRtl=t,this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.hide()}setPosition(e,t){this.editorStyle.left=`${e}px`,this.editorStyle.top=`${t}px`}setSize(e,t){if(e&&t){const r=this.getInputElement();r.style.width=`${e}px`,r.style.height=`${t}px`}}getSize(){return{width:(0,o.outerWidth)(this.getInputElement()),height:(0,o.outerHeight)(this.getInputElement())}}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){this.getInputElement().readOnly=e}show(){this.editorStyle.display="block",this.hidden=!1}hide(){this.hidden||(this.editorStyle.display="none"),this.hidden=!0}isVisible(){return"block"===this.editorStyle.display}setValue(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=e}getValue(){return this.getInputElement().value}isFocused(){return this.rootDocument.activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=this.rootDocument.createElement("div"),t=this.rootDocument.createElement("textarea");return e.style.display="none",this.container=this.rootDocument.createElement("div"),this.container.setAttribute("dir",this.isRtl?"rtl":"ltr"),(0,o.addClass)(this.container,i.CLASS_EDITOR_CONTAINER),this.rootDocument.body.appendChild(this.container),(0,o.addClass)(e,i.CLASS_EDITOR),(0,o.addClass)(t,i.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),this.container.appendChild(e),e}getInputElement(){return this.editor.querySelector(`.${i.CLASS_INPUT}`)}destroy(){const e=this.container?this.container.parentNode:null;this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null,e&&e.removeChild(this.container)}}var a=i;t.default=a},47477:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=n(r(48427)),i=n(r(42538)),a=r(49587),l=r(30369),u=r(76163),h=r(33997),c=n(r(4780)),d=n(r(68666)),f=r(86373),p=n(r(46422)),g=n(r(45317)),m=n(r(86191));function E(e,t){w(e,t),t.add(e)}function y(e,t,r){w(e,t),t.set(e,r)}function w(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(68581);const v="comments";t.PLUGIN_KEY=v;t.PLUGIN_PRIORITY=60;const R="comment";t.META_COMMENT=R;const S="value";t.META_COMMENT_VALUE=S;const T="style";t.META_STYLE=T;const N="readOnly";t.META_READONLY=N;const O=v,M=`plugin:${v}`;var _=new WeakMap,A=new WeakMap,b=new WeakMap,I=new WeakMap,x=new WeakMap,L=new WeakMap,P=new WeakMap,D=new WeakSet,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet,W=new WeakSet,Y=new WeakSet,G=new WeakSet;class j extends h.BasePlugin{constructor(){super(...arguments),E(this,G),E(this,Y),E(this,W),E(this,B),E(this,V),E(this,U),E(this,F),E(this,H),E(this,k),E(this,D),(0,s.default)(this,"range",{}),y(this,_,{writable:!0,value:null}),y(this,A,{writable:!0,value:null}),y(this,b,{writable:!0,value:!1}),y(this,I,{writable:!0,value:!1}),y(this,x,{writable:!0,value:{}}),y(this,L,{writable:!0,value:null}),y(this,P,{writable:!0,value:""})}static get PLUGIN_KEY(){return v}static get PLUGIN_PRIORITY(){return 60}isEnabled(){return!!this.hot.getSettings()[v]}enablePlugin(){this.enabled||((0,i.default)(this,_)||(0,o.default)(this,_,new c.default(this.hot.rootDocument,this.hot.isRtl())),(0,i.default)(this,A)||(0,o.default)(this,A,new d.default(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",(e=>this.addToContextMenu(e))),this.addHook("afterRenderer",((e,t,r,n,s,o)=>C(this,F,X).call(this,e,o))),this.addHook("afterScroll",(()=>C(this,G,te).call(this))),this.addHook("afterBeginEditing",(()=>this.hide())),this.addHook("afterDocumentKeyDown",(e=>C(this,Y,ee).call(this,e))),(0,i.default)(this,A).addLocalHook("hide",(()=>this.hide())),(0,i.default)(this,A).addLocalHook("show",((e,t)=>this.showAtCell(e,t))),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){(0,i.default)(this,A).updateDelay(this.getDisplayDelaySetting()),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),r=e.addContext(M);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();(0,o.default)(this,I,!0),this.hot.scrollToFocusedCell((()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(M),this.hot._registerTimeout((()=>{(0,o.default)(this,I,!1)}))}))},stopPropagation:!0,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!(0,i.default)(this,_).isVisible()},group:O}),r.addShortcut({keys:[["Escape"]],callback:()=>{(0,i.default)(this,_).setValue((0,i.default)(this,P)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&(0,i.default)(this,_).isVisible()},group:O}),r.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&(0,i.default)(this,_).isVisible()},group:O})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(O)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",(e=>C(this,k,$).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>C(this,D,z).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>C(this,H,K).call(this))),this.eventManager.addEventListener(t,"focus",(()=>C(this,V,Q).call(this))),this.eventManager.addEventListener(t,"blur",(()=>C(this,U,q).call(this))),this.eventManager.addEventListener(t,"mousedown",(e=>C(this,B,Z).call(this,e))),this.eventManager.addEventListener(t,"mouseup",(e=>C(this,W,J).call(this,e)))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=(0,a.closest)(e.target,"TD","TBODY");return!!(t&&(0,a.hasClass)(t,"htCommentCell")&&(0,a.closest)(t,[this.hot.rootElement]))}targetIsCommentTextArea(e){return this.getEditorInputElement()===e.target}setComment(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const t=(0,i.default)(this,_).getValue();let r="";null!=e?r=e:null!=t&&(r=t);const n=this.range.from.row,s=this.range.from.col;this.updateCommentMeta(n,s,{[S]:r}),this.hot.render()}setCommentAtCell(e,t,r){this.setRange({from:this.hot._createCellCoords(e,t)}),this.setComment(r)}removeComment(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,R),e&&this.hot.render(),this.hide()}removeCommentAtCell(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(e,t)}),this.removeComment(r)}getComment(){const e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,S)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,S)}show(){var e;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{from:{row:t,col:r}}=this.range;if(t<0||t>this.hot.countSourceRows()-1||r<0||r>this.hot.countSourceCols()-1)return!1;const n=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return(0,i.default)(this,A).cancelHiding(),(0,i.default)(this,_).setValue(null!==(e=n[R]?n[R][S]:null)&&void 0!==e?e:""),(0,i.default)(this,_).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){(0,i.default)(this,_).hide()}refreshEditor(){var e,t;if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&(0,i.default)(this,_).isVisible()))return;const{rowIndexMapper:r,columnIndexMapper:n}=this.hot,{row:s,col:o}=this.range.from;let l=r.getRenderableFromVisualIndex(s),u=n.getRenderableFromVisualIndex(o);const h=null===l;(0,i.default)(this,_).setPosition(0,0),null===l&&(l=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(s,-1))),null===u&&(u=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(o,-1)));const c=null===l,d=null===u;l=null!==(e=l)&&void 0!==e?e:0,u=null!==(t=u)&&void 0!==t?t:0;const{rootWindow:f,view:{_wt:p}}=this.hot,{wtTable:g}=p,m=p.getCell({row:l,col:u},!0),E=this.getCommentMeta(s,o,T);E?(0,i.default)(this,_).setSize(E.width,E.height):(0,i.default)(this,_).resetSize();const y=d?0:g.getStretchedColumnWidth(u),w=h&&!c?(0,a.outerHeight)(m):0,{left:C,top:v,width:R,height:S}=m.getBoundingClientRect(),{width:O,height:M}=(0,i.default)(this,_).getSize(),{innerWidth:A,innerHeight:b}=this.hot.rootWindow,I=this.hot.rootDocument.documentElement;let x=C+f.scrollX+y,L=v+f.scrollY+w;this.hot.isRtl()&&(x-=O+y),this.hot.isLtr()&&C+R+O>A?x=C+f.scrollX-O-1:this.hot.isRtl()&&x<-(I.scrollWidth-I.clientWidth)&&(x=C+f.scrollX+y+1),v+M>b&&(L-=M-S+1),(0,i.default)(this,_).setPosition(x,L),(0,i.default)(this,_).setReadOnlyState(this.getCommentMeta(s,o,N))}focusEditor(){(0,i.default)(this,_).focus()}updateCommentMeta(e,t,r){const n=this.hot.getCellMeta(e,t)[R];let s;n?(s=(0,u.deepClone)(n),(0,u.deepExtend)(s,r)):s=r,this.hot.setCellMeta(e,t,R,s)}getCommentMeta(e,t,r){const n=this.hot.getCellMeta(e,t);if(n[R])return n[R][r]}addToContextMenu(e){e.items.push({name:f.SEPARATOR},(0,p.default)(this),(0,g.default)(this),(0,m.default)(this))}getDisplayDelaySetting(){const e=this.hot.getSettings()[v];if((0,u.isObject)(e))return e.displayDelay}getEditorInputElement(){return(0,i.default)(this,_).getInputElement()}destroy(){(0,i.default)(this,_)&&(0,i.default)(this,_).destroy(),(0,i.default)(this,A)&&(0,i.default)(this,A).destroy(),super.destroy()}}function z(e){if(this.hot.view&&this.hot.view._wt&&!(0,i.default)(this,b)&&!this.targetIsCommentTextArea(e)){const t=(0,a.closest)(e.target,"TD","TBODY");let r=null;t&&(r=this.hot.getCoords(t)),(!t||this.range.from&&r&&(this.range.from.row!==r.row||this.range.from.col!==r.col))&&this.hide()}}function $(e){const{rootDocument:t}=this.hot;if(!((0,i.default)(this,b)||(0,i.default)(this,_).isFocused()||(0,a.hasClass)(e.target,"wtBorder")||(0,i.default)(this,L)===e.target)&&(0,i.default)(this,_))if((0,o.default)(this,L,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));(0,i.default)(this,A).show(t)}else(0,a.isChildOf)(e.target,t)&&!this.targetIsCommentTextArea(e)&&(0,i.default)(this,A).hide()}function K(){(0,o.default)(this,b,!1)}function X(e,t){t[R]&&t[R][S]&&(0,a.addClass)(e,t.commentedCellClassName)}function q(){(0,o.default)(this,P,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function Q(){(0,o.default)(this,P,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(M)}function Z(e){(0,o.default)(this,x,{width:(0,a.outerWidth)(e.target),height:(0,a.outerHeight)(e.target)})}function J(e){const t=(0,a.outerWidth)(e.target),r=(0,a.outerHeight)(e.target);t===(0,i.default)(this,x).width+1&&r===(0,i.default)(this,x).height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,{[T]:{width:t,height:r}})}function ee(e){(0,i.default)(this,_).isVisible()&&(0,l.stopImmediatePropagation)(e)}function te(){(0,i.default)(this,I)||this.hide()}t.Comments=j},46422:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsAddEdit",name(){var t;const r=null===(t=this.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return null!=r&&r.isCell()&&e.getCommentAtCell(r.row,r.col)?this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_EDIT_COMMENT):this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback(){const t=this.getSelectedRangeLast();this.deselectCell(),e.setRange(t),e.show(),e.focusEditor()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},86191:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((t,r)=>e.getCommentMeta(t,r,o.META_READONLY)))?(0,s.markLabelAsSelected)(t):t},callback(){this.getSelectedRangeLast().forAll(((t,r)=>{if(t>=0&&r>=0){const n=!!e.getCommentMeta(t,r,o.META_READONLY);e.updateCommentMeta(t,r,{[o.META_READONLY]:!n})}}))},disabled(){const t=this.getSelectedRangeLast();return!!(!t||t.highlight.isHeader()||!e.getCommentAtCell(t.highlight.row,t.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(12208),o=r(47477);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},45317:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback(){this.getSelectedRangeLast().forAll(((t,r)=>{t>=0&&r>=0&&e.removeCommentAtCell(t,r,!1)})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},68666:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(46029),i=r(76163),a=n(r(63806));class l{constructor(e){(0,s.default)(this,"wasLastActionShow",!0),(0,s.default)(this,"showDebounced",null),(0,s.default)(this,"hidingTimer",null),this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout((()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")}),250)}show(e){this.wasLastActionShow=!0,this.showDebounced(e)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=(0,o.debounce)((e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)}),e)}destroy(){this.clearLocalHooks()}}(0,i.mixin)(l,a.default);var u=l;t.default=u},70013:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(47477);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.Comments=n.Comments},50426:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988),r(26438);var s=n(r(93231)),o=r(98887),i=r(76163);t.CommandExecutor=class{constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"commands",{}),(0,s.default)(this,"commonCallback",null),this.hot=e}registerCommand(e,t){this.commands[e]=t}setCommonCallback(e){this.commonCallback=e}execute(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];const s=e.split(":"),a=s[0],l=2===s.length?s[1]:null;let u=this.commands[a];if(!u)throw new Error(`Menu command '${a}' not exists.`);if(l&&u.submenu&&(u=function(e,t){let r;return(0,o.arrayEach)(t,(t=>{const n=t.key?t.key.split(":"):null;if(Array.isArray(n)&&n[1]===e)return r=t,!1})),r}(l,u.submenu.items)),!0===u.disabled)return;if("function"==typeof u.disabled&&!0===u.disabled.call(this.hot))return;if((0,i.hasOwnProperty)(u,"submenu"))return;const h=[];"function"==typeof u.callback&&h.push(u.callback),"function"==typeof this.commonCallback&&h.push(this.commonCallback),r.unshift(s.join(":")),(0,o.arrayEach)(h,(e=>e.apply(this.hot,r)))}}},32082:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(33997),i=n(r(54925)),a=r(98887),l=r(76163),u=r(50426),h=r(66496),c=r(51366),d=r(12208),f=r(49587),p=r(86373);function g(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function m(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(79498);const E="contextMenu";t.PLUGIN_KEY=E;t.PLUGIN_PRIORITY=70;const y=E;i.default.getSingleton().register("afterContextMenuDefaultOptions"),i.default.getSingleton().register("beforeContextMenuShow"),i.default.getSingleton().register("afterContextMenuShow"),i.default.getSingleton().register("afterContextMenuHide"),i.default.getSingleton().register("afterContextMenuExecute");var w=new WeakSet,C=new WeakSet,v=new WeakSet,R=new WeakSet;class S extends o.BasePlugin{constructor(){super(...arguments),g(this,R),g(this,v),g(this,C),g(this,w),(0,s.default)(this,"commandExecutor",new u.CommandExecutor(this.hot)),(0,s.default)(this,"itemsFactory",null),(0,s.default)(this,"menu",null)}static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return 70}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[p.ROW_ABOVE,p.ROW_BELOW,p.SEPARATOR,p.COLUMN_LEFT,p.COLUMN_RIGHT,p.SEPARATOR,p.REMOVE_ROW,p.REMOVE_COLUMN,p.SEPARATOR,p.UNDO,p.REDO,p.SEPARATOR,p.READ_ONLY,p.SEPARATOR,p.ALIGNMENT]}isEnabled(){return!!this.hot.getSettings()[E]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[E];"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new c.Menu(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",(()=>m(this,C,N).call(this))),this.menu.addLocalHook("afterOpen",(()=>m(this,v,O).call(this))),this.menu.addLocalHook("afterClose",(()=>m(this,R,M).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.executeCommand.call(e,...r)})),this.addHook("afterOnCellContextMenu",(e=>m(this,w,T).call(this,e))),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","\\"],["Shift","F10"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();this.hot.scrollToFocusedCell();const t=this.hot.getCell(e.row,e.col,!0).getBoundingClientRect(),r=(0,d.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({left:t.left+r.left,top:t.top+r.top-1+t.height},{left:t.width,above:-t.height})},runOnlyIf:()=>this.hot.getSelectedRangeLast()&&!this.menu.isOpened(),group:y})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(y)}open(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.prepareMenuItems(),this.menu.open(),(0,l.objectEach)(r,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close(),this.itemsFactory=null}executeCommand(e){null===this.itemsFactory&&this.prepareMenuItems();for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.commandExecutor.execute(e,...r)}prepareMenuItems(){this.itemsFactory=new h.ItemsFactory(this.hot,S.DEFAULT_ITEMS);const e=this.hot.getSettings()[E],t={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const r=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",r),this.menu.setMenuItems(r),(0,a.arrayEach)(r,(e=>this.commandExecutor.registerCommand(e.key,e)))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function T(e){const t=this.hot.getSettings(),r=t.rowHeaders,n=t.colHeaders;const s=e.target;if(this.close(),(0,f.hasClass)(s,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!r&&!n&&!(function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(s)||(0,f.hasClass)(s,"current")&&(0,f.hasClass)(s,"wtBorder")))return;const o=(0,d.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+o.top,left:e.clientX+o.left})}function N(){this.hot.runHooks("beforeContextMenuShow",this)}function O(){this.hot.runHooks("afterContextMenuShow",this)}function M(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}t.ContextMenu=S,S.SEPARATOR={name:p.SEPARATOR}},22031:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(32082);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ContextMenu=n.ContextMenu},66496:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(76163),i=r(98887),a=r(86373);t.ItemsFactory=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,s.default)(this,"hot",void 0),(0,s.default)(this,"predefinedItems",(0,a.predefinedItems)()),(0,s.default)(this,"defaultOrderPattern",void 0),this.hot=e,this.defaultOrderPattern=t}setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,(0,o.objectEach)(e,((e,r)=>{let n="";e.name===a.SEPARATOR?(t[a.SEPARATOR]=e,n=a.SEPARATOR):isNaN(parseInt(r,10))?(e.key=void 0===e.key?r:e.key,t[r]=e,n=e.key):(t[e.key]=e,n=e.key),this.defaultOrderPattern.push(n)})),this.predefinedItems=t}getItems(){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=[];let s=e;s&&s.items?s=s.items:Array.isArray(s)||(s=t);(0,o.isObject)(s)?(0,o.objectEach)(s,((e,t)=>{let s=r["string"==typeof e?e:t];s||(s=e),(0,o.isObject)(e)?(0,o.extend)(s,e):"string"==typeof s&&(s={name:s}),void 0===s.key&&(s.key=t),n.push(s)})):(0,i.arrayEach)(s,((e,t)=>{let s=r[e];!s&&a.ITEMS.indexOf(e)>=0||(s||(s={name:e,key:`${t}`}),(0,o.isObject)(e)&&(0,o.extend)(s,e),void 0===s.key&&(s.key=t),n.push(s))}));return n}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}},28787:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.Cursor=class{constructor(e,t){(0,s.default)(this,"top",void 0),(0,s.default)(this,"topRelative",void 0),(0,s.default)(this,"left",void 0),(0,s.default)(this,"leftRelative",void 0),(0,s.default)(this,"scrollTop",void 0),(0,s.default)(this,"scrollLeft",void 0),(0,s.default)(this,"cellHeight",void 0),(0,s.default)(this,"cellWidth",void 0);const r=t.scrollY,n=t.scrollX;let o,i,a,l,u,h;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(o=parseInt(e.top,10),a=parseInt(e.left,10),u=e.height||0,h=e.width||0,i=o,l=a,o+=r,a+=n):"event"===this.type&&(o=parseInt(e.pageY,10),a=parseInt(e.pageX,10),u=e.target.clientHeight,h=e.target.clientWidth,i=o-r,l=a-n),this.top=o,this.topRelative=i,this.left=a,this.leftRelative=l,this.scrollTop=r,this.scrollLeft=n,this.cellHeight=u,this.cellWidth=h}getSourceType(e){let t="literal";return e instanceof Event&&(t="event"),t}fitsAbove(e){return this.topRelative>=e.offsetHeight}fitsBelow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}fitsOnRight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}fitsOnLeft(e){return this.leftRelative>=e.offsetWidth}}},26235:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultShortcutsList=function(e){return[{keys:[["Tab"],["Shift","Tab"],["Control/Meta","A"]],forwardToContext:e.hot.getShortcutManager().getContext("grid"),callback:()=>e.close(!0)},{keys:[["Escape"]],callback:()=>e.close()},{keys:[["ArrowDown"]],callback:()=>e.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>e.getNavigator().toPreviousItem()},{keys:[["ArrowRight"]],callback:()=>{const t=e.hotMenu.getSelectedLast();if(t){const r=e.openSubMenu(t[0]);r&&r.getNavigator().toFirstItem()}}},{keys:[["ArrowLeft"]],callback:()=>{e.hotMenu.getSelectedLast()&&e.isSubMenu()&&(e.close(),e.isSubMenu()&&e.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>e.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>e.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:t=>{const r=e.hotMenu.getSelectedLast();r&&(e.hotMenu.getSourceDataAtRow(r[0]).submenu?e.openSubMenu(r[0]).getNavigator().toFirstItem():(e.executeCommand(t),e.close(!0)))}},{keys:[["PageUp"]],callback:()=>{e.hotMenu.getSelectedLast()?e.hotMenu.selection.transformStart(-e.hotMenu.countVisibleRows(),0):e.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{e.hotMenu.getSelectedLast()?e.hotMenu.selection.transformStart(e.hotMenu.countVisibleRows(),0):e.getNavigator().toLastItem()}}]}},51366:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(37081);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},37081:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=n(r(48427)),i=n(r(42538)),a=r(77600),l=r(83820),u=r(71227),h=r(86373),c=r(79084),d=n(r(57340)),f=r(98887),p=r(78498),g=r(49587),m=r(30369),E=r(46029),y=r(97639),w=r(76163),C=n(r(63806)),v=r(25839),R=r(66862);function S(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var T=new WeakMap,N=new WeakMap;class O{constructor(e,t){var r=this;(0,s.default)(this,"hot",void 0),(0,s.default)(this,"options",void 0),(0,s.default)(this,"eventManager",new d.default(this)),(0,s.default)(this,"container",void 0),(0,s.default)(this,"positioner",void 0),(0,s.default)(this,"hotMenu",null),(0,s.default)(this,"hotSubMenus",{}),(0,s.default)(this,"parentMenu",void 0),(0,s.default)(this,"menuItems",null),(0,s.default)(this,"origOutsideClickDeselects",null),S(this,T,{writable:!0,value:void 0}),S(this,N,{writable:!0,value:void 0}),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new a.Positioner(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.parentMenu.runLocalHooks("afterSelectionChange",...t)}))}registerEvents(){let e=this.hot.rootWindow;for(;e;)this.eventManager.addEventListener(e.document,"mousedown",(e=>this.onDocumentMouseDown(e))),this.eventManager.addEventListener(e.document,"contextmenu",(e=>this.onDocumentContextMenu(e))),e=(0,g.getParentWindow)(e)}setMenuItems(e){this.menuItems=e}getNavigator(){return(0,i.default)(this,T)}getKeyboardShortcutsCtrl(){return(0,i.default)(this,N)}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedLast())}isSubMenu(){return null!==this.parentMenu}open(){this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const e=(0,E.debounce)((e=>this.openSubMenu(e)),300),t=this.options.minWidth||215;let r=!1,n=(0,f.arrayFilter)(this.menuItems,(e=>(e.key===h.NO_ITEMS&&(r=!0),(0,c.isItemHidden)(e,this.hot))));if(n.length<1&&!r)n.push((0,h.predefinedItems)()[h.NO_ITEMS]);else if(0===n.length)return;n=(0,c.filterSeparators)(n,h.SEPARATOR);let s=!1;const a={data:n,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:e=>(0,y.isDefined)(e)&&e<t?t:e,autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:(0,v.createMenuItemRenderer)(this.hot)}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,beforeOnCellMouseOver:(e,t)=>{(0,i.default)(this,T).setCurrentPage(t.row)},afterOnCellMouseOver:(t,r)=>{this.isAllSubMenusClosed()?e(r.row):this.openSubMenu(r.row)},rowHeights:e=>n[e].name===h.SEPARATOR?1:23,afterOnCellContextMenu:e=>{e.preventDefault(),(0,p.isWindowsOS)()&&s&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(e,t,r,n,s)=>{this.hotMenu.view.isMouseDown()&&(s.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:e=>{this.hasSelectedItem()&&(s=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(e))},afterOnCellMouseUp:e=>{(0,p.isWindowsOS)()&&(0,m.isRightClick)(e)||!s||!this.hasSelectedItem()||((0,p.isMobileBrowser)()||(0,p.isIpadOS)()?this.hot._registerTimeout((()=>this.close(!0)),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,a),this.hotMenu.addHook("afterInit",(()=>this.onAfterInit())),this.hotMenu.init(),(0,o.default)(this,T,(0,l.createMenuNavigator)(this.hotMenu)),(0,o.default)(this,N,(0,u.createKeyboardShortcutsCtrl)(this)),(0,i.default)(this,N).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",(()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this))),this.runLocalHooks("afterOpen",this)}close(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isOpened())if(e&&this.isSubMenu())this.parentMenu.close();else if((0,i.default)(this,T).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const e=this.parentMenu.hotMenu.getSelectedLast();if(e){const t=this.parentMenu.hotMenu.getCell(e[0],0);(0,g.setAttribute)(t,[(0,R.A11Y_EXPANDED)(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!(0,c.hasSubMenu)(t))return!1;const r=this.hotMenu.getSourceDataAtRow(e),n=new O(this.hot,{parent:this,name:r.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return n.setMenuItems(r.submenu.items),n.open(),n.setPosition(t.getBoundingClientRect()),this.hotSubMenus[r.key]=n,this.hot.getSettings().ariaTags&&(0,g.setAttribute)(t,[(0,R.A11Y_EXPANDED)(!0)]),n}closeSubMenu(e){const t=this.hotMenu.getSourceDataAtRow(e),r=this.hotSubMenus[t.key];if(r){r.destroy(),delete this.hotSubMenus[t.key];const n=this.hotMenu.getCell(e,0);this.hot.getSettings().ariaTags&&(0,g.setAttribute)(n,[(0,R.A11Y_EXPANDED)(!1)])}}closeAllSubMenus(){(0,f.arrayEach)(this.hotMenu.getData(),((e,t)=>this.closeSubMenu(t)))}isAllSubMenusClosed(){return 0===Object.keys(this.hotSubMenus).length}focus(){this.isOpened()&&(this.hotMenu.rootElement.focus({preventScroll:!0}),this.getKeyboardShortcutsCtrl().listen(),this.hotMenu.listen())}destroy(){const e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(e){if(!this.isOpened()||!this.hasSelectedItem())return;const t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),this.isCommandPassive(t))return;const r=this.hot.getSelectedRange(),n=r?(0,c.normalizeSelection)(r):[];this.runLocalHooks("executeCommand",t.key,n,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,n,e)}isCommandPassive(e){return!1===e.isCommand||(0,c.isItemSeparator)(e)||(0,c.isItemDisabled)(e,this.hot)||(0,c.isItemSubMenu)(e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.positioner.setOffset(e,t)}setPosition(e){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(e)}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.options.container.ownerDocument;let r,n=e;return n&&((0,E.isFunction)(n)&&(n=n.call(this.hot),n=null===n||(0,y.isUndefined)(n)?"":n.toString()),n=n.replace(/[^A-z0-9]/g,"_"),n=`${this.options.className}Sub_${n}`,r=t.querySelector(`.${this.options.className}.${n}`)),r||(r=t.createElement("div"),(0,g.addClass)(r,`htMenu ${this.options.className}`),n&&(0,g.addClass)(r,n),this.options.container.appendChild(r)),r}onAfterInit(){const{wtTable:e}=this.hotMenu.view._wt,t=this.hotMenu.getSettings().data,r=e.hider.style,n=e.holder.style,s=parseInt(r.width,10),o=(0,f.arrayReduce)(t,((e,t)=>e+(t.name===h.SEPARATOR?1:26)),0);n.width=`${s+3}px`,n.height=`${o+3}px`,r.height=n.height,this.hot.getSettings().ariaTags&&(0,g.setAttribute)(this.hotMenu.rootElement,[(0,R.A11Y_MENU)(),(0,R.A11Y_TABINDEX)(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,g.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,g.isChildOf)(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&(0,g.hasClass)(e.target,"htCore")&&(0,g.isChildOf)(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}t.Menu=O,(0,w.mixin)(O,C.default)},25839:(e,t,r)=>{"use strict";t.__esModule=!0,t.createMenuItemRenderer=function(e){return(t,r,a,l,u,h)=>{if(r.hasAttribute("ghost-table"))return;const c=t.getSourceDataAtRow(a),d=e.rootDocument.createElement("div"),f="function"==typeof h?h.call(e):h;if((0,s.empty)(r),(0,s.addClass)(d,"htItemWrapper"),e.getSettings().ariaTags){const t=!(0,n.isItemDisabled)(c,e)&&!(0,n.isItemSelectionDisabled)(c)&&!(0,n.isItemSeparator)(c);(0,s.setAttribute)(r,[(0,o.A11Y_MENU_ITEM)(),(0,o.A11Y_LABEL)(f),...t?[(0,o.A11Y_TABINDEX)(-1)]:[],...(0,n.isItemDisabled)(c,e)?[(0,o.A11Y_DISABLED)()]:[],...(0,n.isItemSubMenu)(c)?[(0,o.A11Y_EXPANDED)(!1)]:[]])}if((0,n.isItemSubMenu)(c)){r.querySelector(".submenuIndicator")||(0,s.appendElement)(r,{tagName:"div",attributes:e.getSettings().ariaTags?[(0,o.A11Y_HIDDEN)()]:[],className:i})}r.className="",r.appendChild(d),(0,n.isItemSeparator)(c)?(0,s.addClass)(r,"htSeparator"):"function"==typeof c.renderer?((0,s.addClass)(r,"htCustomMenuRenderer"),r.appendChild(c.renderer(t,d,a,l,u,f))):(0,s.fastInnerHTML)(d,f),(0,n.isItemDisabled)(c,e)?(0,s.addClass)(r,"htDisabled"):(0,n.isItemSelectionDisabled)(c)?(0,s.addClass)(r,"htSelectionDisabled"):(0,n.isItemSubMenu)(c)&&(0,s.addClass)(r,"htSubmenu")}};var n=r(79084),s=r(49587),o=r(66862);const i="submenuIndicator"},83820:(e,t,r)=>{"use strict";t.__esModule=!0,t.createMenuNavigator=function(e){return(0,n.createPaginator)({size:()=>e.countRows(),onItemSelect(t,r){const n=e.getCell(t,0);if(!n||(0,s.isSeparator)(n)||(0,s.isDisabled)(n)||(0,s.isSelectionDisabled)(n))return!1;e.selectCell(t,0,...r?[t,0,!1,!1]:[])},onClear(){e.deselectCell()}})};var n=r(99850),s=r(79084)},77600:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),o=n(r(48427)),i=r(28787);function a(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var l=new WeakMap,u=new WeakMap,h=new WeakMap,c=new WeakMap,d=new WeakMap;t.Positioner=class{constructor(e){a(this,l,{writable:!0,value:void 0}),a(this,u,{writable:!0,value:void 0}),a(this,h,{writable:!0,value:void 0}),a(this,c,{writable:!0,value:!1}),a(this,d,{writable:!0,value:{above:0,below:0,left:0,right:0}}),(0,o.default)(this,c,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,s.default)(this,d)[e]=t,this}setElement(e){return(0,o.default)(this,l,e),this}setParentElement(e){return(0,o.default)(this,u,e),this}updatePosition(e){(0,o.default)(this,h,new i.Cursor(e,(0,s.default)(this,l).ownerDocument.defaultView)),(0,s.default)(this,c)?((0,s.default)(this,h).fitsBelow((0,s.default)(this,l))?this.setPositionBelowCursor():(0,s.default)(this,h).fitsAbove((0,s.default)(this,l))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===(0,s.default)(this,l).dir?(0,s.default)(this,h).fitsOnLeft((0,s.default)(this,l))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():(0,s.default)(this,h).fitsOnRight((0,s.default)(this,l))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=(0,s.default)(this,d).above+(0,s.default)(this,h).top-(0,s.default)(this,l).offsetHeight;(0,s.default)(this,u)&&(e=(0,s.default)(this,h).top+(0,s.default)(this,h).cellHeight-(0,s.default)(this,l).offsetHeight+3),(0,s.default)(this,l).style.top=`${e}px`}setPositionBelowCursor(){let e=(0,s.default)(this,d).below+(0,s.default)(this,h).top+1;(0,s.default)(this,u)&&(e=(0,s.default)(this,h).top-1),(0,s.default)(this,l).style.top=`${e}px`}setPositionOnRightOfCursor(){let e=(0,s.default)(this,h).left;if((0,s.default)(this,u)){const{right:t}=(0,s.default)(this,u).getBoundingClientRect();e+=(0,s.default)(this,h).cellWidth+t-((0,s.default)(this,h).left+(0,s.default)(this,h).cellWidth)}else e+=(0,s.default)(this,d).right;(0,s.default)(this,l).style.left=`${e}px`}setPositionOnLeftOfCursor(){let e=(0,s.default)(this,d).left+(0,s.default)(this,h).left-(0,s.default)(this,l).offsetWidth;if((0,s.default)(this,u)){const{left:t}=(0,s.default)(this,u).getBoundingClientRect();e-=(0,s.default)(this,h).left-t}(0,s.default)(this,l).style.left=`${e}px`}}},71227:(e,t,r)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutsCtrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=[];function i(e,t){u(t).addShortcuts(e,{group:s})}function a(e,t){const n=u(t);e.forEach((e=>{let{keys:t}=e;t.forEach((e=>n.removeShortcutsByKeys(e)))})),r.push({shortcuts:e,contextName:t}),i(e,t)}function l(e){return e?`${o}:${e}`:o}function u(t){var r;const n=e.hotMenu.getShortcutManager(),s=l(t);return null!==(r=n.getContext(s))&&void 0!==r?r:n.addContext(s)}return i((0,n.createDefaultShortcutsList)(e)),t.forEach((e=>{let{shortcuts:t,contextName:r}=e;a(t,r)})),{addCustomShortcuts:a,getCustomShortcuts:function(){return[...r]},getContext:u,listen:function(t){e.hotMenu.getShortcutManager().setActiveContextName(l(t))}}},r(95988);var n=r(26235);const s="menu",o=s},79084:(e,t,r)=>{"use strict";t.__esModule=!0,t.filterSeparators=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.SEPARATOR,r=e.slice(0);return r=a(r,t),r=function(e,t){let r=e.slice(0);return r.reverse(),r=a(r,t),r.reverse(),r}(r,t),r=function(e){const t=[];return(0,n.arrayEach)(e,((e,r)=>{r>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}(r),r},t.hasSubMenu=function(e){return(0,o.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,o.hasClass)(e,"htDisabled")},t.isItemDisabled=function(e,t){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(t)},t.isItemHidden=function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))},t.isItemSelectionDisabled=function(e){return(0,s.hasOwnProperty)(e,"disableSelection")},t.isItemSeparator=function(e){return new RegExp(i.SEPARATOR,"i").test(e.name)},t.isItemSubMenu=function(e){return(0,s.hasOwnProperty)(e,"submenu")},t.isSelectionDisabled=function(e){return(0,o.hasClass)(e,"htSelectionDisabled")},t.isSeparator=function(e){return(0,o.hasClass)(e,"htSeparator")},t.normalizeSelection=function(e){return(0,n.arrayMap)(e,(e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()})))},r(95988);var n=r(98887),s=r(76163),o=r(49587),i=r(86373);function a(e,t){const r=e.slice(0);for(let e=0;e<r.length&&r[e].name===t;)r.shift();return r}},94328:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:a,name(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT)},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner()))},submenu:{items:[{key:`${a}:left`,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htLeft"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htLeft";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:center`,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htCenter"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htCenter";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:right`,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htRight"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htRight";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:justify`,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htJustify"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htJustify";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{name:s.KEY},{key:`${a}:top`,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htTop"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="vertical",s="htTop";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:middle`,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htMiddle"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="vertical",s="htMiddle";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:bottom`,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htBottom"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="vertical",s="htBottom";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1}]}}};var n=r(12208),s=r(71273),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="alignment";t.KEY=a},5026:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_CLEAR_COLUMN)},callback(e,t){const r=t[0].start.col,n=t[0].end.col;this.countRows()&&this.populateFromArray(0,r,[[null]],Math.max(t[0].start.row,t[0].end.row),n,"ContextMenu.clearColumn")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByColumnHeader())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const o="clear_column";t.KEY=o},36200:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_INSERT_LEFT)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner(),t=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(t,e.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countCols()}return this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols},hidden(){return!this.getSettings().allowInsertColumn}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const o="col_left";t.KEY=o},11374:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_INSERT_RIGHT)},callback(){const e=this.getSelectedRangeLast().getTopRightCorner(),t=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(t,e.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols))},hidden(){return!this.getSettings().allowInsertColumn}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const o="col_right";t.KEY=o},86373:(e,t,r)=>{"use strict";t.__esModule=!0,t.addItem=function(e,t){-1===w.indexOf(e)&&(C[e]=t)},t.predefinedItems=function(){const e={};return(0,n.objectEach)(C,((t,r)=>{e[r]=t()})),e};var n=r(76163),s=y(r(94328));t.ALIGNMENT=s.KEY;var o=y(r(5026));t.CLEAR_COLUMN=o.KEY;var i=y(r(36200));t.COLUMN_LEFT=i.KEY;var a=y(r(11374));t.COLUMN_RIGHT=a.KEY;var l=y(r(65732));t.READ_ONLY=l.KEY;var u=y(r(35656));t.REDO=u.KEY;var h=y(r(28074));t.REMOVE_COLUMN=h.KEY;var c=y(r(34146));t.REMOVE_ROW=c.KEY;var d=y(r(83487));t.ROW_ABOVE=d.KEY;var f=y(r(54869));t.ROW_BELOW=f.KEY;var p=y(r(71273));t.SEPARATOR=p.KEY;var g=y(r(63676));t.NO_ITEMS=g.KEY;var m=y(r(51159));function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(E=function(e){return e?r:t})(e)}function y(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=E(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}t.UNDO=m.KEY;const w=[d.KEY,f.KEY,i.KEY,a.KEY,o.KEY,c.KEY,h.KEY,m.KEY,u.KEY,l.KEY,s.KEY,p.KEY,g.KEY];t.ITEMS=w;const C={[p.KEY]:p.default,[g.KEY]:g.default,[d.KEY]:d.default,[f.KEY]:f.default,[i.KEY]:i.default,[a.KEY]:a.default,[o.KEY]:o.default,[c.KEY]:c.default,[h.KEY]:h.default,[m.KEY]:m.default,[u.KEY]:u.default,[l.KEY]:l.default,[s.KEY]:s.default}},63676:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:s,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_NO_ITEMS)},disabled:!0,isCommand:!1}};var n=r(497);const s="no_items";t.KEY=s},65732:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:a,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_READ_ONLY);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.checkSelectionConsistency)(e,((e,t)=>this.getCellMeta(e,t).readOnly));(0,s.arrayEach)(e,(e=>{e.forAll(((e,r)=>{e>=0&&r>=0&&this.setCellMeta(e,r,"readOnly",!t)}))})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||(!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||(!this.getSelectedRange()||0===this.getSelectedRange().length))))}}};var n=r(12208),s=r(98887),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="make_read_only";t.KEY=a},35656:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REDO)},callback(){this.redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const o="redo";t.KEY=o},28074:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[,r,,n]=e[0];r-n!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback(){this.alter("remove_col",(0,n.transformSelectionToColumnDistance)(this.getSelected()),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;const t=this.countCols();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByRowHeader()||0===t},hidden(){return!this.getSettings().allowRemoveColumn}}};var n=r(7763),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const i="remove_col";t.KEY=i},34146:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[r,,n]=e[0];r-n!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback(){this.alter("remove_row",(0,n.transformSelectionToRowDistance)(this.getSelected()),1,"ContextMenu.removeRow")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;const t=this.countRows();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByColumnHeader()||0===t},hidden(){return!this.getSettings().allowRemoveRow}}};var n=r(7763),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const i="remove_row";t.KEY=i},83487:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_ROW_ABOVE)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",e.row,1,"ContextMenu.rowAbove")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countRows()}return this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden(){return!this.getSettings().allowInsertRow}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const o="row_above";t.KEY=o},54869:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_ROW_BELOW)},callback(){const e=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",e.row,1,"ContextMenu.rowBelow")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.row<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows))},hidden(){return!this.getSettings().allowInsertRow}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const o="row_below";t.KEY=o},71273:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){return{name:r}};const r="---------";t.KEY=r},51159:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_UNDO)},callback(){this.undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const o="undo";t.KEY=o},12208:(e,t,r)=>{"use strict";t.__esModule=!0,t.align=function(e,t,r,i,a){(0,n.arrayEach)(e,(e=>{e.forAll(((e,n)=>{e>=0&&n>=0&&function(e,t,r,n,i,a){const l=i(e,t);let u=n;l.className&&(u="vertical"===r?s(l.className,n):o(l.className,n));a(e,t,"className",u)}(e,n,t,r,i,a)}))}))},t.checkSelectionConsistency=function(e,t){let r=!1;Array.isArray(e)&&(0,n.arrayEach)(e,(e=>(e.forAll(((e,n)=>{if(e>=0&&n>=0&&t(e,n))return r=!0,!1})),r)));return r},t.getAlignmentClasses=function(e,t){const r={};return(0,n.arrayEach)(e,(e=>{e.forAll(((e,n)=>{e>=0&&n>=0&&(r[e]||(r[e]=[]),r[e][n]=t(e,n))}))})),r},t.getDocumentOffsetByElement=function(e,t){const r={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:n,left:s}=e.getBoundingClientRect();r.top=n,r.left=s}return r},t.markLabelAsSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.prepareHorizontalAlignClass=o,t.prepareVerticalAlignClass=s;var n=r(98887);function s(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${t}`}function o(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${t}`}},55105:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}},72078:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY)},callback(){e.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497)},80771:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?(0,s.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY,t)},callback(){e.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497),s=r(57691)},22050:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,s.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS,t)},callback(){e.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497),s=r(57691)},15742:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,s.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS,t)},callback(){e.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497),s=r(57691)},54475:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"cut",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_CUT)},callback(){e.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},47771:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=n(r(42538)),i=n(r(48427)),a=r(33997),l=n(r(54925)),u=r(32313),h=r(98887),c=r(37913),d=r(49587),f=r(78498),p=n(r(72078)),g=n(r(80771)),m=n(r(22050)),E=n(r(15742)),y=n(r(54475)),w=n(r(16806)),C=r(98023),v=r(65795);function R(e,t){T(e,t),t.add(e)}function S(e,t,r){T(e,t),t.set(e,r)}function T(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function N(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(63824),l.default.getSingleton().register("afterCopyLimit"),l.default.getSingleton().register("modifyCopyableRange"),l.default.getSingleton().register("beforeCut"),l.default.getSingleton().register("afterCut"),l.default.getSingleton().register("beforePaste"),l.default.getSingleton().register("afterPaste"),l.default.getSingleton().register("beforeCopy"),l.default.getSingleton().register("afterCopy");const O="copyPaste";t.PLUGIN_KEY=O;t.PLUGIN_PRIORITY=80;const M=["fragmentSelection"],_=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var A=new WeakMap,b=new WeakMap,I=new WeakMap,x=new WeakMap,L=new WeakMap,P=new WeakMap,D=new WeakMap,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet,W=new WeakSet,Y=new WeakSet,G=new WeakSet;class j extends a.BasePlugin{constructor(){super(...arguments),R(this,G),R(this,Y),R(this,W),R(this,B),R(this,V),R(this,U),R(this,F),R(this,H),R(this,k),(0,s.default)(this,"columnsLimit",1/0),(0,s.default)(this,"rowsLimit",1/0),(0,s.default)(this,"pasteMode","overwrite"),(0,s.default)(this,"uiContainer",this.hot.rootDocument.body),S(this,A,{writable:!0,value:!1}),S(this,b,{writable:!0,value:!1}),S(this,I,{writable:!0,value:!1}),S(this,x,{writable:!0,value:"cells-only"}),S(this,L,{writable:!0,value:!1}),S(this,P,{writable:!0,value:!1}),S(this,D,{writable:!0,value:new C.CopyableRangesFactory({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})}),(0,s.default)(this,"copyableRanges",[])}static get PLUGIN_KEY(){return O}static get SETTING_KEYS(){return[O,...M]}static get PLUGIN_PRIORITY(){return 80}isEnabled(){return!!this.hot.getSettings()[O]}enablePlugin(){var e=this;if(this.enabled)return;const{[O]:t}=this.hot.getSettings();var r,n;"object"==typeof t&&(this.pasteMode=null!==(r=t.pasteMode)&&void 0!==r?r:this.pasteMode,this.rowsLimit=isNaN(t.rowsLimit)?this.rowsLimit:t.rowsLimit,this.columnsLimit=isNaN(t.columnsLimit)?this.columnsLimit:t.columnsLimit,(0,i.default)(this,A,!!t.copyColumnHeaders),(0,i.default)(this,b,!!t.copyColumnGroupHeaders),(0,i.default)(this,I,!!t.copyColumnHeadersOnly),this.uiContainer=null!==(n=t.uiContainer)&&void 0!==n?n:this.uiContainer);this.addHook("afterContextMenuDefaultOptions",(e=>N(this,V,q).call(this,e))),this.addHook("afterSelectionEnd",(()=>N(this,B,Q).call(this))),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(function(){return e.onCopy(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(function(){return e.onCut(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(function(){return e.onPaste(...arguments)})),(0,f.isSafari)()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N(e,W,Z).call(e,...r)})),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N(e,Y,J).call(e,...r)})),this.addHook("afterSelection",(()=>N(this,G,ee).call(this)))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only";(0,i.default)(this,x,e),(0,i.default)(this,L,!0),N(this,k,z).call(this,"copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){(0,i.default)(this,P,!0),N(this,k,z).call(this,"cut")}getRangedCopyableData(e){return(0,u.stringify)(this.getRangedData(e))}getRangedData(e){const t=[],{rows:r,columns:n}=(0,C.normalizeRanges)(e);return(0,h.arrayEach)(r,(e=>{const r=[];(0,h.arrayEach)(n,(t=>{e<0?r.push(this.hot.getColHeader(t,e)):r.push(this.hot.getCopyableData(e,t))})),t.push(r)})),t}paste(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!e&&!t)return;const r=new w.default;e&&r.clipboardData.setData("text/plain",e),t&&r.clipboardData.setData("text/html",t),this.onPaste(r)}setCopyableText(){const e=this.hot.getSelectedRangeLast();if(!e)return;if(e.isSingleHeader())return void(this.copyableRanges=[]);(0,o.default)(this,D).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===(0,o.default)(this,x)?t.set("headers",(0,o.default)(this,D).getMostBottomColumnHeadersRange()):("with-column-headers"===(0,o.default)(this,x)?t.set("headers",(0,o.default)(this,D).getMostBottomColumnHeadersRange()):"with-column-group-headers"===(0,o.default)(this,x)&&t.set("headers",(0,o.default)(this,D).getAllColumnHeadersRange()),t.set("cells",(0,o.default)(this,D).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter((e=>null!==e)).map((e=>{let{startRow:t,startCol:r,endRow:n,endCol:s}=e;return{startRow:t,startCol:r,endRow:n,endCol:s}})),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const r=t.get("cells");if(null!==r&&r.isRangeTrimmed){const{startRow:e,startCol:t,endRow:n,endCol:s}=r;this.hot.runHooks("afterCopyLimit",n-e+1,s-t+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){var e;return null===(e=this.hot.getActiveEditor())||void 0===e?void 0:e.isOpened()}populateValues(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(!e.length)return;const r=e.length,n=e[0].length,s=[],{row:o,col:i}=t.getTopStartCorner(),{row:a,col:l}=t.getBottomEndCorner();let u=o,h=i,c=o,d=i;for(;s.length<r||u<=a;){const{skipRowOnPaste:t,visualRow:a}=this.hot.getCellMeta(u,i);if(u=a+1,!0===t)continue;c=a,h=i;const f=[],p=s.length%r;for(;f.length<n||h<=l;){const{skipColumnOnPaste:t,visualCol:r}=this.hot.getCellMeta(o,h);if(h=r+1,!0===t)continue;d=r;const s=f.length%n;f.push(e[p][s])}s.push(f)}return this.hot.populateFromArray(o,i,s,void 0,void 0,"CopyPaste.paste",this.pasteMode),[o,i,c,d]}onCopy(e){if(!this.hot.isListening()&&!(0,o.default)(this,L)||this.isEditorOpened())return;this.setCopyableText(),(0,i.default)(this,L,!1);const t=this.getRangedData(this.copyableRanges),r=N(this,H,$).call(this,this.copyableRanges);if(!!this.hot.runHooks("beforeCopy",t,this.copyableRanges,r)){const n=(0,u.stringify)(t);if(e&&e.clipboardData){const r=(0,v._dataToHTML)(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",n),e.clipboardData.setData("text/html",[_,r].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",n);this.hot.runHooks("afterCopy",t,this.copyableRanges,r)}(0,i.default)(this,x,"cells-only"),e.preventDefault()}onCut(e){if(!this.hot.isListening()&&!(0,o.default)(this,P)||this.isEditorOpened())return;this.setCopyableText(),(0,i.default)(this,P,!1);const t=this.getRangedData(this.copyableRanges);if(!!this.hot.runHooks("beforeCut",t,this.copyableRanges)){const r=(0,u.stringify)(t);if(e&&e.clipboardData){const n=(0,v._dataToHTML)(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",r),e.clipboardData.setData("text/html",[_,n].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",r);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",t,this.copyableRanges)}e.preventDefault()}onPaste(e){if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected())return;let t;if(e&&e.preventDefault&&e.preventDefault(),e&&void 0!==e.clipboardData){const r=(0,c.sanitize)(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});if(r&&/(<table)|(<TABLE)/g.test(r)){t=(0,v.htmlToGridSettings)(r,this.hot.rootDocument).data}else t=e.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(t=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof t&&(t=(0,u.parse)(t)),void 0===t||t&&0===t.length)return;if(!1===this.hot.runHooks("beforePaste",t,this.copyableRanges))return;const[r,n,s,o]=this.populateValues(t);this.hot.selectCell(r,n,Math.min(this.hot.countRows()-1,s),Math.min(this.hot.countCols()-1,o)),this.hot.runHooks("afterPaste",t,this.copyableRanges)}destroy(){super.destroy()}}function z(e){if((0,f.isSafari)()){const t=this.hot.getSelectedRangeLast();if(t){const{row:r,col:n}=t.highlight,s=this.hot.getCell(r,n,!0);s&&(0,d.runWithSelectedContendEditableElement)(s,(()=>{this.hot.rootDocument.execCommand(e)}))}}else this.hot.rootDocument.execCommand(e)}function $(e){const{rows:t}=(0,C.normalizeRanges)(e);let r=0;for(let e=0;e<t.length&&!(t[e]>=0);e++)r+=1;return{columnHeadersCount:r}}function K(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:r}=e.highlight,n=this.hot.getCell(t,r,!0);n&&(0,d.makeElementContentEditableAndSelectItsContent)(n)}}}function X(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:r}=e.highlight,n=this.hot.getCell(t,r,!0);null!=n&&n.hasAttribute("contenteditable")&&(0,d.removeContentEditableFromElementAndDeselect)(n)}}}function q(e){e.items.push({name:"---------"},(0,p.default)(this)),(0,o.default)(this,A)&&e.items.push((0,E.default)(this)),(0,o.default)(this,b)&&e.items.push((0,m.default)(this)),(0,o.default)(this,I)&&e.items.push((0,g.default)(this)),e.items.push((0,y.default)(this))}function Q(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function Z(){N(this,U,X).call(this)}function J(){N(this,F,K).call(this)}function ee(){N(this,U,X).call(this)}t.CopyPaste=j},98023:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,t.normalizeRanges=function(e){const t=[],r=[];return(0,i.arrayEach)(e,(e=>{const n=Math.min(e.startRow,e.endRow),s=Math.max(e.startRow,e.endRow);(0,a.rangeEach)(n,s,(e=>{-1===t.indexOf(e)&&t.push(e)}));const o=Math.min(e.startCol,e.endCol),i=Math.max(e.startCol,e.endCol);(0,a.rangeEach)(o,i,(e=>{-1===r.indexOf(e)&&r.push(e)}))})),{rows:t,columns:r}},r(95988);var s=n(r(42538)),o=n(r(48427)),i=r(98887),a=r(57691);function l(e,t){h(e,t),t.add(e)}function u(e,t,r){h(e,t),t.set(e,r)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,E=new WeakMap,y=new WeakSet,w=new WeakSet;function C(e,t){return Math.min(t,Math.max(e+(0,s.default)(this,m).call(this)-1,e))}function v(e,t){return Math.min(t,Math.max(e+(0,s.default)(this,g).call(this)-1,e))}t.CopyableRangesFactory=class{constructor(e){let{countRows:t,countColumns:r,rowsLimit:n,columnsLimit:s,countColumnHeaders:i}=e;l(this,w),l(this,y),u(this,d,{writable:!0,value:void 0}),u(this,f,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:void 0}),u(this,g,{writable:!0,value:void 0}),u(this,m,{writable:!0,value:void 0}),u(this,E,{writable:!0,value:void 0}),(0,o.default)(this,f,t),(0,o.default)(this,p,r),(0,o.default)(this,g,n),(0,o.default)(this,m,s),(0,o.default)(this,E,i)}setSelectedRange(e){(0,o.default)(this,d,e)}getCellsRange(){if(0===(0,s.default)(this,f).call(this)||0===(0,s.default)(this,p).call(this))return null;const{row:e,col:t}=(0,s.default)(this,d).getTopStartCorner(),{row:r,col:n}=(0,s.default)(this,d).getBottomEndCorner(),o=c(this,w,v).call(this,e,r),i=c(this,y,C).call(this,t,n);return{isRangeTrimmed:r!==o||n!==i,startRow:e,startCol:t,endRow:o,endCol:i}}getMostBottomColumnHeadersRange(){if(0===(0,s.default)(this,p).call(this)||0===(0,s.default)(this,E).call(this))return null;const{col:e}=(0,s.default)(this,d).getTopStartCorner(),{col:t}=(0,s.default)(this,d).getBottomEndCorner(),r=c(this,y,C).call(this,e,t);return{isRangeTrimmed:t!==r,startRow:-1,startCol:e,endRow:-1,endCol:r}}getAllColumnHeadersRange(){if(0===(0,s.default)(this,p).call(this)||0===(0,s.default)(this,E).call(this))return null;const{col:e}=(0,s.default)(this,d).getTopStartCorner(),{col:t}=(0,s.default)(this,d).getBottomEndCorner(),r=c(this,y,C).call(this,e,t);return{isRangeTrimmed:t!==r,startRow:-(0,s.default)(this,E).call(this),startCol:e,endRow:-1,endCol:r}}}},82630:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(47771);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.CopyPaste=n.CopyPaste},16806:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(55105));t.default=class{constructor(){this.clipboardData=new s.default}}},50526:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return(0,s.checkSelectionBorders)(this,"bottom")&&(e=(0,s.markSelected)(e)),e},callback(t,r){const n=(0,s.checkSelectionBorders)(this,"bottom");e.prepareBorder(r,"bottom",n)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(17802);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}},47586:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(50526));t.bottom=s.default;var o=n(r(13125));t.left=o.default;var i=n(r(76196));t.noBorders=i.default;var a=n(r(72431));t.right=a.default;var l=n(r(41056));t.top=l.default},13125:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_LEFT);return(0,s.checkSelectionBorders)(this,t)&&(e=(0,s.markSelected)(e)),e},callback(r,n){const o=(0,s.checkSelectionBorders)(this,t);e.prepareBorder(n,t,o)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(17802);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}},76196:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback(t,r){e.prepareBorder(r,"noBorders")},disabled(){return!(0,s.checkSelectionBorders)(this)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(17802);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}},72431:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return(0,s.checkSelectionBorders)(this,t)&&(e=(0,s.markSelected)(e)),e},callback(r,n){const o=(0,s.checkSelectionBorders)(this,t);e.prepareBorder(n,t,o)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(17802);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}},41056:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:top",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_TOP);return(0,s.checkSelectionBorders)(this,"top")&&(e=(0,s.markSelected)(e)),e},callback(t,r){const n=(0,s.checkSelectionBorders)(this,"top");e.prepareBorder(r,"top",n)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(17802);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}},91166:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(33997),i=r(76163),a=r(57691),l=r(98887),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),h=r(47586),c=r(17802),d=r(79055);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}function p(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function g(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const m="customBorders";t.PLUGIN_KEY=m;t.PLUGIN_PRIORITY=90;var E=new WeakSet,y=new WeakSet;class w extends o.BasePlugin{constructor(){super(...arguments),p(this,y),p(this,E),(0,s.default)(this,"savedBorders",[])}static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return 90}isEnabled(){return!!this.hot.getSettings()[m]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>g(this,E,C).call(this,e))),this.addHook("init",(()=>g(this,y,v).call(this))),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(e,t){let r=["top","bottom","start","end"],n=null;t&&(this.checkSettingsCohesion([t]),r=Object.keys(t),n=(0,c.normalizeBorder)(t));const s=(0,d.detectSelectionType)(e),o=(0,d.normalizeSelectionFactory)(s);(0,l.arrayEach)(e,(e=>{o(e).forAll(((e,t)=>{(0,l.arrayEach)(r,(r=>{this.prepareBorderFromCustomAdded(e,t,n,(0,c.toInlinePropName)(r))}))}))})),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=(0,d.detectSelectionType)(e),r=(0,d.normalizeSelectionFactory)(t),n=[];return(0,l.arrayEach)(e,(e=>{r(e).forAll(((e,t)=>{(0,l.arrayEach)(this.savedBorders,(r=>{r.row===e&&r.col===t&&n.push((0,c.denormalizeBorder)(r))}))}))})),n}clearBorders(e){e?this.setBorders(e):((0,l.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),this.hot.removeCellMeta(e.row,e.col,"borders")})),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){this.checkSavedBorders(e)||this.savedBorders.push(e);const r=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col));this.checkCustomSelections(e,r,t)||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:r})}prepareBorderFromCustomAdded(e,t,r,n){const s=this.hot.countRows(),o=this.hot.countCols();if(e>=s||t>=o)return;let i=(0,c.createEmptyBorders)(e,t);r&&(i=(0,c.extendDefaultBorder)(i,r),(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(e=>{if(i.id===e.settings.id)return Object.assign(e.settings,r),i.id=e.settings.id,i.top=e.settings.top,i.bottom=e.settings.bottom,i.start=e.settings.start,i.end=e.settings.end,!1}))),this.hot.setCellMeta(e,t,"borders",(0,c.denormalizeBorder)(i)),this.insertBorderIntoSettings(i,n)}prepareBorderFromCustomAddedRange(e,t){const r=Math.min(e.to.row,this.hot.countRows()-1),n=Math.min(e.to.col,this.hot.countCols()-1);(0,a.rangeEach)(e.from.row,r,(r=>{(0,a.rangeEach)(e.from.col,n,(n=>{const s=(0,c.createEmptyBorders)(r,n);let o=0;r===e.from.row&&(0,i.hasOwnProperty)(t,"top")&&(o+=1,s.top=t.top),r===e.to.row&&(0,i.hasOwnProperty)(t,"bottom")&&(o+=1,s.bottom=t.bottom),n===e.from.col&&(0,i.hasOwnProperty)(t,"start")&&(o+=1,s.start=t.start),n===e.to.col&&(0,i.hasOwnProperty)(t,"end")&&(o+=1,s.end=t.end),o>0&&(this.hot.setCellMeta(r,n,"borders",(0,c.denormalizeBorder)(s)),this.insertBorderIntoSettings(s))}))}))}removeAllBorders(e,t){const r=(0,c.createId)(e,t);this.spliceBorder(r),this.clearBordersFromSelectionSettings(r),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,r,n){let s=this.hot.getCellMeta(e,t).borders;if(s=s&&void 0!==s.border?(0,c.normalizeBorder)(s):(0,c.createEmptyBorders)(e,t),n){s[r]=(0,c.createSingleEmptyBorder)();if(4===this.countHide(s))this.removeAllBorders(e,t);else{this.checkCustomSelectionsFromContextMenu(s,r,n)||this.insertBorderIntoSettings(s),this.hot.setCellMeta(e,t,"borders",(0,c.denormalizeBorder)(s))}}else{s[r]=(0,c.createDefaultCustomBorder)();this.checkCustomSelectionsFromContextMenu(s,r,n)||this.insertBorderIntoSettings(s),this.hot.setCellMeta(e,t,"borders",(0,c.denormalizeBorder)(s))}}prepareBorder(e,t,r){(0,l.arrayEach)(e,(e=>{let{start:n,end:s}=e;if(n.row===s.row&&n.col===s.col)"noBorders"===t?this.removeAllBorders(n.row,n.col):this.setBorder(n.row,n.col,t,r);else switch(t){case"noBorders":(0,a.rangeEach)(n.col,s.col,(e=>{(0,a.rangeEach)(n.row,s.row,(t=>{this.removeAllBorders(t,e)}))}));break;case"top":(0,a.rangeEach)(n.col,s.col,(e=>{this.setBorder(n.row,e,t,r)}));break;case"bottom":(0,a.rangeEach)(n.col,s.col,(e=>{this.setBorder(s.row,e,t,r)}));break;case"start":(0,a.rangeEach)(n.row,s.row,(e=>{this.setBorder(e,n.col,t,r)}));break;case"end":(0,a.rangeEach)(n.row,s.row,(e=>{this.setBorder(e,s.col,t,r)}))}}))}createCustomBorders(e){(0,l.arrayEach)(e,(e=>{const t=(0,c.normalizeBorder)(e);e.range?this.prepareBorderFromCustomAddedRange(e.range,t):this.prepareBorderFromCustomAdded(e.row,e.col,t)}))}countHide(e){const{top:t,bottom:r,start:n,end:s}=e,o=[t,r,n,s];return(0,l.arrayReduce)(o,((e,t)=>{let r=e;return t&&t.hide&&(r+=1),r}),0)}clearBordersFromSelectionSettings(e){const t=(0,l.arrayMap)(this.hot.selection.highlight.customSelections,(e=>e.settings.id)).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){(0,l.arrayEach)(this.hot.selection.highlight.customSelections,((e,t)=>{if(null===e.cellRange)return this.hot.selection.highlight.customSelections[t].destroy(),this.hot.selection.highlight.customSelections.splice(t,1),!1}))}hideBorders(){(0,l.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()}))}spliceBorder(e){const t=(0,l.arrayMap)(this.savedBorders,(e=>e.id)).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;return 4===this.countHide(e)?(this.spliceBorder(e.id),t=!0):(0,l.arrayEach)(this.savedBorders,((r,n)=>{if(e.id===r.id)return this.savedBorders[n]=e,t=!0,!1})),t}checkCustomSelectionsFromContextMenu(e,t,r){let n=!1;return(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(s=>{if(e.id===s.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(s);return(0,l.arrayEach)(e,(e=>{e.toggleHiddenClass(t,r)})),n=!0,!1}})),n}checkCustomSelections(e,t,r){const n=this.countHide(e);let s=!1;return 4===n?(this.removeAllBorders(e.row,e.col),s=!0):(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(n=>{if(e.id===n.settings.id){if(n.visualCellRange=t,n.commit(),r){const t=this.hot.view._wt.selectionManager.getBorderInstances(n);(0,l.arrayEach)(t,(t=>{t.changeBorderStyle(r,e)}))}return s=!0,!1}})),s}changeBorderSettings(){const e=this.hot.getSettings()[m];if(Array.isArray(e)){const t=(0,i.deepClone)(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else void 0!==e&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=(0,c.hasLeftRightTypeOptions)(e),r=(0,c.hasStartEndTypeOptions)(e);if(t&&r)throw new Error('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".');if(this.hot.isRtl()&&t)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}destroy(){super.destroy()}}function C(e){this.hot.getSettings()[m]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(u.CONTEXTMENU_ITEMS_BORDERS)},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[(0,h.top)(this),(0,h.right)(this),(0,h.bottom)(this),(0,h.left)(this),(0,h.noBorders)(this)]}})}function v(){this.changeBorderSettings()}t.CustomBorders=w},93725:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(91166);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.CustomBorders=n.CustomBorders},17802:(e,t,r)=>{"use strict";t.__esModule=!0,t.checkSelectionBorders=function(e,t){let r=!1;return(0,o.arrayEach)(e.getSelectedRange(),(s=>{s.forAll(((s,o)=>{if(s<0||o<0)return;const i=e.getCellMeta(s,o).borders;if(i){if(!t)return r=!0,!1;if(!(0,n.hasOwnProperty)(i[t],"hide")||!1===i[t].hide)return r=!0,!1}}))})),r},t.createDefaultCustomBorder=a,t.createDefaultHtBorder=u,t.createEmptyBorders=function(e,t){return{id:i(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},bottom:{hide:!0},start:{hide:!0},end:{hide:!0}}},t.createId=i,t.createSingleEmptyBorder=l,t.denormalizeBorder=function(e){(0,s.isDefined)(e.start)&&(e.left=e.start);(0,s.isDefined)(e.end)&&(e.right=e.end);return e},t.extendDefaultBorder=function(e,t){(0,n.hasOwnProperty)(t,"border")&&t.border&&(e.border=t.border);(0,n.hasOwnProperty)(t,"top")&&(0,s.isDefined)(t.top)&&(t.top?((0,n.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top));(0,n.hasOwnProperty)(t,"bottom")&&(0,s.isDefined)(t.bottom)&&(t.bottom?((0,n.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom));(0,n.hasOwnProperty)(t,"start")&&(0,s.isDefined)(t.start)&&(t.start?((0,n.isObject)(t.start)||(t.start={width:1,color:"#000"}),e.start=t.start):(t.start={hide:!0},e.start=t.start));(0,n.hasOwnProperty)(t,"end")&&(0,s.isDefined)(t.end)&&(t.end?((0,n.isObject)(t.end)||(t.end={width:1,color:"#000"}),e.end=t.end):(t.end={hide:!0},e.end=t.end));return e},t.hasLeftRightTypeOptions=function(e){return e.some((e=>(0,s.isDefined)(e.left)||(0,s.isDefined)(e.right)))},t.hasStartEndTypeOptions=function(e){return e.some((e=>(0,s.isDefined)(e.start)||(0,s.isDefined)(e.end)))},t.markSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.normalizeBorder=function(e){var t,r;((0,s.isDefined)(e.start)||(0,s.isDefined)(e.left))&&(e.start=null!==(t=e.start)&&void 0!==t?t:e.left);((0,s.isDefined)(e.end)||(0,s.isDefined)(e.right))&&(e.end=null!==(r=e.end)&&void 0!==r?r:e.right);return delete e.left,delete e.right,e},t.toInlinePropName=function(e){var t;return null!==(t=h.get(e))&&void 0!==t?t:e};var n=r(76163),s=r(97639),o=r(98887);function i(e,t){return`border_row${e}col${t}`}function a(){return{width:1,color:"#000"}}function l(){return{hide:!0}}function u(){return{width:1,color:"#000",cornerVisible:!1}}const h=new Map([["left","start"],["right","end"]])},16703:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(33997),i=r(30369),a=r(49587);function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const h="dragToScroll";t.PLUGIN_KEY=h;t.PLUGIN_PRIORITY=100;var c=new WeakSet;class d extends o.BasePlugin{constructor(){super(...arguments),l(this,c),(0,s.default)(this,"boundaries",null),(0,s.default)(this,"callback",null),(0,s.default)(this,"listening",!1)}static get PLUGIN_KEY(){return h}static get PLUGIN_PRIORITY(){return 100}isEnabled(){return!!this.hot.getSettings()[h]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",(e=>u(this,c,f).call(this,e))),this.addHook("afterOnCellCornerMouseDown",(e=>u(this,c,f).call(this,e))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(e){this.boundaries=e}setCallback(e){this.callback=e}check(e,t){let r=0,n=0;t<this.boundaries.top?n=t-this.boundaries.top:t>this.boundaries.bottom&&(n=t-this.boundaries.bottom),e<this.boundaries.left?r=e-this.boundaries.left:e>this.boundaries.right&&(r=e-this.boundaries.right),this.callback(r,n)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:e}=this.hot;let t=e;for(;t;)this.eventManager.addEventListener(t.document,"contextmenu",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mouseup",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mousemove",(e=>this.onMouseMove(e))),t=(0,a.getParentWindow)(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}function f(e){if((0,i.isRightClick)(e))return;const t=this.hot.view._wt.wtTable.holder;t!==this.hot.rootWindow&&(this.setBoundaries(t.getBoundingClientRect()),this.setCallback(((e,r)=>{e<0?t.scrollLeft-=50:e>0&&(t.scrollLeft+=50),r<0?t.scrollTop-=20:r>0&&(t.scrollTop+=20)})),this.listen())}t.DragToScroll=d},59910:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(16703);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.DragToScroll=n.DragToScroll},20877:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(33997),i=r(98887),a=r(76163),l=r(50426),u=r(12208),h=r(49587),c=r(66496),d=r(51366),f=n(r(54925)),p=r(86373);r(59456);var g=r(497),m=r(66862);function E(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}f.default.getSingleton().register("afterDropdownMenuDefaultOptions"),f.default.getSingleton().register("beforeDropdownMenuShow"),f.default.getSingleton().register("afterDropdownMenuShow"),f.default.getSingleton().register("afterDropdownMenuHide"),f.default.getSingleton().register("afterDropdownMenuExecute");const w="dropdownMenu";t.PLUGIN_KEY=w;t.PLUGIN_PRIORITY=230;const C="changeType",v=w;var R=new WeakSet,S=new WeakSet,T=new WeakSet,N=new WeakSet,O=new WeakSet,M=new WeakSet,_=new WeakSet;class A extends o.BasePlugin{static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return 230}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[p.COLUMN_LEFT,p.COLUMN_RIGHT,p.SEPARATOR,p.REMOVE_COLUMN,p.SEPARATOR,p.CLEAR_COLUMN,p.SEPARATOR,p.READ_ONLY,p.SEPARATOR,p.ALIGNMENT]}constructor(e){super(e),E(this,_),E(this,M),E(this,O),E(this,N),E(this,T),E(this,S),E(this,R),(0,s.default)(this,"commandExecutor",new l.CommandExecutor(this.hot)),(0,s.default)(this,"itemsFactory",null),(0,s.default)(this,"menu",null),this.hot.addHook("afterGetColHeader",((e,t)=>y(this,T,x).call(this,e,t)))}isEnabled(){return this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new c.ItemsFactory(this.hot,A.DEFAULT_ITEMS);const t=this.hot.getSettings()[w],r={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady((()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",r),this.itemsFactory.setPredefinedItems(r.items);const n=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new d.Menu(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.hot.runHooks("beforeDropdownMenuSetItems",n),this.menu.setMenuItems(n),this.menu.addLocalHook("beforeOpen",(()=>y(this,N,L).call(this))),this.menu.addLocalHook("afterOpen",(()=>y(this,O,P).call(this))),this.menu.addLocalHook("afterSubmenuOpen",(e=>y(this,M,D).call(this,e))),this.menu.addLocalHook("afterClose",(()=>y(this,_,k).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.executeCommand.call(e,...r)})),(0,i.arrayEach)(n,(e=>this.commandExecutor.registerCommand(e.key,e)))}))}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if((e.isHeader()&&-1===e.row||e.isCell())&&e.col>=0){this.hot.selectColumns(e.col,e.col,-1);const{from:t}=this.hot.getSelectedRangeLast(),r=(0,u.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),n=this.hot.getCell(-1,t.col,!0),s=n.getBoundingClientRect();this.open({left:s.left+r.left,top:s.top+n.offsetHeight+r.top},{left:s.width})}};this.hot.getShortcutManager().getContext("grid").addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:e,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader())&&!this.menu.isOpened()},captureCtrl:!0,group:v},{keys:[["Shift","Alt","ArrowDown"]],callback:e,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!this.menu.isOpened()},group:v}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(v)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",(e=>y(this,S,I).call(this,e)))}open(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.menu.open(),(0,a.objectEach)(r,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close()}executeCommand(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.commandExecutor.execute(e,...r)}setListening(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function b(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function I(e){if(e.stopPropagation(),(0,h.hasClass)(e.target,C)){const t=(0,u.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),r=e.target.getBoundingClientRect();this.open({left:r.left+t.left,top:r.top+e.target.offsetHeight+3+t.top},{left:r.width})}}function x(e,t){const r=t.parentNode;if(!r)return;const n=r.parentNode.childNodes,s=Array.prototype.indexOf.call(n,r);if(e<0||s!==n.length-1)return;const o=t.querySelector(`.${C}`);if(this.enabled&&o)return;if(!this.enabled)return void(o&&o.parentNode.removeChild(o));const i=this.hot.rootDocument.createElement("button");i.className=C,i.type="button",i.tabIndex=-1,this.hot.getSettings().ariaTags&&((0,h.setAttribute)(i,[(0,m.A11Y_LABEL)(this.hot.getTranslatedPhrase(g.COLUMN_HEADER_LABEL_OPEN_MENU))]),(0,h.setAttribute)(t,[(0,m.A11Y_HASPOPUP)("menu")])),i.onclick=function(){return!1},t.firstChild.insertBefore(i,t.firstChild.firstChild)}function L(){this.hot.runHooks("beforeDropdownMenuShow",this)}function P(){this.hot.runHooks("afterDropdownMenuShow",this),y(this,R,b).call(this,this.menu)}function D(e){y(this,R,b).call(this,e)}function k(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}t.DropdownMenu=A,A.SEPARATOR={name:p.SEPARATOR}},82143:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(20877);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.DropdownMenu=n.DropdownMenu},39105:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(57691);var i=class{constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"options",{}),this.hot=e}setOptions(e){this.options=e}getData(){const{startRow:e,startCol:t,endRow:r,endCol:n}=this._getDataRange(),s=this.options,i=[];return(0,o.rangeEach)(e,r,(e=>{const r=[];!s.exportHiddenRows&&this._isHiddenRow(e)||((0,o.rangeEach)(t,n,(t=>{!s.exportHiddenColumns&&this._isHiddenColumn(t)||r.push(this.hot.getDataAtCell(e,t))})),i.push(r))})),i}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:r}=this._getDataRange(),n=this.hot.getRowHeader();(0,o.rangeEach)(t,r,(t=>{!this.options.exportHiddenRows&&this._isHiddenRow(t)||e.push(n[t])}))}return e}getColumnHeaders(){const e=[];if(this.options.columnHeaders){const{startCol:t,endCol:r}=this._getDataRange(),n=this.hot.getColHeader();(0,o.rangeEach)(t,r,(t=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(t)||e.push(n[t])}))}return e}_getDataRange(){const e=this.hot.countCols()-1,t=this.hot.countRows()-1;let[r=0,n=0,s=t,o=e]=this.options.range;return r=Math.max(r,0),n=Math.max(n,0),s=Math.min(s,t),o=Math.min(o,e),{startRow:r,startCol:n,endRow:s,endCol:o}}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}};t.default=i},33726:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=r(33997),o=n(r(39105)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(54655));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l="exportFile";t.PLUGIN_KEY=l;t.PLUGIN_PRIORITY=240;class u extends s.BasePlugin{static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return 240}isEnabled(){return!0}exportAsString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,t).export()}exportAsBlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,t))}downloadFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:r,rootWindow:n}=this.hot,s=this._createTypeFormatter(e,t),o=this._createBlob(s),i=n.URL||n.webkitURL,a=r.createElement("a"),l=`${s.options.filename}.${s.options.fileExtension}`;if(void 0!==a.download){const e=i.createObjectURL(o);a.style.display="none",a.setAttribute("href",e),a.setAttribute("download",l),r.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),r.body.removeChild(a),setTimeout((()=>{i.revokeObjectURL(e)}),100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(o,l)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!i.EXPORT_TYPES[e])throw new Error(`Export format type "${e}" is not supported.`);return(0,i.default)(e,new o.default(this.hot),t)}_createBlob(e){let t=null;return"undefined"!=typeof Blob&&(t=new Blob([e.export()],{type:`${e.options.mimeType};charset=${e.options.encoding}`})),t}}t.ExportFile=u},57103:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(33726);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ExportFile=n.ExportFile},54655:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.default=function(e,t,r){if("function"==typeof o[e])return new o[e](t,r);return null};var s=n(r(40202));t.TYPE_CSV="csv";t.TYPE_EXCEL="excel";t.TYPE_PDF="pdf";const o={csv:s.default};t.EXPORT_TYPES=o},68716:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(76163),i=r(37913);class a{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}constructor(e,t){(0,s.default)(this,"dataProvider",void 0),(0,s.default)(this,"options",void 0),this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}_mergeOptions(e){let t=(0,o.clone)(this.constructor.DEFAULT_OPTIONS);const r=new Date;return t=(0,o.extend)((0,o.clone)(a.DEFAULT_OPTIONS),t),t=(0,o.extend)(t,e),t.filename=(0,i.substitute)(t.filename,{YYYY:r.getFullYear(),MM:`${r.getMonth()+1}`.padStart(2,"0"),DD:`${r.getDate()}`.padStart(2,"0")}),t}}var l=a;t.default=l},40202:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(98887),o=r(97639),i=n(r(68716));const a=String.fromCharCode(13),l=String.fromCharCode(34),u=String.fromCharCode(10);class h extends i.default{static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n"}}export(){const e=this.options,t=this.dataProvider.getData();let r=this.dataProvider.getColumnHeaders();const n=r.length>0,o=this.dataProvider.getRowHeaders(),i=o.length>0;let a=e.bom?String.fromCharCode(65279):"";return n&&(r=(0,s.arrayMap)(r,(e=>this._escapeCell(e,!0))),i&&(a+=e.columnDelimiter),a+=r.join(e.columnDelimiter),a+=e.rowDelimiter),(0,s.arrayEach)(t,((t,r)=>{r>0&&(a+=e.rowDelimiter),i&&(a+=this._escapeCell(o[r])+e.columnDelimiter),a+=t.map((e=>this._escapeCell(e))).join(e.columnDelimiter)})),a}_escapeCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=(0,o.stringify)(e);return""!==r&&(t||r.indexOf(a)>=0||r.indexOf(l)>=0||r.indexOf(u)>=0||r.indexOf(this.options.columnDelimiter)>=0)&&(r=r.replace(new RegExp('"',"g"),'""'),r=`"${r}"`),r}}var c=h;t.default=c},31168:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(98887),i=r(76163),a=n(r(63806)),l=r(41789);class u{constructor(e,t){let{id:r,stateless:n=!0}=t;(0,s.default)(this,"hot",void 0),(0,s.default)(this,"id",void 0),(0,s.default)(this,"elements",[]),(0,s.default)(this,"hidden",!1),(0,s.default)(this,"stateId",""),(0,s.default)(this,"state",void 0),this.hot=e,this.id=r,this.stateId=`Filters.component.${this.id}`,this.state=n?null:this.hot.columnIndexMapper.registerMap(this.stateId,new l.LinkedPhysicalIndexToValueMap)}getElements(){return this.elements}reset(){(0,o.arrayEach)(this.elements,(e=>e.reset()))}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return null===this.hot||this.hidden}restoreState(e){this.state&&this.setState(this.state.getValueAtIndex(e))}setState(){throw new Error("The state setting logic is not implemented")}saveState(e){this.state&&this.state.setValueAtIndex(e,this.getState())}getState(){throw new Error("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),(0,o.arrayEach)(this.elements,(e=>e.destroy())),this.state=null,this.elements=null,this.hot=null}}t.BaseComponent=u,(0,i.mixin)(u,a.default)},78884:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s,o=n(r(93231)),i=r(49587),a=r(98887),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),u=r(31168),h=r(69346);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}function d(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}var f=new WeakSet;class p extends u.BaseComponent{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(e,t){super(e,{id:t.id,stateless:!0}),d(this,f),(0,o.default)(this,"name",""),this.name=t.name,this.elements.push(new h.InputUI(this.hot,{type:"button",value:l.FILTERS_BUTTONS_OK,className:"htUIButton htUIButtonOK",identifier:p.BUTTON_OK})),this.elements.push(new h.InputUI(this.hot,{type:"button",value:l.FILTERS_BUTTONS_CANCEL,className:"htUIButton htUIButtonCancel",identifier:p.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){(0,a.arrayEach)(this.elements,(e=>{e.addLocalHook("click",((e,t)=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,f,g).call(this,e,t)))}))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,i.addClass)(t.parentNode,"htFiltersMenuActionBar"),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function g(e,t){t.options.identifier===s.BUTTON_OK?this.accept():this.cancel()}t.ActionBarComponent=p,s=p},9666:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(49587),i=r(30369),a=r(98887),l=r(49223),u=r(76163),h=E(r(497)),c=r(31168),d=E(r(78327)),f=r(69346),p=r(23335),g=r(41830);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(m=function(e){return e?r:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=m(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}function y(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function w(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var C=new WeakSet,v=new WeakSet;class R extends c.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),y(this,v),y(this,C),(0,s.default)(this,"name",""),(0,s.default)(this,"addSeparator",!1),this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new p.SelectUI(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new f.InputUI(this.hot,{placeholder:h.FILTERS_BUTTONS_PLACEHOLDER_VALUE})),this.elements.push(new f.InputUI(this.hot,{placeholder:h.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",(e=>w(this,C,S).call(this,e))).addLocalHook("afterClose",(()=>this.runLocalHooks("afterClose"))).addLocalHook("tabKeydown",(e=>this.runLocalHooks("selectTabKeydown",e))),(0,a.arrayEach)(this.getInputElements(),(e=>{e.addLocalHook("keydown",(e=>w(this,v,T).call(this,e)))}))}setState(e){if(this.reset(),!e)return;const t=(0,u.clone)(e.command);t.name.startsWith(h.FILTERS_CONDITIONS_NAMESPACE)&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),(0,a.arrayEach)(e.args,((e,r)=>{if(r>t.inputsCount-1)return!1;const n=this.getInputElement(r);n.setValue(e),n[t.inputsCount>r?"show":"hide"](),r||this.hot._registerTimeout((()=>n.focus()),10)}))}getState(){const e=this.getSelectElement().getValue()||(0,g.getConditionDescriptor)(d.CONDITION_NONE),t=[];return(0,a.arrayEach)(this.getInputElements(),((r,n)=>{e.inputsCount>n&&t.push(r.getValue())})),{command:e,args:t}}updateState(e,t){const r=e?(0,g.getConditionDescriptor)(e.name):(0,g.getConditionDescriptor)(d.CONDITION_NONE);this.state.setValueAtIndex(t,{command:r,args:e?e.args:[]}),e||(0,a.arrayEach)(this.getInputElements(),(e=>e.setValue(null)))}getSelectElement(){return this.elements.filter((e=>e instanceof p.SelectUI))[0]}getInputElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[e]}getInputElements(){return this.elements.filter((e=>e instanceof f.InputUI))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,r,n,s,i)=>{(0,o.addClass)(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&(0,o.addClass)(t.parentNode,"border");const l=this.hot.rootDocument.createElement("div");return(0,o.addClass)(l,"htFiltersMenuLabel"),l.textContent=i,t.appendChild(l),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[(0,g.getConditionDescriptor)(d.CONDITION_NONE)];if(null!==e){const{visualIndex:r}=e;t=(0,d.default)(this.hot.getDataType(0,r,this.hot.countRows(),r))}(0,a.arrayEach)(this.getInputElements(),(e=>e.hide())),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}}function S(e){(0,a.arrayEach)(this.getInputElements(),((t,r)=>{t[e.inputsCount>r?"show":"hide"](),0===r&&this.hot._registerTimeout((()=>t.focus()),10)})),this.runLocalHooks("change",e)}function T(e){(0,l.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,i.stopImmediatePropagation)(e))}t.ConditionComponent=R},52387:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(49587),i=r(98887),a=r(45561),l=r(31168),u=r(46798),h=r(98986),c=r(19926),d=r(79591),f=r(20498);function p(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}var g=new WeakSet;class m extends l.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),p(this,g),(0,s.default)(this,"name",""),this.name=t.name,this.buildOperatorsElement()}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,o.addClass)(t.parentNode,"htFiltersMenuOperators"),(0,i.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}buildOperatorsElement(){const e=[h.OPERATION_ID,c.OPERATION_ID];(0,i.arrayEach)(e,(t=>{const r=new f.RadioInputUI(this.hot,{name:"operator",label:{htmlFor:t,textContent:(0,u.getOperationName)(t)},value:t,checked:t===e[0],id:t});r.addLocalHook("change",(e=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,g,E).call(this,e))),this.elements.push(r)}))}setChecked(e){if(this.elements.length<e)throw Error(a.toSingleLine`Radio button with index ${e} doesn't exist.`);(0,i.arrayEach)(this.elements,((t,r)=>{t.setChecked(r===e)}))}getActiveOperationId(){const e=this.elements.find((e=>e instanceof f.RadioInputUI&&e.isChecked()));return e?e.getValue():h.OPERATION_ID}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&(0,i.arrayEach)(this.elements,(t=>{t.setChecked(t.getValue()===e)}))}updateState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.OPERATION_ID,t=arguments.length>1?arguments[1]:void 0,r=e;r===d.OPERATION_ID&&(r=c.OPERATION_ID),this.state.setValueAtIndex(t,r)}reset(){this.setChecked(0)}}function E(e){this.setState(e.target.value)}t.OperatorsComponent=m},95896:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(49587),i=r(30369),a=r(98887),l=r(49223),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=g(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),h=r(41902),c=r(31168),d=r(89319),f=r(78327),p=r(41830);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(g=function(e){return e?r:t})(e)}function m(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}var E=new WeakSet;class y extends c.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),m(this,E),(0,s.default)(this,"name",""),this.name=t.name,this.elements.push(new d.MultipleSelectUI(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",(e=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,E,w).call(this,e))).addLocalHook("listTabKeydown",(e=>this.runLocalHooks("listTabKeydown",e)))}getElements(){const e=this.getMultipleSelectElement();return[e.getSearchInputElement(),e.getSelectAllElement(),e.getClearAllElement(),this.getMultipleSelectElement()]}setState(e){if(this.reset(),e&&e.command.key===f.CONDITION_BY_VALUE){const t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0]),t.setLocale(e.locale)}}getState(){const e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?f.CONDITION_NONE:f.CONDITION_BY_VALUE},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(t,r,n,s,o)=>{const[i]=(0,a.arrayFilter)(r,(e=>e.name===f.CONDITION_BY_VALUE)),l={},c=this.hot.getTranslatedPhrase(u.FILTERS_VALUES_BLANK_CELLS);if(i){const r=(0,h.unifyColumnValues)((0,a.arrayMap)(s(t,o),(e=>e.value)));n&&(i.args[0]=n);const u=[],d=(0,h.intersectValues)(r,i.args[0],c,(e=>{e.checked&&u.push(e.value)})),g=e.editedConditionStack.column;l.locale=this.hot.getCellMeta(0,g).locale,l.args=[u],l.command=(0,p.getConditionDescriptor)(f.CONDITION_BY_VALUE),l.itemsSnapshot=d}else l.args=[],l.command=(0,p.getConditionDescriptor)(f.CONDITION_NONE);this.state.setValueAtIndex(t,l)};t(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&t(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter((e=>e instanceof d.MultipleSelectUI))[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,r,n,s,i)=>{(0,o.addClass)(t.parentNode,"htFiltersMenuValue");const l=this.hot.rootDocument.createElement("div");return(0,o.addClass)(l,"htFiltersMenuLabel"),l.textContent=i,t.appendChild(l),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getTranslatedPhrase(u.FILTERS_VALUES_BLANK_CELLS),t=(0,h.unifyColumnValues)(this._getColumnVisibleValues()),r=(0,h.intersectValues)(t,t,e);this.getMultipleSelectElement().setItems(r),super.reset(),this.getMultipleSelectElement().setValue(t);const n=this.hot.getPlugin("filters").getSelectedColumn();null!==n&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,n.visualIndex).locale)}_getColumnVisibleValues(){const e=this.hot.getPlugin("filters").getSelectedColumn();return null===e?[]:(0,a.arrayMap)(this.hot.getDataAtCol(e.visualIndex),(e=>(0,h.toEmptyString)(e)))}}function w(e){(0,l.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,i.stopImmediatePropagation)(e))}t.ValueComponent=y},80292:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(97639),o=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="begins_with";function l(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale).startsWith((0,s.stringify)(r))}t.CONDITION_NAME=a,(0,o.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_BEGINS_WITH,inputsCount:1,showOperators:!0})},10818:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=u;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830),o=r(50532),i=r(26943);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l="between";function u(e,t){let[r,n]=t,a=r,l=n;if("numeric"===e.meta.type){const e=parseFloat(a,10),t=parseFloat(l,10);a=Math.min(e,t),l=Math.max(e,t)}else if("date"===e.meta.type){const t=(0,s.getCondition)(i.CONDITION_NAME,[l]),r=(0,s.getCondition)(o.CONDITION_NAME,[a]);return t(e)&&r(e)}return e.value>=a&&e.value<=l}t.CONDITION_NAME=l,(0,s.registerCondition)(l,u,{name:n.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0})},88500:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=i;var n=r(41830),s=r(41902);const o="by_value";function i(e,t){let[r]=t;return r(e.value)}t.CONDITION_NAME=o,(0,n.registerCondition)(o,i,{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[(0,s.createArrayAssertion)(t)]},showOperators:!1})},74025:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(97639),o=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="contains";function l(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale).indexOf((0,s.stringify)(r))>=0}t.CONDITION_NAME=a,(0,o.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_CONTAINS,inputsCount:1,showOperators:!0})},50532:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),i=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l="date_after";function u(e,t){let[r]=t;const n=(0,s.default)(e.value,e.meta.dateFormat),o=(0,s.default)(r,e.meta.dateFormat);return!(!n.isValid()||!o.isValid())&&n.diff(o)>=0}t.CONDITION_NAME=l,(0,i.registerCondition)(l,u,{name:o.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0})},26943:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),i=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l="date_before";function u(e,t){let[r]=t;const n=(0,s.default)(e.value,e.meta.dateFormat),o=(0,s.default)(r,e.meta.dateFormat);return!(!n.isValid()||!o.isValid())&&n.diff(o)<=0}t.CONDITION_NAME=l,(0,i.registerCondition)(l,u,{name:o.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0})},80190:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),i=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l="date_today";function u(e){const t=(0,s.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,s.default)().startOf("day"),"d")}t.CONDITION_NAME=l,(0,i.registerCondition)(l,u,{name:o.FILTERS_CONDITIONS_TODAY,inputsCount:0})},91586:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),i=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l="date_tomorrow";function u(e){const t=(0,s.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,s.default)().subtract(-1,"days").startOf("day"),"d")}t.CONDITION_NAME=l,(0,i.registerCondition)(l,u,{name:o.FILTERS_CONDITIONS_TOMORROW,inputsCount:0})},40201:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),i=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l="date_yesterday";function u(e){const t=(0,s.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,s.default)().subtract(1,"days").startOf("day"),"d")}t.CONDITION_NAME=l,(0,i.registerCondition)(l,u,{name:o.FILTERS_CONDITIONS_YESTERDAY,inputsCount:0})},92912:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830),o=r(97639);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="empty";function l(e){return(0,o.isEmpty)(e.value)}t.CONDITION_NAME=a,(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_EMPTY,inputsCount:0,showOperators:!0})},52277:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(97639),o=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="ends_with";function l(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale).endsWith((0,s.stringify)(r))}t.CONDITION_NAME=a,(0,o.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_ENDS_WITH,inputsCount:1,showOperators:!0})},17034:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(97639),o=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}function a(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale)===(0,s.stringify)(r)}t.CONDITION_NAME="eq",(0,o.registerCondition)("eq",a,{name:n.FILTERS_CONDITIONS_EQUAL,inputsCount:1,showOperators:!0})},6828:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=o;var n=r(41830);const s="false";function o(){return!1}t.CONDITION_NAME=s,(0,n.registerCondition)(s,o,{name:"False"})},74642:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=i;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}function i(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value>n}t.CONDITION_NAME="gt",(0,s.registerCondition)("gt",i,{name:n.FILTERS_CONDITIONS_GREATER_THAN,inputsCount:1,showOperators:!0})},81970:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=i;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}function i(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value>=n}t.CONDITION_NAME="gte",(0,s.registerCondition)("gte",i,{name:n.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},16323:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=i;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}function i(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value<n}t.CONDITION_NAME="lt",(0,s.registerCondition)("lt",i,{name:n.FILTERS_CONDITIONS_LESS_THAN,inputsCount:1,showOperators:!0})},46070:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=i;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}function i(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value<=n}t.CONDITION_NAME="lte",(0,s.registerCondition)("lte",i,{name:n.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},71063:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const i="none";function a(){return!0}t.CONDITION_NAME=i,(0,s.registerCondition)(i,a,{name:n.FILTERS_CONDITIONS_NONE,inputsCount:0,showOperators:!1})},30730:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830),o=r(10818);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="not_between";function l(e,t){return!(0,s.getCondition)(o.CONDITION_NAME,t)(e)}t.CONDITION_NAME=a,(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_NOT_BETWEEN,inputsCount:2,showOperators:!0})},35227:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830),o=r(74025);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="not_contains";function l(e,t){return!(0,s.getCondition)(o.CONDITION_NAME,t)(e)}t.CONDITION_NAME=a,(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_NOT_CONTAIN,inputsCount:1,showOperators:!0})},11535:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830),o=r(92912);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="not_empty";function l(e,t){return!(0,s.getCondition)(o.CONDITION_NAME,t)(e)}t.CONDITION_NAME=a,(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_NOT_EMPTY,inputsCount:0,showOperators:!0})},76514:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830),o=r(17034);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}function a(e,t){return!(0,s.getCondition)(o.CONDITION_NAME,t)(e)}t.CONDITION_NAME="neq",(0,s.registerCondition)("neq",a,{name:n.FILTERS_CONDITIONS_NOT_EQUAL,inputsCount:1,showOperators:!0})},53323:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=o;var n=r(41830);const s="true";function o(){return!0}t.CONDITION_NAME=s,(0,n.registerCondition)(s,o,{name:"True"})},75207:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=r(98887),i=r(76163),a=r(45561),l=n(r(63806)),u=r(41830),h=r(98986),c=r(46798),d=r(97639),f=r(41789);const p="ConditionCollection.filteringStates";class g{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(0,s.default)(this,"hot",void 0),(0,s.default)(this,"isMapRegistrable",void 0),(0,s.default)(this,"filteringStates",new f.LinkedPhysicalIndexToValueMap),this.hot=e,this.isMapRegistrable=t,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(p,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}isEmpty(){return 0===this.getFilteredColumns().length}isMatch(e,t){var r;const n=this.filteringStates.getValueAtIndex(t),s=null!==(r=null==n?void 0:n.conditions)&&void 0!==r?r:[],o=null==n?void 0:n.operation;return this.isMatchInConditions(s,e,o)}isMatchInConditions(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.OPERATION_ID;return!e.length||(0,c.getOperationFunc)(r)(e,t)}addCondition(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.OPERATION_ID,n=arguments.length>3?arguments[3]:void 0;const s=this.hot.getCellMeta(0,e).locale,i=(0,o.arrayMap)(t.args,(e=>"string"==typeof e?e.toLocaleLowerCase(s):e)),l=t.name||t.command.key;this.runLocalHooks("beforeAdd",e);const f=this.getOperation(e);if(f){if(f!==r)throw Error(a.toSingleLine`The column of index ${e} has been already applied with a \`${f}\`\x20
951
+ learn about the migration path.`,f=new Map([["modifyRow","8.0.0"],["modifyCol","8.0.0"],["unmodifyRow","8.0.0"],["unmodifyCol","8.0.0"],["skipLengthCache","8.0.0"],["hiddenColumn","8.0.0"],["hiddenRow","8.0.0"]]),p=new Map([[]]);class g{static getSingleton(){return m}constructor(){(0,s.default)(this,"globalBucket",void 0),this.globalBucket=this.createEmptyBucket()}createEmptyBucket(){const e=Object.create(null);return(0,o.arrayEach)(c,(t=>e[t]=[])),e}getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))(0,o.arrayEach)(t,(t=>this.add(e,t,r)));else{f.has(e)&&(0,l.warn)((0,a.substitute)(d,{hookName:e,removedInVersion:f.get(e)})),p.has(e)&&(0,l.warn)(p.get(e));const n=this.getBucket(r);if(void 0===n[e]&&(this.register(e),n[e]=[]),t.skip=!1,-1===n[e].indexOf(t)){let r=!1;t.initialHook&&(0,o.arrayEach)(n[e],((s,o)=>{if(s.initialHook)return n[e][o]=t,r=!0,!1})),r||n[e].push(t)}}return this}once(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?(0,o.arrayEach)(t,(t=>this.once(e,t,r))):(t.runOnce=!0,this.add(e,t,r))}remove(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=this.getBucket(r);return void 0!==n[e]&&n[e].indexOf(t)>=0&&(t.skip=!0,!0)}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=this.getBucket(t);return!(void 0===r[e]||!r[e].length)}run(e,t,r,n,s,o,i,a){{const l=this.globalBucket[t],u=l?l.length:0;let c=0;if(u)for(;c<u;){if(!l[c]||l[c].skip){c+=1;continue}const u=(0,h.fastCall)(l[c],e,r,n,s,o,i,a);void 0!==u&&(r=u),l[c]&&l[c].runOnce&&this.remove(t,l[c]),c+=1}}{const l=this.getBucket(e)[t],u=l?l.length:0;let c=0;if(u)for(;c<u;){if(!l[c]||l[c].skip){c+=1;continue}const u=(0,h.fastCall)(l[c],e,r,n,s,o,i,a);void 0!==u&&(r=u),l[c]&&l[c].runOnce&&this.remove(t,l[c],e),c+=1}}return r}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,i.objectEach)(this.getBucket(e),((e,t,r)=>r[t].length=0))}register(e){this.isRegistered(e)||c.push(e)}deregister(e){this.isRegistered(e)&&c.splice(c.indexOf(e),1)}isDeprecated(e){return p.has(e)||f.has(e)}isRegistered(e){return c.indexOf(e)>=0}getRegistered(){return c}}const m=new g;var E=g;t.default=E},6671:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=n(r(48427)),i=n(r(42538)),a=r(33997),l=r(98887),u=r(6022),h=n(r(46998)),c=n(r(54925)),d=r(76163),f=r(57691),p=n(r(30240)),g=r(37913),m=r(94699),E=r(41789),y=r(97639);function w(e,t){C(e,t),t.add(e)}function C(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}c.default.getSingleton().register("modifyAutoColumnSizeSeed");const R="autoColumnSize";t.PLUGIN_KEY=R;t.PLUGIN_PRIORITY=10;var S=new WeakMap,T=new WeakSet,N=new WeakSet,O=new WeakSet,M=new WeakSet,_=new WeakSet,A=new WeakSet;class b extends a.BasePlugin{static get PLUGIN_KEY(){return R}static get PLUGIN_PRIORITY(){return 10}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}constructor(e){var t,r,n;super(e),w(this,A),w(this,_),w(this,M),w(this,O),w(this,N),w(this,T),(0,s.default)(this,"ghostTable",new h.default(this.hot)),(0,s.default)(this,"samplesGenerator",new p.default(((e,t)=>{const r=this.hot.getCellMeta(e,t);let n="";r.spanned||(n=this.hot.getDataAtCell(e,t));let s="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(s=this.hot.runHooks("modifyAutoColumnSizeSeed",s,r,n)),{value:n,bundleSeed:s}}))),(0,s.default)(this,"firstCalculation",!0),(0,s.default)(this,"inProgress",!1),(0,s.default)(this,"measuredColumns",0),(0,s.default)(this,"columnWidthsMap",new E.PhysicalIndexToValueMap),n={writable:!0,value:[]},C(t=this,r=S),r.set(t,n),this.hot.columnIndexMapper.registerMap("autoColumnSize",this.columnWidthsMap),this.addHook("beforeColumnResize",((e,t,r)=>v(this,M,P).call(this,e,t,r)))}isEnabled(){return!1!==this.hot.getSettings()[R]&&!this.hot.getSettings().colWidths}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[R];t&&null!==t.useHeaders&&void 0!==t.useHeaders&&this.ghostTable.setSetting("useHeaders",t.useHeaders),this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v(e,N,x).call(e,...r)})),this.addHook("beforeChangeRender",(e=>v(this,O,L).call(this,e))),this.addHook("afterFormulasValuesUpdate",(e=>v(this,A,k).call(this,e))),this.addHook("beforeViewRender",(e=>v(this,T,I).call(this,e))),this.addHook("modifyColWidth",((e,t)=>this.getColumnWidth(t,e))),this.addHook("afterInit",(()=>v(this,_,D).call(this))),super.enablePlugin()}updatePlugin(){const e=this.findColumnsWhereHeaderWasChanged();e.length&&(this.clearCache(e),this.calculateVisibleColumnsWidth()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",((e,t,r)=>v(this,M,P).call(this,e,t,r)))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const e=this.hot.renderCall,t=this.getFirstVisibleColumn(),r=this.getLastVisibleColumn();-1!==t&&-1!==r&&this.calculateColumnsWidth({from:t,to:r},void 0,e)}calculateColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n="number"==typeof e?{from:e,to:e}:e,s="number"==typeof t?{from:t,to:t}:t;(0,f.rangeEach)(n.from,n.to,(e=>{let t=this.hot.toPhysicalColumn(e);if(null===t&&(t=e),r||null===this.columnWidthsMap.getValueAtIndex(t)&&!this.hot._getColWidthFromSettings(t)){const t=this.samplesGenerator.generateColumnSamples(e,s);(0,l.arrayEach)(t,(e=>{let[t,r]=e;return this.ghostTable.addColumn(t,r)}))}})),this.ghostTable.columns.length&&(this.hot.batchExecution((()=>{this.ghostTable.getWidths(((e,t)=>{const r=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(r,t)}))}),!0),this.measuredColumns=n.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=0;const r=this.hot.countCols()-1;let n=null;this.inProgress=!0;const s=()=>{if(!this.hot)return(0,u.cancelAnimationFrame)(n),void(this.inProgress=!1);this.calculateColumnsWidth({from:t,to:Math.min(t+b.CALCULATION_STEP,r)},e),t=t+b.CALCULATION_STEP+1,t<r?n=(0,u.requestAnimationFrame)(s):((0,u.cancelAnimationFrame)(n),this.inProgress=!1,this.hot.view.adjustElementsSize())},o=this.getSyncCalculationLimit();this.firstCalculation&&o>=0&&(this.calculateColumnsWidth({from:0,to:o},e),this.firstCalculation=!1,t=o+1),t<r?s():this.inProgress=!1}setSamplingOptions(){const e=this.hot.getSettings()[R],t=e&&(0,d.hasOwnProperty)(e,"samplingRatio")?e.samplingRatio:void 0,r=e&&(0,d.hasOwnProperty)(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),r&&this.samplesGenerator.setAllowDuplicates(r)}recalculateAllColumnsWidth(){this.hot.view&&this.hot.view._wt.wtTable.isVisible()&&(this.clearCache(),this.calculateAllColumnsWidth())}getSyncCalculationLimit(){const e=this.hot.getSettings()[R];let t=b.SYNC_CALCULATION_LIMIT;const r=this.hot.countCols()-1;return(0,d.isObject)(e)&&(t=e.syncLimit,(0,g.isPercentValue)(t)?t=(0,f.valueAccordingPercent)(r,t):t>>=0),Math.min(t,r)}getColumnWidth(e){let t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return void 0===r&&(r=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e)),t&&"number"==typeof r&&(r=Math.max(r,m.ViewportColumnsCalculator.DEFAULT_WIDTH))),r}getFirstVisibleColumn(){const e=this.hot.view._wt;if(e.wtViewport.columnsVisibleCalculator){const t=e.wtTable.getFirstVisibleColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}if(e.wtViewport.columnsRenderCalculator){const t=e.wtTable.getFirstRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}getLastVisibleColumn(){const e=this.hot.view._wt;if(e.wtViewport.columnsVisibleCalculator){const t=e.wtTable.getLastVisibleColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}if(e.wtViewport.columnsRenderCalculator){const t=e.wtTable.getLastRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}findColumnsWhereHeaderWasChanged(){const e=this.hot.getColHeader();return(0,l.arrayReduce)(e,((e,t,r)=>{const n=(0,i.default)(this,S).length;return(n-1<r||(0,i.default)(this,S)[r]!==t)&&e.push(r),n-1<r?(0,i.default)(this,S).push(t):(0,i.default)(this,S)[r]=t,e}),[])}clearCache(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.length?this.hot.batchExecution((()=>{(0,l.arrayEach)(e,(e=>{this.columnWidthsMap.setValueAtIndex(e,null)}))}),!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!(0,l.arrayFilter)(this.columnWidthsMap.getValues().slice(0,this.measuredColumns),(e=>null===e)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function I(){this.calculateVisibleColumnsWidth(),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth()}function x(){this.hot.view?this.recalculateAllColumnsWidth():setTimeout((()=>{this.hot&&this.recalculateAllColumnsWidth()}),0)}function L(e){const t=(0,l.arrayMap)(e,(e=>{let[,t]=e;return this.hot.toPhysicalColumn(this.hot.propToCol(t))}));this.clearCache(Array.from(new Set(t)))}function P(e,t,r){let n=e;return r&&(this.calculateColumnsWidth(t,void 0,!0),n=this.getColumnWidth(t,void 0,!1)),n}function D(){(0,o.default)(this,S,this.hot.getColHeader())}function k(e){const t=(0,l.arrayFilter)(e,(e=>{var t;return(0,y.isDefined)(null===(t=e.address)||void 0===t?void 0:t.col)})),r=(0,l.arrayMap)(t,(e=>e.address.col));this.clearCache(Array.from(new Set(r)))}t.AutoColumnSize=b},87070:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(6671);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.AutoColumnSize=n.AutoColumnSize},49737:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(33997),i=r(98887),a=r(6022),l=r(49587),u=n(r(46998)),h=r(76163),c=r(57691),d=n(r(30240)),f=r(37913),p=r(41789);function g(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function m(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const E="autoRowSize";t.PLUGIN_KEY=E;t.PLUGIN_PRIORITY=40;var y=new WeakSet,w=new WeakSet,C=new WeakSet,v=new WeakSet;class R extends o.BasePlugin{static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return 40}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(e){super(e),g(this,v),g(this,C),g(this,w),g(this,y),(0,s.default)(this,"headerHeight",null),(0,s.default)(this,"ghostTable",new u.default(this.hot)),(0,s.default)(this,"samplesGenerator",new d.default(((e,t)=>{if(e>=0&&t>=0){if(this.hot.getCellMeta(e,t).hidden)return!1}let r;return e>=0?r=this.hot.getDataAtCell(e,t):-1===e&&(r=this.hot.getColHeader(t)),{value:r}}))),(0,s.default)(this,"firstCalculation",!0),(0,s.default)(this,"inProgress",!1),(0,s.default)(this,"measuredRows",0),(0,s.default)(this,"rowHeightsMap",new p.PhysicalIndexToValueMap),this.hot.rowIndexMapper.registerMap("autoRowSize",this.rowHeightsMap),this.addHook("beforeRowResize",((e,t,r)=>m(this,w,T).call(this,e,t,r)))}isEnabled(){const e=this.hot.getSettings()[E];return!0===e||(0,h.isObject)(e)}enablePlugin(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m(e,C,N).call(e,...r)})),this.addHook("beforeChangeRender",(e=>m(this,v,O).call(this,e))),this.addHook("beforeColumnResize",(()=>this.recalculateAllRowsHeight())),this.addHook("beforeViewRender",(e=>m(this,y,S).call(this,e))),this.addHook("modifyRowHeight",((e,t)=>this.getRowHeight(t,e))),this.addHook("modifyColumnHeaderHeight",(()=>this.getColumnHeaderHeight())),super.enablePlugin())}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",((e,t,r)=>m(this,w,T).call(this,e,t,r)))}calculateRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n="number"==typeof e?{from:e,to:e}:e,s="number"==typeof t?{from:t,to:t}:t;if(null!==this.hot.getColHeader(0)){const e=this.samplesGenerator.generateRowSamples(-1,s);this.ghostTable.addColumnHeadersRow(e.get(-1))}(0,c.rangeEach)(n.from,n.to,(e=>{if(r||null===this.rowHeightsMap.getValueAtIndex(e)){const t=this.samplesGenerator.generateRowSamples(e,s);(0,i.arrayEach)(t,(e=>{let[t,r]=e;return this.ghostTable.addRow(t,r)}))}})),this.ghostTable.rows.length&&(this.hot.batchExecution((()=>{this.ghostTable.getHeights(((e,t)=>{e<0?this.headerHeight=t:this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(e),t)}))}),!0),this.measuredRows=n.to+1,this.ghostTable.clean())}calculateAllRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=0;const r=this.hot.countRows()-1;let n=null;this.inProgress=!0;const s=()=>{if(!this.hot)return(0,a.cancelAnimationFrame)(n),void(this.inProgress=!1);this.calculateRowsHeight({from:t,to:Math.min(t+R.CALCULATION_STEP,r)},e),t=t+R.CALCULATION_STEP+1,t<r?n=(0,a.requestAnimationFrame)(s):((0,a.cancelAnimationFrame)(n),this.inProgress=!1,this.hot.view.adjustElementsSize(!0),this.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender&&this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw())},o=this.getSyncCalculationLimit();this.firstCalculation&&o>=0&&(this.calculateRowsHeight({from:0,to:o},e),this.firstCalculation=!1,t=o+1),t<r?s():(this.inProgress=!1,this.hot.view.adjustElementsSize(!1))}setSamplingOptions(){const e=this.hot.getSettings()[E],t=e&&(0,h.hasOwnProperty)(e,"samplingRatio")?e.samplingRatio:void 0,r=e&&(0,h.hasOwnProperty)(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),r&&this.samplesGenerator.setAllowDuplicates(r)}recalculateAllRowsHeight(){(0,l.isVisible)(this.hot.view._wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllRowsHeight())}getSyncCalculationLimit(){const e=this.hot.getSettings()[E];let t=R.SYNC_CALCULATION_LIMIT;const r=this.hot.countRows()-1;return(0,h.isObject)(e)&&(t=e.syncLimit,(0,f.isPercentValue)(t)?t=(0,c.valueAccordingPercent)(r,t):t>>=0),Math.min(t,r)}getRowHeight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const r=e<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(e));let n=t;return null!==r&&r>(t||0)&&(n=r),n}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){const e=this.hot.view._wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getFirstVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getFirstRenderedRow():-1}getLastVisibleRow(){const e=this.hot.view._wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getLastVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getLastRenderedRow():-1}clearCache(){this.headerHeight=null,this.rowHeightsMap.init()}clearCacheByRange(e){const{from:t,to:r}="number"==typeof e?{from:e,to:e}:e;this.hot.batchExecution((()=>{(0,c.rangeEach)(Math.min(t,r),Math.max(t,r),(e=>{this.rowHeightsMap.setValueAtIndex(e,null)}))}),!0)}isNeedRecalculate(){return!!(0,i.arrayFilter)(this.rowHeightsMap.getValues().slice(0,this.measuredRows),(e=>null===e)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function S(){const e=this.hot.renderCall,t=this.hot.getSettings().fixedRowsBottom,r=this.getFirstVisibleRow(),n=this.getLastVisibleRow();if(-1!==r&&-1!==n){if(this.calculateRowsHeight({from:r,to:n},void 0,e),t){const e=this.hot.countRows()-1;this.calculateRowsHeight({from:e-t,to:e})}this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()}}function T(e,t,r){let n=e;return r&&(this.calculateRowsHeight(t,void 0,!0),n=this.getRowHeight(t)),n}function N(){this.hot.view?this.recalculateAllRowsHeight():this.hot._registerTimeout((()=>{this.hot&&this.recalculateAllRowsHeight()}))}function O(e){let t=null;1===e.length?t=e[0][0]:e.length>1&&(t={from:e[0][0],to:e[e.length-1][0]}),null!==t&&this.clearCacheByRange(t)}t.AutoRowSize=R},12987:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(49737);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.AutoRowSize=n.AutoRowSize},31422:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(33997),i=n(r(54925)),a=r(49587),l=r(98887),u=r(34488);function h(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}i.default.getSingleton().register("modifyAutofillRange"),i.default.getSingleton().register("beforeAutofill"),i.default.getSingleton().register("afterAutofill");const d="autofill";t.PLUGIN_KEY=d;t.PLUGIN_PRIORITY=20;const f=["fillHandle"];var p=new WeakSet,g=new WeakSet,m=new WeakSet,E=new WeakSet,y=new WeakSet;class w extends o.BasePlugin{constructor(){super(...arguments),h(this,y),h(this,E),h(this,m),h(this,g),h(this,p),(0,s.default)(this,"addingStarted",!1),(0,s.default)(this,"mouseDownOnCellCorner",!1),(0,s.default)(this,"mouseDragOutside",!1),(0,s.default)(this,"handleDraggedCells",0),(0,s.default)(this,"directions",[]),(0,s.default)(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return 20}static get SETTING_KEYS(){return[d,...f]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",(e=>c(this,g,v).call(this,e))),this.addHook("afterOnCellCornerDblClick",(e=>c(this,p,C).call(this,e))),this.addHook("beforeOnCellMouseOver",((e,t)=>c(this,m,R).call(this,t))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(){const e=this.hot.getSelectedRangeLast(),{row:t,col:r}=e.getTopStartCorner(),{row:n,col:s}=e.getBottomEndCorner(),o=this.hot.runHooks("modifyCopyableRange",[{startRow:t,startCol:r,endRow:n,endCol:s}]),i=[],a=[],u=[];return(0,l.arrayEach)(o,(e=>{for(let t=e.startRow;t<=e.endRow;t+=1)-1===i.indexOf(t)&&i.push(t);for(let t=e.startCol;t<=e.endCol;t+=1)-1===a.indexOf(t)&&a.push(t)})),(0,l.arrayEach)(i,(e=>{const t=[];(0,l.arrayEach)(a,(r=>{t.push(this.hot.getCopyableData(e,r))})),u.push(t)})),u}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[e,t,r,n]=this.hot.selection.highlight.getFill().getVisualCorners(),s=this.hot.getSelectedRangeLast(),o=s.getTopStartCorner(),i=s.getBottomEndCorner();this.resetSelectionOfDraggedArea();const a=[o.row,o.col,i.row,i.col],l=this.hot.runHooks("modifyAutofillRange",[Math.min(o.row,e),Math.min(o.col,t),Math.max(i.row,r),Math.max(i.col,n)],a),{directionOfDrag:h,startOfDragCoords:c,endOfDragCoords:d}=(0,u.getDragDirectionAndRange)(a,l,((e,t)=>this.hot._createCellCoords(e,t)));if(c&&c.row>-1&&c.col>-1){const e=this.getSelectionData(),t=s.clone(),r=this.hot._createCellRange(c,c,d),n=this.hot.runHooks("beforeAutofill",e,t,r,h);if(!1===n)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let o=n;const i=n;if(["up","left"].indexOf(h)>-1&&(1!==i.length||0!==i[0].length))if(o=[],"up"===h){const e=d.row-c.row+1,t=e%i.length;for(let r=0;r<e;r++)o.push(i[(r+(i.length-t))%i.length])}else{const e=d.col-c.col+1,t=e%i[0].length;for(let r=0;r<i.length;r++){o.push([]);for(let n=0;n<e;n++)o[r].push(i[r][(n+(i[r].length-t))%i[r].length])}}this.hot.populateFromArray(c.row,c.col,o,d.row,d.col,`${this.pluginName}.fill`,null),this.setSelection(l),this.hot.runHooks("afterAutofill",o,t,r,h),this.hot.render()}else this.hot._refreshBorders();return!0}reduceSelectionAreaIfNeeded(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e}getCoordsOfDragAndDropBorders(e){const t=this.hot.getSelectedRangeLast(),r=t.getBottomEndCorner();let n=e;if(this.directions.includes(u.DIRECTIONS.vertical)&&this.directions.includes(u.DIRECTIONS.horizontal)){const s=t.getTopStartCorner();(r.col<=e.col||s.col>=e.col)&&(n=this.hot._createCellCoords(r.row,e.col)),(r.row<e.row||s.row>e.row)&&(n=this.hot._createCellCoords(e.row,r.col))}else if(this.directions.includes(u.DIRECTIONS.vertical))n=this.hot._createCellCoords(e.row,r.col);else{if(!this.directions.includes(u.DIRECTIONS.horizontal))return;n=this.hot._createCellCoords(r.row,e.col)}return this.reduceSelectionAreaIfNeeded(n)}showBorder(e){const t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}addRow(){this.hot._registerTimeout((()=>{this.hot.alter("insert_row_below",void 0,1,`${this.pluginName}.fill`),this.addingStarted=!1}),200)}addNewRowIfNeeded(){if(!this.hot.selection.highlight.getFill().isEmpty()&&!1===this.addingStarted&&this.autoInsertRow){const e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getVisualCorners(),r=this.hot.countRows();e[2]<r-1&&t[2]===r-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(e){const t=this.hot.getData(),r=this.hot.countRows();let n;for(let s=e[2]+1;s<r;s++){for(let r=e[1];r<=e[3];r++){if(t[s][r])return-1}const r=t[s][e[1]-1],o=t[s][e[3]+1];(r||o)&&(n=s)}return n}addSelectionFromStartAreaToSpecificRowIndex(e,t){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(e[0],e[1])).add(this.hot._createCellCoords(t,e[3])).commit()}setSelection(e){this.hot.selectCell(...(0,l.arrayMap)(e,(e=>Math.max(e,0))),!1,!1)}selectAdjacent(){const e=this.hot.getSelectedLast(),t=this.getIndexOfLastAdjacentFilledInRow(e);return-1!==t&&void 0!==t&&(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(e){const{documentElement:t}=this.hot.rootDocument,r=(0,a.offset)(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+(0,a.outerHeight)(this.hot.table),n=(0,a.offset)(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+(0,a.outerWidth)(this.hot.table);return e.clientY>r&&e.clientX<=n}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",(()=>c(this,E,S).call(this))),this.eventManager.addEventListener(e,"mousemove",(e=>c(this,y,T).call(this,e)))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const e=(0,u.getMappedFillHandleSetting)(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}destroy(){super.destroy()}}function C(){this.selectAdjacent()&&this.fillIn()}function v(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function R(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}function S(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function T(e){const t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&t?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}t.Autofill=w},56996:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(31422);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.Autofill=n.Autofill},34488:(e,t,r)=>{"use strict";t.__esModule=!0,t.getDragDirectionAndRange=function(e,t,r){let n,s,o;t[0]===e[0]&&t[1]<e[1]?(o="left",n=r(t[0],t[1]),s=r(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(o="right",n=r(t[0],e[3]+1),s=r(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(o="up",n=r(t[0],t[1]),s=r(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(o="down",n=r(e[2]+1,t[1]),s=r(t[2],t[3]));n&&n.normalize();s&&s.normalize();return{directionOfDrag:o,startOfDragCoords:n,endOfDragCoords:s}},t.getMappedFillHandleSetting=function(e){const t={};!0===e?(t.directions=Object.keys(o),t.autoInsertRow=!0):(0,n.isObject)(e)?((0,s.isDefined)(e.autoInsertRow)?e.direction===o.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,(0,s.isDefined)(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(o)):"string"==typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1);return t};var n=r(76163),s=r(97639);const o={horizontal:"horizontal",vertical:"vertical"};t.DIRECTIONS=o},46462:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=n(r(42538)),i=r(76163),a=r(98887),l=r(5280),u=r(79321),h=r(16691),c=r(36996),d=r(59340),f=n(r(57340));function p(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}const g=new Map([["plugin",l.hasPlugin],["cell-type",u.hasCellType],["editor",h.hasEditor],["renderer",c.hasRenderer],["validator",d.hasValidator]]),m="base";t.PLUGIN_KEY=m;const E=[];let y=null;var w=new WeakMap,C=new WeakSet;function v(e){if(!e)return!1;const t=this.constructor.SETTING_KEYS;if("boolean"==typeof t)return t;for(let r=0;r<t.length;r++)if(void 0!==e[t[r]])return!0;return!1}t.BasePlugin=class{static get PLUGIN_KEY(){return m}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}constructor(e){var t,r;p(t=this,r=C),r.add(t),(0,s.default)(this,"eventManager",new f.default(this)),(0,s.default)(this,"pluginName",null),(0,s.default)(this,"pluginsInitializedCallbacks",[]),(0,s.default)(this,"isPluginsReady",!1),(0,s.default)(this,"enabled",!1),(0,s.default)(this,"initialized",!1),function(e,t,r){p(e,t),t.set(e,r)}(this,w,{writable:!0,value:{}}),(0,i.defineGetter)(this,"hot",e,{writable:!1}),y=null,this.hot.addHook("afterPluginsInitialized",(()=>this.onAfterPluginsInitialized())),this.hot.addHook("afterUpdateSettings",(e=>this.onUpdateSettings(e))),this.hot.addHook("beforeInit",(()=>this.init()))}init(){this.pluginName=this.hot.getPluginName(this);const e=this.constructor.PLUGIN_DEPS,t=Array.isArray(e)?e:[];if(t.length>0){const e=[];if(t.forEach((t=>{const[r,n]=t.split(":");if(!g.has(r))throw new Error(`Unknown plugin dependency type "${r}" was found.`);g.get(r)(n)||e.push(` - ${n} (${r})`)})),e.length>0){const t=[`The ${this.pluginName} plugin requires the following modules:\n`,`${e.join("\n")}\n`].join("");E.push(t)}}y||(y=(0,l.getPluginsNames)()),y.indexOf("UndoRedo")>=0&&y.splice(y.indexOf("UndoRedo"),1),y.indexOf(this.pluginName)>=0&&y.splice(y.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",(()=>{this.isEnabled&&this.isEnabled()&&this.enablePlugin()}));if(0===y.length){if(E.length>0){const e=[`${E.join("\n")}\n`,"You have to import and register them manually."].join("");throw new Error(e)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}enablePlugin(){this.enabled=!0}disablePlugin(){var e;null===(e=this.eventManager)||void 0===e||e.clear(),this.clearHooks(),this.enabled=!1}addHook(e,t){(0,o.default)(this,w)[e]=(0,o.default)(this,w)[e]||[];const r=(0,o.default)(this,w)[e];this.hot.addHook(e,t),r.push(t),(0,o.default)(this,w)[e]=r}removeHooks(e){(0,a.arrayEach)((0,o.default)(this,w)[e]||[],(t=>{this.hot.removeHook(e,t)}))}clearHooks(){const e=(0,o.default)(this,w);(0,i.objectEach)(e,((e,t)=>this.removeHooks(t))),e.length=0}callOnPluginsReady(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}onAfterPluginsInitialized(){(0,a.arrayEach)(this.pluginsInitializedCallbacks,(e=>e())),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(e){const t=function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,C,v).call(this,e);this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&t&&this.updatePlugin(e))}updatePlugin(){}destroy(){var e;null===(e=this.eventManager)||void 0===e||e.destroy(),this.clearHooks(),(0,i.objectEach)(this,((e,t)=>{"hot"!==t&&(this[t]=null)})),delete this.t,delete this.hot}}},33997:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(46462);t.PLUGIN_KEY=n.PLUGIN_KEY,t.BasePlugin=n.BasePlugin},14027:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(33997),i=n(r(50998)),a=n(r(27862));function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}const u="bindRowsWithHeaders";t.PLUGIN_KEY=u;t.PLUGIN_PRIORITY=210;const h=new Map([["loose",i.default],["strict",a.default]]);var c=new WeakSet;class d extends o.BasePlugin{constructor(){super(...arguments),l(this,c),(0,s.default)(this,"headerIndexes",null)}static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return 210}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){if(this.enabled)return;let e=this.hot.getSettings()[u];"string"!=typeof e&&(e="loose");const t=h.get(e);this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",(e=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,c,f).call(this,e))),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}}function f(e){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(e))}t.BindRowsWithHeaders=d},26298:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(14027);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.BindRowsWithHeaders=n.BindRowsWithHeaders},50998:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(41789);const{getListWithInsertedItems:s,getListWithRemovedItems:o}=(0,n.alterUtilsFactory)("physicallyIndexed");class i extends n.IndexMap{constructor(){super((e=>e))}insert(e,t){const r=(0,n.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=s(r,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=o(this.indexedValues,e);this.indexedValues=(0,n.getDecreasedIndexes)(t,e),super.remove(e)}}var a=i;t.default=a},27862:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(41789);const{getListWithInsertedItems:s,getListWithRemovedItems:o}=(0,n.alterUtilsFactory)("physicallyIndexed");class i extends n.IndexMap{constructor(){super((e=>e))}insert(e,t){this.indexedValues=s(this.indexedValues,e,t,((e,t)=>this.getNextValue(t))),super.insert(e,t)}remove(e){this.indexedValues=o(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}}var a=i;t.default=a},82295:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=n(r(42538)),i=n(r(48427)),a=r(33997),l=r(98887),u=r(57691),h=r(31990),c=r(49587),d=r(30369),f=r(66862),p=r(497);function g(e,t){m(e,t),t.add(e)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function E(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const y="collapsibleColumns";t.PLUGIN_KEY=y;t.PLUGIN_PRIORITY=290;const w=["nestedHeaders"],C="collapsibleIndicator",v=y,R=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var S=new WeakMap,T=new WeakSet,N=new WeakSet,O=new WeakSet,M=new WeakSet;class _ extends a.BasePlugin{constructor(){var e,t,r;super(...arguments),g(this,M),g(this,O),g(this,N),g(this,T),(0,s.default)(this,"nestedHeadersPlugin",null),(0,s.default)(this,"headerStateManager",null),r={writable:!0,value:null},m(e=this,t=S),t.set(e,r)}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return 290}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[y,...w]}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||(0,h.warn)("You need to configure the Nested Headers plugin in order to use collapsible headers."),(0,i.default)(this,S,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",(()=>E(this,O,I).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E(e,M,x).call(e,...r)})),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E(e,T,A).call(e,...r)})),this.addHook("beforeOnCellMouseDown",((e,t,r)=>E(this,N,b).call(this,e,t,r))),this.registerShortcuts(),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){const{collapsibleColumns:e}=this.hot.getSettings();"boolean"==typeof e?this.headerStateManager.mapState((e=>({collapsible:e.origColspan>1}))):Array.isArray(e)&&(this.headerStateManager.mapState((()=>({collapsible:!1}))),this.headerStateManager.mergeStateWith(e))}super.updatePlugin()}}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),(0,i.default)(this,S,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{var e;const{row:t,col:r}=this.hot.getSelectedRangeLast().highlight,{collapsible:n,isCollapsed:s,columnIndex:o}=null!==(e=this.headerStateManager.getHeaderTreeNodeData(t,r))&&void 0!==e?e:{};n&&(s?this.expandSection({row:t,col:o}):this.collapseSection({row:t,col:o}))},runOnlyIf:()=>{var e;return null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader()},group:v})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(v)}clearButtons(){if(!this.hot.view)return;const e=this.hot.view._wt.getSetting("columnHeaders").length,t=this.hot.view._wt.wtTable.THEAD,r=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,n=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,s=function(e){e&&e.parentNode.removeChild(e)};(0,u.rangeEach)(0,e-1,(e=>{const o=t.childNodes[e],i=r.childNodes[e],a=n?n.childNodes[e]:null;(0,u.rangeEach)(0,o.childNodes.length-1,(e=>{let t=o.childNodes[e].querySelector(`.${C}`);s(t),i&&i.childNodes[e]&&(t=i.childNodes[e].querySelector(`.${C}`),s(t)),n&&a&&a.childNodes[e]&&(t=a.childNodes[e].querySelector(`.${C}`),s(t))}))}),!0)}expandSection(e){this.toggleCollapsibleSection([e],"expand")}collapseSection(e){this.toggleCollapsibleSection([e],"collapse")}toggleAllCollapsibleSections(e){const t=this.headerStateManager.mapNodes((t=>{const{collapsible:r,origColspan:n,headerLevel:s,columnIndex:o,isCollapsed:i}=t;if(!0===r&&n>1&&(i&&"expand"===e||!i&&"collapse"===e))return{row:this.headerStateManager.levelToRowCoords(s),col:o}}));this.toggleCollapsibleSection(t,e)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(e,t){if(!R.has(t))throw new Error(`Unsupported action is passed (${t}).`);if(!Array.isArray(e))return;const r=(0,l.arrayFilter)(e,(e=>{let{row:t}=e;return t<0}));let n=r.length>0;(0,l.arrayEach)(r,(e=>{var r;let{row:s,col:o}=e;const{collapsible:i,isCollapsed:a}=null!==(r=this.headerStateManager.getHeaderSettings(s,o))&&void 0!==r?r:{};if(!i||a&&"collapse"===t||!a&&"expand"===t)return n=!1,!1}));const s=[],i=[];n&&(0,l.arrayEach)(r,(e=>{let{row:r,col:n}=e;const{colspanCompensation:o,affectedColumns:a,rollbackModification:l}=this.headerStateManager.triggerNodeModification(t,r,n);o>0&&(i.push(...a),s.push(l))}));const a=this.getCollapsedColumns();let u=[];"collapse"===t?u=(0,l.arrayUnique)([...a,...i]):"expand"===t&&(u=(0,l.arrayFilter)(a,(e=>!i.includes(e))));const h=R.get(t);if(!1===this.hot.runHooks(h.beforeHook,a,u,n))return void(0,l.arrayEach)(s,(e=>{e()}));this.hot.batchExecution((()=>{(0,l.arrayEach)(i,(e=>{(0,o.default)(this,S).setValueAtIndex(this.hot.toPhysicalColumn(e),h.hideColumn)}))}),!0);const c=this.getCollapsedColumns().length!==a.length;this.hot.runHooks(h.afterHook,a,u,n,c),this.hot.render(),this.hot.view.adjustElementsSize(!0)}getCollapsedColumns(){return(0,o.default)(this,S).getHiddenIndexes()}destroy(){(0,i.default)(this,S,null),super.destroy()}}function A(e,t,r){var n;const{collapsible:s,origColspan:o,isCollapsed:i}=null!==(n=this.headerStateManager.getHeaderSettings(r,e))&&void 0!==n?n:{},a=s&&o>1&&e>=this.hot.getSettings().fixedColumnsStart,l=this.hot.getSettings().ariaTags;let u=t.querySelector(`.${C}`);var h;((0,c.removeAttribute)(t,[(0,f.A11Y_EXPANDED)("")[0]]),a)?(u||(u=this.hot.rootDocument.createElement("div"),(0,c.addClass)(u,C),t.querySelector("div:first-child").appendChild(u)),(0,c.removeClass)(u,["collapsed","expanded"]),i?((0,c.addClass)(u,"collapsed"),(0,c.fastInnerText)(u,"+"),l&&(0,c.setAttribute)(t,[(0,f.A11Y_EXPANDED)(!1),(0,f.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(p.COLUMN_HEADER_DESCRIPTION_EXPAND_COLUMN))])):((0,c.addClass)(u,"expanded"),(0,c.fastInnerText)(u,"-"),l&&(0,c.setAttribute)(t,[(0,f.A11Y_EXPANDED)(!0),(0,f.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(p.COLUMN_HEADER_DESCRIPTION_COLLAPSE_COLUMN))])),l&&(0,c.setAttribute)(u,...(0,f.A11Y_HIDDEN)())):null===(h=u)||void 0===h||h.remove()}function b(e,t){(0,c.hasClass)(e.target,C)&&((0,c.hasClass)(e.target,"expanded")?(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"collapse")):(0,c.hasClass)(e.target,"collapsed")&&(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"expand")),(0,d.stopImmediatePropagation)(e))}function I(){this.updatePlugin()}function x(e,t){t||this.updatePlugin()}t.CollapsibleColumns=_},85792:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(82295);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.CollapsibleColumns=n.CollapsibleColumns},13500:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(49587),i=r(97639),a=r(76163),l=r(46029),u=r(98887),h=r(33997),c=r(41789),d=n(r(54925)),f=r(82801),p=r(95262),g=r(90838),m=r(16766),E=r(10185),y=r(66862),w=r(497);function C(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function v(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const R="columnSorting";t.PLUGIN_KEY=R;t.PLUGIN_PRIORITY=50;const S="append";t.APPEND_COLUMN_CONFIG_STRATEGY=S;const T="replace";t.REPLACE_COLUMN_CONFIG_STRATEGY=T;const N=R,O="columnSortingIndicator";(0,E.registerRootComparator)(R,m.rootComparator),d.default.getSingleton().register("beforeColumnSort"),d.default.getSingleton().register("afterColumnSort");var M=new WeakSet,_=new WeakSet,A=new WeakSet,b=new WeakSet;class I extends h.BasePlugin{constructor(){super(...arguments),C(this,b),C(this,A),C(this,_),C(this,M),(0,s.default)(this,"columnStatesManager",null),(0,s.default)(this,"columnMetaCache",null),(0,s.default)(this,"pluginKey",R),(0,s.default)(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return R}static get PLUGIN_PRIORITY(){return 50}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var e=this;this.enabled||(this.columnStatesManager=new f.ColumnStatesManager(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=new c.PhysicalIndexToValueMap((e=>{let t=this.hot.toVisualColumn(e);return null===t&&(t=e),this.getMergedPluginSettings(t)})),this.hot.columnIndexMapper.registerMap(`${this.pluginKey}.columnMeta`,this.columnMetaCache),this.addHook("afterGetColHeader",((e,t)=>v(this,_,L).call(this,e,t))),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v(e,b,D).call(e,...r)})),this.addHook("afterOnCellMouseDown",((e,t)=>this.onAfterOnCellMouseDown(e,t))),this.addHook("afterInit",(()=>v(this,M,x).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v(e,A,P).call(e,...r)})),this.hot.view&&v(this,M,x).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(e,t)=>{const r=(0,p.getHeaderSpanElement)(t);!1!==(0,p.isFirstLevelColumnHeader)(e,t)&&null!==r&&this.updateHeaderClasses(r)};this.hot.addHook("afterGetColHeader",e),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("afterGetColHeader",e)})),this.hot.batchExecution((()=>{null!==this.indexesSequenceCache&&(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginKey))}),!0),this.hot.columnIndexMapper.unregisterMap(`${this.pluginKey}.columnMeta`),this.columnStatesManager.destroy(),this.columnMetaCache=null,this.columnStatesManager=null,this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();-1===e.row&&e.col>=0&&this.sort(this.getColumnNextConfig(e.col))},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()},group:N})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(N)}sort(e){const t=this.getSortConfig(),r=this.getNormalizedSortConfigs(e),n=this.areValidSortConfigs(r);!1!==this.hot.runHooks("beforeColumnSort",t,r,n)&&(0===t.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new c.IndexesSequence),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),n&&(this.columnStatesManager.setSortStates(r),this.sortByPresetSortStates(r),this.saveAllSortSettings(r)),this.hot.runHooks("afterColumnSort",t,n?r:t,n),n&&(this.hot.render(),this.hot.forceFullRender=!1,this.hot.view.render()))}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(e){return(0,i.isDefined)(e)?this.columnStatesManager.getColumnSortState(e):this.columnStatesManager.getSortStates()}setSortConfig(e){const t=this.getNormalizedSortConfigs(e);this.areValidSortConfigs(t)&&this.columnStatesManager.setSortStates(t)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e]}areValidSortConfigs(e){const t=this.hot.countCols();return(0,p.areValidSortStates)(e)&&e.every((e=>{let{column:r}=e;return r<=t&&r>=0}))}saveAllSortSettings(e){const t=this.columnStatesManager.getAllColumnsProperties();t.initialConfig=(0,u.arrayMap)(e,(e=>{let{column:t,...r}=e;return{column:this.hot.toPhysicalColumn(t),...r}})),this.hot.runHooks("persistentStateSave","columnSorting",t)}getAllSavedSortSettings(){const e={};this.hot.runHooks("persistentStateLoad","columnSorting",e);const t=e.value,r=e=>{let{column:t,...r}=e;return{column:this.hot.toVisualColumn(t),...r}};return(0,i.isDefined)(t)&&Array.isArray(t.initialConfig)&&(t.initialConfig=(0,u.arrayMap)(t.initialConfig,r)),t}getColumnNextConfig(e){const t=this.columnStatesManager.getSortOrderOfColumn(e);if((0,i.isDefined)(t)){const r=(0,p.getNextSortOrder)(t);return(0,i.isDefined)(r)?{column:e,sortOrder:r}:void 0}const r=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<r)return{column:e,sortOrder:(0,p.getNextSortOrder)()}}getNextSortConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S;const r=this.columnStatesManager.getIndexOfColumnInSortQueue(e),n=-1!==r,s=this.getSortConfig(),o=this.getColumnNextConfig(e);if(n){if((0,i.isUndefined)(o))return[...s.slice(0,r),...s.slice(r+1)];if(t===S)return[...s.slice(0,r),...s.slice(r+1),o];if(t===T)return[...s.slice(0,r),o,...s.slice(r+1)]}return(0,i.isDefined)(o)?s.concat(o):s}getPluginColumnConfig(e){if((0,a.isObject)(e)){const t=e[this.pluginKey];if((0,a.isObject)(t))return t}return{}}getMergedPluginSettings(e){const t=this.hot.getSettings()[this.pluginKey],r=this.columnStatesManager.getAllColumnsProperties(),n=this.hot.getCellMeta(0,e),s=Object.getPrototypeOf(n);return Array.isArray(s.columns)?Object.assign(r,t,this.getPluginColumnConfig(s.columns[e])):(0,l.isFunction)(s.columns)?Object.assign(r,t,this.getPluginColumnConfig(s.columns(e))):Object.assign(r,t)}getFirstCellSettings(e){const t=this.hot.getCellMeta(0,e),r=Object.create(t);return r[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(e)),r}getNumberOfRowsToSort(e){const t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}sortByPresetSortStates(e){if(0===e.length)return void this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues());const t=[],r=this.hot.countRows(),n=t=>(0,u.arrayMap)(e,(e=>this.hot.getDataAtCell(t,e.column)));for(let e=0;e<this.getNumberOfRowsToSort(r);e+=1)t.push([this.hot.toPhysicalRow(e)].concat(n(e)));const s=(0,u.arrayMap)(t,(e=>e[0]));(0,E.sort)(t,this.pluginKey,(0,u.arrayMap)(e,(e=>e.sortOrder)),(0,u.arrayMap)(e,(e=>this.getFirstCellSettings(e.column))));for(let e=t.length;e<r;e+=1)t.push([e].concat(n(e)));const o=(0,u.arrayMap)(t,(e=>e[0])),i=new Map((0,u.arrayMap)(s,((e,t)=>[e,o[t]]))),a=(0,u.arrayMap)(this.hot.rowIndexMapper.getIndexesSequence(),(e=>i.has(e)?i.get(e):e));this.hot.rowIndexMapper.setIndexesSequence(a)}sortBySettings(e){if((0,a.isObject)(e)){this.columnStatesManager.updateAllColumnsProperties(e);const t=e.initialConfig;(Array.isArray(t)||(0,a.isObject)(t))&&this.sort(t)}else this.hot.render()}updateHeaderClasses(e){if((0,o.removeClass)(e,(0,g.getClassesToRemove)(e)),!1!==this.enabled){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];(0,o.addClass)(e,(0,g.getClassesToAdd)(...r))}}updateSortingIndicator(e,t){const r=this.getFirstCellSettings(e)[this.pluginKey],n=this.hot.getSettings().ariaTags,s=r.indicator,i=this.columnStatesManager.isColumnSorted(e),a=t.querySelector(`.${O}`);s&&i&&!a&&(0,o.appendElement)(t,{tagName:"div",className:O,attributes:n?[(0,y.A11Y_HIDDEN)()]:[]})}onUpdateSettings(e){super.onUpdateSettings(),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),(0,i.isDefined)(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}wasClickableHeaderClicked(e,t){return this.getFirstCellSettings(t)[this.pluginKey].headerAction&&"SPAN"===e.target.nodeName}onAfterOnCellMouseDown(e,t){!1!==(0,p.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col)),this.sort(this.getColumnNextConfig(t.col)))}destroy(){var e;null===(e=this.columnStatesManager)||void 0===e||e.destroy(),super.destroy()}}function x(){const e=this.getAllSavedSortSettings();if((0,a.isObject)(e))this.sortBySettings(e);else{const e=this.hot.getSettings()[this.pluginKey];this.sortBySettings(e)}}function L(e,t){const r=(0,p.getHeaderSpanElement)(t);if(!1===(0,p.isFirstLevelColumnHeader)(e,t)||null===r)return;const n=this.getFirstCellSettings(e)[this.pluginKey],s=this.hot.getSettings().ariaTags,i=n.indicator,a=n.headerAction,l=this.columnStatesManager.getSortOrderOfColumn(e);this.updateHeaderClasses(r,this.columnStatesManager,e,i,a),this.updateSortingIndicator(e,r),s&&(0,o.setAttribute)(t,[(0,y.A11Y_SORT)(l?`${l}ending`:"none"),(0,y.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(w.COLUMN_HEADER_DESCRIPTION_SORT_ROWS))])}function P(e){!0===e&&this.hot.view&&v(this,M,x).call(this)}function D(e,t,r,n){!1!==(0,p.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(n.column=!0)}t.ColumnSorting=I},82801:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(76163),i=r(41789),a=r(97639);const l=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];t.ColumnStatesManager=class{constructor(e,t){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"sortingStates",new i.LinkedPhysicalIndexToValueMap),(0,s.default)(this,"sortEmptyCells",false),(0,s.default)(this,"indicator",true),(0,s.default)(this,"headerAction",true),(0,s.default)(this,"compareFunctionFactory",void 0),(0,s.default)(this,"mapName",void 0),this.hot=e,this.mapName=t,this.hot.columnIndexMapper.registerMap(t,this.sortingStates)}updateAllColumnsProperties(e){(0,o.isObject)(e)&&(0,o.objectEach)(e,((e,t)=>{l.includes(t)&&(this[t]=e)}))}getAllColumnsProperties(){const e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"==typeof this.compareFunctionFactory&&(e.compareFunctionFactory=this.compareFunctionFactory),e}getSortOrderOfColumn(e){var t;return null===(t=this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))||void 0===t?void 0:t.sortOrder}getIndexOfColumnInSortQueue(e){return e=this.hot.toPhysicalColumn(e),this.sortingStates.getEntries().findIndex((t=>{let[r]=t;return r===e}))}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return 0===this.getNumberOfSortedColumns()}isColumnSorted(e){return(0,o.isObject)(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))}getSortStates(){if(null===this.sortingStates)return[];return this.sortingStates.getEntries().map((e=>{let[t,r]=e;return{column:this.hot.toVisualColumn(t),...r}}))}getColumnSortState(e){const t=this.getSortOrderOfColumn(e);if((0,a.isDefined)(t))return{column:e,sortOrder:t}}setSortStates(e){this.sortingStates.clear();for(let t=0;t<e.length;t+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(e[t].column),{sortOrder:e[t].sortOrder})}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}}},90838:(e,t,r)=>{"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,r,s){const u=[i];s&&u.push(a);if(!1===r)return u.push(o),u;const h=e.getSortOrderOfColumn(t);(0,n.isDefined)(h)&&u.push(l.get(h));return u},t.getClassesToRemove=function(){return Array.from(l.values()).concat(a,o,i)},r(95988);var n=r(97639),s=r(95262);const o="indicatorDisabled",i="columnSorting",a="sortAction",l=new Map([[s.ASC_SORT_STATE,"ascending"],[s.DESC_SORT_STATE,"descending"]])},8540:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(13500);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ColumnSorting=n.ColumnSorting,t.APPEND_COLUMN_CONFIG_STRATEGY=n.APPEND_COLUMN_CONFIG_STRATEGY,t.REPLACE_COLUMN_CONFIG_STRATEGY=n.REPLACE_COLUMN_CONFIG_STRATEGY},16766:(e,t,r)=>{"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(r,s){const[,...o]=r,[,...i]=s;return function(r){const s=e[r],a=t[r],l=o[r],u=i[r],h=a.columnSorting;return(h.compareFunctionFactory?h.compareFunctionFactory:(0,n.getCompareFunctionFactory)(a.type))(s,a,h)(l,u)}(0)}};var n=r(10185)},59891:(e,t,r)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,r){const i=t.checkedTemplate,a=t.uncheckedTemplate,{sortEmptyCells:l}=r;return function(u,h){const c=(0,o.isEmpty)(u),d=(0,o.isEmpty)(h),f=c?a:u,p=d?a:h,g=f===a||f===i,m=p===a||p===i;if(!1===l){if(c&&!1===d)return n.FIRST_AFTER_SECOND;if(!1===c&&d)return n.FIRST_BEFORE_SECOND}return!1===g&&m?"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:g&&!1===m?"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:!1===g&&!1===m?(0,s.compareFunctionFactory)(e,t,r)(u,h):f===a&&p===i?"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:f===i&&p===a?"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:n.DO_NOT_SWAP}};var n=r(10185),s=r(73180),o=r(97639);t.COLUMN_DATA_TYPE="checkbox"},35789:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.compareFunctionFactory=function(e,t,r){return function(n,a){const{sortEmptyCells:l}=r;if(n===a)return i.DO_NOT_SWAP;if((0,o.isEmpty)(n))return(0,o.isEmpty)(a)?i.DO_NOT_SWAP:l&&"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND;if((0,o.isEmpty)(a))return l&&"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND;const u=t.dateFormat,h=(0,s.default)(n,u),c=(0,s.default)(a,u);return h.isValid()?c.isValid()?c.isAfter(h)?"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:c.isBefore(h)?"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:i.DO_NOT_SWAP:i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND}};var s=n(r(22418)),o=r(97639),i=r(10185);t.COLUMN_DATA_TYPE="date"},73180:(e,t,r)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,r){const o=t.locale;return function(t,i){const{sortEmptyCells:a}=r;return"string"==typeof t&&(t=t.toLocaleLowerCase(o)),"string"==typeof i&&(i=i.toLocaleLowerCase(o)),t===i?s.DO_NOT_SWAP:(0,n.isEmpty)(t)?(0,n.isEmpty)(i)?s.DO_NOT_SWAP:a&&"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:(0,n.isEmpty)(i)?a&&"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:isNaN(t)&&!isNaN(i)?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:!isNaN(t)&&isNaN(i)?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:(isNaN(t)||isNaN(i)||(t=parseFloat(t),i=parseFloat(i)),t<i?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:t>i?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:s.DO_NOT_SWAP)}};var n=r(97639),s=r(10185);t.COLUMN_DATA_TYPE="default"},33068:(e,t,r)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,r){return function(t,o){const i=parseFloat(t),a=parseFloat(o),{sortEmptyCells:l}=r;if(i===a||isNaN(i)&&isNaN(a))return s.DO_NOT_SWAP;if(l){if((0,n.isEmpty)(t))return"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND;if((0,n.isEmpty)(o))return"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND}return isNaN(i)?s.FIRST_AFTER_SECOND:isNaN(a)?s.FIRST_BEFORE_SECOND:i<a?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:i>a?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:s.DO_NOT_SWAP}};var n=r(97639),s=r(10185);t.COLUMN_DATA_TYPE="numeric"},9972:(e,t,r)=>{"use strict";t.__esModule=!0,t.sort=function(e,t){const r=(0,n.getRootComparator)(t);for(var s=arguments.length,o=new Array(s>2?s-2:0),i=2;i<s;i++)o[i-2]=arguments[i];e.sort(r(...o))};var n=r(64602);t.DO_NOT_SWAP=0;t.FIRST_BEFORE_SECOND=-1;t.FIRST_AFTER_SECOND=1},10185:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64602);t.registerRootComparator=n.registerRootComparator,t.getRootComparator=n.getRootComparator,t.getCompareFunctionFactory=n.getCompareFunctionFactory;var s=r(9972);t.FIRST_AFTER_SECOND=s.FIRST_AFTER_SECOND,t.FIRST_BEFORE_SECOND=s.FIRST_BEFORE_SECOND,t.DO_NOT_SWAP=s.DO_NOT_SWAP,t.sort=s.sort},64602:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getCompareFunctionFactory=function(e){if(c(e))return h(e);return h(s.COLUMN_DATA_TYPE)};var s=r(73180),o=r(33068),i=r(59891),a=r(35789),l=n(r(31056));const{register:u,getItem:h,hasItem:c}=(0,l.default)("sorting.compareFunctionFactory"),{register:d,getItem:f}=(0,l.default)("sorting.mainSortComparator");t.getRootComparator=f,t.registerRootComparator=d,u(o.COLUMN_DATA_TYPE,o.compareFunctionFactory),u(i.COLUMN_DATA_TYPE,i.compareFunctionFactory),u(a.COLUMN_DATA_TYPE,a.compareFunctionFactory),u(s.COLUMN_DATA_TYPE,s.compareFunctionFactory)},95262:(e,t,r)=>{"use strict";t.__esModule=!0,t.areValidSortStates=function(e){if(e.some((e=>!1===function(e){if(!1===(0,n.isObject)(e))return!1;const{column:t,sortOrder:r}=e;return Number.isInteger(t)&&[o,i].includes(r)}(e))))return!1;const t=e.map((e=>{let{column:t}=e;return t}));return new Set(t).size===t.length},t.getHeaderSpanElement=function(e){return e.querySelector(`.${a}`)},t.getNextSortOrder=function(e){if(e===i)return;if(e===o)return i;return o},t.isFirstLevelColumnHeader=function(e,t){if(e<0||!t.parentNode)return!1;const r=t.parentNode.parentNode.childNodes;if(Array.from(r).indexOf(t.parentNode)-r.length!=-1)return!1;return!0},t.wasHeaderClickedProperly=function(e,t,r){return-1===e&&t>=0&&!1===(0,s.isRightClick)(r)};var n=r(76163),s=r(30369);const o="asc";t.ASC_SORT_STATE=o;const i="desc";t.DESC_SORT_STATE=i;const a="colHeader";t.HEADER_SPAN_CLASS=a},83659:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(33997),i=r(76163),a=n(r(95883)),l=r(45561),u=r(1178);function h(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const d="columnSummary";t.PLUGIN_KEY=d;t.PLUGIN_PRIORITY=220;var f=new WeakSet,p=new WeakSet,g=new WeakSet;class m extends o.BasePlugin{constructor(){super(...arguments),h(this,g),h(this,p),h(this,f),(0,s.default)(this,"endpoints",null)}static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return 220}isEnabled(){return!!this.hot.getSettings()[d]}enablePlugin(){var e=this;this.enabled||(this.settings=this.hot.getSettings()[d],this.endpoints=new a.default(this,this.settings),this.addHook("afterInit",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c(e,f,E).call(e,...r)})),this.addHook("afterChange",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c(e,p,y).call(e,...r)})),this.addHook("beforeCreateRow",((e,t,r)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_row",e,t,null,r))),this.addHook("beforeCreateCol",((e,t,r)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_col",e,t,null,r))),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.endpoints.resetSetupBeforeStructureAlteration("remove_row",...r)})),this.addHook("beforeRemoveCol",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.endpoints.resetSetupBeforeStructureAlteration("remove_col",...r)})),this.addHook("afterCreateRow",((e,t,r)=>this.endpoints.resetSetupAfterStructureAlteration("insert_row",e,t,null,r))),this.addHook("afterCreateCol",((e,t,r)=>this.endpoints.resetSetupAfterStructureAlteration("insert_col",e,t,null,r))),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.endpoints.resetSetupAfterStructureAlteration("remove_row",...r)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.endpoints.resetSetupAfterStructureAlteration("remove_col",...r)})),this.addHook("afterRowMove",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c(e,g,w).call(e,...r)})),super.enablePlugin())}disablePlugin(){this.endpoints=null,this.settings=null,this.currentEndpoint=null}calculate(e){switch(e.type.toLowerCase()){case"sum":e.result=this.calculateSum(e);break;case"min":case"max":e.result=this.calculateMinMax(e,e.type);break;case"count":e.result=this.countEntries(e);break;case"average":e.result=this.calculateAverage(e);break;case"custom":e.result=e.customFunction.call(this,e)}}calculateSum(e){let t=0;return(0,i.objectEach)(e.ranges,(r=>{t+=this.getPartialSum(r,e.sourceColumn)})),t}getPartialSum(e,t){let r=0,n=e[1]||e[0],s=null,o=0;do{if(s=this.getCellValue(n,t),s=(0,u.isNullishOrNaN)(s)?null:s,null!==s){const e=(`${s}`.split(".")[1]||[]).length||1;e>o&&(o=e)}r+=s||0,n-=1}while(n>=e[0]);return Math.round(r*10**o)/10**o}calculateMinMax(e,t){let r=null;return(0,i.objectEach)(e.ranges,(n=>{const s=this.getPartialMinMax(n,e.sourceColumn,t);if(null===r&&null!==s&&(r=s),null!==s)switch(t){case"min":r=Math.min(r,s);break;case"max":r=Math.max(r,s)}})),null===r?"Not enough data":r}getPartialMinMax(e,t,r){let n,s=null,o=e[1]||e[0];do{if(n=this.getCellValue(o,t),n=(0,u.isNullishOrNaN)(n)?null:n,null===s)s=n;else if(null!==n)switch(r){case"min":s=Math.min(s,n);break;case"max":s=Math.max(s,n)}o-=1}while(o>=e[0]);return s}countEmpty(e,t){let r,n=0,s=e[1]||e[0];do{r=this.getCellValue(s,t),r=(0,u.isNullishOrNaN)(r)?null:r,null===r&&(n+=1),s-=1}while(s>=e[0]);return n}countEntries(e){let t=0;const r=e.ranges;return(0,i.objectEach)(r,(r=>{const n=void 0===r[1]?1:r[1]-r[0]+1,s=this.countEmpty(r,e.sourceColumn);t+=n,t-=s})),t}calculateAverage(e){return this.calculateSum(e)/this.countEntries(e)}getCellValue(e,t){const r=this.hot.toVisualRow(e),n=this.hot.toVisualColumn(t);let s=this.hot.getSourceDataAtCell(e,t),o="";if(null!==r&&null!==n&&(o=this.hot.getCellMeta(r,n).className||""),o.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof s&&(s=s.replace(/,/,".")),s=parseFloat(s)),isNaN(s)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(l.toSingleLine`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
952
+ numeric format. Cannot do the calculation.`);return s}}function E(){this.endpoints.endpoints=this.endpoints.parseSettings(),this.endpoints.refreshAllEndpoints(!0)}function y(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function w(e,t){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}t.ColumnSummary=m},95883:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=r(98887),i=r(31990);var a=class{constructor(e,t){(0,s.default)(this,"plugin",void 0),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"endpoints",[]),(0,s.default)(this,"settings",void 0),(0,s.default)(this,"settingsType","array"),(0,s.default)(this,"currentEndpoint",null),(0,s.default)(this,"cellsToSetCache",[]),this.plugin=e,this.hot=this.plugin.hot,this.settings=t}getEndpoint(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(e){return this.parseSettings(e.call(this))}parseSettings(e){const t=[];let r=e;if(r||"function"!=typeof this.settings)return r||(r=this.settings),(0,o.arrayEach)(r,(e=>{const r={};this.assignSetting(e,r,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(e,r,"reversedRowCoords",!1),this.assignSetting(e,r,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,r,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,r,"sourceColumn",e.destinationColumn),this.assignSetting(e,r,"type","sum"),this.assignSetting(e,r,"forceNumeric",!1),this.assignSetting(e,r,"suppressDataTypeErrors",!0),this.assignSetting(e,r,"suppressDataTypeErrors",!0),this.assignSetting(e,r,"customFunction",null),this.assignSetting(e,r,"readOnly",!0),this.assignSetting(e,r,"roundFloat",!1),t.push(r)})),t;this.settingsType="function"}assignSetting(e,t,r,n){if("ranges"!==r||void 0!==e[r]){if("ranges"!==r||0!==e[r].length)if(void 0===e[r]){if(n instanceof Error)throw n;t[r]=n}else"destinationRow"===r&&t.reversedRowCoords?t[r]=this.hot.countRows()-e[r]-1:t[r]=e[r]}else t[r]=n}resetSetupBeforeStructureAlteration(e,t,r){if("function"!==this.settingsType)return;const n=e.indexOf("row")>-1?"row":"col",s=this.getAllEndpoints();(0,o.arrayEach)(s,(s=>{"row"===n&&s.destinationRow>=t&&("insert_row"===e?s.alterRowOffset=r:"remove_row"===e&&(s.alterRowOffset=-1*r)),"col"===n&&s.destinationColumn>=t&&("insert_col"===e?s.alterColumnOffset=r:"remove_col"===e&&(s.alterColumnOffset=-1*r))})),this.resetAllEndpoints(s,!1)}resetSetupAfterStructureAlteration(e,t,r,n,s){let i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"===this.settingsType){const e=()=>(this.hot.removeHook("beforeViewRender",e),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",e)}const a=e.indexOf("row")>-1?"row":"col",l=e.indexOf("remove")>-1?-1:1,u=this.getAllEndpoints(),h=0===e.indexOf("move_row"),c=t;(0,o.arrayEach)(u,(e=>{"row"===a&&e.destinationRow>=c&&(e.alterRowOffset=l*r),"col"===a&&e.destinationColumn>=c&&(e.alterColumnOffset=l*r)})),this.resetAllEndpoints(u,!h),h?(0,o.arrayEach)(u,(e=>{this.extendEndpointRanges(e,c,n[0],n.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)})):(0,o.arrayEach)(u,(e=>{this.shiftEndpointCoordinates(e,c)})),i&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,r,n){(0,o.arrayEach)(e.ranges,(e=>{e[1]&&(t>=e[0]&&t<=e[1]?r>e[1]?e[1]+=n:r<e[0]&&(e[0]-=n):r>=e[0]&&r<=e[1]&&(e[1]-=n,t<=e[0]&&(e[0]+=1,e[1]+=1)))}))}recreatePhysicalRanges(e){const t=e.ranges,r=[],n=[];(0,o.arrayEach)(t,(e=>{const t=[];if(e[1])for(let r=e[0];r<=e[1];r++)t.push(this.hot.toPhysicalRow(r));else t.push(this.hot.toPhysicalRow(e[0]));n.push(t)})),(0,o.arrayEach)(n,(e=>{let t=[];(0,o.arrayEach)(e,((n,s)=>{0===s?t.push(n):e[s]!==e[s-1]+1&&(t.push(e[s-1]),r.push(t),t=[],t.push(n)),s===e.length-1&&(t.push(n),r.push(t))}))})),e.ranges=r}shiftEndpointCoordinates(e,t){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,(0,o.arrayEach)(e.ranges,(r=>{(0,o.arrayEach)(r,((n,s)=>{n>=t&&(r[s]+=e.alterRowOffset||0)}))}))):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}resetAllEndpoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.some((e=>{const t=e.alterRowOffset||0,r=e.alterColumnOffset||0;return e.destinationRow+t>=this.hot.countRows()||e.destinationColumn+r>=this.hot.countCols()}))||(this.cellsToSetCache=[],(0,o.arrayEach)(e,(e=>{this.resetEndpointValue(e,t)})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],(0,o.arrayEach)(this.getAllEndpoints(),(e=>{this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e,"init")})),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(e){const t=[];this.cellsToSetCache=[],(0,o.arrayEach)(e,((e,r,n)=>{`${e[2]||""}`!=`${e[3]}`&&(0,o.arrayEach)(this.getAllEndpoints(),((e,s)=>{this.hot.propToCol(n[r][1])===e.sourceColumn&&-1===t.indexOf(s)&&t.push(s)}))})),(0,o.arrayEach)(t,(e=>{this.refreshEndpoint(this.getEndpoint(e))})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshEndpoint(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}resetEndpointValue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=e.alterRowOffset||0,n=e.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(t?r:0)),this.hot.toVisualColumn(e.destinationColumn+(t?n:0)),""])}setEndpointValue(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const s=this.hot.toVisualRow(e.destinationRow);if(null!==s){const r=this.hot.getCellMeta(s,e.destinationColumn);"init"!==t&&r.readOnly===e.readOnly||(r.readOnly=e.readOnly,r.className="columnSummaryResult")}e.roundFloat&&!isNaN(e.result)&&(e.result=e.result.toFixed(e.roundFloat)),r?this.hot.setDataAtCell(n,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([n,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}throwOutOfBoundsWarning(){(0,i.warn)("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}};t.default=a},75001:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(83659);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ColumnSummary=n.ColumnSummary},1178:(e,t)=>{"use strict";t.__esModule=!0,t.isNullishOrNaN=function(e){return null==e||isNaN(e)}},4780:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(49587);class i{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}constructor(e,t){(0,s.default)(this,"rootDocument",void 0),(0,s.default)(this,"isRtl",!1),(0,s.default)(this,"container",null),(0,s.default)(this,"editor",void 0),(0,s.default)(this,"editorStyle",void 0),(0,s.default)(this,"hidden",!0),this.rootDocument=e,this.isRtl=t,this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.hide()}setPosition(e,t){this.editorStyle.left=`${e}px`,this.editorStyle.top=`${t}px`}setSize(e,t){if(e&&t){const r=this.getInputElement();r.style.width=`${e}px`,r.style.height=`${t}px`}}getSize(){return{width:(0,o.outerWidth)(this.getInputElement()),height:(0,o.outerHeight)(this.getInputElement())}}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){this.getInputElement().readOnly=e}show(){this.editorStyle.display="block",this.hidden=!1}hide(){this.hidden||(this.editorStyle.display="none"),this.hidden=!0}isVisible(){return"block"===this.editorStyle.display}setValue(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=e}getValue(){return this.getInputElement().value}isFocused(){return this.rootDocument.activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=this.rootDocument.createElement("div"),t=this.rootDocument.createElement("textarea");return e.style.display="none",this.container=this.rootDocument.createElement("div"),this.container.setAttribute("dir",this.isRtl?"rtl":"ltr"),(0,o.addClass)(this.container,i.CLASS_EDITOR_CONTAINER),this.rootDocument.body.appendChild(this.container),(0,o.addClass)(e,i.CLASS_EDITOR),(0,o.addClass)(t,i.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),this.container.appendChild(e),e}getInputElement(){return this.editor.querySelector(`.${i.CLASS_INPUT}`)}destroy(){const e=this.container?this.container.parentNode:null;this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null,e&&e.removeChild(this.container)}}var a=i;t.default=a},47477:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=n(r(48427)),i=n(r(42538)),a=r(49587),l=r(30369),u=r(76163),h=r(33997),c=n(r(4780)),d=n(r(68666)),f=r(86373),p=n(r(46422)),g=n(r(45317)),m=n(r(86191));function E(e,t){w(e,t),t.add(e)}function y(e,t,r){w(e,t),t.set(e,r)}function w(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(68581);const v="comments";t.PLUGIN_KEY=v;t.PLUGIN_PRIORITY=60;const R="comment";t.META_COMMENT=R;const S="value";t.META_COMMENT_VALUE=S;const T="style";t.META_STYLE=T;const N="readOnly";t.META_READONLY=N;const O=v,M=`plugin:${v}`;var _=new WeakMap,A=new WeakMap,b=new WeakMap,I=new WeakMap,x=new WeakMap,L=new WeakMap,P=new WeakMap,D=new WeakSet,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet,W=new WeakSet,Y=new WeakSet,G=new WeakSet;class j extends h.BasePlugin{constructor(){super(...arguments),E(this,G),E(this,Y),E(this,W),E(this,B),E(this,V),E(this,U),E(this,F),E(this,H),E(this,k),E(this,D),(0,s.default)(this,"range",{}),y(this,_,{writable:!0,value:null}),y(this,A,{writable:!0,value:null}),y(this,b,{writable:!0,value:!1}),y(this,I,{writable:!0,value:!1}),y(this,x,{writable:!0,value:{}}),y(this,L,{writable:!0,value:null}),y(this,P,{writable:!0,value:""})}static get PLUGIN_KEY(){return v}static get PLUGIN_PRIORITY(){return 60}isEnabled(){return!!this.hot.getSettings()[v]}enablePlugin(){this.enabled||((0,i.default)(this,_)||(0,o.default)(this,_,new c.default(this.hot.rootDocument,this.hot.isRtl())),(0,i.default)(this,A)||(0,o.default)(this,A,new d.default(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",(e=>this.addToContextMenu(e))),this.addHook("afterRenderer",((e,t,r,n,s,o)=>C(this,F,X).call(this,e,o))),this.addHook("afterScroll",(()=>C(this,G,te).call(this))),this.addHook("afterBeginEditing",(()=>this.hide())),this.addHook("afterDocumentKeyDown",(e=>C(this,Y,ee).call(this,e))),(0,i.default)(this,A).addLocalHook("hide",(()=>this.hide())),(0,i.default)(this,A).addLocalHook("show",((e,t)=>this.showAtCell(e,t))),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){(0,i.default)(this,A).updateDelay(this.getDisplayDelaySetting()),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),r=e.addContext(M);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();(0,o.default)(this,I,!0),this.hot.scrollToFocusedCell((()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(M),this.hot._registerTimeout((()=>{(0,o.default)(this,I,!1)}))}))},stopPropagation:!0,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!(0,i.default)(this,_).isVisible()},group:O}),r.addShortcut({keys:[["Escape"]],callback:()=>{(0,i.default)(this,_).setValue((0,i.default)(this,P)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&(0,i.default)(this,_).isVisible()},group:O}),r.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&(0,i.default)(this,_).isVisible()},group:O})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(O)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",(e=>C(this,k,$).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>C(this,D,z).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>C(this,H,K).call(this))),this.eventManager.addEventListener(t,"focus",(()=>C(this,V,Q).call(this))),this.eventManager.addEventListener(t,"blur",(()=>C(this,U,q).call(this))),this.eventManager.addEventListener(t,"mousedown",(e=>C(this,B,Z).call(this,e))),this.eventManager.addEventListener(t,"mouseup",(e=>C(this,W,J).call(this,e)))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=(0,a.closest)(e.target,"TD","TBODY");return!!(t&&(0,a.hasClass)(t,"htCommentCell")&&(0,a.closest)(t,[this.hot.rootElement]))}targetIsCommentTextArea(e){return this.getEditorInputElement()===e.target}setComment(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const t=(0,i.default)(this,_).getValue();let r="";null!=e?r=e:null!=t&&(r=t);const n=this.range.from.row,s=this.range.from.col;this.updateCommentMeta(n,s,{[S]:r}),this.hot.render()}setCommentAtCell(e,t,r){this.setRange({from:this.hot._createCellCoords(e,t)}),this.setComment(r)}removeComment(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,R),e&&this.hot.render(),this.hide()}removeCommentAtCell(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(e,t)}),this.removeComment(r)}getComment(){const e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,S)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,S)}show(){var e;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{from:{row:t,col:r}}=this.range;if(t<0||t>this.hot.countSourceRows()-1||r<0||r>this.hot.countSourceCols()-1)return!1;const n=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return(0,i.default)(this,A).cancelHiding(),(0,i.default)(this,_).setValue(null!==(e=n[R]?n[R][S]:null)&&void 0!==e?e:""),(0,i.default)(this,_).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){(0,i.default)(this,_).hide()}refreshEditor(){var e,t;if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&(0,i.default)(this,_).isVisible()))return;const{rowIndexMapper:r,columnIndexMapper:n}=this.hot,{row:s,col:o}=this.range.from;let l=r.getRenderableFromVisualIndex(s),u=n.getRenderableFromVisualIndex(o);const h=null===l;(0,i.default)(this,_).setPosition(0,0),null===l&&(l=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(s,-1))),null===u&&(u=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(o,-1)));const c=null===l,d=null===u;l=null!==(e=l)&&void 0!==e?e:0,u=null!==(t=u)&&void 0!==t?t:0;const{rootWindow:f,view:{_wt:p}}=this.hot,{wtTable:g}=p,m=p.getCell({row:l,col:u},!0),E=this.getCommentMeta(s,o,T);E?(0,i.default)(this,_).setSize(E.width,E.height):(0,i.default)(this,_).resetSize();const y=d?0:g.getStretchedColumnWidth(u),w=h&&!c?(0,a.outerHeight)(m):0,{left:C,top:v,width:R,height:S}=m.getBoundingClientRect(),{width:O,height:M}=(0,i.default)(this,_).getSize(),{innerWidth:A,innerHeight:b}=this.hot.rootWindow,I=this.hot.rootDocument.documentElement;let x=C+f.scrollX+y,L=v+f.scrollY+w;this.hot.isRtl()&&(x-=O+y),this.hot.isLtr()&&C+R+O>A?x=C+f.scrollX-O-1:this.hot.isRtl()&&x<-(I.scrollWidth-I.clientWidth)&&(x=C+f.scrollX+y+1),v+M>b&&(L-=M-S+1),(0,i.default)(this,_).setPosition(x,L),(0,i.default)(this,_).setReadOnlyState(this.getCommentMeta(s,o,N))}focusEditor(){(0,i.default)(this,_).focus()}updateCommentMeta(e,t,r){const n=this.hot.getCellMeta(e,t)[R];let s;n?(s=(0,u.deepClone)(n),(0,u.deepExtend)(s,r)):s=r,this.hot.setCellMeta(e,t,R,s)}getCommentMeta(e,t,r){const n=this.hot.getCellMeta(e,t);if(n[R])return n[R][r]}addToContextMenu(e){e.items.push({name:f.SEPARATOR},(0,p.default)(this),(0,g.default)(this),(0,m.default)(this))}getDisplayDelaySetting(){const e=this.hot.getSettings()[v];if((0,u.isObject)(e))return e.displayDelay}getEditorInputElement(){return(0,i.default)(this,_).getInputElement()}destroy(){(0,i.default)(this,_)&&(0,i.default)(this,_).destroy(),(0,i.default)(this,A)&&(0,i.default)(this,A).destroy(),super.destroy()}}function z(e){if(this.hot.view&&this.hot.view._wt&&!(0,i.default)(this,b)&&!this.targetIsCommentTextArea(e)){const t=(0,a.closest)(e.target,"TD","TBODY");let r=null;t&&(r=this.hot.getCoords(t)),(!t||this.range.from&&r&&(this.range.from.row!==r.row||this.range.from.col!==r.col))&&this.hide()}}function $(e){const{rootDocument:t}=this.hot;if(!((0,i.default)(this,b)||(0,i.default)(this,_).isFocused()||(0,a.hasClass)(e.target,"wtBorder")||(0,i.default)(this,L)===e.target)&&(0,i.default)(this,_))if((0,o.default)(this,L,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));(0,i.default)(this,A).show(t)}else(0,a.isChildOf)(e.target,t)&&!this.targetIsCommentTextArea(e)&&(0,i.default)(this,A).hide()}function K(){(0,o.default)(this,b,!1)}function X(e,t){t[R]&&t[R][S]&&(0,a.addClass)(e,t.commentedCellClassName)}function q(){(0,o.default)(this,P,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function Q(){(0,o.default)(this,P,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(M)}function Z(e){(0,o.default)(this,x,{width:(0,a.outerWidth)(e.target),height:(0,a.outerHeight)(e.target)})}function J(e){const t=(0,a.outerWidth)(e.target),r=(0,a.outerHeight)(e.target);t===(0,i.default)(this,x).width+1&&r===(0,i.default)(this,x).height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,{[T]:{width:t,height:r}})}function ee(e){(0,i.default)(this,_).isVisible()&&(0,l.stopImmediatePropagation)(e)}function te(){(0,i.default)(this,I)||this.hide()}t.Comments=j},46422:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsAddEdit",name(){var t;const r=null===(t=this.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return null!=r&&r.isCell()&&e.getCommentAtCell(r.row,r.col)?this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_EDIT_COMMENT):this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback(){const t=this.getSelectedRangeLast();this.deselectCell(),e.setRange(t),e.show(),e.focusEditor()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},86191:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((t,r)=>e.getCommentMeta(t,r,o.META_READONLY)))?(0,s.markLabelAsSelected)(t):t},callback(){this.getSelectedRangeLast().forAll(((t,r)=>{if(t>=0&&r>=0){const n=!!e.getCommentMeta(t,r,o.META_READONLY);e.updateCommentMeta(t,r,{[o.META_READONLY]:!n})}}))},disabled(){const t=this.getSelectedRangeLast();return!!(!t||t.highlight.isHeader()||!e.getCommentAtCell(t.highlight.row,t.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(12208),o=r(47477);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},45317:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback(){this.getSelectedRangeLast().forAll(((t,r)=>{t>=0&&r>=0&&e.removeCommentAtCell(t,r,!1)})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},68666:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(46029),i=r(76163),a=n(r(63806));class l{constructor(e){(0,s.default)(this,"wasLastActionShow",!0),(0,s.default)(this,"showDebounced",null),(0,s.default)(this,"hidingTimer",null),this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout((()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")}),250)}show(e){this.wasLastActionShow=!0,this.showDebounced(e)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=(0,o.debounce)((e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)}),e)}destroy(){this.clearLocalHooks()}}(0,i.mixin)(l,a.default);var u=l;t.default=u},70013:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(47477);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.Comments=n.Comments},50426:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988),r(26438);var s=n(r(93231)),o=r(98887),i=r(76163);t.CommandExecutor=class{constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"commands",{}),(0,s.default)(this,"commonCallback",null),this.hot=e}registerCommand(e,t){this.commands[e]=t}setCommonCallback(e){this.commonCallback=e}execute(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];const s=e.split(":"),a=s[0],l=2===s.length?s[1]:null;let u=this.commands[a];if(!u)throw new Error(`Menu command '${a}' not exists.`);if(l&&u.submenu&&(u=function(e,t){let r;return(0,o.arrayEach)(t,(t=>{const n=t.key?t.key.split(":"):null;if(Array.isArray(n)&&n[1]===e)return r=t,!1})),r}(l,u.submenu.items)),!0===u.disabled)return;if("function"==typeof u.disabled&&!0===u.disabled.call(this.hot))return;if((0,i.hasOwnProperty)(u,"submenu"))return;const h=[];"function"==typeof u.callback&&h.push(u.callback),"function"==typeof this.commonCallback&&h.push(this.commonCallback),r.unshift(s.join(":")),(0,o.arrayEach)(h,(e=>e.apply(this.hot,r)))}}},32082:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(33997),i=n(r(54925)),a=r(98887),l=r(76163),u=r(50426),h=r(66496),c=r(51366),d=r(12208),f=r(49587),p=r(86373);function g(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function m(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(79498);const E="contextMenu";t.PLUGIN_KEY=E;t.PLUGIN_PRIORITY=70;const y=E;i.default.getSingleton().register("afterContextMenuDefaultOptions"),i.default.getSingleton().register("beforeContextMenuShow"),i.default.getSingleton().register("afterContextMenuShow"),i.default.getSingleton().register("afterContextMenuHide"),i.default.getSingleton().register("afterContextMenuExecute");var w=new WeakSet,C=new WeakSet,v=new WeakSet,R=new WeakSet;class S extends o.BasePlugin{constructor(){super(...arguments),g(this,R),g(this,v),g(this,C),g(this,w),(0,s.default)(this,"commandExecutor",new u.CommandExecutor(this.hot)),(0,s.default)(this,"itemsFactory",null),(0,s.default)(this,"menu",null)}static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return 70}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[p.ROW_ABOVE,p.ROW_BELOW,p.SEPARATOR,p.COLUMN_LEFT,p.COLUMN_RIGHT,p.SEPARATOR,p.REMOVE_ROW,p.REMOVE_COLUMN,p.SEPARATOR,p.UNDO,p.REDO,p.SEPARATOR,p.READ_ONLY,p.SEPARATOR,p.ALIGNMENT]}isEnabled(){return!!this.hot.getSettings()[E]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[E];"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new c.Menu(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",(()=>m(this,C,N).call(this))),this.menu.addLocalHook("afterOpen",(()=>m(this,v,O).call(this))),this.menu.addLocalHook("afterClose",(()=>m(this,R,M).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.executeCommand.call(e,...r)})),this.addHook("afterOnCellContextMenu",(e=>m(this,w,T).call(this,e))),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","\\"],["Shift","F10"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();this.hot.scrollToFocusedCell();const t=this.hot.getCell(e.row,e.col,!0).getBoundingClientRect(),r=(0,d.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({left:t.left+r.left,top:t.top+r.top-1+t.height},{left:t.width,above:-t.height})},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&!this.menu.isOpened()},group:y})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(y)}open(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.prepareMenuItems(),this.menu.open(),(0,l.objectEach)(r,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close(),this.itemsFactory=null}executeCommand(e){null===this.itemsFactory&&this.prepareMenuItems();for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.commandExecutor.execute(e,...r)}prepareMenuItems(){this.itemsFactory=new h.ItemsFactory(this.hot,S.DEFAULT_ITEMS);const e=this.hot.getSettings()[E],t={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const r=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",r),this.menu.setMenuItems(r),(0,a.arrayEach)(r,(e=>this.commandExecutor.registerCommand(e.key,e)))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function T(e){const t=this.hot.getSettings(),r=t.rowHeaders,n=t.colHeaders;const s=e.target;if(this.close(),(0,f.hasClass)(s,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!r&&!n&&!(function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(s)||(0,f.hasClass)(s,"current")&&(0,f.hasClass)(s,"wtBorder")))return;const o=(0,d.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+o.top,left:e.clientX+o.left})}function N(){this.hot.runHooks("beforeContextMenuShow",this)}function O(){this.hot.runHooks("afterContextMenuShow",this)}function M(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}t.ContextMenu=S,S.SEPARATOR={name:p.SEPARATOR}},22031:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(32082);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ContextMenu=n.ContextMenu},66496:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(76163),i=r(98887),a=r(86373);t.ItemsFactory=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,s.default)(this,"hot",void 0),(0,s.default)(this,"predefinedItems",(0,a.predefinedItems)()),(0,s.default)(this,"defaultOrderPattern",void 0),this.hot=e,this.defaultOrderPattern=t}setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,(0,o.objectEach)(e,((e,r)=>{let n="";e.name===a.SEPARATOR?(t[a.SEPARATOR]=e,n=a.SEPARATOR):isNaN(parseInt(r,10))?(e.key=void 0===e.key?r:e.key,t[r]=e,n=e.key):(t[e.key]=e,n=e.key),this.defaultOrderPattern.push(n)})),this.predefinedItems=t}getItems(){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=[];let s=e;s&&s.items?s=s.items:Array.isArray(s)||(s=t);(0,o.isObject)(s)?(0,o.objectEach)(s,((e,t)=>{let s=r["string"==typeof e?e:t];s||(s=e),(0,o.isObject)(e)?(0,o.extend)(s,e):"string"==typeof s&&(s={name:s}),void 0===s.key&&(s.key=t),n.push(s)})):(0,i.arrayEach)(s,((e,t)=>{let s=r[e];!s&&a.ITEMS.indexOf(e)>=0||(s||(s={name:e,key:`${t}`}),(0,o.isObject)(e)&&(0,o.extend)(s,e),void 0===s.key&&(s.key=t),n.push(s))}));return n}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}},28787:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.Cursor=class{constructor(e,t){(0,s.default)(this,"top",void 0),(0,s.default)(this,"topRelative",void 0),(0,s.default)(this,"left",void 0),(0,s.default)(this,"leftRelative",void 0),(0,s.default)(this,"scrollTop",void 0),(0,s.default)(this,"scrollLeft",void 0),(0,s.default)(this,"cellHeight",void 0),(0,s.default)(this,"cellWidth",void 0);const r=t.scrollY,n=t.scrollX;let o,i,a,l,u,h;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(o=parseInt(e.top,10),a=parseInt(e.left,10),u=e.height||0,h=e.width||0,i=o,l=a,o+=r,a+=n):"event"===this.type&&(o=parseInt(e.pageY,10),a=parseInt(e.pageX,10),u=e.target.clientHeight,h=e.target.clientWidth,i=o-r,l=a-n),this.top=o,this.topRelative=i,this.left=a,this.leftRelative=l,this.scrollTop=r,this.scrollLeft=n,this.cellHeight=u,this.cellWidth=h}getSourceType(e){let t="literal";return e instanceof Event&&(t="event"),t}fitsAbove(e){return this.topRelative>=e.offsetHeight}fitsBelow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}fitsOnRight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}fitsOnLeft(e){return this.leftRelative>=e.offsetWidth}}},26235:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultShortcutsList=function(e){return[{keys:[["Tab"],["Shift","Tab"],["Control/Meta","A"]],forwardToContext:e.hot.getShortcutManager().getContext("grid"),callback:()=>e.close(!0)},{keys:[["Escape"]],callback:()=>e.close()},{keys:[["ArrowDown"]],callback:()=>e.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>e.getNavigator().toPreviousItem()},{keys:[["ArrowRight"]],callback:()=>{const t=e.hotMenu.getSelectedLast();if(t){const r=e.openSubMenu(t[0]);r&&r.getNavigator().toFirstItem()}}},{keys:[["ArrowLeft"]],callback:()=>{e.hotMenu.getSelectedLast()&&e.isSubMenu()&&(e.close(),e.isSubMenu()&&e.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>e.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>e.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:t=>{const r=e.hotMenu.getSelectedLast();r&&(e.hotMenu.getSourceDataAtRow(r[0]).submenu?e.openSubMenu(r[0]).getNavigator().toFirstItem():(e.executeCommand(t),e.close(!0)))}},{keys:[["PageUp"]],callback:()=>{e.hotMenu.getSelectedLast()?e.hotMenu.selection.transformStart(-e.hotMenu.countVisibleRows(),0):e.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{e.hotMenu.getSelectedLast()?e.hotMenu.selection.transformStart(e.hotMenu.countVisibleRows(),0):e.getNavigator().toLastItem()}}]}},51366:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(37081);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},37081:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=n(r(48427)),i=n(r(42538)),a=r(77600),l=r(83820),u=r(71227),h=r(86373),c=r(79084),d=n(r(57340)),f=r(98887),p=r(78498),g=r(49587),m=r(30369),E=r(46029),y=r(97639),w=r(76163),C=n(r(63806)),v=r(25839),R=r(66862);function S(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var T=new WeakMap,N=new WeakMap;class O{constructor(e,t){var r=this;(0,s.default)(this,"hot",void 0),(0,s.default)(this,"options",void 0),(0,s.default)(this,"eventManager",new d.default(this)),(0,s.default)(this,"container",void 0),(0,s.default)(this,"positioner",void 0),(0,s.default)(this,"hotMenu",null),(0,s.default)(this,"hotSubMenus",{}),(0,s.default)(this,"parentMenu",void 0),(0,s.default)(this,"menuItems",null),(0,s.default)(this,"origOutsideClickDeselects",null),S(this,T,{writable:!0,value:void 0}),S(this,N,{writable:!0,value:void 0}),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new a.Positioner(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.parentMenu.runLocalHooks("afterSelectionChange",...t)}))}registerEvents(){let e=this.hot.rootWindow;for(;e;)this.eventManager.addEventListener(e.document,"mousedown",(e=>this.onDocumentMouseDown(e))),this.eventManager.addEventListener(e.document,"contextmenu",(e=>this.onDocumentContextMenu(e))),e=(0,g.getParentWindow)(e)}setMenuItems(e){this.menuItems=e}getNavigator(){return(0,i.default)(this,T)}getKeyboardShortcutsCtrl(){return(0,i.default)(this,N)}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedLast())}isSubMenu(){return null!==this.parentMenu}open(){this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const e=(0,E.debounce)((e=>this.openSubMenu(e)),300),t=this.options.minWidth||215;let r=!1,n=(0,f.arrayFilter)(this.menuItems,(e=>(e.key===h.NO_ITEMS&&(r=!0),(0,c.isItemHidden)(e,this.hot))));if(n.length<1&&!r)n.push((0,h.predefinedItems)()[h.NO_ITEMS]);else if(0===n.length)return;n=(0,c.filterSeparators)(n,h.SEPARATOR);let s=!1;const a={data:n,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:e=>(0,y.isDefined)(e)&&e<t?t:e,autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:(0,v.createMenuItemRenderer)(this.hot)}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,beforeOnCellMouseOver:(e,t)=>{(0,i.default)(this,T).setCurrentPage(t.row)},afterOnCellMouseOver:(t,r)=>{this.isAllSubMenusClosed()?e(r.row):this.openSubMenu(r.row)},rowHeights:e=>n[e].name===h.SEPARATOR?1:23,afterOnCellContextMenu:e=>{e.preventDefault(),(0,p.isWindowsOS)()&&s&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(e,t,r,n,s)=>{this.hotMenu.view.isMouseDown()&&(s.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:e=>{this.hasSelectedItem()&&(s=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(e))},afterOnCellMouseUp:e=>{(0,p.isWindowsOS)()&&(0,m.isRightClick)(e)||!s||!this.hasSelectedItem()||((0,p.isMobileBrowser)()||(0,p.isIpadOS)()?this.hot._registerTimeout((()=>this.close(!0)),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,a),this.hotMenu.addHook("afterInit",(()=>this.onAfterInit())),this.hotMenu.init(),(0,o.default)(this,T,(0,l.createMenuNavigator)(this.hotMenu)),(0,o.default)(this,N,(0,u.createKeyboardShortcutsCtrl)(this)),(0,i.default)(this,N).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",(()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this))),this.runLocalHooks("afterOpen",this)}close(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isOpened())if(e&&this.isSubMenu())this.parentMenu.close();else if((0,i.default)(this,T).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const e=this.parentMenu.hotMenu.getSelectedLast();if(e){const t=this.parentMenu.hotMenu.getCell(e[0],0);(0,g.setAttribute)(t,[(0,R.A11Y_EXPANDED)(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!(0,c.hasSubMenu)(t))return!1;const r=this.hotMenu.getSourceDataAtRow(e),n=new O(this.hot,{parent:this,name:r.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return n.setMenuItems(r.submenu.items),n.open(),n.setPosition(t.getBoundingClientRect()),this.hotSubMenus[r.key]=n,this.hot.getSettings().ariaTags&&(0,g.setAttribute)(t,[(0,R.A11Y_EXPANDED)(!0)]),n}closeSubMenu(e){const t=this.hotMenu.getSourceDataAtRow(e),r=this.hotSubMenus[t.key];if(r){r.destroy(),delete this.hotSubMenus[t.key];const n=this.hotMenu.getCell(e,0);this.hot.getSettings().ariaTags&&(0,g.setAttribute)(n,[(0,R.A11Y_EXPANDED)(!1)])}}closeAllSubMenus(){(0,f.arrayEach)(this.hotMenu.getData(),((e,t)=>this.closeSubMenu(t)))}isAllSubMenusClosed(){return 0===Object.keys(this.hotSubMenus).length}focus(){this.isOpened()&&(this.hotMenu.rootElement.focus({preventScroll:!0}),this.getKeyboardShortcutsCtrl().listen(),this.hotMenu.listen())}destroy(){const e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(e){if(!this.isOpened()||!this.hasSelectedItem())return;const t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),this.isCommandPassive(t))return;const r=this.hot.getSelectedRange(),n=r?(0,c.normalizeSelection)(r):[];this.runLocalHooks("executeCommand",t.key,n,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,n,e)}isCommandPassive(e){return!1===e.isCommand||(0,c.isItemSeparator)(e)||(0,c.isItemDisabled)(e,this.hot)||(0,c.isItemSubMenu)(e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.positioner.setOffset(e,t)}setPosition(e){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(e)}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.options.container.ownerDocument;let r,n=e;return n&&((0,E.isFunction)(n)&&(n=n.call(this.hot),n=null===n||(0,y.isUndefined)(n)?"":n.toString()),n=n.replace(/[^A-z0-9]/g,"_"),n=`${this.options.className}Sub_${n}`,r=t.querySelector(`.${this.options.className}.${n}`)),r||(r=t.createElement("div"),(0,g.addClass)(r,`htMenu ${this.options.className}`),n&&(0,g.addClass)(r,n),this.options.container.appendChild(r)),r}onAfterInit(){const{wtTable:e}=this.hotMenu.view._wt,t=this.hotMenu.getSettings().data,r=e.hider.style,n=e.holder.style,s=parseInt(r.width,10),o=(0,f.arrayReduce)(t,((e,t)=>e+(t.name===h.SEPARATOR?1:26)),0);n.width=`${s+3}px`,n.height=`${o+3}px`,r.height=n.height,this.hot.getSettings().ariaTags&&(0,g.setAttribute)(this.hotMenu.rootElement,[(0,R.A11Y_MENU)(),(0,R.A11Y_TABINDEX)(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,g.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,g.isChildOf)(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&(0,g.hasClass)(e.target,"htCore")&&(0,g.isChildOf)(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}t.Menu=O,(0,w.mixin)(O,C.default)},25839:(e,t,r)=>{"use strict";t.__esModule=!0,t.createMenuItemRenderer=function(e){return(t,r,a,l,u,h)=>{if(r.hasAttribute("ghost-table"))return;const c=t.getSourceDataAtRow(a),d=e.rootDocument.createElement("div"),f="function"==typeof h?h.call(e):h;if((0,s.empty)(r),(0,s.addClass)(d,"htItemWrapper"),e.getSettings().ariaTags){const t=!(0,n.isItemDisabled)(c,e)&&!(0,n.isItemSelectionDisabled)(c)&&!(0,n.isItemSeparator)(c);(0,s.setAttribute)(r,[(0,o.A11Y_MENU_ITEM)(),(0,o.A11Y_LABEL)(f),...t?[(0,o.A11Y_TABINDEX)(-1)]:[],...(0,n.isItemDisabled)(c,e)?[(0,o.A11Y_DISABLED)()]:[],...(0,n.isItemSubMenu)(c)?[(0,o.A11Y_EXPANDED)(!1)]:[]])}if((0,n.isItemSubMenu)(c)){r.querySelector(".submenuIndicator")||(0,s.appendElement)(r,{tagName:"div",attributes:e.getSettings().ariaTags?[(0,o.A11Y_HIDDEN)()]:[],className:i})}r.className="",r.appendChild(d),(0,n.isItemSeparator)(c)?(0,s.addClass)(r,"htSeparator"):"function"==typeof c.renderer?((0,s.addClass)(r,"htCustomMenuRenderer"),r.appendChild(c.renderer(t,d,a,l,u,f))):(0,s.fastInnerHTML)(d,f),(0,n.isItemDisabled)(c,e)?(0,s.addClass)(r,"htDisabled"):(0,n.isItemSelectionDisabled)(c)?(0,s.addClass)(r,"htSelectionDisabled"):(0,n.isItemSubMenu)(c)&&(0,s.addClass)(r,"htSubmenu")}};var n=r(79084),s=r(49587),o=r(66862);const i="submenuIndicator"},83820:(e,t,r)=>{"use strict";t.__esModule=!0,t.createMenuNavigator=function(e){return(0,n.createPaginator)({size:()=>e.countRows(),onItemSelect(t,r){const n=e.getCell(t,0);if(!n||(0,s.isSeparator)(n)||(0,s.isDisabled)(n)||(0,s.isSelectionDisabled)(n))return!1;e.selectCell(t,0,...r?[t,0,!1,!1]:[])},onClear(){e.deselectCell()}})};var n=r(99850),s=r(79084)},77600:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),o=n(r(48427)),i=r(28787);function a(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var l=new WeakMap,u=new WeakMap,h=new WeakMap,c=new WeakMap,d=new WeakMap;t.Positioner=class{constructor(e){a(this,l,{writable:!0,value:void 0}),a(this,u,{writable:!0,value:void 0}),a(this,h,{writable:!0,value:void 0}),a(this,c,{writable:!0,value:!1}),a(this,d,{writable:!0,value:{above:0,below:0,left:0,right:0}}),(0,o.default)(this,c,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,s.default)(this,d)[e]=t,this}setElement(e){return(0,o.default)(this,l,e),this}setParentElement(e){return(0,o.default)(this,u,e),this}updatePosition(e){(0,o.default)(this,h,new i.Cursor(e,(0,s.default)(this,l).ownerDocument.defaultView)),(0,s.default)(this,c)?((0,s.default)(this,h).fitsBelow((0,s.default)(this,l))?this.setPositionBelowCursor():(0,s.default)(this,h).fitsAbove((0,s.default)(this,l))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===(0,s.default)(this,l).dir?(0,s.default)(this,h).fitsOnLeft((0,s.default)(this,l))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():(0,s.default)(this,h).fitsOnRight((0,s.default)(this,l))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=(0,s.default)(this,d).above+(0,s.default)(this,h).top-(0,s.default)(this,l).offsetHeight;(0,s.default)(this,u)&&(e=(0,s.default)(this,h).top+(0,s.default)(this,h).cellHeight-(0,s.default)(this,l).offsetHeight+3),(0,s.default)(this,l).style.top=`${e}px`}setPositionBelowCursor(){let e=(0,s.default)(this,d).below+(0,s.default)(this,h).top+1;(0,s.default)(this,u)&&(e=(0,s.default)(this,h).top-1),(0,s.default)(this,l).style.top=`${e}px`}setPositionOnRightOfCursor(){let e=(0,s.default)(this,h).left;if((0,s.default)(this,u)){const{right:t}=(0,s.default)(this,u).getBoundingClientRect();e+=(0,s.default)(this,h).cellWidth+t-((0,s.default)(this,h).left+(0,s.default)(this,h).cellWidth)}else e+=(0,s.default)(this,d).right;(0,s.default)(this,l).style.left=`${e}px`}setPositionOnLeftOfCursor(){let e=(0,s.default)(this,d).left+(0,s.default)(this,h).left-(0,s.default)(this,l).offsetWidth;if((0,s.default)(this,u)){const{left:t}=(0,s.default)(this,u).getBoundingClientRect();e-=(0,s.default)(this,h).left-t}(0,s.default)(this,l).style.left=`${e}px`}}},71227:(e,t,r)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutsCtrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=[];function i(e,t){u(t).addShortcuts(e,{group:s})}function a(e,t){const n=u(t);e.forEach((e=>{let{keys:t}=e;t.forEach((e=>n.removeShortcutsByKeys(e)))})),r.push({shortcuts:e,contextName:t}),i(e,t)}function l(e){return e?`${o}:${e}`:o}function u(t){var r;const n=e.hotMenu.getShortcutManager(),s=l(t);return null!==(r=n.getContext(s))&&void 0!==r?r:n.addContext(s)}return i((0,n.createDefaultShortcutsList)(e)),t.forEach((e=>{let{shortcuts:t,contextName:r}=e;a(t,r)})),{addCustomShortcuts:a,getCustomShortcuts:function(){return[...r]},getContext:u,listen:function(t){e.hotMenu.getShortcutManager().setActiveContextName(l(t))}}},r(95988);var n=r(26235);const s="menu",o=s},79084:(e,t,r)=>{"use strict";t.__esModule=!0,t.filterSeparators=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.SEPARATOR,r=e.slice(0);return r=a(r,t),r=function(e,t){let r=e.slice(0);return r.reverse(),r=a(r,t),r.reverse(),r}(r,t),r=function(e){const t=[];return(0,n.arrayEach)(e,((e,r)=>{r>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}(r),r},t.hasSubMenu=function(e){return(0,o.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,o.hasClass)(e,"htDisabled")},t.isItemDisabled=function(e,t){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(t)},t.isItemHidden=function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))},t.isItemSelectionDisabled=function(e){return(0,s.hasOwnProperty)(e,"disableSelection")},t.isItemSeparator=function(e){return new RegExp(i.SEPARATOR,"i").test(e.name)},t.isItemSubMenu=function(e){return(0,s.hasOwnProperty)(e,"submenu")},t.isSelectionDisabled=function(e){return(0,o.hasClass)(e,"htSelectionDisabled")},t.isSeparator=function(e){return(0,o.hasClass)(e,"htSeparator")},t.normalizeSelection=function(e){return(0,n.arrayMap)(e,(e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()})))},r(95988);var n=r(98887),s=r(76163),o=r(49587),i=r(86373);function a(e,t){const r=e.slice(0);for(let e=0;e<r.length&&r[e].name===t;)r.shift();return r}},94328:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:a,name(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT)},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner()))},submenu:{items:[{key:`${a}:left`,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htLeft"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htLeft";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:center`,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htCenter"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htCenter";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:right`,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htRight"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htRight";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:justify`,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htJustify"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htJustify";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{name:s.KEY},{key:`${a}:top`,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htTop"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="vertical",s="htTop";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:middle`,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htMiddle"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="vertical",s="htMiddle";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:bottom`,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htBottom"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="vertical",s="htBottom";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1}]}}};var n=r(12208),s=r(71273),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="alignment";t.KEY=a},5026:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_CLEAR_COLUMN)},callback(e,t){const r=t[0].start.col,n=t[0].end.col;this.countRows()&&this.populateFromArray(0,r,[[null]],Math.max(t[0].start.row,t[0].end.row),n,"ContextMenu.clearColumn")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByColumnHeader())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const o="clear_column";t.KEY=o},36200:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_INSERT_LEFT)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner(),t=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(t,e.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countCols()}return this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols},hidden(){return!this.getSettings().allowInsertColumn}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const o="col_left";t.KEY=o},11374:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_INSERT_RIGHT)},callback(){const e=this.getSelectedRangeLast().getTopRightCorner(),t=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(t,e.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols))},hidden(){return!this.getSettings().allowInsertColumn}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const o="col_right";t.KEY=o},86373:(e,t,r)=>{"use strict";t.__esModule=!0,t.addItem=function(e,t){-1===w.indexOf(e)&&(C[e]=t)},t.predefinedItems=function(){const e={};return(0,n.objectEach)(C,((t,r)=>{e[r]=t()})),e};var n=r(76163),s=y(r(94328));t.ALIGNMENT=s.KEY;var o=y(r(5026));t.CLEAR_COLUMN=o.KEY;var i=y(r(36200));t.COLUMN_LEFT=i.KEY;var a=y(r(11374));t.COLUMN_RIGHT=a.KEY;var l=y(r(65732));t.READ_ONLY=l.KEY;var u=y(r(35656));t.REDO=u.KEY;var h=y(r(28074));t.REMOVE_COLUMN=h.KEY;var c=y(r(34146));t.REMOVE_ROW=c.KEY;var d=y(r(83487));t.ROW_ABOVE=d.KEY;var f=y(r(54869));t.ROW_BELOW=f.KEY;var p=y(r(71273));t.SEPARATOR=p.KEY;var g=y(r(63676));t.NO_ITEMS=g.KEY;var m=y(r(51159));function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(E=function(e){return e?r:t})(e)}function y(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=E(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}t.UNDO=m.KEY;const w=[d.KEY,f.KEY,i.KEY,a.KEY,o.KEY,c.KEY,h.KEY,m.KEY,u.KEY,l.KEY,s.KEY,p.KEY,g.KEY];t.ITEMS=w;const C={[p.KEY]:p.default,[g.KEY]:g.default,[d.KEY]:d.default,[f.KEY]:f.default,[i.KEY]:i.default,[a.KEY]:a.default,[o.KEY]:o.default,[c.KEY]:c.default,[h.KEY]:h.default,[m.KEY]:m.default,[u.KEY]:u.default,[l.KEY]:l.default,[s.KEY]:s.default}},63676:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:s,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_NO_ITEMS)},disabled:!0,isCommand:!1}};var n=r(497);const s="no_items";t.KEY=s},65732:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:a,name(){let e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_READ_ONLY);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.checkSelectionConsistency)(e,((e,t)=>this.getCellMeta(e,t).readOnly));(0,s.arrayEach)(e,(e=>{e.forAll(((e,r)=>{e>=0&&r>=0&&this.setCellMeta(e,r,"readOnly",!t)}))})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||(!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||(!this.getSelectedRange()||0===this.getSelectedRange().length))))}}};var n=r(12208),s=r(98887),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="make_read_only";t.KEY=a},35656:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REDO)},callback(){this.redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const o="redo";t.KEY=o},28074:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[,r,,n]=e[0];r-n!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback(){this.alter("remove_col",(0,n.transformSelectionToColumnDistance)(this),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;const t=this.countCols();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByRowHeader()||0===t},hidden(){return!this.getSettings().allowRemoveColumn}}};var n=r(7763),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const i="remove_col";t.KEY=i},34146:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[r,,n]=e[0];r-n!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback(){this.alter("remove_row",(0,n.transformSelectionToRowDistance)(this),1,"ContextMenu.removeRow")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;const t=this.countRows();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByColumnHeader()||0===t},hidden(){return!this.getSettings().allowRemoveRow}}};var n=r(7763),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const i="remove_row";t.KEY=i},83487:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_ROW_ABOVE)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",e.row,1,"ContextMenu.rowAbove")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countRows()}return this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden(){return!this.getSettings().allowInsertRow}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const o="row_above";t.KEY=o},54869:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_ROW_BELOW)},callback(){const e=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",e.row,1,"ContextMenu.rowBelow")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.row<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows))},hidden(){return!this.getSettings().allowInsertRow}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const o="row_below";t.KEY=o},71273:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){return{name:r}};const r="---------";t.KEY=r},51159:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_UNDO)},callback(){this.undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const o="undo";t.KEY=o},12208:(e,t,r)=>{"use strict";t.__esModule=!0,t.align=function(e,t,r,i,a){(0,n.arrayEach)(e,(e=>{e.forAll(((e,n)=>{e>=0&&n>=0&&function(e,t,r,n,i,a){const l=i(e,t);let u=n;l.className&&(u="vertical"===r?s(l.className,n):o(l.className,n));a(e,t,"className",u)}(e,n,t,r,i,a)}))}))},t.checkSelectionConsistency=function(e,t){let r=!1;Array.isArray(e)&&(0,n.arrayEach)(e,(e=>(e.forAll(((e,n)=>{if(e>=0&&n>=0&&t(e,n))return r=!0,!1})),r)));return r},t.getAlignmentClasses=function(e,t){const r={};return(0,n.arrayEach)(e,(e=>{e.forAll(((e,n)=>{e>=0&&n>=0&&(r[e]||(r[e]=[]),r[e][n]=t(e,n))}))})),r},t.getDocumentOffsetByElement=function(e,t){const r={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:n,left:s}=e.getBoundingClientRect();r.top=n,r.left=s}return r},t.markLabelAsSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.prepareHorizontalAlignClass=o,t.prepareVerticalAlignClass=s;var n=r(98887);function s(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${t}`}function o(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${t}`}},55105:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}},72078:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY)},callback(){e.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497)},80771:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?(0,s.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY,t)},callback(){e.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497),s=r(57691)},22050:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,s.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS,t)},callback(){e.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497),s=r(57691)},15742:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,s.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS,t)},callback(){e.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497),s=r(57691)},54475:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"cut",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_CUT)},callback(){e.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},47771:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=n(r(42538)),i=n(r(48427)),a=r(33997),l=n(r(54925)),u=r(32313),h=r(98887),c=r(37913),d=r(49587),f=r(78498),p=n(r(72078)),g=n(r(80771)),m=n(r(22050)),E=n(r(15742)),y=n(r(54475)),w=n(r(16806)),C=r(98023),v=r(65795);function R(e,t){T(e,t),t.add(e)}function S(e,t,r){T(e,t),t.set(e,r)}function T(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function N(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(63824),l.default.getSingleton().register("afterCopyLimit"),l.default.getSingleton().register("modifyCopyableRange"),l.default.getSingleton().register("beforeCut"),l.default.getSingleton().register("afterCut"),l.default.getSingleton().register("beforePaste"),l.default.getSingleton().register("afterPaste"),l.default.getSingleton().register("beforeCopy"),l.default.getSingleton().register("afterCopy");const O="copyPaste";t.PLUGIN_KEY=O;t.PLUGIN_PRIORITY=80;const M=["fragmentSelection"],_=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var A=new WeakMap,b=new WeakMap,I=new WeakMap,x=new WeakMap,L=new WeakMap,P=new WeakMap,D=new WeakMap,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet,W=new WeakSet,Y=new WeakSet,G=new WeakSet;class j extends a.BasePlugin{constructor(){super(...arguments),R(this,G),R(this,Y),R(this,W),R(this,B),R(this,V),R(this,U),R(this,F),R(this,H),R(this,k),(0,s.default)(this,"columnsLimit",1/0),(0,s.default)(this,"rowsLimit",1/0),(0,s.default)(this,"pasteMode","overwrite"),(0,s.default)(this,"uiContainer",this.hot.rootDocument.body),S(this,A,{writable:!0,value:!1}),S(this,b,{writable:!0,value:!1}),S(this,I,{writable:!0,value:!1}),S(this,x,{writable:!0,value:"cells-only"}),S(this,L,{writable:!0,value:!1}),S(this,P,{writable:!0,value:!1}),S(this,D,{writable:!0,value:new C.CopyableRangesFactory({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})}),(0,s.default)(this,"copyableRanges",[])}static get PLUGIN_KEY(){return O}static get SETTING_KEYS(){return[O,...M]}static get PLUGIN_PRIORITY(){return 80}isEnabled(){return!!this.hot.getSettings()[O]}enablePlugin(){var e=this;if(this.enabled)return;const{[O]:t}=this.hot.getSettings();var r,n;"object"==typeof t&&(this.pasteMode=null!==(r=t.pasteMode)&&void 0!==r?r:this.pasteMode,this.rowsLimit=isNaN(t.rowsLimit)?this.rowsLimit:t.rowsLimit,this.columnsLimit=isNaN(t.columnsLimit)?this.columnsLimit:t.columnsLimit,(0,i.default)(this,A,!!t.copyColumnHeaders),(0,i.default)(this,b,!!t.copyColumnGroupHeaders),(0,i.default)(this,I,!!t.copyColumnHeadersOnly),this.uiContainer=null!==(n=t.uiContainer)&&void 0!==n?n:this.uiContainer);this.addHook("afterContextMenuDefaultOptions",(e=>N(this,V,q).call(this,e))),this.addHook("afterSelectionEnd",(()=>N(this,B,Q).call(this))),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(function(){return e.onCopy(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(function(){return e.onCut(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(function(){return e.onPaste(...arguments)})),(0,f.isSafari)()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N(e,W,Z).call(e,...r)})),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N(e,Y,J).call(e,...r)})),this.addHook("afterSelection",(()=>N(this,G,ee).call(this)))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only";(0,i.default)(this,x,e),(0,i.default)(this,L,!0),N(this,k,z).call(this,"copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){(0,i.default)(this,P,!0),N(this,k,z).call(this,"cut")}getRangedCopyableData(e){return(0,u.stringify)(this.getRangedData(e))}getRangedData(e){const t=[],{rows:r,columns:n}=(0,C.normalizeRanges)(e);return(0,h.arrayEach)(r,(e=>{const r=[];(0,h.arrayEach)(n,(t=>{e<0?r.push(this.hot.getColHeader(t,e)):r.push(this.hot.getCopyableData(e,t))})),t.push(r)})),t}paste(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!e&&!t)return;const r=new w.default;e&&r.clipboardData.setData("text/plain",e),t&&r.clipboardData.setData("text/html",t),this.onPaste(r)}setCopyableText(){const e=this.hot.getSelectedRangeLast();if(!e)return;if(e.isSingleHeader())return void(this.copyableRanges=[]);(0,o.default)(this,D).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===(0,o.default)(this,x)?t.set("headers",(0,o.default)(this,D).getMostBottomColumnHeadersRange()):("with-column-headers"===(0,o.default)(this,x)?t.set("headers",(0,o.default)(this,D).getMostBottomColumnHeadersRange()):"with-column-group-headers"===(0,o.default)(this,x)&&t.set("headers",(0,o.default)(this,D).getAllColumnHeadersRange()),t.set("cells",(0,o.default)(this,D).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter((e=>null!==e)).map((e=>{let{startRow:t,startCol:r,endRow:n,endCol:s}=e;return{startRow:t,startCol:r,endRow:n,endCol:s}})),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const r=t.get("cells");if(null!==r&&r.isRangeTrimmed){const{startRow:e,startCol:t,endRow:n,endCol:s}=r;this.hot.runHooks("afterCopyLimit",n-e+1,s-t+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){var e;return null===(e=this.hot.getActiveEditor())||void 0===e?void 0:e.isOpened()}populateValues(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(!e.length)return;const r=e.length,n=e[0].length,s=[],{row:o,col:i}=t.getTopStartCorner(),{row:a,col:l}=t.getBottomEndCorner();let u=o,h=i,c=o,d=i;for(;s.length<r||u<=a;){const{skipRowOnPaste:t,visualRow:a}=this.hot.getCellMeta(u,i);if(u=a+1,!0===t)continue;c=a,h=i;const f=[],p=s.length%r;for(;f.length<n||h<=l;){const{skipColumnOnPaste:t,visualCol:r}=this.hot.getCellMeta(o,h);if(h=r+1,!0===t)continue;d=r;const s=f.length%n;f.push(e[p][s])}s.push(f)}return this.hot.populateFromArray(o,i,s,void 0,void 0,"CopyPaste.paste",this.pasteMode),[o,i,c,d]}onCopy(e){if(!this.hot.isListening()&&!(0,o.default)(this,L)||this.isEditorOpened())return;this.setCopyableText(),(0,i.default)(this,L,!1);const t=this.getRangedData(this.copyableRanges),r=N(this,H,$).call(this,this.copyableRanges);if(!!this.hot.runHooks("beforeCopy",t,this.copyableRanges,r)){const n=(0,u.stringify)(t);if(e&&e.clipboardData){const r=(0,v._dataToHTML)(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",n),e.clipboardData.setData("text/html",[_,r].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",n);this.hot.runHooks("afterCopy",t,this.copyableRanges,r)}(0,i.default)(this,x,"cells-only"),e.preventDefault()}onCut(e){if(!this.hot.isListening()&&!(0,o.default)(this,P)||this.isEditorOpened())return;this.setCopyableText(),(0,i.default)(this,P,!1);const t=this.getRangedData(this.copyableRanges);if(!!this.hot.runHooks("beforeCut",t,this.copyableRanges)){const r=(0,u.stringify)(t);if(e&&e.clipboardData){const n=(0,v._dataToHTML)(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",r),e.clipboardData.setData("text/html",[_,n].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",r);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",t,this.copyableRanges)}e.preventDefault()}onPaste(e){if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected())return;let t;if(e&&e.preventDefault&&e.preventDefault(),e&&void 0!==e.clipboardData){const r=(0,c.sanitize)(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});if(r&&/(<table)|(<TABLE)/g.test(r)){t=(0,v.htmlToGridSettings)(r,this.hot.rootDocument).data}else t=e.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(t=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof t&&(t=(0,u.parse)(t)),void 0===t||t&&0===t.length)return;if(!1===this.hot.runHooks("beforePaste",t,this.copyableRanges))return;const[r,n,s,o]=this.populateValues(t);this.hot.selectCell(r,n,Math.min(this.hot.countRows()-1,s),Math.min(this.hot.countCols()-1,o)),this.hot.runHooks("afterPaste",t,this.copyableRanges)}destroy(){super.destroy()}}function z(e){if((0,f.isSafari)()){const t=this.hot.getSelectedRangeLast();if(t){const{row:r,col:n}=t.highlight,s=this.hot.getCell(r,n,!0);s&&(0,d.runWithSelectedContendEditableElement)(s,(()=>{this.hot.rootDocument.execCommand(e)}))}}else this.hot.rootDocument.execCommand(e)}function $(e){const{rows:t}=(0,C.normalizeRanges)(e);let r=0;for(let e=0;e<t.length&&!(t[e]>=0);e++)r+=1;return{columnHeadersCount:r}}function K(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:r}=e.highlight,n=this.hot.getCell(t,r,!0);n&&(0,d.makeElementContentEditableAndSelectItsContent)(n)}}}function X(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:r}=e.highlight,n=this.hot.getCell(t,r,!0);null!=n&&n.hasAttribute("contenteditable")&&(0,d.removeContentEditableFromElementAndDeselect)(n)}}}function q(e){e.items.push({name:"---------"},(0,p.default)(this)),(0,o.default)(this,A)&&e.items.push((0,E.default)(this)),(0,o.default)(this,b)&&e.items.push((0,m.default)(this)),(0,o.default)(this,I)&&e.items.push((0,g.default)(this)),e.items.push((0,y.default)(this))}function Q(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function Z(){N(this,U,X).call(this)}function J(){N(this,F,K).call(this)}function ee(){N(this,U,X).call(this)}t.CopyPaste=j},98023:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,t.normalizeRanges=function(e){const t=[],r=[];return(0,i.arrayEach)(e,(e=>{const n=Math.min(e.startRow,e.endRow),s=Math.max(e.startRow,e.endRow);(0,a.rangeEach)(n,s,(e=>{-1===t.indexOf(e)&&t.push(e)}));const o=Math.min(e.startCol,e.endCol),i=Math.max(e.startCol,e.endCol);(0,a.rangeEach)(o,i,(e=>{-1===r.indexOf(e)&&r.push(e)}))})),{rows:t,columns:r}},r(95988);var s=n(r(42538)),o=n(r(48427)),i=r(98887),a=r(57691);function l(e,t){h(e,t),t.add(e)}function u(e,t,r){h(e,t),t.set(e,r)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,E=new WeakMap,y=new WeakSet,w=new WeakSet;function C(e,t){return Math.min(t,Math.max(e+(0,s.default)(this,m).call(this)-1,e))}function v(e,t){return Math.min(t,Math.max(e+(0,s.default)(this,g).call(this)-1,e))}t.CopyableRangesFactory=class{constructor(e){let{countRows:t,countColumns:r,rowsLimit:n,columnsLimit:s,countColumnHeaders:i}=e;l(this,w),l(this,y),u(this,d,{writable:!0,value:void 0}),u(this,f,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:void 0}),u(this,g,{writable:!0,value:void 0}),u(this,m,{writable:!0,value:void 0}),u(this,E,{writable:!0,value:void 0}),(0,o.default)(this,f,t),(0,o.default)(this,p,r),(0,o.default)(this,g,n),(0,o.default)(this,m,s),(0,o.default)(this,E,i)}setSelectedRange(e){(0,o.default)(this,d,e)}getCellsRange(){if(0===(0,s.default)(this,f).call(this)||0===(0,s.default)(this,p).call(this))return null;const{row:e,col:t}=(0,s.default)(this,d).getTopStartCorner(),{row:r,col:n}=(0,s.default)(this,d).getBottomEndCorner(),o=c(this,w,v).call(this,e,r),i=c(this,y,C).call(this,t,n);return{isRangeTrimmed:r!==o||n!==i,startRow:e,startCol:t,endRow:o,endCol:i}}getMostBottomColumnHeadersRange(){if(0===(0,s.default)(this,p).call(this)||0===(0,s.default)(this,E).call(this))return null;const{col:e}=(0,s.default)(this,d).getTopStartCorner(),{col:t}=(0,s.default)(this,d).getBottomEndCorner(),r=c(this,y,C).call(this,e,t);return{isRangeTrimmed:t!==r,startRow:-1,startCol:e,endRow:-1,endCol:r}}getAllColumnHeadersRange(){if(0===(0,s.default)(this,p).call(this)||0===(0,s.default)(this,E).call(this))return null;const{col:e}=(0,s.default)(this,d).getTopStartCorner(),{col:t}=(0,s.default)(this,d).getBottomEndCorner(),r=c(this,y,C).call(this,e,t);return{isRangeTrimmed:t!==r,startRow:-(0,s.default)(this,E).call(this),startCol:e,endRow:-1,endCol:r}}}},82630:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(47771);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.CopyPaste=n.CopyPaste},16806:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(55105));t.default=class{constructor(){this.clipboardData=new s.default}}},50526:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return(0,s.checkSelectionBorders)(this,"bottom")&&(e=(0,s.markSelected)(e)),e},callback(t,r){const n=(0,s.checkSelectionBorders)(this,"bottom");e.prepareBorder(r,"bottom",n)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(17802);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}},47586:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(50526));t.bottom=s.default;var o=n(r(13125));t.left=o.default;var i=n(r(76196));t.noBorders=i.default;var a=n(r(72431));t.right=a.default;var l=n(r(41056));t.top=l.default},13125:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_LEFT);return(0,s.checkSelectionBorders)(this,t)&&(e=(0,s.markSelected)(e)),e},callback(r,n){const o=(0,s.checkSelectionBorders)(this,t);e.prepareBorder(n,t,o)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(17802);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}},76196:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback(t,r){e.prepareBorder(r,"noBorders")},disabled(){return!(0,s.checkSelectionBorders)(this)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(17802);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}},72431:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return(0,s.checkSelectionBorders)(this,t)&&(e=(0,s.markSelected)(e)),e},callback(r,n){const o=(0,s.checkSelectionBorders)(this,t);e.prepareBorder(n,t,o)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(17802);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}},41056:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:top",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_TOP);return(0,s.checkSelectionBorders)(this,"top")&&(e=(0,s.markSelected)(e)),e},callback(t,r){const n=(0,s.checkSelectionBorders)(this,"top");e.prepareBorder(r,"top",n)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(17802);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}},91166:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(33997),i=r(76163),a=r(57691),l=r(98887),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),h=r(47586),c=r(17802),d=r(79055);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}function p(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function g(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const m="customBorders";t.PLUGIN_KEY=m;t.PLUGIN_PRIORITY=90;var E=new WeakSet,y=new WeakSet;class w extends o.BasePlugin{constructor(){super(...arguments),p(this,y),p(this,E),(0,s.default)(this,"savedBorders",[])}static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return 90}isEnabled(){return!!this.hot.getSettings()[m]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>g(this,E,C).call(this,e))),this.addHook("init",(()=>g(this,y,v).call(this))),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(e,t){let r=["top","bottom","start","end"],n=null;t&&(this.checkSettingsCohesion([t]),r=Object.keys(t),n=(0,c.normalizeBorder)(t));const s=(0,d.detectSelectionType)(e),o=(0,d.normalizeSelectionFactory)(s,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});(0,l.arrayEach)(e,(e=>{o(e).forAll(((e,t)=>{(0,l.arrayEach)(r,(r=>{this.prepareBorderFromCustomAdded(e,t,n,(0,c.toInlinePropName)(r))}))}))})),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=(0,d.detectSelectionType)(e),r=(0,d.normalizeSelectionFactory)(t,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),n=[];return(0,l.arrayEach)(e,(e=>{r(e).forAll(((e,t)=>{(0,l.arrayEach)(this.savedBorders,(r=>{r.row===e&&r.col===t&&n.push((0,c.denormalizeBorder)(r))}))}))})),n}clearBorders(e){e?this.setBorders(e):((0,l.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),this.hot.removeCellMeta(e.row,e.col,"borders")})),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){this.checkSavedBorders(e)||this.savedBorders.push(e);const r=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col));this.checkCustomSelections(e,r,t)||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:r})}prepareBorderFromCustomAdded(e,t,r,n){const s=this.hot.countRows(),o=this.hot.countCols();if(e>=s||t>=o)return;let i=(0,c.createEmptyBorders)(e,t);r&&(i=(0,c.extendDefaultBorder)(i,r),(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(e=>{if(i.id===e.settings.id)return Object.assign(e.settings,r),i.id=e.settings.id,i.top=e.settings.top,i.bottom=e.settings.bottom,i.start=e.settings.start,i.end=e.settings.end,!1}))),this.hot.setCellMeta(e,t,"borders",(0,c.denormalizeBorder)(i)),this.insertBorderIntoSettings(i,n)}prepareBorderFromCustomAddedRange(e,t){const r=Math.min(e.to.row,this.hot.countRows()-1),n=Math.min(e.to.col,this.hot.countCols()-1);(0,a.rangeEach)(e.from.row,r,(r=>{(0,a.rangeEach)(e.from.col,n,(n=>{const s=(0,c.createEmptyBorders)(r,n);let o=0;r===e.from.row&&(0,i.hasOwnProperty)(t,"top")&&(o+=1,s.top=t.top),r===e.to.row&&(0,i.hasOwnProperty)(t,"bottom")&&(o+=1,s.bottom=t.bottom),n===e.from.col&&(0,i.hasOwnProperty)(t,"start")&&(o+=1,s.start=t.start),n===e.to.col&&(0,i.hasOwnProperty)(t,"end")&&(o+=1,s.end=t.end),o>0&&(this.hot.setCellMeta(r,n,"borders",(0,c.denormalizeBorder)(s)),this.insertBorderIntoSettings(s))}))}))}removeAllBorders(e,t){const r=(0,c.createId)(e,t);this.spliceBorder(r),this.clearBordersFromSelectionSettings(r),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,r,n){let s=this.hot.getCellMeta(e,t).borders;if(s=s&&void 0!==s.border?(0,c.normalizeBorder)(s):(0,c.createEmptyBorders)(e,t),n){s[r]=(0,c.createSingleEmptyBorder)();if(4===this.countHide(s))this.removeAllBorders(e,t);else{this.checkCustomSelectionsFromContextMenu(s,r,n)||this.insertBorderIntoSettings(s),this.hot.setCellMeta(e,t,"borders",(0,c.denormalizeBorder)(s))}}else{s[r]=(0,c.createDefaultCustomBorder)();this.checkCustomSelectionsFromContextMenu(s,r,n)||this.insertBorderIntoSettings(s),this.hot.setCellMeta(e,t,"borders",(0,c.denormalizeBorder)(s))}}prepareBorder(e,t,r){(0,l.arrayEach)(e,(e=>{let{start:n,end:s}=e;if(n.row===s.row&&n.col===s.col)"noBorders"===t?this.removeAllBorders(n.row,n.col):this.setBorder(n.row,n.col,t,r);else switch(t){case"noBorders":(0,a.rangeEach)(n.col,s.col,(e=>{(0,a.rangeEach)(n.row,s.row,(t=>{this.removeAllBorders(t,e)}))}));break;case"top":(0,a.rangeEach)(n.col,s.col,(e=>{this.setBorder(n.row,e,t,r)}));break;case"bottom":(0,a.rangeEach)(n.col,s.col,(e=>{this.setBorder(s.row,e,t,r)}));break;case"start":(0,a.rangeEach)(n.row,s.row,(e=>{this.setBorder(e,n.col,t,r)}));break;case"end":(0,a.rangeEach)(n.row,s.row,(e=>{this.setBorder(e,s.col,t,r)}))}}))}createCustomBorders(e){(0,l.arrayEach)(e,(e=>{const t=(0,c.normalizeBorder)(e);e.range?this.prepareBorderFromCustomAddedRange(e.range,t):this.prepareBorderFromCustomAdded(e.row,e.col,t)}))}countHide(e){const{top:t,bottom:r,start:n,end:s}=e,o=[t,r,n,s];return(0,l.arrayReduce)(o,((e,t)=>{let r=e;return t&&t.hide&&(r+=1),r}),0)}clearBordersFromSelectionSettings(e){const t=(0,l.arrayMap)(this.hot.selection.highlight.customSelections,(e=>e.settings.id)).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){(0,l.arrayEach)(this.hot.selection.highlight.customSelections,((e,t)=>{if(null===e.cellRange)return this.hot.selection.highlight.customSelections[t].destroy(),this.hot.selection.highlight.customSelections.splice(t,1),!1}))}hideBorders(){(0,l.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()}))}spliceBorder(e){const t=(0,l.arrayMap)(this.savedBorders,(e=>e.id)).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;return 4===this.countHide(e)?(this.spliceBorder(e.id),t=!0):(0,l.arrayEach)(this.savedBorders,((r,n)=>{if(e.id===r.id)return this.savedBorders[n]=e,t=!0,!1})),t}checkCustomSelectionsFromContextMenu(e,t,r){let n=!1;return(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(s=>{if(e.id===s.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(s);return(0,l.arrayEach)(e,(e=>{e.toggleHiddenClass(t,r)})),n=!0,!1}})),n}checkCustomSelections(e,t,r){const n=this.countHide(e);let s=!1;return 4===n?(this.removeAllBorders(e.row,e.col),s=!0):(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(n=>{if(e.id===n.settings.id){if(n.visualCellRange=t,n.commit(),r){const t=this.hot.view._wt.selectionManager.getBorderInstances(n);(0,l.arrayEach)(t,(t=>{t.changeBorderStyle(r,e)}))}return s=!0,!1}})),s}changeBorderSettings(){const e=this.hot.getSettings()[m];if(Array.isArray(e)){const t=(0,i.deepClone)(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else void 0!==e&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=(0,c.hasLeftRightTypeOptions)(e),r=(0,c.hasStartEndTypeOptions)(e);if(t&&r)throw new Error('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".');if(this.hot.isRtl()&&t)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}destroy(){super.destroy()}}function C(e){this.hot.getSettings()[m]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(u.CONTEXTMENU_ITEMS_BORDERS)},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[(0,h.top)(this),(0,h.right)(this),(0,h.bottom)(this),(0,h.left)(this),(0,h.noBorders)(this)]}})}function v(){this.changeBorderSettings()}t.CustomBorders=w},93725:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(91166);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.CustomBorders=n.CustomBorders},17802:(e,t,r)=>{"use strict";t.__esModule=!0,t.checkSelectionBorders=function(e,t){let r=!1;return(0,o.arrayEach)(e.getSelectedRange(),(s=>{s.forAll(((s,o)=>{if(s<0||o<0)return;const i=e.getCellMeta(s,o).borders;if(i){if(!t)return r=!0,!1;if(!(0,n.hasOwnProperty)(i[t],"hide")||!1===i[t].hide)return r=!0,!1}}))})),r},t.createDefaultCustomBorder=a,t.createDefaultHtBorder=u,t.createEmptyBorders=function(e,t){return{id:i(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},bottom:{hide:!0},start:{hide:!0},end:{hide:!0}}},t.createId=i,t.createSingleEmptyBorder=l,t.denormalizeBorder=function(e){(0,s.isDefined)(e.start)&&(e.left=e.start);(0,s.isDefined)(e.end)&&(e.right=e.end);return e},t.extendDefaultBorder=function(e,t){(0,n.hasOwnProperty)(t,"border")&&t.border&&(e.border=t.border);(0,n.hasOwnProperty)(t,"top")&&(0,s.isDefined)(t.top)&&(t.top?((0,n.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top));(0,n.hasOwnProperty)(t,"bottom")&&(0,s.isDefined)(t.bottom)&&(t.bottom?((0,n.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom));(0,n.hasOwnProperty)(t,"start")&&(0,s.isDefined)(t.start)&&(t.start?((0,n.isObject)(t.start)||(t.start={width:1,color:"#000"}),e.start=t.start):(t.start={hide:!0},e.start=t.start));(0,n.hasOwnProperty)(t,"end")&&(0,s.isDefined)(t.end)&&(t.end?((0,n.isObject)(t.end)||(t.end={width:1,color:"#000"}),e.end=t.end):(t.end={hide:!0},e.end=t.end));return e},t.hasLeftRightTypeOptions=function(e){return e.some((e=>(0,s.isDefined)(e.left)||(0,s.isDefined)(e.right)))},t.hasStartEndTypeOptions=function(e){return e.some((e=>(0,s.isDefined)(e.start)||(0,s.isDefined)(e.end)))},t.markSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.normalizeBorder=function(e){var t,r;((0,s.isDefined)(e.start)||(0,s.isDefined)(e.left))&&(e.start=null!==(t=e.start)&&void 0!==t?t:e.left);((0,s.isDefined)(e.end)||(0,s.isDefined)(e.right))&&(e.end=null!==(r=e.end)&&void 0!==r?r:e.right);return delete e.left,delete e.right,e},t.toInlinePropName=function(e){var t;return null!==(t=h.get(e))&&void 0!==t?t:e};var n=r(76163),s=r(97639),o=r(98887);function i(e,t){return`border_row${e}col${t}`}function a(){return{width:1,color:"#000"}}function l(){return{hide:!0}}function u(){return{width:1,color:"#000",cornerVisible:!1}}const h=new Map([["left","start"],["right","end"]])},16703:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(33997),i=r(30369),a=r(49587);function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const h="dragToScroll";t.PLUGIN_KEY=h;t.PLUGIN_PRIORITY=100;var c=new WeakSet;class d extends o.BasePlugin{constructor(){super(...arguments),l(this,c),(0,s.default)(this,"boundaries",null),(0,s.default)(this,"callback",null),(0,s.default)(this,"listening",!1)}static get PLUGIN_KEY(){return h}static get PLUGIN_PRIORITY(){return 100}isEnabled(){return!!this.hot.getSettings()[h]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",(e=>u(this,c,f).call(this,e))),this.addHook("afterOnCellCornerMouseDown",(e=>u(this,c,f).call(this,e))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(e){this.boundaries=e}setCallback(e){this.callback=e}check(e,t){let r=0,n=0;t<this.boundaries.top?n=t-this.boundaries.top:t>this.boundaries.bottom&&(n=t-this.boundaries.bottom),e<this.boundaries.left?r=e-this.boundaries.left:e>this.boundaries.right&&(r=e-this.boundaries.right),this.callback(r,n)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:e}=this.hot;let t=e;for(;t;)this.eventManager.addEventListener(t.document,"contextmenu",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mouseup",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mousemove",(e=>this.onMouseMove(e))),t=(0,a.getParentWindow)(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}function f(e){if((0,i.isRightClick)(e))return;const t=this.hot.view._wt.wtTable.holder;t!==this.hot.rootWindow&&(this.setBoundaries(t.getBoundingClientRect()),this.setCallback(((e,r)=>{e<0?t.scrollLeft-=50:e>0&&(t.scrollLeft+=50),r<0?t.scrollTop-=20:r>0&&(t.scrollTop+=20)})),this.listen())}t.DragToScroll=d},59910:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(16703);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.DragToScroll=n.DragToScroll},20877:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(33997),i=r(98887),a=r(76163),l=r(50426),u=r(12208),h=r(49587),c=r(66496),d=r(51366),f=n(r(54925)),p=r(86373);r(59456);var g=r(497),m=r(66862);function E(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}f.default.getSingleton().register("afterDropdownMenuDefaultOptions"),f.default.getSingleton().register("beforeDropdownMenuShow"),f.default.getSingleton().register("afterDropdownMenuShow"),f.default.getSingleton().register("afterDropdownMenuHide"),f.default.getSingleton().register("afterDropdownMenuExecute");const w="dropdownMenu";t.PLUGIN_KEY=w;t.PLUGIN_PRIORITY=230;const C="changeType",v=w;var R=new WeakSet,S=new WeakSet,T=new WeakSet,N=new WeakSet,O=new WeakSet,M=new WeakSet,_=new WeakSet;class A extends o.BasePlugin{static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return 230}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[p.COLUMN_LEFT,p.COLUMN_RIGHT,p.SEPARATOR,p.REMOVE_COLUMN,p.SEPARATOR,p.CLEAR_COLUMN,p.SEPARATOR,p.READ_ONLY,p.SEPARATOR,p.ALIGNMENT]}constructor(e){super(e),E(this,_),E(this,M),E(this,O),E(this,N),E(this,T),E(this,S),E(this,R),(0,s.default)(this,"commandExecutor",new l.CommandExecutor(this.hot)),(0,s.default)(this,"itemsFactory",null),(0,s.default)(this,"menu",null),this.hot.addHook("afterGetColHeader",((e,t)=>y(this,T,x).call(this,e,t)))}isEnabled(){return this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new c.ItemsFactory(this.hot,A.DEFAULT_ITEMS);const t=this.hot.getSettings()[w],r={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady((()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",r),this.itemsFactory.setPredefinedItems(r.items);const n=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new d.Menu(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.hot.runHooks("beforeDropdownMenuSetItems",n),this.menu.setMenuItems(n),this.menu.addLocalHook("beforeOpen",(()=>y(this,N,L).call(this))),this.menu.addLocalHook("afterOpen",(()=>y(this,O,P).call(this))),this.menu.addLocalHook("afterSubmenuOpen",(e=>y(this,M,D).call(this,e))),this.menu.addLocalHook("afterClose",(()=>y(this,_,k).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.executeCommand.call(e,...r)})),(0,i.arrayEach)(n,(e=>this.commandExecutor.registerCommand(e.key,e)))}))}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if((e.isHeader()&&-1===e.row||e.isCell())&&e.col>=0){this.hot.selectColumns(e.col,e.col,-1);const{from:t}=this.hot.getSelectedRangeLast(),r=(0,u.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),n=this.hot.getCell(-1,t.col,!0),s=n.getBoundingClientRect();this.open({left:s.left+r.left,top:s.top+n.offsetHeight+r.top},{left:s.width})}};this.hot.getShortcutManager().getContext("grid").addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()&&!this.menu.isOpened()},captureCtrl:!0,group:v},{keys:[["Shift","Alt","ArrowDown"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isCell()&&!this.menu.isOpened()},group:v}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(v)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",(e=>y(this,S,I).call(this,e)))}open(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.menu.open(),(0,a.objectEach)(r,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close()}executeCommand(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.commandExecutor.execute(e,...r)}setListening(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function b(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function I(e){if(e.stopPropagation(),(0,h.hasClass)(e.target,C)){const t=(0,u.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),r=e.target.getBoundingClientRect();this.open({left:r.left+t.left,top:r.top+e.target.offsetHeight+3+t.top},{left:r.width})}}function x(e,t){const r=t.parentNode;if(!r)return;const n=r.parentNode.childNodes,s=Array.prototype.indexOf.call(n,r);if(e<0||s!==n.length-1)return;const o=t.querySelector(`.${C}`);if(this.enabled&&o)return;if(!this.enabled)return void(o&&o.parentNode.removeChild(o));const i=this.hot.rootDocument.createElement("button");i.className=C,i.type="button",i.tabIndex=-1,this.hot.getSettings().ariaTags&&((0,h.setAttribute)(i,[(0,m.A11Y_LABEL)(this.hot.getTranslatedPhrase(g.COLUMN_HEADER_LABEL_OPEN_MENU))]),(0,h.setAttribute)(t,[(0,m.A11Y_HASPOPUP)("menu")])),i.onclick=function(){return!1},t.firstChild.insertBefore(i,t.firstChild.firstChild)}function L(){this.hot.runHooks("beforeDropdownMenuShow",this)}function P(){this.hot.runHooks("afterDropdownMenuShow",this),y(this,R,b).call(this,this.menu)}function D(e){y(this,R,b).call(this,e)}function k(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}t.DropdownMenu=A,A.SEPARATOR={name:p.SEPARATOR}},82143:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(20877);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.DropdownMenu=n.DropdownMenu},39105:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(57691);var i=class{constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"options",{}),this.hot=e}setOptions(e){this.options=e}getData(){const{startRow:e,startCol:t,endRow:r,endCol:n}=this._getDataRange(),s=this.options,i=[];return(0,o.rangeEach)(e,r,(e=>{const r=[];!s.exportHiddenRows&&this._isHiddenRow(e)||((0,o.rangeEach)(t,n,(t=>{!s.exportHiddenColumns&&this._isHiddenColumn(t)||r.push(this.hot.getDataAtCell(e,t))})),i.push(r))})),i}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:r}=this._getDataRange(),n=this.hot.getRowHeader();(0,o.rangeEach)(t,r,(t=>{!this.options.exportHiddenRows&&this._isHiddenRow(t)||e.push(n[t])}))}return e}getColumnHeaders(){const e=[];if(this.options.columnHeaders){const{startCol:t,endCol:r}=this._getDataRange(),n=this.hot.getColHeader();(0,o.rangeEach)(t,r,(t=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(t)||e.push(n[t])}))}return e}_getDataRange(){const e=this.hot.countCols()-1,t=this.hot.countRows()-1;let[r=0,n=0,s=t,o=e]=this.options.range;return r=Math.max(r,0),n=Math.max(n,0),s=Math.min(s,t),o=Math.min(o,e),{startRow:r,startCol:n,endRow:s,endCol:o}}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}};t.default=i},33726:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=r(33997),o=n(r(39105)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(54655));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l="exportFile";t.PLUGIN_KEY=l;t.PLUGIN_PRIORITY=240;class u extends s.BasePlugin{static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return 240}isEnabled(){return!0}exportAsString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,t).export()}exportAsBlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,t))}downloadFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:r,rootWindow:n}=this.hot,s=this._createTypeFormatter(e,t),o=this._createBlob(s),i=n.URL||n.webkitURL,a=r.createElement("a"),l=`${s.options.filename}.${s.options.fileExtension}`;if(void 0!==a.download){const e=i.createObjectURL(o);a.style.display="none",a.setAttribute("href",e),a.setAttribute("download",l),r.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),r.body.removeChild(a),setTimeout((()=>{i.revokeObjectURL(e)}),100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(o,l)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!i.EXPORT_TYPES[e])throw new Error(`Export format type "${e}" is not supported.`);return(0,i.default)(e,new o.default(this.hot),t)}_createBlob(e){let t=null;return"undefined"!=typeof Blob&&(t=new Blob([e.export()],{type:`${e.options.mimeType};charset=${e.options.encoding}`})),t}}t.ExportFile=u},57103:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(33726);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ExportFile=n.ExportFile},54655:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.default=function(e,t,r){if("function"==typeof o[e])return new o[e](t,r);return null};var s=n(r(40202));t.TYPE_CSV="csv";t.TYPE_EXCEL="excel";t.TYPE_PDF="pdf";const o={csv:s.default};t.EXPORT_TYPES=o},68716:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(76163),i=r(37913);class a{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}constructor(e,t){(0,s.default)(this,"dataProvider",void 0),(0,s.default)(this,"options",void 0),this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}_mergeOptions(e){let t=(0,o.clone)(this.constructor.DEFAULT_OPTIONS);const r=new Date;return t=(0,o.extend)((0,o.clone)(a.DEFAULT_OPTIONS),t),t=(0,o.extend)(t,e),t.filename=(0,i.substitute)(t.filename,{YYYY:r.getFullYear(),MM:`${r.getMonth()+1}`.padStart(2,"0"),DD:`${r.getDate()}`.padStart(2,"0")}),t}}var l=a;t.default=l},40202:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(98887),o=r(97639),i=n(r(68716));const a=String.fromCharCode(13),l=String.fromCharCode(34),u=String.fromCharCode(10);class h extends i.default{static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n"}}export(){const e=this.options,t=this.dataProvider.getData();let r=this.dataProvider.getColumnHeaders();const n=r.length>0,o=this.dataProvider.getRowHeaders(),i=o.length>0;let a=e.bom?String.fromCharCode(65279):"";return n&&(r=(0,s.arrayMap)(r,(e=>this._escapeCell(e,!0))),i&&(a+=e.columnDelimiter),a+=r.join(e.columnDelimiter),a+=e.rowDelimiter),(0,s.arrayEach)(t,((t,r)=>{r>0&&(a+=e.rowDelimiter),i&&(a+=this._escapeCell(o[r])+e.columnDelimiter),a+=t.map((e=>this._escapeCell(e))).join(e.columnDelimiter)})),a}_escapeCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=(0,o.stringify)(e);return""!==r&&(t||r.indexOf(a)>=0||r.indexOf(l)>=0||r.indexOf(u)>=0||r.indexOf(this.options.columnDelimiter)>=0)&&(r=r.replace(new RegExp('"',"g"),'""'),r=`"${r}"`),r}}var c=h;t.default=c},31168:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(98887),i=r(76163),a=n(r(63806)),l=r(41789);class u{constructor(e,t){let{id:r,stateless:n=!0}=t;(0,s.default)(this,"hot",void 0),(0,s.default)(this,"id",void 0),(0,s.default)(this,"elements",[]),(0,s.default)(this,"hidden",!1),(0,s.default)(this,"stateId",""),(0,s.default)(this,"state",void 0),this.hot=e,this.id=r,this.stateId=`Filters.component.${this.id}`,this.state=n?null:this.hot.columnIndexMapper.registerMap(this.stateId,new l.LinkedPhysicalIndexToValueMap)}getElements(){return this.elements}reset(){(0,o.arrayEach)(this.elements,(e=>e.reset()))}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return null===this.hot||this.hidden}restoreState(e){this.state&&this.setState(this.state.getValueAtIndex(e))}setState(){throw new Error("The state setting logic is not implemented")}saveState(e){this.state&&this.state.setValueAtIndex(e,this.getState())}getState(){throw new Error("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),(0,o.arrayEach)(this.elements,(e=>e.destroy())),this.state=null,this.elements=null,this.hot=null}}t.BaseComponent=u,(0,i.mixin)(u,a.default)},78884:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s,o=n(r(93231)),i=r(49587),a=r(98887),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),u=r(31168),h=r(69346);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}function d(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}var f=new WeakSet;class p extends u.BaseComponent{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(e,t){super(e,{id:t.id,stateless:!0}),d(this,f),(0,o.default)(this,"name",""),this.name=t.name,this.elements.push(new h.InputUI(this.hot,{type:"button",value:l.FILTERS_BUTTONS_OK,className:"htUIButton htUIButtonOK",identifier:p.BUTTON_OK})),this.elements.push(new h.InputUI(this.hot,{type:"button",value:l.FILTERS_BUTTONS_CANCEL,className:"htUIButton htUIButtonCancel",identifier:p.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){(0,a.arrayEach)(this.elements,(e=>{e.addLocalHook("click",((e,t)=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,f,g).call(this,e,t)))}))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,i.addClass)(t.parentNode,"htFiltersMenuActionBar"),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function g(e,t){t.options.identifier===s.BUTTON_OK?this.accept():this.cancel()}t.ActionBarComponent=p,s=p},9666:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(49587),i=r(30369),a=r(98887),l=r(49223),u=r(76163),h=E(r(497)),c=r(31168),d=E(r(78327)),f=r(69346),p=r(23335),g=r(41830);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(m=function(e){return e?r:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=m(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}function y(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function w(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var C=new WeakSet,v=new WeakSet;class R extends c.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),y(this,v),y(this,C),(0,s.default)(this,"name",""),(0,s.default)(this,"addSeparator",!1),this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new p.SelectUI(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new f.InputUI(this.hot,{placeholder:h.FILTERS_BUTTONS_PLACEHOLDER_VALUE})),this.elements.push(new f.InputUI(this.hot,{placeholder:h.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",(e=>w(this,C,S).call(this,e))).addLocalHook("afterClose",(()=>this.runLocalHooks("afterClose"))).addLocalHook("tabKeydown",(e=>this.runLocalHooks("selectTabKeydown",e))),(0,a.arrayEach)(this.getInputElements(),(e=>{e.addLocalHook("keydown",(e=>w(this,v,T).call(this,e)))}))}setState(e){if(this.reset(),!e)return;const t=(0,u.clone)(e.command);t.name.startsWith(h.FILTERS_CONDITIONS_NAMESPACE)&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),(0,a.arrayEach)(e.args,((e,r)=>{if(r>t.inputsCount-1)return!1;const n=this.getInputElement(r);n.setValue(e),n[t.inputsCount>r?"show":"hide"](),r||this.hot._registerTimeout((()=>n.focus()),10)}))}getState(){const e=this.getSelectElement().getValue()||(0,g.getConditionDescriptor)(d.CONDITION_NONE),t=[];return(0,a.arrayEach)(this.getInputElements(),((r,n)=>{e.inputsCount>n&&t.push(r.getValue())})),{command:e,args:t}}updateState(e,t){const r=e?(0,g.getConditionDescriptor)(e.name):(0,g.getConditionDescriptor)(d.CONDITION_NONE);this.state.setValueAtIndex(t,{command:r,args:e?e.args:[]}),e||(0,a.arrayEach)(this.getInputElements(),(e=>e.setValue(null)))}getSelectElement(){return this.elements.filter((e=>e instanceof p.SelectUI))[0]}getInputElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[e]}getInputElements(){return this.elements.filter((e=>e instanceof f.InputUI))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,r,n,s,i)=>{(0,o.addClass)(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&(0,o.addClass)(t.parentNode,"border");const l=this.hot.rootDocument.createElement("div");return(0,o.addClass)(l,"htFiltersMenuLabel"),l.textContent=i,t.appendChild(l),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[(0,g.getConditionDescriptor)(d.CONDITION_NONE)];if(null!==e){const{visualIndex:r}=e;t=(0,d.default)(this.hot.getDataType(0,r,this.hot.countRows(),r))}(0,a.arrayEach)(this.getInputElements(),(e=>e.hide())),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}}function S(e){(0,a.arrayEach)(this.getInputElements(),((t,r)=>{t[e.inputsCount>r?"show":"hide"](),0===r&&this.hot._registerTimeout((()=>t.focus()),10)})),this.runLocalHooks("change",e)}function T(e){(0,l.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,i.stopImmediatePropagation)(e))}t.ConditionComponent=R},52387:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(49587),i=r(98887),a=r(45561),l=r(31168),u=r(46798),h=r(98986),c=r(19926),d=r(79591),f=r(20498);function p(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}var g=new WeakSet;class m extends l.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),p(this,g),(0,s.default)(this,"name",""),this.name=t.name,this.buildOperatorsElement()}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,o.addClass)(t.parentNode,"htFiltersMenuOperators"),(0,i.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}buildOperatorsElement(){const e=[h.OPERATION_ID,c.OPERATION_ID];(0,i.arrayEach)(e,(t=>{const r=new f.RadioInputUI(this.hot,{name:"operator",label:{htmlFor:t,textContent:(0,u.getOperationName)(t)},value:t,checked:t===e[0],id:t});r.addLocalHook("change",(e=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,g,E).call(this,e))),this.elements.push(r)}))}setChecked(e){if(this.elements.length<e)throw Error(a.toSingleLine`Radio button with index ${e} doesn't exist.`);(0,i.arrayEach)(this.elements,((t,r)=>{t.setChecked(r===e)}))}getActiveOperationId(){const e=this.elements.find((e=>e instanceof f.RadioInputUI&&e.isChecked()));return e?e.getValue():h.OPERATION_ID}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&(0,i.arrayEach)(this.elements,(t=>{t.setChecked(t.getValue()===e)}))}updateState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.OPERATION_ID,t=arguments.length>1?arguments[1]:void 0,r=e;r===d.OPERATION_ID&&(r=c.OPERATION_ID),this.state.setValueAtIndex(t,r)}reset(){this.setChecked(0)}}function E(e){this.setState(e.target.value)}t.OperatorsComponent=m},95896:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(49587),i=r(30369),a=r(98887),l=r(49223),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=g(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),h=r(41902),c=r(31168),d=r(89319),f=r(78327),p=r(41830);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(g=function(e){return e?r:t})(e)}function m(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}var E=new WeakSet;class y extends c.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),m(this,E),(0,s.default)(this,"name",""),this.name=t.name,this.elements.push(new d.MultipleSelectUI(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",(e=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,E,w).call(this,e))).addLocalHook("listTabKeydown",(e=>this.runLocalHooks("listTabKeydown",e)))}getElements(){const e=this.getMultipleSelectElement();return[e.getSearchInputElement(),e.getSelectAllElement(),e.getClearAllElement(),this.getMultipleSelectElement()]}setState(e){if(this.reset(),e&&e.command.key===f.CONDITION_BY_VALUE){const t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0]),t.setLocale(e.locale)}}getState(){const e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?f.CONDITION_NONE:f.CONDITION_BY_VALUE},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(t,r,n,s,o)=>{const[i]=(0,a.arrayFilter)(r,(e=>e.name===f.CONDITION_BY_VALUE)),l={},c=this.hot.getTranslatedPhrase(u.FILTERS_VALUES_BLANK_CELLS);if(i){const r=(0,h.unifyColumnValues)((0,a.arrayMap)(s(t,o),(e=>e.value)));n&&(i.args[0]=n);const u=[],d=(0,h.intersectValues)(r,i.args[0],c,(e=>{e.checked&&u.push(e.value)})),g=e.editedConditionStack.column;l.locale=this.hot.getCellMeta(0,g).locale,l.args=[u],l.command=(0,p.getConditionDescriptor)(f.CONDITION_BY_VALUE),l.itemsSnapshot=d}else l.args=[],l.command=(0,p.getConditionDescriptor)(f.CONDITION_NONE);this.state.setValueAtIndex(t,l)};t(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&t(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter((e=>e instanceof d.MultipleSelectUI))[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,r,n,s,i)=>{(0,o.addClass)(t.parentNode,"htFiltersMenuValue");const l=this.hot.rootDocument.createElement("div");return(0,o.addClass)(l,"htFiltersMenuLabel"),l.textContent=i,t.appendChild(l),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getTranslatedPhrase(u.FILTERS_VALUES_BLANK_CELLS),t=(0,h.unifyColumnValues)(this._getColumnVisibleValues()),r=(0,h.intersectValues)(t,t,e);this.getMultipleSelectElement().setItems(r),super.reset(),this.getMultipleSelectElement().setValue(t);const n=this.hot.getPlugin("filters").getSelectedColumn();null!==n&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,n.visualIndex).locale)}_getColumnVisibleValues(){const e=this.hot.getPlugin("filters").getSelectedColumn();return null===e?[]:(0,a.arrayMap)(this.hot.getDataAtCol(e.visualIndex),(e=>(0,h.toEmptyString)(e)))}}function w(e){(0,l.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,i.stopImmediatePropagation)(e))}t.ValueComponent=y},80292:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(97639),o=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="begins_with";function l(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale).startsWith((0,s.stringify)(r))}t.CONDITION_NAME=a,(0,o.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_BEGINS_WITH,inputsCount:1,showOperators:!0})},10818:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=u;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830),o=r(50532),i=r(26943);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l="between";function u(e,t){let[r,n]=t,a=r,l=n;if("numeric"===e.meta.type){const e=parseFloat(a,10),t=parseFloat(l,10);a=Math.min(e,t),l=Math.max(e,t)}else if("date"===e.meta.type){const t=(0,s.getCondition)(i.CONDITION_NAME,[l]),r=(0,s.getCondition)(o.CONDITION_NAME,[a]);return t(e)&&r(e)}return e.value>=a&&e.value<=l}t.CONDITION_NAME=l,(0,s.registerCondition)(l,u,{name:n.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0})},88500:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=i;var n=r(41830),s=r(41902);const o="by_value";function i(e,t){let[r]=t;return r(e.value)}t.CONDITION_NAME=o,(0,n.registerCondition)(o,i,{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[(0,s.createArrayAssertion)(t)]},showOperators:!1})},74025:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(97639),o=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="contains";function l(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale).indexOf((0,s.stringify)(r))>=0}t.CONDITION_NAME=a,(0,o.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_CONTAINS,inputsCount:1,showOperators:!0})},50532:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),i=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l="date_after";function u(e,t){let[r]=t;const n=(0,s.default)(e.value,e.meta.dateFormat),o=(0,s.default)(r,e.meta.dateFormat);return!(!n.isValid()||!o.isValid())&&n.diff(o)>=0}t.CONDITION_NAME=l,(0,i.registerCondition)(l,u,{name:o.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0})},26943:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),i=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l="date_before";function u(e,t){let[r]=t;const n=(0,s.default)(e.value,e.meta.dateFormat),o=(0,s.default)(r,e.meta.dateFormat);return!(!n.isValid()||!o.isValid())&&n.diff(o)<=0}t.CONDITION_NAME=l,(0,i.registerCondition)(l,u,{name:o.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0})},80190:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),i=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l="date_today";function u(e){const t=(0,s.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,s.default)().startOf("day"),"d")}t.CONDITION_NAME=l,(0,i.registerCondition)(l,u,{name:o.FILTERS_CONDITIONS_TODAY,inputsCount:0})},91586:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),i=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l="date_tomorrow";function u(e){const t=(0,s.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,s.default)().subtract(-1,"days").startOf("day"),"d")}t.CONDITION_NAME=l,(0,i.registerCondition)(l,u,{name:o.FILTERS_CONDITIONS_TOMORROW,inputsCount:0})},40201:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),i=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l="date_yesterday";function u(e){const t=(0,s.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,s.default)().subtract(1,"days").startOf("day"),"d")}t.CONDITION_NAME=l,(0,i.registerCondition)(l,u,{name:o.FILTERS_CONDITIONS_YESTERDAY,inputsCount:0})},92912:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830),o=r(97639);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="empty";function l(e){return(0,o.isEmpty)(e.value)}t.CONDITION_NAME=a,(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_EMPTY,inputsCount:0,showOperators:!0})},52277:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(97639),o=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="ends_with";function l(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale).endsWith((0,s.stringify)(r))}t.CONDITION_NAME=a,(0,o.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_ENDS_WITH,inputsCount:1,showOperators:!0})},17034:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(97639),o=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}function a(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale)===(0,s.stringify)(r)}t.CONDITION_NAME="eq",(0,o.registerCondition)("eq",a,{name:n.FILTERS_CONDITIONS_EQUAL,inputsCount:1,showOperators:!0})},6828:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=o;var n=r(41830);const s="false";function o(){return!1}t.CONDITION_NAME=s,(0,n.registerCondition)(s,o,{name:"False"})},74642:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=i;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}function i(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value>n}t.CONDITION_NAME="gt",(0,s.registerCondition)("gt",i,{name:n.FILTERS_CONDITIONS_GREATER_THAN,inputsCount:1,showOperators:!0})},81970:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=i;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}function i(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value>=n}t.CONDITION_NAME="gte",(0,s.registerCondition)("gte",i,{name:n.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},16323:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=i;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}function i(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value<n}t.CONDITION_NAME="lt",(0,s.registerCondition)("lt",i,{name:n.FILTERS_CONDITIONS_LESS_THAN,inputsCount:1,showOperators:!0})},46070:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=i;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}function i(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value<=n}t.CONDITION_NAME="lte",(0,s.registerCondition)("lte",i,{name:n.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},71063:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const i="none";function a(){return!0}t.CONDITION_NAME=i,(0,s.registerCondition)(i,a,{name:n.FILTERS_CONDITIONS_NONE,inputsCount:0,showOperators:!1})},30730:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830),o=r(10818);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="not_between";function l(e,t){return!(0,s.getCondition)(o.CONDITION_NAME,t)(e)}t.CONDITION_NAME=a,(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_NOT_BETWEEN,inputsCount:2,showOperators:!0})},35227:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830),o=r(74025);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="not_contains";function l(e,t){return!(0,s.getCondition)(o.CONDITION_NAME,t)(e)}t.CONDITION_NAME=a,(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_NOT_CONTAIN,inputsCount:1,showOperators:!0})},11535:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830),o=r(92912);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const a="not_empty";function l(e,t){return!(0,s.getCondition)(o.CONDITION_NAME,t)(e)}t.CONDITION_NAME=a,(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_NOT_EMPTY,inputsCount:0,showOperators:!0})},76514:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),s=r(41830),o=r(17034);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}function a(e,t){return!(0,s.getCondition)(o.CONDITION_NAME,t)(e)}t.CONDITION_NAME="neq",(0,s.registerCondition)("neq",a,{name:n.FILTERS_CONDITIONS_NOT_EQUAL,inputsCount:1,showOperators:!0})},53323:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=o;var n=r(41830);const s="true";function o(){return!0}t.CONDITION_NAME=s,(0,n.registerCondition)(s,o,{name:"True"})},75207:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=r(98887),i=r(76163),a=r(45561),l=n(r(63806)),u=r(41830),h=r(98986),c=r(46798),d=r(97639),f=r(41789);const p="ConditionCollection.filteringStates";class g{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(0,s.default)(this,"hot",void 0),(0,s.default)(this,"isMapRegistrable",void 0),(0,s.default)(this,"filteringStates",new f.LinkedPhysicalIndexToValueMap),this.hot=e,this.isMapRegistrable=t,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(p,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}isEmpty(){return 0===this.getFilteredColumns().length}isMatch(e,t){var r;const n=this.filteringStates.getValueAtIndex(t),s=null!==(r=null==n?void 0:n.conditions)&&void 0!==r?r:[],o=null==n?void 0:n.operation;return this.isMatchInConditions(s,e,o)}isMatchInConditions(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.OPERATION_ID;return!e.length||(0,c.getOperationFunc)(r)(e,t)}addCondition(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.OPERATION_ID,n=arguments.length>3?arguments[3]:void 0;const s=this.hot.getCellMeta(0,e).locale,i=(0,o.arrayMap)(t.args,(e=>"string"==typeof e?e.toLocaleLowerCase(s):e)),l=t.name||t.command.key;this.runLocalHooks("beforeAdd",e);const f=this.getOperation(e);if(f){if(f!==r)throw Error(a.toSingleLine`The column of index ${e} has been already applied with a \`${f}\`\x20
953
953
  filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
954
954
  Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
955
955
  use it consequently for a particular column).`)}else if((0,d.isUndefined)(c.operations[r]))throw new Error(a.toSingleLine`Unexpected operation named \`${r}\`. Possible ones are\x20
@@ -963,17 +963,17 @@ s.version="2.29.4",o(Xr),s.fn=uo,s.min=Jr,s.max=en,s.now=tn,s.utc=g,s.unix=ho,s.
963
963
  and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.`}static ZERO_SPAN_WARNING(e){return o.toSingleLine`The merged cell declared at [${e.row}, ${e.col}] has "rowspan"\x20
964
964
  or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`}static containsNegativeValues(e){return e.row<0||e.col<0||e.rowspan<0||e.colspan<0}static isSingleCell(e){return 1===e.colspan&&1===e.rowspan}static containsZeroSpan(e){return 0===e.colspan||0===e.rowspan}static isOutOfBounds(e,t,r){return e.row<0||e.col<0||e.row>=t||e.row+e.rowspan-1>=t||e.col>=r||e.col+e.colspan-1>=r}normalize(e){const t=e.countRows(),r=e.countCols();this.row<0?this.row=0:this.row>t-1&&(this.row=t-1),this.col<0?this.col=0:this.col>r-1&&(this.col=r-1),this.row+this.rowspan>t-1&&(this.rowspan=t-this.row),this.col+this.colspan>r-1&&(this.colspan=r-this.col)}includes(e,t){return this.row<=e&&this.col<=t&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=t}includesHorizontally(e){return this.col<=e&&this.col+this.colspan-1>=e}includesVertically(e){return this.row<=e&&this.row+this.rowspan-1>=e}shift(e,t){const r=e[0]||e[1],n=t+Math.abs(e[0]||e[1])-1,s=e[0]?"colspan":"rowspan",o=e[0]?"col":"row",i=Math.min(t,n),a=Math.max(t,n),l=this[o],u=this[o]+this[s]-1;if(l>=t&&(this[o]+=r),r>0)t<=u&&t>l&&(this[s]+=r);else if(r<0){if(i<=l&&a>=u)return this.removed=!0,!1;if(l>=i&&l<=a){const e=a-l+1,t=Math.abs(r)-e;this[o]-=t+r,this[s]-=e}else if(l<=i&&u>=a)this[s]+=r;else if(l<=i&&u>=i&&u<a){const e=u-i+1;this[s]-=e}}return!0}isFarther(e,t){return!e||("down"===t?e.row+e.rowspan-1<this.row+this.rowspan-1:"up"===t?e.row>this.row:"right"===t?e.col+e.colspan-1<this.col+this.colspan-1:"left"===t?e.col>this.col:null)}getLastRow(){return this.row+this.rowspan-1}getLastColumn(){return this.col+this.colspan-1}getRange(){return this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))}};t.default=i},46875:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=n(r(64066)),i=r(57691),a=r(31990),l=r(98887),u=r(69015),h=r(45561);class c{constructor(e){(0,s.default)(this,"plugin",void 0),(0,s.default)(this,"mergedCells",[]),(0,s.default)(this,"hot",void 0),this.plugin=e,this.hot=e.hot}static IS_OVERLAPPING_WARNING(e){return h.toSingleLine`The merged cell declared at [${e.row}, ${e.col}], overlaps\x20
965
965
  with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
966
- fix your setup.`}get(e,t){const r=this.mergedCells;let n=!1;return(0,l.arrayEach)(r,(r=>!(r.row<=e&&r.row+r.rowspan-1>=e&&r.col<=t&&r.col+r.colspan-1>=t)||(n=r,!1))),n}getByRange(e){const t=this.mergedCells;let r=!1;return(0,l.arrayEach)(t,(t=>!(t.row<=e.from.row&&t.row+t.rowspan-1>=e.to.row&&t.col<=e.from.col&&t.col+t.colspan-1>=e.to.col)||(r=t,r))),r}getWithinRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=this.mergedCells,n=[];let s=e;if(!s.includesRange){const e=this.hot._createCellCoords(s.from.row,s.from.col),t=this.hot._createCellCoords(s.to.row,s.to.col);s=this.hot._createCellRange(e,e,t)}return(0,l.arrayEach)(r,(e=>{const r=this.hot._createCellCoords(e.row,e.col),o=this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),i=this.hot._createCellRange(r,r,o);t?s.overlaps(i)&&n.push(e):s.includesRange(i)&&n.push(e)})),!!n.length&&n}add(e){const t=this.mergedCells,r=e.row,n=e.col,s=e.rowspan,i=e.colspan,l=new o.default(r,n,s,i,this.hot._createCellCoords,this.hot._createCellRange),u=this.get(r,n),h=this.isOverlapping(l);return u||h?((0,a.warn)(c.IS_OVERLAPPING_WARNING(l)),!1):(this.hot&&l.normalize(this.hot),t.push(l),l)}remove(e,t){const r=this.mergedCells,n=this.get(e,t),s=n?this.mergedCells.indexOf(n):-1;return!(!n||-1===s)&&(r.splice(s,1),n)}clear(){const e=this.mergedCells,t=[],r=[];(0,l.arrayEach)(e,(e=>{const r=this.hot.getCell(e.row,e.col);r&&t.push([r,this.get(e.row,e.col),e.row,e.col])})),this.mergedCells.length=0,(0,l.arrayEach)(t,((e,n)=>{(0,i.rangeEach)(0,e.rowspan-1,(t=>{(0,i.rangeEach)(0,e.colspan-1,(n=>{if(0!==n||0!==t){const s=this.hot.getCell(e.row+t,e.col+n);s&&r.push([s,null,null,null])}}))})),t[n][1]=null})),(0,l.arrayEach)(t,(e=>{(0,u.applySpanProperties)(...e)})),(0,l.arrayEach)(r,(e=>{(0,u.applySpanProperties)(...e)}))}isOverlapping(e){const t=this.hot._createCellRange(this.hot._createCellCoords(0,0),this.hot._createCellCoords(e.row,e.col),this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1));let r=!1;return(0,l.arrayEach)(this.mergedCells,(e=>!this.hot._createCellRange(this.hot._createCellCoords(0,0),this.hot._createCellCoords(e.row,e.col),this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1)).overlaps(t)||(r=!0,!1))),r}isFirstRenderableMergedCell(e,t){const r=this.get(e,t);return r&&this.hot.rowIndexMapper.getNearestNotHiddenIndex(r.row,1)===e&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(r.col,1)===t}getFirstRenderableCoords(e,t){const r=this.get(e,t);if(!r||this.isFirstRenderableMergedCell(e,t))return this.hot._createCellCoords(e,t);const n=this.hot.rowIndexMapper.getNearestNotHiddenIndex(r.row,1),s=this.hot.columnIndexMapper.getNearestNotHiddenIndex(r.col,1);return this.hot._createCellCoords(n,s)}shiftCollections(e,t,r){const n=[0,0];switch(e){case"right":n[0]+=r;break;case"left":n[0]-=r;break;case"down":n[1]+=r;break;case"up":n[1]-=r}(0,l.arrayEach)(this.mergedCells,(e=>{e.shift(n,t)})),(0,i.rangeEachReverse)(this.mergedCells.length-1,0,(e=>{const t=this.mergedCells[e];t&&t.removed&&this.mergedCells.splice(this.mergedCells.indexOf(t),1)}))}}var d=c;t.default=d},1779:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.default=function(e){return{key:"mergeCells",name(){const t=this.getSelectedLast();if(t){const r=e.mergedCellsCollection.get(t[0],t[1]);if(r.row===t[0]&&r.col===t[1]&&r.row+r.rowspan-1===t[2]&&r.col+r.colspan-1===t[3])return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_UNMERGE_CELLS)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_MERGE_CELLS)},callback(){e.toggleMergeOnSelection()},disabled(){const e=this.getSelectedLast();if(!e)return!0;return o.default.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1})||this.selection.isSelectedByCorner()},hidden:!1}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),o=n(r(64066));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},89409:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(58665);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.MergeCells=n.MergeCells},58665:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=n(r(48427)),i=n(r(42538)),a=r(33997),l=n(r(54925)),u=n(r(46875)),h=n(r(64066)),c=n(r(89279)),d=n(r(14381)),f=n(r(1779)),p=r(98887),g=r(76163),m=r(31990),E=r(57691),y=r(69015);r(51309);var w=r(49587),C=r(78498);function v(e,t){R(e,t),t.add(e)}function R(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function S(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}l.default.getSingleton().register("beforeMergeCells"),l.default.getSingleton().register("afterMergeCells"),l.default.getSingleton().register("beforeUnmergeCells"),l.default.getSingleton().register("afterUnmergeCells");const T="mergeCells";t.PLUGIN_KEY=T;t.PLUGIN_PRIORITY=150;const N=T;var O=new WeakMap,M=new WeakSet,_=new WeakSet,A=new WeakSet,b=new WeakSet,I=new WeakSet,x=new WeakSet,L=new WeakSet,P=new WeakSet,D=new WeakSet,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet,W=new WeakSet,Y=new WeakSet,G=new WeakSet,j=new WeakSet,z=new WeakSet,$=new WeakSet,K=new WeakSet;class X extends a.BasePlugin{constructor(){var e,t,r;super(...arguments),v(this,K),v(this,$),v(this,z),v(this,j),v(this,G),v(this,Y),v(this,W),v(this,B),v(this,V),v(this,U),v(this,F),v(this,H),v(this,k),v(this,D),v(this,P),v(this,L),v(this,x),v(this,I),v(this,b),v(this,A),v(this,_),v(this,M),(0,s.default)(this,"mergedCellsCollection",null),(0,s.default)(this,"autofillCalculations",null),(0,s.default)(this,"selectionCalculations",null),r={writable:!0,value:null},R(e=this,t=O),t.set(e,r)}static get PLUGIN_KEY(){return T}static get PLUGIN_PRIORITY(){return 150}isEnabled(){return!!this.hot.getSettings()[T]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new u.default(this),this.autofillCalculations=new c.default(this),this.selectionCalculations=new d.default(this),this.addHook("afterInit",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,M,q).call(e,...r)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,A,Z).call(e,...r)})),this.addHook("afterModifyTransformStart",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,z,ge).call(e,...r)})),this.addHook("modifyTransformEnd",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,b,J).call(e,...r)})),this.addHook("modifyGetCellCoords",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,I,ee).call(e,...r)})),this.addHook("beforeSetRangeStart",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,P,ne).call(e,...r)})),this.addHook("beforeSetRangeStartOnly",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,P,ne).call(e,...r)})),this.addHook("beforeSetRangeEnd",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,D,se).call(e,...r)})),this.addHook("afterIsMultipleSelection",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,_,Q).call(e,...r)})),this.addHook("afterRenderer",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,L,re).call(e,...r)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,x,te).call(e,...r)})),this.addHook("afterGetCellMeta",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,k,oe).call(e,...r)})),this.addHook("afterViewportRowCalculatorOverride",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,H,ie).call(e,...r)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,F,ae).call(e,...r)})),this.addHook("modifyAutofillRange",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,U,le).call(e,...r)})),this.addHook("afterCreateCol",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,V,ue).call(e,...r)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,B,he).call(e,...r)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,W,ce).call(e,...r)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,Y,de).call(e,...r)})),this.addHook("afterChange",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,G,fe).call(e,...r)})),this.addHook("beforeDrawBorders",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,j,pe).call(e,...r)})),this.addHook("afterDrawSelection",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,$,me).call(e,...r)})),this.addHook("beforeRemoveCellClassNames",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,K,Ee).call(e,...r)})),this.addHook("beforeUndoStackChange",((e,t)=>{if("MergeCells"===t)return!1})),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),super.disablePlugin()}updatePlugin(){const e=this.hot.getSettings()[T];this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),super.updatePlugin()}ifChromeForceRepaint(){if(!(0,C.isChrome)())return;const e=[];let t=[];this.mergedCellsCollection.mergedCells.forEach((e=>{const{row:r,rowspan:n}=e;for(let e=r+1;e<r+n;e++)t.push(e)})),t=[...new Set(t)],t.forEach((t=>{const r=this.hot.rowIndexMapper.getRenderableFromVisualIndex(t);this.hot.view._wt.wtOverlays.getOverlays(!0).map((e=>"master"===(null==e?void 0:e.name)?e:e.clone.wtTable)).forEach((t=>{const n=t.getRow(r);n&&(n.style.background=(0,w.getStyle)(n,"backgroundColor").replace(")",", 0.99)"),e.push(n))}))})),this.hot._registerTimeout((()=>{e.forEach((e=>{e.style.background=(0,w.getStyle)(e,"backgroundColor").replace(", 0.99)",")")}))}),1)}validateSetting(e){let t=!0;return!!e&&(h.default.containsNegativeValues(e)?((0,m.warn)(h.default.NEGATIVE_VALUES_WARNING(e)),t=!1):h.default.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,m.warn)(h.default.IS_OUT_OF_BOUNDS_WARNING(e)),t=!1):h.default.isSingleCell(e)?((0,m.warn)(h.default.IS_SINGLE_CELL(e)),t=!1):h.default.containsZeroSpan(e)&&((0,m.warn)(h.default.ZERO_SPAN_WARNING(e)),t=!1),t)}generateFromSettings(e){if(Array.isArray(e)){const t=[];if((0,p.arrayEach)(e,(e=>{if(!this.validateSetting(e))return;const r=this.hot._createCellCoords(e.row,e.col),n=this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),s=this.hot._createCellRange(r,r,n);this.mergeRange(s,!0,!0),(0,E.rangeEach)(e.row,e.row+e.rowspan-1,(r=>{(0,E.rangeEach)(e.col,e.col+e.colspan-1,(n=>{!1==(r===e.row&&n===e.col)&&t.push([r,n,null])}))}))})),0===t.length)return;this.hot.setDataAtCell(t)}}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(e){return!!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])||this.validateSetting(e)}toggleMergeOnSelection(){const e=this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:r}=e;this.toggleMerge(e),this.hot.selectCell(t.row,t.col,r.row,r.col,!1)}mergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:r}=e;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(t.row,t.col,r.row,r.col,!1)}unmergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;const{from:t,to:r}=e;this.unmergeRange(e,!0),this.hot.selectCell(t.row,t.col,r.row,r.col,!1)}mergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=e.getTopStartCorner(),s=e.getBottomEndCorner(),o={row:n.row,col:n.col,rowspan:s.row-n.row+1,colspan:s.col-n.col+1},i=[];let a=null;if(!this.canMergeRange(o,t))return!1;this.hot.runHooks("beforeMergeCells",e,t),(0,E.rangeEach)(0,o.rowspan-1,(e=>{(0,E.rangeEach)(0,o.colspan-1,(t=>{let r=null;i[e]||(i[e]=[]),0===e&&0===t?r=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(o.row),this.hot.toPhysicalColumn(o.col)):this.hot.setCellMeta(o.row+e,o.col+t,"hidden",!0),i[e][t]=r}))})),this.hot.setCellMeta(o.row,o.col,"spanned",!0);return!this.mergedCellsCollection.add(o)||(r?a=[o.row,o.col,i]:this.hot.populateFromArray(o.row,o.col,i,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,o,t),a)}unmergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=this.mergedCellsCollection.getWithinRange(e);r&&(this.hot.runHooks("beforeUnmergeCells",e,t),(0,p.arrayEach)(r,(e=>{this.mergedCellsCollection.remove(e.row,e.col),(0,E.rangeEach)(0,e.rowspan-1,(t=>{(0,E.rangeEach)(0,e.colspan-1,(r=>{this.hot.removeCellMeta(e.row+t,e.col+r,"hidden"),this.hot.removeCellMeta(e.row+t,e.col+r,"copyable")}))})),this.hot.removeCellMeta(e.row,e.col,"spanned")})),this.hot.runHooks("afterUnmergeCells",e,t),this.hot.render())}toggleMerge(e){const t=this.mergedCellsCollection.get(e.from.row,e.from.col);t.row===e.from.row&&t.col===e.from.col&&t.row+t.rowspan-1===e.to.row&&t.col+t.colspan-1===e.to.col?this.unmergeRange(e):this.mergeSelection(e)}merge(e,t,r,n){const s=this.hot._createCellCoords(e,t),o=this.hot._createCellCoords(r,n);this.mergeRange(this.hot._createCellRange(s,s,o))}unmerge(e,t,r,n){const s=this.hot._createCellCoords(e,t),o=this.hot._createCellCoords(r,n);this.unmergeRange(this.hot._createCellRange(s,s,o))}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control","m"]],callback:()=>{const e=this.hot.getSelectedRangeLast();e&&!e.isSingleHeader()&&(this.toggleMerge(e),this.hot.render())},runOnlyIf:e=>!e.altKey,group:N})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(N)}modifyViewportRowStart(e,t){const r=this.hot.rowIndexMapper,n=r.getVisualFromRenderableIndex(e.startRow);for(let s=0;s<t;s+=1){const o=this.mergedCellsCollection.get(n,s);if((0,g.isObject)(o)){const n=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o.row,1));if(n<e.startRow)return e.startRow=n,void this.modifyViewportRowStart(e,t)}}}modifyViewportRowEnd(e,t){const r=this.hot.rowIndexMapper,n=r.getVisualFromRenderableIndex(e.endRow);for(let s=0;s<t;s+=1){const o=this.mergedCellsCollection.get(n,s);if((0,g.isObject)(o)){const n=o.row+o.rowspan-1,s=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(n,-1));if(s>e.endRow)return e.endRow=s,void this.modifyViewportRowEnd(e,t)}}}modifyViewportColumnStart(e,t){const r=this.hot.columnIndexMapper,n=r.getVisualFromRenderableIndex(e.startColumn);for(let s=0;s<t;s+=1){const o=this.mergedCellsCollection.get(s,n);if((0,g.isObject)(o)){const n=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o.col,1));if(n<e.startColumn)return e.startColumn=n,void this.modifyViewportColumnStart(e,t)}}}modifyViewportColumnEnd(e,t){const r=this.hot.columnIndexMapper,n=r.getVisualFromRenderableIndex(e.endColumn);for(let s=0;s<t;s+=1){const o=this.mergedCellsCollection.get(s,n);if((0,g.isObject)(o)){const n=o.col+o.colspan-1,s=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(n,-1));if(s>e.endColumn)return e.endColumn=s,void this.modifyViewportColumnEnd(e,t)}}}translateMergedCellToRenderable(e,t,r,n){const{rowIndexMapper:s,columnIndexMapper:o}=this.hot;let i,a;i=0===t?s.getNearestNotHiddenIndex(e,1):s.getNearestNotHiddenIndex(e+t-1,-1),a=0===n?o.getNearestNotHiddenIndex(r,1):o.getNearestNotHiddenIndex(r+n-1,-1);return[e>=0?s.getRenderableFromVisualIndex(i):e,r>=0?o.getRenderableFromVisualIndex(a):r]}}function q(){this.generateFromSettings(this.hot.getSettings()[T]),this.hot.render()}function Q(e){if(e){const e=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeLast();for(let r=0;r<e.length;r+=1)if(t.from.row===e[r].row&&t.from.col===e[r].col&&t.to.row===e[r].row+e[r].rowspan-1&&t.to.col===e[r].col+e[r].colspan-1)return!1}return e}function Z(e){const t=this.hot.getSelectedRangeLast();let r={row:e.row,col:e.col},n=null;const s=this.hot._createCellCoords(t.highlight.row,t.highlight.col),a=this.mergedCellsCollection.get(s.row,s.col);if((0,i.default)(this,O)||(0,o.default)(this,O,this.hot._createCellCoords(null,null)),a){const t=this.hot._createCellCoords(a.row,a.col),n=this.hot._createCellCoords(a.row+a.rowspan-1,a.col+a.colspan-1);this.hot._createCellRange(t,t,n).includes((0,i.default)(this,O))||(0,o.default)(this,O,this.hot._createCellCoords(null,null)),r.row=(0,i.default)(this,O).row?(0,i.default)(this,O).row-s.row:r.row,r.col=(0,i.default)(this,O).col?(0,i.default)(this,O).col-s.col:r.col,e.row>0?r.row=a.row+a.rowspan-1-s.row+e.row:e.row<0&&(r.row=s.row-a.row+e.row),e.col>0?r.col=a.col+a.colspan-1-s.col+e.col:e.col<0&&(r.col=s.col-a.col+e.col)}n=this.hot._createCellCoords(t.highlight.row+r.row,t.highlight.col+r.col);const l=this.mergedCellsCollection.get(n.row,n.col);if(l){const e=this.mergedCellsCollection.getFirstRenderableCoords(l.row,l.col);(0,o.default)(this,O,n),r={row:e.row-s.row,col:e.col-s.col}}0!==r.row&&(e.row=r.row),0!==r.col&&(e.col=r.col)}function J(e){const t=this.hot.getSelectedRangeLast(),r=(0,g.clone)(e),n=this.selectionCalculations.getUpdatedSelectionRange(t,e);let s=(0,g.clone)(r);const o=this.mergedCellsCollection.getWithinRange(n,!0);do{s=(0,g.clone)(r),this.selectionCalculations.getUpdatedSelectionRange(t,r),(0,p.arrayEach)(o,(e=>{this.selectionCalculations.snapDelta(r,t,e)}))}while(r.row!==s.row||r.col!==s.col);e.row=r.row,e.col=r.col}function ee(e,t){if(e<0||t<0)return;const r=this.mergedCellsCollection.get(e,t);if(!r)return;const{row:n,col:s,colspan:o,rowspan:i}=r;return[n,s,n+i-1,s+o-1]}function te(e){e.items.push({name:"---------"},(0,f.default)(this))}function re(e,t,r){const n=this.mergedCellsCollection.get(t,r),s=(0,g.isObject)(n)?(0,g.clone)(n):void 0;if((0,g.isObject)(s)){const{rowIndexMapper:e,columnIndexMapper:n}=this.hot,{row:o,col:i,colspan:a,rowspan:l}=s,[u,h]=this.translateMergedCellToRenderable(o,l,i,a),c=u-e.getRenderableFromVisualIndex(t)+1,d=h-n.getRenderableFromVisualIndex(r)+1;s.row=e.getNearestNotHiddenIndex(s.row,1),s.col=n.getNearestNotHiddenIndex(s.col,1),s.rowspan=Math.min(s.rowspan,c),s.colspan=Math.min(s.colspan,d)}(0,y.applySpanProperties)(e,s,t,r)}function ne(e){if(this.mergedCellsCollection.isFirstRenderableMergedCell(e.row,e.col)){const t=this.mergedCellsCollection.get(e.row,e.col);[e.row,e.col]=[t.row,t.col]}}function se(e){const t=this.hot.getSelectedRangeLast();t.highlight=this.hot._createCellCoords(t.highlight.row,t.highlight.col),t.to=e;let r=!1;if(!this.hot.selection.isSelectedByColumnHeader()&&!this.hot.selection.isSelectedByRowHeader())do{r=!1;for(let n=0;n<this.mergedCellsCollection.mergedCells.length;n+=1){const s=this.mergedCellsCollection.mergedCells[n].getRange();t.expandByRange(s)&&(e.row=t.to.row,e.col=t.to.col,r=!0)}}while(r)}function oe(e,t,r){const n=this.mergedCellsCollection.get(e,t);n&&(n.row!==e||n.col!==t?r.copyable=!1:(r.rowspan=n.rowspan,r.colspan=n.colspan))}function ie(e){const t=this.hot.countCols();this.modifyViewportRowStart(e,t),this.modifyViewportRowEnd(e,t)}function ae(e){const t=this.hot.countRows();this.modifyViewportColumnStart(e,t),this.modifyViewportColumnEnd(e,t)}function le(e,t){this.autofillCalculations.correctSelectionAreaSize(t);const r=this.autofillCalculations.getDirection(t,e);let n=e;if(this.autofillCalculations.dragAreaOverlapsCollections(t,n,r))return n=t,n;const s=this.mergedCellsCollection.getWithinRange({from:{row:t[0],col:t[1]},to:{row:t[2],col:t[3]}});return s?(n=this.autofillCalculations.snapDragArea(t,n,r,s),n):n}function ue(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}function he(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}function ce(e,t,r){"auto"!==r&&this.mergedCellsCollection.shiftCollections("down",e,t)}function de(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}function fe(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}function pe(e,t){if(t&&"area"===t){const t=this.hot.getSelectedRangeLast(),r=this.mergedCellsCollection.getWithinRange(t);(0,p.arrayEach)(r,(r=>{t.getBottomEndCorner().row===r.getLastRow()&&t.getBottomEndCorner().col===r.getLastColumn()&&(e[2]=r.row,e[3]=r.col)}))}}function ge(e,t,r){if(!this.enabled)return;const n=this.mergedCellsCollection.get(e.row,e.col);if(!n)return;const s=t>0,o=t<0,i=r<0,a=r>0,l=n.row+n.rowspan-1==this.hot.countRows()-1,u=0===n.row,h=n.col+n.colspan-1==this.hot.countCols()-1,c=0===n.col;(s&&l||o&&u||a&&h||i&&c)&&(e.row=n.row,e.col=n.col)}function me(e,t,r,n){if(r)return this.selectionCalculations.getSelectedMergedCellClassName(e,t,r,n)}function Ee(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}t.MergeCells=X},69015:(e,t)=>{"use strict";t.__esModule=!0,t.applySpanProperties=function(e,t,r,n){t?t.row===r&&t.col===n?(e.setAttribute("rowspan",t.rowspan.toString()),e.setAttribute("colspan",t.colspan.toString())):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="none"):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="")}},6033:(e,t,r)=>{"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,r){const s=[];if(!1===r)return s;e.isColumnSorted(t)&&e.getNumberOfSortedColumns()>1&&s.push(`${n}-${e.getIndexOfColumnInSortQueue(t)+1}`);return s},t.getClassesToRemove=function(e){const t=e.className.split(" "),r=new RegExp(`^${n}-[0-9]{1,2}$`);return t.filter((e=>r.test(e)))},r(95988);const n="sort"},3186:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(75426);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.MultiColumnSorting=n.MultiColumnSorting},75426:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(8540),i=r(10185),a=r(95262),l=r(49587),u=r(7592),h=r(26221),c=r(6033),d=r(66862),f=r(497);r(2049);const p="multiColumnSorting";t.PLUGIN_KEY=p;t.PLUGIN_PRIORITY=170;const g="columnSorting",m=p;(0,i.registerRootComparator)(p,u.rootComparator);class E extends o.ColumnSorting{constructor(){super(...arguments),(0,s.default)(this,"pluginKey",p)}static get PLUGIN_KEY(){return p}static get PLUGIN_PRIORITY(){return 170}isEnabled(){return super.isEnabled()}enablePlugin(){!this.enabled&&this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[g]&&(0,h.warnAboutPluginsConflict)(),super.enablePlugin()}disablePlugin(){super.disablePlugin()}registerShortcuts(){super.registerShortcuts(),this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Shift","Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();-1===e.row&&e.col>=0&&this.sort(this.getNextSortConfig(e.col,o.APPEND_COLUMN_CONFIG_STRATEGY))},runOnlyIf:()=>{var e;return null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader()},group:m})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(m)}sort(e){super.sort(e)}clearSort(){super.clearSort()}isSorted(){return super.isSorted()}getSortConfig(e){return super.getSortConfig(e)}setSortConfig(e){super.setSortConfig(e)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:[e]}updateHeaderClasses(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];super.updateHeaderClasses(e,...r),(0,l.removeClass)(e,(0,c.getClassesToRemove)(e)),!1!==this.enabled&&(0,l.addClass)(e,(0,c.getClassesToAdd)(...r))}updateSortingIndicator(e,t){super.updateSortingIndicator(e,t);const r=t.querySelector(".columnSortingIndicator");if(!r||!this.hot.getSettings().ariaTags||!this.columnStatesManager.isColumnSorted(e)||this.columnStatesManager.getNumberOfSortedColumns()<=1)return;const n=this.columnStatesManager.getIndexOfColumnInSortQueue(e)+1,s=(0,d.A11Y_LABEL)(`${this.hot.getTranslatedPhrase(f.COLUMN_HEADER_LABEL_MULTI_COLUMN_SORT_ORDER)} ${n}.`);(0,l.removeAttribute)(r,(0,d.A11Y_HIDDEN)()[0]),(0,l.setAttribute)(r,...s)}onUpdateSettings(e){this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[g]&&(0,h.warnAboutPluginsConflict)(),super.onUpdateSettings(e)}onAfterOnCellMouseDown(e,t){!1!==(0,a.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()?(this.hot.deselectCell(),this.hot.selectColumns(t.col),this.sort(this.getNextSortConfig(t.col,o.APPEND_COLUMN_CONFIG_STRATEGY))):this.sort(this.getColumnNextConfig(t.col)))}}t.MultiColumnSorting=E},7592:(e,t,r)=>{"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(r,s){const[,...o]=r,[,...i]=s;return function r(s){const a=e[s],l=t[s],u=o[s],h=i[s],c=l.multiColumnSorting,d=(c.compareFunctionFactory?c.compareFunctionFactory:(0,n.getCompareFunctionFactory)(l.type))(a,l,c)(u,h);if(d===n.DO_NOT_SWAP){const e=s+1;if(void 0!==t[e])return r(e)}return d}(0)}};var n=r(10185)},26221:(e,t,r)=>{"use strict";t.__esModule=!0,t.warnAboutPluginsConflict=function(){(0,n.warn)(s.toSingleLine`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.
966
+ fix your setup.`}get(e,t){const r=this.mergedCells;let n=!1;return(0,l.arrayEach)(r,(r=>!(r.row<=e&&r.row+r.rowspan-1>=e&&r.col<=t&&r.col+r.colspan-1>=t)||(n=r,!1))),n}getByRange(e){const t=this.mergedCells;let r=!1;return(0,l.arrayEach)(t,(t=>!(t.row<=e.from.row&&t.row+t.rowspan-1>=e.to.row&&t.col<=e.from.col&&t.col+t.colspan-1>=e.to.col)||(r=t,r))),r}getWithinRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=this.mergedCells,n=[];let s=e;if(!s.includesRange){const e=this.hot._createCellCoords(s.from.row,s.from.col),t=this.hot._createCellCoords(s.to.row,s.to.col);s=this.hot._createCellRange(e,e,t)}return(0,l.arrayEach)(r,(e=>{const r=this.hot._createCellCoords(e.row,e.col),o=this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),i=this.hot._createCellRange(r,r,o);t?s.overlaps(i)&&n.push(e):s.includesRange(i)&&n.push(e)})),!!n.length&&n}add(e){const t=this.mergedCells,r=e.row,n=e.col,s=e.rowspan,i=e.colspan,l=new o.default(r,n,s,i,this.hot._createCellCoords,this.hot._createCellRange),u=this.get(r,n),h=this.isOverlapping(l);return u||h?((0,a.warn)(c.IS_OVERLAPPING_WARNING(l)),!1):(this.hot&&l.normalize(this.hot),t.push(l),l)}remove(e,t){const r=this.mergedCells,n=this.get(e,t),s=n?this.mergedCells.indexOf(n):-1;return!(!n||-1===s)&&(r.splice(s,1),n)}clear(){const e=this.mergedCells,t=[],r=[];(0,l.arrayEach)(e,(e=>{const r=this.hot.getCell(e.row,e.col);r&&t.push([r,this.get(e.row,e.col),e.row,e.col])})),this.mergedCells.length=0,(0,l.arrayEach)(t,((e,n)=>{(0,i.rangeEach)(0,e.rowspan-1,(t=>{(0,i.rangeEach)(0,e.colspan-1,(n=>{if(0!==n||0!==t){const s=this.hot.getCell(e.row+t,e.col+n);s&&r.push([s,null,null,null])}}))})),t[n][1]=null})),(0,l.arrayEach)(t,(e=>{(0,u.applySpanProperties)(...e)})),(0,l.arrayEach)(r,(e=>{(0,u.applySpanProperties)(...e)}))}isOverlapping(e){const t=this.hot._createCellRange(this.hot._createCellCoords(0,0),this.hot._createCellCoords(e.row,e.col),this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1));let r=!1;return(0,l.arrayEach)(this.mergedCells,(e=>!this.hot._createCellRange(this.hot._createCellCoords(0,0),this.hot._createCellCoords(e.row,e.col),this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1)).overlaps(t)||(r=!0,!1))),r}isFirstRenderableMergedCell(e,t){const r=this.get(e,t);return r&&this.hot.rowIndexMapper.getNearestNotHiddenIndex(r.row,1)===e&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(r.col,1)===t}getFirstRenderableCoords(e,t){const r=this.get(e,t);if(!r||this.isFirstRenderableMergedCell(e,t))return this.hot._createCellCoords(e,t);const n=this.hot.rowIndexMapper.getNearestNotHiddenIndex(r.row,1),s=this.hot.columnIndexMapper.getNearestNotHiddenIndex(r.col,1);return this.hot._createCellCoords(n,s)}shiftCollections(e,t,r){const n=[0,0];switch(e){case"right":n[0]+=r;break;case"left":n[0]-=r;break;case"down":n[1]+=r;break;case"up":n[1]-=r}(0,l.arrayEach)(this.mergedCells,(e=>{e.shift(n,t)})),(0,i.rangeEachReverse)(this.mergedCells.length-1,0,(e=>{const t=this.mergedCells[e];t&&t.removed&&this.mergedCells.splice(this.mergedCells.indexOf(t),1)}))}}var d=c;t.default=d},1779:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.default=function(e){return{key:"mergeCells",name(){const t=this.getSelectedLast();if(t){const r=e.mergedCellsCollection.get(t[0],t[1]);if(r.row===t[0]&&r.col===t[1]&&r.row+r.rowspan-1===t[2]&&r.col+r.colspan-1===t[3])return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_UNMERGE_CELLS)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_MERGE_CELLS)},callback(){e.toggleMergeOnSelection()},disabled(){const e=this.getSelectedLast();if(!e)return!0;return o.default.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1})||this.selection.isSelectedByCorner()},hidden:!1}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),o=n(r(64066));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},89409:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(58665);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.MergeCells=n.MergeCells},58665:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=n(r(48427)),i=n(r(42538)),a=r(33997),l=n(r(54925)),u=n(r(46875)),h=n(r(64066)),c=n(r(89279)),d=n(r(14381)),f=n(r(1779)),p=r(98887),g=r(76163),m=r(31990),E=r(57691),y=r(69015);r(51309);var w=r(49587),C=r(78498);function v(e,t){R(e,t),t.add(e)}function R(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function S(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}l.default.getSingleton().register("beforeMergeCells"),l.default.getSingleton().register("afterMergeCells"),l.default.getSingleton().register("beforeUnmergeCells"),l.default.getSingleton().register("afterUnmergeCells");const T="mergeCells";t.PLUGIN_KEY=T;t.PLUGIN_PRIORITY=150;const N=T;var O=new WeakMap,M=new WeakSet,_=new WeakSet,A=new WeakSet,b=new WeakSet,I=new WeakSet,x=new WeakSet,L=new WeakSet,P=new WeakSet,D=new WeakSet,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet,W=new WeakSet,Y=new WeakSet,G=new WeakSet,j=new WeakSet,z=new WeakSet,$=new WeakSet,K=new WeakSet;class X extends a.BasePlugin{constructor(){var e,t,r;super(...arguments),v(this,K),v(this,$),v(this,z),v(this,j),v(this,G),v(this,Y),v(this,W),v(this,B),v(this,V),v(this,U),v(this,F),v(this,H),v(this,k),v(this,D),v(this,P),v(this,L),v(this,x),v(this,I),v(this,b),v(this,A),v(this,_),v(this,M),(0,s.default)(this,"mergedCellsCollection",null),(0,s.default)(this,"autofillCalculations",null),(0,s.default)(this,"selectionCalculations",null),r={writable:!0,value:null},R(e=this,t=O),t.set(e,r)}static get PLUGIN_KEY(){return T}static get PLUGIN_PRIORITY(){return 150}isEnabled(){return!!this.hot.getSettings()[T]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new u.default(this),this.autofillCalculations=new c.default(this),this.selectionCalculations=new d.default(this),this.addHook("afterInit",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,M,q).call(e,...r)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,A,Z).call(e,...r)})),this.addHook("afterModifyTransformStart",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,z,ge).call(e,...r)})),this.addHook("modifyTransformEnd",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,b,J).call(e,...r)})),this.addHook("modifyGetCellCoords",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,I,ee).call(e,...r)})),this.addHook("beforeSetRangeStart",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,P,ne).call(e,...r)})),this.addHook("beforeSetRangeStartOnly",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,P,ne).call(e,...r)})),this.addHook("beforeSetRangeEnd",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,D,se).call(e,...r)})),this.addHook("afterIsMultipleSelection",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,_,Q).call(e,...r)})),this.addHook("afterRenderer",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,L,re).call(e,...r)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,x,te).call(e,...r)})),this.addHook("afterGetCellMeta",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,k,oe).call(e,...r)})),this.addHook("afterViewportRowCalculatorOverride",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,H,ie).call(e,...r)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,F,ae).call(e,...r)})),this.addHook("modifyAutofillRange",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,U,le).call(e,...r)})),this.addHook("afterCreateCol",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,V,ue).call(e,...r)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,B,he).call(e,...r)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,W,ce).call(e,...r)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,Y,de).call(e,...r)})),this.addHook("afterChange",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,G,fe).call(e,...r)})),this.addHook("beforeDrawBorders",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,j,pe).call(e,...r)})),this.addHook("afterDrawSelection",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,$,me).call(e,...r)})),this.addHook("beforeRemoveCellClassNames",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,K,Ee).call(e,...r)})),this.addHook("beforeUndoStackChange",((e,t)=>{if("MergeCells"===t)return!1})),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),super.disablePlugin()}updatePlugin(){const e=this.hot.getSettings()[T];this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),super.updatePlugin()}ifChromeForceRepaint(){if(!(0,C.isChrome)())return;const e=[];let t=[];this.mergedCellsCollection.mergedCells.forEach((e=>{const{row:r,rowspan:n}=e;for(let e=r+1;e<r+n;e++)t.push(e)})),t=[...new Set(t)],t.forEach((t=>{const r=this.hot.rowIndexMapper.getRenderableFromVisualIndex(t);this.hot.view._wt.wtOverlays.getOverlays(!0).map((e=>"master"===(null==e?void 0:e.name)?e:e.clone.wtTable)).forEach((t=>{const n=t.getRow(r);n&&(n.style.background=(0,w.getStyle)(n,"backgroundColor").replace(")",", 0.99)"),e.push(n))}))})),this.hot._registerTimeout((()=>{e.forEach((e=>{e.style.background=(0,w.getStyle)(e,"backgroundColor").replace(", 0.99)",")")}))}),1)}validateSetting(e){let t=!0;return!!e&&(h.default.containsNegativeValues(e)?((0,m.warn)(h.default.NEGATIVE_VALUES_WARNING(e)),t=!1):h.default.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,m.warn)(h.default.IS_OUT_OF_BOUNDS_WARNING(e)),t=!1):h.default.isSingleCell(e)?((0,m.warn)(h.default.IS_SINGLE_CELL(e)),t=!1):h.default.containsZeroSpan(e)&&((0,m.warn)(h.default.ZERO_SPAN_WARNING(e)),t=!1),t)}generateFromSettings(e){if(Array.isArray(e)){const t=[];if((0,p.arrayEach)(e,(e=>{if(!this.validateSetting(e))return;const r=this.hot._createCellCoords(e.row,e.col),n=this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),s=this.hot._createCellRange(r,r,n);this.mergeRange(s,!0,!0),(0,E.rangeEach)(e.row,e.row+e.rowspan-1,(r=>{(0,E.rangeEach)(e.col,e.col+e.colspan-1,(n=>{!1==(r===e.row&&n===e.col)&&t.push([r,n,null])}))}))})),0===t.length)return;this.hot.setDataAtCell(t)}}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(e){return!!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])||this.validateSetting(e)}toggleMergeOnSelection(){const e=this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:r}=e;this.toggleMerge(e),this.hot.selectCell(t.row,t.col,r.row,r.col,!1)}mergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:r}=e;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(t.row,t.col,r.row,r.col,!1)}unmergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;const{from:t,to:r}=e;this.unmergeRange(e,!0),this.hot.selectCell(t.row,t.col,r.row,r.col,!1)}mergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=e.getTopStartCorner(),s=e.getBottomEndCorner(),o={row:n.row,col:n.col,rowspan:s.row-n.row+1,colspan:s.col-n.col+1},i=[];let a=null;if(!this.canMergeRange(o,t))return!1;this.hot.runHooks("beforeMergeCells",e,t),(0,E.rangeEach)(0,o.rowspan-1,(e=>{(0,E.rangeEach)(0,o.colspan-1,(t=>{let r=null;i[e]||(i[e]=[]),0===e&&0===t?r=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(o.row),this.hot.toPhysicalColumn(o.col)):this.hot.setCellMeta(o.row+e,o.col+t,"hidden",!0),i[e][t]=r}))})),this.hot.setCellMeta(o.row,o.col,"spanned",!0);return!this.mergedCellsCollection.add(o)||(r?a=[o.row,o.col,i]:this.hot.populateFromArray(o.row,o.col,i,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,o,t),a)}unmergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=this.mergedCellsCollection.getWithinRange(e);r&&(this.hot.runHooks("beforeUnmergeCells",e,t),(0,p.arrayEach)(r,(e=>{this.mergedCellsCollection.remove(e.row,e.col),(0,E.rangeEach)(0,e.rowspan-1,(t=>{(0,E.rangeEach)(0,e.colspan-1,(r=>{this.hot.removeCellMeta(e.row+t,e.col+r,"hidden"),this.hot.removeCellMeta(e.row+t,e.col+r,"copyable")}))})),this.hot.removeCellMeta(e.row,e.col,"spanned")})),this.hot.runHooks("afterUnmergeCells",e,t),this.hot.render())}toggleMerge(e){const t=this.mergedCellsCollection.get(e.from.row,e.from.col);t.row===e.from.row&&t.col===e.from.col&&t.row+t.rowspan-1===e.to.row&&t.col+t.colspan-1===e.to.col?this.unmergeRange(e):this.mergeSelection(e)}merge(e,t,r,n){const s=this.hot._createCellCoords(e,t),o=this.hot._createCellCoords(r,n);this.mergeRange(this.hot._createCellRange(s,s,o))}unmerge(e,t,r,n){const s=this.hot._createCellCoords(e,t),o=this.hot._createCellCoords(r,n);this.unmergeRange(this.hot._createCellRange(s,s,o))}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control","m"]],callback:()=>{const e=this.hot.getSelectedRangeLast();e&&!e.isSingleHeader()&&(this.toggleMerge(e),this.hot.render())},runOnlyIf:e=>!e.altKey,group:N})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(N)}modifyViewportRowStart(e,t){const r=this.hot.rowIndexMapper,n=r.getVisualFromRenderableIndex(e.startRow);for(let s=0;s<t;s+=1){const o=this.mergedCellsCollection.get(n,s);if((0,g.isObject)(o)){const n=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o.row,1));if(n<e.startRow)return e.startRow=n,void this.modifyViewportRowStart(e,t)}}}modifyViewportRowEnd(e,t){const r=this.hot.rowIndexMapper,n=r.getVisualFromRenderableIndex(e.endRow);for(let s=0;s<t;s+=1){const o=this.mergedCellsCollection.get(n,s);if((0,g.isObject)(o)){const n=o.row+o.rowspan-1,s=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(n,-1));if(s>e.endRow)return e.endRow=s,void this.modifyViewportRowEnd(e,t)}}}modifyViewportColumnStart(e,t){const r=this.hot.columnIndexMapper,n=r.getVisualFromRenderableIndex(e.startColumn);for(let s=0;s<t;s+=1){const o=this.mergedCellsCollection.get(s,n);if((0,g.isObject)(o)){const n=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o.col,1));if(n<e.startColumn)return e.startColumn=n,void this.modifyViewportColumnStart(e,t)}}}modifyViewportColumnEnd(e,t){const r=this.hot.columnIndexMapper,n=r.getVisualFromRenderableIndex(e.endColumn);for(let s=0;s<t;s+=1){const o=this.mergedCellsCollection.get(s,n);if((0,g.isObject)(o)){const n=o.col+o.colspan-1,s=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(n,-1));if(s>e.endColumn)return e.endColumn=s,void this.modifyViewportColumnEnd(e,t)}}}translateMergedCellToRenderable(e,t,r,n){const{rowIndexMapper:s,columnIndexMapper:o}=this.hot;let i,a;i=0===t?s.getNearestNotHiddenIndex(e,1):s.getNearestNotHiddenIndex(e+t-1,-1),a=0===n?o.getNearestNotHiddenIndex(r,1):o.getNearestNotHiddenIndex(r+n-1,-1);return[e>=0?s.getRenderableFromVisualIndex(i):e,r>=0?o.getRenderableFromVisualIndex(a):r]}}function q(){this.generateFromSettings(this.hot.getSettings()[T]),this.hot.render()}function Q(e){if(e){const e=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeLast();for(let r=0;r<e.length;r+=1)if(t.from.row===e[r].row&&t.from.col===e[r].col&&t.to.row===e[r].row+e[r].rowspan-1&&t.to.col===e[r].col+e[r].colspan-1)return!1}return e}function Z(e){const t=this.hot.getSelectedRangeLast();let r={row:e.row,col:e.col},n=null;const s=this.hot._createCellCoords(t.highlight.row,t.highlight.col),a=this.mergedCellsCollection.get(s.row,s.col);if((0,i.default)(this,O)||(0,o.default)(this,O,this.hot._createCellCoords(null,null)),a){const t=this.hot._createCellCoords(a.row,a.col),n=this.hot._createCellCoords(a.row+a.rowspan-1,a.col+a.colspan-1);this.hot._createCellRange(t,t,n).includes((0,i.default)(this,O))||(0,o.default)(this,O,this.hot._createCellCoords(null,null)),r.row=(0,i.default)(this,O).row?(0,i.default)(this,O).row-s.row:r.row,r.col=(0,i.default)(this,O).col?(0,i.default)(this,O).col-s.col:r.col,e.row>0?r.row=a.row+a.rowspan-1-s.row+e.row:e.row<0&&(r.row=s.row-a.row+e.row),e.col>0?r.col=a.col+a.colspan-1-s.col+e.col:e.col<0&&(r.col=s.col-a.col+e.col)}n=this.hot._createCellCoords(t.highlight.row+r.row,t.highlight.col+r.col);const l=this.mergedCellsCollection.get(n.row,n.col);if(l){const e=this.mergedCellsCollection.getFirstRenderableCoords(l.row,l.col);(0,o.default)(this,O,n),r={row:e.row-s.row,col:e.col-s.col}}0!==r.row&&(e.row=r.row),0!==r.col&&(e.col=r.col)}function J(e){const t=this.hot.getSelectedRangeLast(),r=(0,g.clone)(e),n=this.selectionCalculations.getUpdatedSelectionRange(t,e);let s=(0,g.clone)(r);const o=this.mergedCellsCollection.getWithinRange(n,!0);do{s=(0,g.clone)(r),this.selectionCalculations.getUpdatedSelectionRange(t,r),(0,p.arrayEach)(o,(e=>{this.selectionCalculations.snapDelta(r,t,e)}))}while(r.row!==s.row||r.col!==s.col);e.row=r.row,e.col=r.col}function ee(e,t){if(e<0||t<0)return;const r=this.mergedCellsCollection.get(e,t);if(!r)return;const{row:n,col:s,colspan:o,rowspan:i}=r;return[n,s,n+i-1,s+o-1]}function te(e){e.items.push({name:"---------"},(0,f.default)(this))}function re(e,t,r){const n=this.mergedCellsCollection.get(t,r),s=(0,g.isObject)(n)?(0,g.clone)(n):void 0;if((0,g.isObject)(s)){const{rowIndexMapper:e,columnIndexMapper:n}=this.hot,{row:o,col:i,colspan:a,rowspan:l}=s,[u,h]=this.translateMergedCellToRenderable(o,l,i,a),c=u-e.getRenderableFromVisualIndex(t)+1,d=h-n.getRenderableFromVisualIndex(r)+1;s.row=e.getNearestNotHiddenIndex(s.row,1),s.col=n.getNearestNotHiddenIndex(s.col,1),s.rowspan=Math.min(s.rowspan,c),s.colspan=Math.min(s.colspan,d)}(0,y.applySpanProperties)(e,s,t,r)}function ne(e){if(this.mergedCellsCollection.isFirstRenderableMergedCell(e.row,e.col)){const t=this.mergedCellsCollection.get(e.row,e.col);[e.row,e.col]=[t.row,t.col]}}function se(e){const t=this.hot.getSelectedRangeLast();t.highlight=this.hot._createCellCoords(t.highlight.row,t.highlight.col),t.to=e;let r=!1;if(!this.hot.selection.isSelectedByColumnHeader()&&!this.hot.selection.isSelectedByRowHeader())do{r=!1;for(let n=0;n<this.mergedCellsCollection.mergedCells.length;n+=1){const s=this.mergedCellsCollection.mergedCells[n].getRange();t.expandByRange(s)&&(e.row=t.to.row,e.col=t.to.col,r=!0)}}while(r)}function oe(e,t,r){const n=this.mergedCellsCollection.get(e,t);n&&(n.row!==e||n.col!==t?r.copyable=!1:(r.rowspan=n.rowspan,r.colspan=n.colspan))}function ie(e){const t=this.hot.countCols();this.modifyViewportRowStart(e,t),this.modifyViewportRowEnd(e,t)}function ae(e){const t=this.hot.countRows();this.modifyViewportColumnStart(e,t),this.modifyViewportColumnEnd(e,t)}function le(e,t){this.autofillCalculations.correctSelectionAreaSize(t);const r=this.autofillCalculations.getDirection(t,e);let n=e;if(this.autofillCalculations.dragAreaOverlapsCollections(t,n,r))return n=t,n;const s=this.mergedCellsCollection.getWithinRange({from:{row:t[0],col:t[1]},to:{row:t[2],col:t[3]}});return s?(n=this.autofillCalculations.snapDragArea(t,n,r,s),n):n}function ue(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}function he(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}function ce(e,t,r){"auto"!==r&&this.mergedCellsCollection.shiftCollections("down",e,t)}function de(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}function fe(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}function pe(e,t){if(t&&"area"===t){const t=this.hot.getSelectedRangeLast(),r=this.mergedCellsCollection.getWithinRange(t);(0,p.arrayEach)(r,(r=>{t.getBottomEndCorner().row===r.getLastRow()&&t.getBottomEndCorner().col===r.getLastColumn()&&(e[2]=r.row,e[3]=r.col)}))}}function ge(e,t,r){if(!this.enabled)return;const n=this.mergedCellsCollection.get(e.row,e.col);if(!n)return;const s=t>0,o=t<0,i=r<0,a=r>0,l=n.row+n.rowspan-1==this.hot.countRows()-1,u=0===n.row,h=n.col+n.colspan-1==this.hot.countCols()-1,c=0===n.col;(s&&l||o&&u||a&&h||i&&c)&&(e.row=n.row,e.col=n.col)}function me(e,t,r,n){if(r)return this.selectionCalculations.getSelectedMergedCellClassName(e,t,r,n)}function Ee(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}t.MergeCells=X},69015:(e,t)=>{"use strict";t.__esModule=!0,t.applySpanProperties=function(e,t,r,n){t?t.row===r&&t.col===n?(e.setAttribute("rowspan",t.rowspan.toString()),e.setAttribute("colspan",t.colspan.toString())):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="none"):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="")}},6033:(e,t,r)=>{"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,r){const s=[];if(!1===r)return s;e.isColumnSorted(t)&&e.getNumberOfSortedColumns()>1&&s.push(`${n}-${e.getIndexOfColumnInSortQueue(t)+1}`);return s},t.getClassesToRemove=function(e){const t=e.className.split(" "),r=new RegExp(`^${n}-[0-9]{1,2}$`);return t.filter((e=>r.test(e)))},r(95988);const n="sort"},3186:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(75426);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.MultiColumnSorting=n.MultiColumnSorting},75426:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(8540),i=r(10185),a=r(95262),l=r(49587),u=r(7592),h=r(26221),c=r(6033),d=r(66862),f=r(497);r(2049);const p="multiColumnSorting";t.PLUGIN_KEY=p;t.PLUGIN_PRIORITY=170;const g="columnSorting",m=p;(0,i.registerRootComparator)(p,u.rootComparator);class E extends o.ColumnSorting{constructor(){super(...arguments),(0,s.default)(this,"pluginKey",p)}static get PLUGIN_KEY(){return p}static get PLUGIN_PRIORITY(){return 170}isEnabled(){return super.isEnabled()}enablePlugin(){!this.enabled&&this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[g]&&(0,h.warnAboutPluginsConflict)(),super.enablePlugin()}disablePlugin(){super.disablePlugin()}registerShortcuts(){super.registerShortcuts(),this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Shift","Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();-1===e.row&&e.col>=0&&this.sort(this.getNextSortConfig(e.col,o.APPEND_COLUMN_CONFIG_STRATEGY))},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()},group:m})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(m)}sort(e){super.sort(e)}clearSort(){super.clearSort()}isSorted(){return super.isSorted()}getSortConfig(e){return super.getSortConfig(e)}setSortConfig(e){super.setSortConfig(e)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:[e]}updateHeaderClasses(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];super.updateHeaderClasses(e,...r),(0,l.removeClass)(e,(0,c.getClassesToRemove)(e)),!1!==this.enabled&&(0,l.addClass)(e,(0,c.getClassesToAdd)(...r))}updateSortingIndicator(e,t){super.updateSortingIndicator(e,t);const r=t.querySelector(".columnSortingIndicator");if(!r||!this.hot.getSettings().ariaTags||!this.columnStatesManager.isColumnSorted(e)||this.columnStatesManager.getNumberOfSortedColumns()<=1)return;const n=this.columnStatesManager.getIndexOfColumnInSortQueue(e)+1,s=(0,d.A11Y_LABEL)(`${this.hot.getTranslatedPhrase(f.COLUMN_HEADER_LABEL_MULTI_COLUMN_SORT_ORDER)} ${n}.`);(0,l.removeAttribute)(r,(0,d.A11Y_HIDDEN)()[0]),(0,l.setAttribute)(r,...s)}onUpdateSettings(e){this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[g]&&(0,h.warnAboutPluginsConflict)(),super.onUpdateSettings(e)}onAfterOnCellMouseDown(e,t){!1!==(0,a.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()?(this.hot.deselectCell(),this.hot.selectColumns(t.col),this.sort(this.getNextSortConfig(t.col,o.APPEND_COLUMN_CONFIG_STRATEGY))):this.sort(this.getColumnNextConfig(t.col)))}}t.MultiColumnSorting=E},7592:(e,t,r)=>{"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(r,s){const[,...o]=r,[,...i]=s;return function r(s){const a=e[s],l=t[s],u=o[s],h=i[s],c=l.multiColumnSorting,d=(c.compareFunctionFactory?c.compareFunctionFactory:(0,n.getCompareFunctionFactory)(l.type))(a,l,c)(u,h);if(d===n.DO_NOT_SWAP){const e=s+1;if(void 0!==t[e])return r(e)}return d}(0)}};var n=r(10185)},26221:(e,t,r)=>{"use strict";t.__esModule=!0,t.warnAboutPluginsConflict=function(){(0,n.warn)(s.toSingleLine`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.
967
967
  Only \`multiColumnSorting\` will work.`)};var n=r(31990),s=r(45561)},59793:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(92947);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.MultipleSelectionHandles=n.MultipleSelectionHandles},92947:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(49587),i=r(78498),a=r(33997);const l="multipleSelectionHandles";t.PLUGIN_KEY=l;t.PLUGIN_PRIORITY=160;class u extends a.BasePlugin{constructor(){super(...arguments),(0,s.default)(this,"dragged",[]),(0,s.default)(this,"lastSetCell",null)}static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return 160}isEnabled(){return(0,i.isMobileBrowser)()}enablePlugin(){this.enabled||(this.registerListeners(),super.enablePlugin())}registerListeners(){const e=this,{rootElement:t}=this.hot;function r(t){if(1===e.dragged.length)return e.dragged.splice(0,e.dragged.length),!0;const r=e.dragged.indexOf(t);if(-1===r)return!1;0===r?e.dragged=e.dragged.slice(0,1):1===r&&(e.dragged=e.dragged.slice(-1))}this.eventManager.addEventListener(t,"touchstart",(t=>{let r;return(0,o.hasClass)(t.target,"topSelectionHandle-HitArea")?(r=e.hot.getSelectedRangeLast(),e.dragged.push("top"),e.touchStartRange={width:r.getWidth(),height:r.getHeight(),direction:r.getDirection()},t.preventDefault(),!1):(0,o.hasClass)(t.target,"bottomSelectionHandle-HitArea")?(r=e.hot.getSelectedRangeLast(),e.dragged.push("bottom"),e.touchStartRange={width:r.getWidth(),height:r.getHeight(),direction:r.getDirection()},t.preventDefault(),!1):void 0})),this.eventManager.addEventListener(t,"touchend",(t=>(0,o.hasClass)(t.target,"topSelectionHandle-HitArea")?(r.call(e,"top"),e.touchStartRange=void 0,t.preventDefault(),!1):(0,o.hasClass)(t.target,"bottomSelectionHandle-HitArea")?(r.call(e,"bottom"),e.touchStartRange=void 0,t.preventDefault(),!1):void 0)),this.eventManager.addEventListener(t,"touchmove",(t=>{const{rootDocument:r}=this.hot;let n,s,o,i,a,l;if(0===e.dragged.length)return;const u=r.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY);u&&u!==e.lastSetCell&&("TD"!==u.nodeName&&"TH"!==u.nodeName||(n=e.hot.getCoords(u),-1===n.col&&(n.col=0),s=e.hot.getSelectedRangeLast(),o=s.getWidth(),i=s.getHeight(),a=s.getDirection(),1===o&&1===i&&e.hot.selection.setRangeEnd(n),l=e.getCurrentRangeCoords(s,n,e.touchStartRange.direction,a,e.dragged[0]),null!==l.start&&e.hot.selection.setRangeStart(l.start),e.hot.selection.setRangeEnd(l.end),e.lastSetCell=u),t.preventDefault())}))}getCurrentRangeCoords(e,t,r,n,s){const o=e.getTopStartCorner(),i=e.getBottomEndCorner(),a=e.getBottomStartCorner(),l=e.getTopEndCorner();let u={start:null,end:null};switch(r){case"NE-SW":switch(n){case"NE-SW":case"NW-SE":u="top"===s?{start:this.hot._createCellCoords(t.row,e.highlight.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,o.col)};break;case"SE-NW":"bottom"===s&&(u={start:this.hot._createCellCoords(i.row,t.col),end:this.hot._createCellCoords(t.row,o.col)})}break;case"NW-SE":switch(n){case"NE-SW":"top"===s?u={start:t,end:a}:u.end=t;break;case"NW-SE":"top"===s?u={start:t,end:i}:u.end=t;break;case"SE-NW":"top"===s?u={start:t,end:o}:u.end=t;break;case"SW-NE":"top"===s?u={start:t,end:l}:u.end=t}break;case"SW-NE":switch(n){case"NW-SE":u="bottom"===s?{start:this.hot._createCellCoords(t.row,o.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(o.row,t.col),end:this.hot._createCellCoords(t.row,i.col)};break;case"SW-NE":u="top"===s?{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,i.col)}:{start:this.hot._createCellCoords(t.row,o.col),end:this.hot._createCellCoords(o.row,t.col)};break;case"SE-NW":"bottom"===s?u={start:this.hot._createCellCoords(t.row,l.col),end:this.hot._createCellCoords(o.row,t.col)}:"top"===s&&(u={start:a,end:t})}break;case"SE-NW":switch(n){case"NW-SE":case"NE-SW":case"SW-NE":"top"===s&&(u.end=t);break;case"SE-NW":"top"===s?u.end=t:u={start:t,end:o}}}return u}isDragged(){return this.dragged.length>0}}t.MultipleSelectionHandles=u},38284:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(41017);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.NestedHeaders=n.NestedHeaders},41017:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=n(r(48427)),i=n(r(42538)),a=r(49587),l=r(57691),u=r(45561),h=r(30369),c=r(31990),d=r(79055),f=r(33997),p=n(r(51661)),g=n(r(65177));function m(e,t){y(e,t),t.add(e)}function E(e,t,r){y(e,t),t.set(e,r)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(10596);const C="nestedHeaders";t.PLUGIN_KEY=C;t.PLUGIN_PRIORITY=280;var v=new WeakMap,R=new WeakMap,S=new WeakMap,T=new WeakMap,N=new WeakSet,O=new WeakSet,M=new WeakSet,_=new WeakSet,A=new WeakSet,b=new WeakSet,I=new WeakSet,x=new WeakSet,L=new WeakSet,P=new WeakSet,D=new WeakSet,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet,W=new WeakSet;class Y extends f.BasePlugin{constructor(){super(...arguments),m(this,W),m(this,B),m(this,V),m(this,U),m(this,F),m(this,H),m(this,k),m(this,D),m(this,P),m(this,L),m(this,x),m(this,I),m(this,b),m(this,A),m(this,_),m(this,M),m(this,O),m(this,N),E(this,v,{writable:!0,value:new p.default}),E(this,R,{writable:!0,value:null}),E(this,S,{writable:!0,value:null}),E(this,T,{writable:!0,value:!1}),(0,s.default)(this,"ghostTable",new g.default(this.hot,((e,t)=>this.getHeaderSettings(e,t)))),(0,s.default)(this,"detectedOverlappedHeaders",!1)}static get PLUGIN_KEY(){return C}static get PLUGIN_PRIORITY(){return 280}isEnabled(){return!!this.hot.getSettings()[C]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();Array.isArray(t)&&Array.isArray(t[0])||(0,c.warn)(u.toSingleLine`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
968
968
  passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",(()=>w(this,B,ie).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,W,ae).call(e,...r)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,A,K).call(e,...r)})),this.addHook("afterOnCellMouseDown",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,b,X).call(e,...r)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,I,q).call(e,...r)})),this.addHook("beforeOnCellMouseUp",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,x,Q).call(e,...r)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,L,Z).call(e,...r)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,P,J).call(e,...r)})),this.addHook("afterSelection",(()=>w(this,N,G).call(this))),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,O,j).call(e,...r)})),this.addHook("afterGetColumnHeaderRenderers",(e=>w(this,k,te).call(this,e))),this.addHook("modifyColWidth",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,F,ne).call(e,...r)})),this.addHook("modifyColumnHeaderValue",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,U,se).call(e,...r)})),this.addHook("beforeHighlightingColumnHeader",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,M,z).call(e,...r)})),this.addHook("beforeCopy",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,_,$).call(e,...r)})),this.addHook("beforeSelectColumns",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,D,ee).call(e,...r)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,H,re).call(e,...r)})),this.addHook("modifyFocusedElement",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,V,oe).call(e,...r)})),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",(()=>w(this,N,G).call(this))),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",(()=>w(this,N,G).call(this))),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:e}=this.hot.getSettings();(0,i.default)(this,v).setColumnsLimit(this.hot.countCols()),Array.isArray(e)&&(this.detectedOverlappedHeaders=(0,i.default)(this,v).setState(e)),this.detectedOverlappedHeaders&&(0,c.warn)(u.toSingleLine`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
969
969
  is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach(((e,t)=>{const r=!0===e?"hide-column":"show-column";(0,i.default)(this,v).triggerColumnModification(r,t)})),!(0,i.default)(this,R)&&this.enabled&&(0,o.default)(this,R,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe((e=>{e.forEach((e=>{let{op:t,index:r,newValue:n}=e;if("replace"===t){const e=!0===n?"hide-column":"show-column";(0,i.default)(this,v).triggerColumnModification(e,r)}})),this.ghostTable.buildWidthsMap()}))),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),super.updatePlugin()}disablePlugin(){this.clearColspans(),(0,i.default)(this,v).clear(),(0,i.default)(this,R).unsubscribe(),(0,o.default)(this,R,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return(0,i.default)(this,v)}getLayersCount(){return(0,i.default)(this,v).getLayersCount()}getHeaderSettings(e,t){return(0,i.default)(this,v).getHeaderSettings(e,t)}clearColspans(){if(!this.hot.view)return;const{_wt:e}=this.hot.view,t=e.getSetting("columnHeaders").length,r=e.wtTable.THEAD,n=e.wtOverlays.topOverlay.clone.wtTable.THEAD,s=e.wtOverlays.topInlineStartCornerOverlay?e.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null;for(let e=0;e<t;e++){const t=r.childNodes[e];if(!t)break;const o=n.childNodes[e],i=s?s.childNodes[e]:null;for(let e=0,r=t.childNodes.length;e<r;e++)t.childNodes[e].removeAttribute("colspan"),(0,a.removeClass)(t.childNodes[e],"hiddenHeader"),o&&o.childNodes[e]&&(o.childNodes[e].removeAttribute("colspan"),(0,a.removeClass)(o.childNodes[e],"hiddenHeader")),s&&i&&i.childNodes[e]&&(i.childNodes[e].removeAttribute("colspan"),(0,a.removeClass)(i.childNodes[e],"hiddenHeader"))}}headerRendererFactory(e){var t=this;const r=this.hot.view._wt.getSetting("fixedColumnsStart");return(n,s)=>{var o;const{columnIndexMapper:l,view:u}=this.hot;let h=l.getVisualFromRenderableIndex(n);null===h&&(h=n),s.removeAttribute("colspan"),(0,a.removeClass)(s,"hiddenHeader");const{colspan:c,isHidden:d,isPlaceholder:f}=null!==(o=(0,i.default)(this,v).getHeaderSettings(e,h))&&void 0!==o?o:{label:""};if(f||d)(0,a.addClass)(s,"hiddenHeader");else if(c>1){var p,g;const{wtOverlays:e}=u._wt,t=null===(p=e.topInlineStartCornerOverlay)||void 0===p?void 0:p.clone.wtTable.THEAD.contains(s),o=null===(g=e.inlineStartOverlay)||void 0===g?void 0:g.clone.wtTable.THEAD.contains(s),i=t||o?Math.min(c,r-n):c;i>1&&s.setAttribute("colspan",i)}this.hot.view.appendColHeader(h,s,(function(){return t.getColumnHeaderValue(...arguments)}),e)}}getColumnHeaderValue(e,t){var r;const{isHidden:n,isPlaceholder:s}=null!==(r=(0,i.default)(this,v).getHeaderSettings(t,e))&&void 0!==r?r:{};return s||n?"":this.hot.getColHeader(e,t)}destroy(){(0,o.default)(this,v,null),null!==(0,i.default)(this,R)&&((0,i.default)(this,R).unsubscribe(),(0,o.default)(this,R,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(e){if(!(e.row>=0||e.col<0))return(0,i.default)(this,v).getHeaderTreeNodeData(e.row,e.col)}}function G(){var e;const t=null===(e=this.hot)||void 0===e?void 0:e.getSelectedRangeLast();if(!t)return;const{highlight:r}=t;if(r.isHeader()&&r.col>=0){const e=(0,i.default)(this,v).findLeftMostColumnIndex(r.row,r.col),t=this.hot.selection.highlight.getFocus();t.visualCellRange.highlight.col=e,t.visualCellRange.from.col=e,t.visualCellRange.to.col=e,t.commit()}}function j(e){const t=this.hot.getSelectedRangeLast();if(!t)return e;const{highlight:r}=t;if(!(r.isHeader()&&r.col>=0))return e;const n=this.hot.view.getFirstFullyVisibleColumn(),s=this.hot.view.getLastFullyVisibleColumn(),o=(0,i.default)(this,v).findLeftMostColumnIndex(r.row,r.col),a=(0,i.default)(this,v).findRightMostColumnIndex(r.row,r.col);return o<n&&a>s?e:o<n?o:a}function z(e,t,r){const n=(0,i.default)(this,v).getHeaderTreeNodeData(t,e);if(!n)return e;const{columnCursor:s,selectionType:o,selectionWidth:a}=r,{isRoot:l,colspan:u}=(0,i.default)(this,v).getHeaderSettings(t,e);if(o===d.HEADER_TYPE){if(!l)return n.columnIndex}else if(o===d.ACTIVE_HEADER_TYPE&&(u>a-s||!l))return null;return e}function $(e,t,r){let{columnHeadersCount:n}=r;if(0!==n)for(let r=0;r<t.length;r++){const{startRow:n,startCol:o,endRow:a,endCol:l}=t[r],u=a-n+1;if(n>=0||1===o-l+1)break;for(let t=o;t<=l;t++)for(let r=n;r<=a;r++){var s;const n=u+r,a=t-o;if(0===a)continue;!1===(null===(s=(0,i.default)(this,v).getHeaderTreeNodeData(r,t))||void 0===s?void 0:s.isRoot)&&(e[n][a]="")}}}function K(e,t,r,n){this._getHeaderTreeNodeDataByCoords(t)&&(n.column=!0)}function X(e,t){const r=this._getHeaderTreeNodeDataByCoords(t);if(!r)return;(0,o.default)(this,S,t.clone()),(0,o.default)(this,T,!0);const{selection:n}=this.hot,s=n.isSelected()?n.getSelectedRange().current():null,i=[],{columnIndex:a,origColspan:l}=r,u=!n.inInSelection(t);e.shiftKey&&s?t.col<s.from.col?i.push(s.getTopEndCorner().col,a,t.row):t.col>s.from.col?i.push(s.getTopStartCorner().col,a+l-1,t.row):i.push(a,a+l-1,t.row):((0,h.isLeftClick)(e)||(0,h.isRightClick)(e)&&u)&&i.push(a,a+l-1,t.row),n.selectColumns(...i)}function q(e,t,r,n){if(!this.hot.view.isMouseDown())return;const s=this._getHeaderTreeNodeDataByCoords(t);if(!s)return;const{columnIndex:o,origColspan:i}=s,a=this.hot.getSelectedRangeLast(),u=a.getTopStartCorner(),h=a.getBottomEndCorner(),{from:c}=a;n.column=!0,n.cell=!0;const d=[],f=(0,l.clamp)(t.row,-1/0,-1);t.col<c.col?d.push(h.col,o,f):t.col>c.col?d.push(u.col,o+i-1,f):d.push(o,o+i-1,f),this.hot.selection.selectColumns(...d)}function Q(){(0,o.default)(this,T,!1)}function Z(){const{navigableHeaders:e}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!(0,i.default)(this,T)||!e)return;const t=this.hot.getSelectedRangeLast(),r=t.getTopStartCorner().col,n=t.getBottomEndCorner().col,{columnIndex:s,origColspan:o}=(0,i.default)(this,v).getHeaderTreeNodeData((0,i.default)(this,S).row,(0,i.default)(this,S).col);if(t.setHighlight((0,i.default)(this,S)),o>t.getWidth()||s<r||s+o-1>n){const e=(0,i.default)(this,v).findTopMostEntireHeaderLevel((0,l.clamp)(r,s,s+o-1),(0,l.clamp)(n,s,s+o-1));t.highlight.row=e,t.highlight.col=t.from.col}}function J(e){const{highlight:t}=this.hot.getSelectedRangeLast(),r=this.hot._createCellCoords(t.row+e.row,t.col+e.col);if(!(r.isHeader()&&r.col>=0))return;const n=(0,i.default)(this,v).findLeftMostColumnIndex(r.row,r.col),s=(0,i.default)(this,v).findRightMostColumnIndex(r.row,r.col);if(e.col<0){const r=t.col>=n&&t.col<=s?n-1:s,o=this.hot.columnIndexMapper.getNearestNotHiddenIndex(r,-1);e.col=null===o?-this.hot.view.countRenderableColumnsInRange(0,t.col):-Math.max(this.hot.view.countRenderableColumnsInRange(o,t.col)-1,1)}else if(e.col>0){const r=t.col>=n&&t.col<=s?s+1:n,o=this.hot.columnIndexMapper.getNearestNotHiddenIndex(r,1);e.col=null===o?this.hot.view.countRenderableColumnsInRange(t.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(t.col,o)-1,1)}}function ee(e,t){const r=e.row,n=this._getHeaderTreeNodeDataByCoords({row:r,col:e.col}),s=this._getHeaderTreeNodeDataByCoords({row:r,col:t.col});t.col<e.col?(n&&(e.col=n.columnIndex+n.origColspan-1),s&&(t.col=s.columnIndex)):t.col>=e.col&&(n&&(e.col=n.columnIndex),s&&(t.col=s.columnIndex+s.origColspan-1))}function te(e){e.length=0;for(let t=0;t<(0,i.default)(this,v).getLayersCount();t++)e.push(this.headerRendererFactory(t))}function re(e){const t=(0,i.default)(this,v).getLayersCount();let r=e.startColumn,n=!!t;for(let s=0;s<t;s++){const t=(0,i.default)(this,v).findLeftMostColumnIndex(s,e.startColumn),o=this.hot.columnIndexMapper.getRenderableFromVisualIndex(t);if(t>=0&&(n=!1),(0,l.isNumeric)(o)&&o<e.startColumn){r=o;break}}e.startColumn=n?(0,i.default)(this,v).getHeaderTreeNodeData(0,r).columnIndex:r}function ne(e,t){const r=this.ghostTable.getWidth(t);return e>r?e:r}function se(e,t,r){var n;const{label:s}=null!==(n=(0,i.default)(this,v).getHeaderTreeNodeData(r,t))&&void 0!==n?n:{label:""};return s}function oe(e,t){if(e<0)return this.hot.getCell(e,(0,i.default)(this,v).findLeftMostColumnIndex(e,t),!0)}function ie(){this.updatePlugin()}function ae(e,t){t||this.updatePlugin()}t.NestedHeaders=Y},12985:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),o=n(r(48427)),i=r(98887),a=n(r(96660));function l(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var u=new WeakMap,h=new WeakMap,c=new WeakMap;t.default=class{constructor(e){l(this,u,{writable:!0,value:new Map}),l(this,h,{writable:!0,value:new Map}),l(this,c,{writable:!0,value:null}),(0,o.default)(this,c,e)}getRoots(){return Array.from((0,s.default)(this,u).values())}getRootByColumn(e){let t;return(0,s.default)(this,h).has(e)&&(t=(0,s.default)(this,u).get((0,s.default)(this,h).get(e))),t}getNode(e,t){const r=this.getRootByColumn(t);if(!r)return;const n=t-(0,s.default)(this,h).get(t);let o,i=0;return r.walkDown((r=>{const{data:{origColspan:s,headerLevel:a}}=r;if(e===a){if(n>=i&&n<=i+s-1)return o=r,o.data.isRoot=t===o.data.columnIndex,!1;i+=s}})),o}rebuildTreeIndex(){let e=0;(0,s.default)(this,h).clear(),(0,i.arrayEach)((0,s.default)(this,u),(t=>{let[,{data:{colspan:r}}]=t;for(let t=e;t<e+r;t++)(0,s.default)(this,h).set(t,e);e+=r}))}buildTree(){this.clear();const e=(0,s.default)(this,c).getColumnsCount();let t=0;for(;t<e;){const e=(0,s.default)(this,c).getHeaderSettings(0,t),r=new a.default;(0,s.default)(this,u).set(t,r),this.buildLeaves(r,t,0,e.origColspan),t+=e.origColspan}this.rebuildTreeIndex()}buildLeaves(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=(0,s.default)(this,c).getHeadersSettings(r,t,n);r+=1,(0,i.arrayEach)(o,(n=>{const o={...n,headerLevel:r-1,columnIndex:t};let i;1===r?(e.data=o,i=e):(i=new a.default(o),e.addChild(i)),r<(0,s.default)(this,c).getLayersCount()&&this.buildLeaves(i,t,r,n.origColspan),t+=n.origColspan}))}clear(){(0,s.default)(this,u).clear(),(0,s.default)(this,h).clear()}}},51661:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(48427)),o=n(r(42538)),i=r(98887),a=n(r(14135)),l=n(r(12985)),u=r(44255),h=r(88717),c=r(96660);function d(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var f=new WeakMap,p=new WeakMap,g=new WeakMap;t.default=class{constructor(){d(this,f,{writable:!0,value:new a.default}),d(this,p,{writable:!0,value:new l.default((0,o.default)(this,f))}),d(this,g,{writable:!0,value:[[]]})}setState(e){(0,o.default)(this,f).setData(e);let t=!1;try{(0,o.default)(this,p).buildTree()}catch(e){(0,o.default)(this,p).clear(),(0,o.default)(this,f).clear(),t=!0}return(0,s.default)(this,g,(0,h.generateMatrix)((0,o.default)(this,p).getRoots())),t}setColumnsLimit(e){(0,o.default)(this,f).setColumnsLimit(e)}mergeStateWith(e){const t=(0,i.arrayMap)(e,(e=>{let{row:t,...r}=e;return{row:t<0?this.rowCoordsToLevel(t):t,...r}}));(0,o.default)(this,f).mergeWith(t),(0,o.default)(this,p).buildTree(),(0,s.default)(this,g,(0,h.generateMatrix)((0,o.default)(this,p).getRoots()))}mapState(e){(0,o.default)(this,f).map(e),(0,o.default)(this,p).buildTree(),(0,s.default)(this,g,(0,h.generateMatrix)((0,o.default)(this,p).getRoots()))}mapNodes(e){return(0,i.arrayReduce)((0,o.default)(this,p).getRoots(),((t,r)=>(r.walkDown((r=>{const n=e(r.data);void 0!==n&&t.push(n)})),t)),[])}triggerNodeModification(e,t,r){t<0&&(t=this.rowCoordsToLevel(t));const n=(0,o.default)(this,p).getNode(t,r);let i;return n&&(i=(0,u.triggerNodeModification)(e,n,r),(0,s.default)(this,g,(0,h.generateMatrix)((0,o.default)(this,p).getRoots()))),i}triggerColumnModification(e,t){return this.triggerNodeModification(e,-1,t)}rowCoordsToLevel(e){if(e>=0)return null;const t=e+Math.max(this.getLayersCount(),1);return t<0?null:t}levelToRowCoords(e){if(e<0)return null;const t=e-Math.max(this.getLayersCount(),1);return t>=0?null:t}getHeaderSettings(e,t){var r,n;return e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount()?null:null!==(r=null===(n=(0,o.default)(this,g)[e])||void 0===n?void 0:n[t])&&void 0!==r?r:null}getHeaderTreeNodeData(e,t){const r=this.getHeaderTreeNode(e,t);return r?{...r.data}:null}getHeaderTreeNode(e,t){if(e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount())return null;const r=(0,o.default)(this,p).getNode(e,t);return r||null}findTopMostEntireHeaderLevel(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const n=r-e+1;let s=!1,i=null;for(let t=e;t<=r;t++){const a=(0,o.default)(this,p).getRootByColumn(t);if(!a)break;s=!0,a.walkDown((t=>{const{columnIndex:s,headerLevel:o,origColspan:a,isHidden:l}=t.data;l||a<=n&&s>=e&&s+a-1<=r&&(null===i||o<i)&&(i=o)}),c.TRAVERSAL_DF_PRE)}return s&&null===i?-1:this.levelToRowCoords(null!==(t=i)&&void 0!==t?t:0)}findLeftMostColumnIndex(e,t){var r;const{isRoot:n}=null!==(r=this.getHeaderSettings(e,t))&&void 0!==r?r:{isRoot:!0};if(n)return t;let s=t-1;for(;s>=0;){var o;const{isRoot:t}=null!==(o=this.getHeaderSettings(e,s))&&void 0!==o?o:{isRoot:!0};if(t)break;s-=1}return s}findRightMostColumnIndex(e,t){var r;const{isRoot:n,origColspan:s}=null!==(r=this.getHeaderSettings(e,t))&&void 0!==r?r:{isRoot:!0,origColspan:1};if(n)return t+s-1;let o=t+1;for(;o<this.getColumnsCount();){var i;const{isRoot:t}=null!==(i=this.getHeaderSettings(e,o))&&void 0!==i?i:{isRoot:!0};if(t)break;o+=1}return o-1}getLayersCount(){return(0,o.default)(this,f).getLayersCount()}getColumnsCount(){return(0,o.default)(this,f).getColumnsCount()}clear(){(0,s.default)(this,g,[]),(0,o.default)(this,f).clear(),(0,o.default)(this,p).clear()}}},88717:(e,t,r)=>{"use strict";t.__esModule=!0,t.generateMatrix=function(e){const t=[];return(0,n.arrayEach)(e,(e=>{e.walkDown((e=>{const r=e.data,{origColspan:n,columnIndex:i,headerLevel:a,crossHiddenColumns:l}=r,u=function(e,t){let r;Array.isArray(e[t])?r=e[t]:(r=[],e[t]=r);return r}(t,a);let h=!1;for(let e=i;e<i+n;e++){if(l.includes(e)||h)u.push((0,s.createPlaceholderHeaderSettings)(r));else{const e=o(r);e.isRoot=!0,u.push(e),h=!0}}}))})),t},r(95988);var n=r(98887),s=r(27122);function o(e){const{crossHiddenColumns:t,...r}=(0,s.createDefaultHeaderSettings)(e);return r}},29113:(e,t,r)=>{"use strict";t.__esModule=!0,t.collapseNode=function e(t){var r;const{data:i,childs:a}=t;if(i.isCollapsed||i.isHidden||i.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if((0,o.isNodeReflectsFirstChildColspan)(t))return e(a[0]);i.isCollapsed=!0;const l=a.slice(1),u=new Set;if(l.length>0)(0,n.arrayEach)(l,(e=>{(0,o.traverseHiddenNodeColumnIndexes)(e,(e=>{u.add(e)})),e.data.clonedTree=e.cloneTree(),e.walkDown((e=>{let{data:t}=e;t.isHidden=!0}))}));else{const{origColspan:e,columnIndex:t}=i;for(let r=1;r<e;r++){const e=t+r;u.add(e)}}const h=i.colspan-(null!==(r=(0,o.getFirstChildProperty)(t,"colspan"))&&void 0!==r?r:1);return t.walkUp((e=>{const{data:t}=e;t.colspan-=h,t.colspan<=1?(t.colspan=1,t.isCollapsed=!0):(0,o.isNodeReflectsFirstChildColspan)(e)&&(t.isCollapsed=(0,o.getFirstChildProperty)(e,"isCollapsed"))})),{rollbackModification:()=>(0,s.expandNode)(t),affectedColumns:Array.from(u),colspanCompensation:h}};var n=r(98887),s=r(32600),o=r(5985)},32600:(e,t,r)=>{"use strict";t.__esModule=!0,t.expandNode=function e(t){const{data:r,childs:i}=t;if(!r.isCollapsed||r.isHidden||r.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if((0,o.isNodeReflectsFirstChildColspan)(t))return e(i[0]);r.isCollapsed=!1;const a=i.slice(1),l=new Set;let u=0;if(a.length>0)(0,n.arrayEach)(a,(e=>{e.replaceTreeWith(e.data.clonedTree),e.data.clonedTree=null;const t=e.data;u+=t.colspan,(0,o.traverseHiddenNodeColumnIndexes)(e,(e=>{l.add(e)}))}));else{const{colspan:e,origColspan:t,columnIndex:n}=r;u=t-e;for(let e=1;e<t;e++)l.add(n+e)}return t.walkUp((e=>{const{data:t}=e;t.colspan+=u,t.colspan>=t.origColspan?(t.colspan=t.origColspan,t.isCollapsed=!1):(0,o.isNodeReflectsFirstChildColspan)(e)&&(t.isCollapsed=(0,o.getFirstChildProperty)(e,"isCollapsed"))})),{rollbackModification:()=>(0,s.collapseNode)(t),affectedColumns:Array.from(l),colspanCompensation:u}};var n=r(98887),s=r(29113),o=r(5985)},63055:(e,t,r)=>{"use strict";t.__esModule=!0,t.hideColumn=function(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(n.toSingleLine`The passed node is not the last node on the tree. Only for\x20
970
970
  the last node, the hide column modification can be applied.`);const{crossHiddenColumns:r}=e.data;if(r.includes(t))return;let s=!1;if(e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return s=!0,!1})),s)return;e.walkUp((e=>{const{data:r}=e;r.crossHiddenColumns.push(t),r.colspan>1?r.colspan-=1:r.isHidden=!0}))},r(60740),r(95988);var n=r(45561)},44255:(e,t,r)=>{"use strict";t.__esModule=!0,t.triggerNodeModification=function(e,t,r){if(!a.has(e))throw new Error(`The node modifier action ("${e}") does not exist.`);return a.get(e)(t,r)},r(60740);var n=r(29113),s=r(32600),o=r(63055),i=r(50559);const a=new Map([["collapse",n.collapseNode],["expand",s.expandNode],["hide-column",o.hideColumn],["show-column",i.showColumn]])},50559:(e,t,r)=>{"use strict";t.__esModule=!0,t.showColumn=function(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(n.toSingleLine`The passed node is not the last node on the tree. Only for\x20
971
- the last node, the show column modification can be applied.`);const{crossHiddenColumns:r}=e.data;if(!r.includes(t))return;let s=!1;if(e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return s=!0,!1})),s)return;e.walkUp((e=>{const{data:r}=e;r.crossHiddenColumns.splice(r.crossHiddenColumns.indexOf(t),1),!r.isHidden&&r.colspan<r.origColspan&&(r.colspan+=1),r.isHidden=!1}))},r(60740);var n=r(45561)},5985:(e,t)=>{"use strict";function r(e,t){let{childs:r}=e;if(0!==r.length)return r[0].data[t]}t.__esModule=!0,t.getFirstChildProperty=r,t.isNodeReflectsFirstChildColspan=function(e){return r(e,"origColspan")===e.data.origColspan},t.traverseHiddenNodeColumnIndexes=function(e,t){e.walkDown((e=>{let{data:r,childs:n}=e;if(!r.isHidden&&(t(r.columnIndex),0===n.length))for(let e=1;e<r.colspan;e++)t(r.columnIndex+e)}))}},15914:(e,t,r)=>{"use strict";t.__esModule=!0,t.normalizeSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const r=[];if(0===t)return r;(0,n.arrayEach)(e,(e=>{const a=[];let l=0;r.push(a),(0,n.arrayEach)(e,(e=>{const r=(0,i.createDefaultHeaderSettings)();if((0,s.isObject)(e)){const{label:t,colspan:n}=e;r.label=(0,o.stringify)(t),"number"==typeof n&&n>1&&(r.colspan=n,r.origColspan=n)}else r.label=(0,o.stringify)(e);l+=r.origColspan;let n=!1;if(l>=t&&(r.colspan=r.origColspan-(l-t),r.origColspan=r.colspan,n=!0),a.push(r),r.colspan>1)for(let e=0;e<r.colspan-1;e++)a.push((0,i.createPlaceholderHeaderSettings)());return!n}))}));const a=Math.max(...(0,n.arrayMap)(r,(e=>e.length)));return(0,n.arrayEach)(r,(e=>{if(e.length<a){const t=(0,n.arrayMap)(new Array(a-e.length),(()=>(0,i.createDefaultHeaderSettings)()));e.splice(e.length,0,...t)}})),r},r(95988);var n=r(98887),s=r(76163),o=r(97639),i=r(27122)},14135:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(42538)),o=n(r(48427)),i=r(76163),a=r(98887),l=r(15914);function u(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}const h=["label","collapsible"];t.HEADER_CONFIGURABLE_PROPS=h;var c=new WeakMap,d=new WeakMap,f=new WeakMap;t.default=class{constructor(){u(this,c,{writable:!0,value:[]}),u(this,d,{writable:!0,value:0}),u(this,f,{writable:!0,value:1/0})}setColumnsLimit(e){(0,o.default)(this,f,e)}setData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,o.default)(this,c,(0,l.normalizeSettings)(e,(0,s.default)(this,f))),(0,o.default)(this,d,(0,s.default)(this,c).length)}getData(){return(0,s.default)(this,c)}mergeWith(e){(0,a.arrayEach)(e,(e=>{let{row:t,col:r,...n}=e;const s=this.getHeaderSettings(t,r);null!==s&&(0,i.extend)(s,n,h)}))}map(e){(0,a.arrayEach)((0,s.default)(this,c),(t=>{(0,a.arrayEach)(t,(t=>{const r=e({...t});(0,i.isObject)(r)&&(0,i.extend)(t,r,h)}))}))}getHeaderSettings(e,t){var r;if(e>=(0,s.default)(this,d)||e<0)return null;const n=(0,s.default)(this,c)[e];return t>=n.length?null:null!==(r=n[t])&&void 0!==r?r:null}getHeadersSettings(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const n=[];if(e>=(0,s.default)(this,d)||e<0)return n;const o=(0,s.default)(this,c)[e];let i=0;for(let e=t;e<o.length;e++){const t=o[e];if(t.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(i+=t.colspan,n.push(t),t.colspan>1&&(e+=t.colspan-1),i===r)break;if(i>r)throw new Error("The last column settings cannot overlap the other header layers")}return n}getLayersCount(){return(0,s.default)(this,d)}getColumnsCount(){return(0,s.default)(this,d)>0?(0,s.default)(this,c)[0].length:0}clear(){(0,o.default)(this,c,[]),(0,o.default)(this,d,0)}}},27122:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultHeaderSettings=function(){let{label:e="",colspan:t=1,origColspan:r=1,collapsible:n=!1,crossHiddenColumns:s=[],isCollapsed:o=!1,isHidden:i=!1,isRoot:a=!1,isPlaceholder:l=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:e,colspan:t,origColspan:r,collapsible:n,isCollapsed:o,crossHiddenColumns:s,isHidden:i,isRoot:a,isPlaceholder:l}},t.createPlaceholderHeaderSettings=function(){return{label:"",isPlaceholder:!0}}},65177:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(49587);var i=class{constructor(e,t){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"nestedHeaderSettingsGetter",void 0),(0,s.default)(this,"layersCount",0),(0,s.default)(this,"container",void 0),(0,s.default)(this,"widthsMap",void 0),this.hot=e,this.nestedHeaderSettingsGetter=t,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}setLayersCount(e){return this.layersCount=e,this}getWidth(e){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e))}buildWidthsMap(){this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize"),this._buildGhostTable(this.container),this.hot.rootDocument.body.appendChild(this.container);const e=this.container.querySelectorAll("tr:last-of-type th"),t=e.length;this.widthsMap.clear();for(let r=0;r<t;r++){const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(r),n=this.hot.toPhysicalColumn(t);this.widthsMap.setValueAtIndex(n,e[r].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}_buildGhostTable(e){const{rootDocument:t,columnIndexMapper:r}=this.hot,n=t.createDocumentFragment(),s=t.createElement("table"),i=!!this.hot.getSettings().dropdownMenu,a=r.getRenderableIndexesLength();for(let e=0;e<this.layersCount;e++){const n=t.createElement("tr");for(let s=0;s<a;s++){let a=r.getVisualFromRenderableIndex(s);null===a&&(a=s);const l=t.createElement("th"),u=this.nestedHeaderSettingsGetter(e,a);if(u&&(!u.isPlaceholder||u.isHidden)){let e=u.label;i&&(e+='<button class="changeType"></button>'),(0,o.fastInnerHTML)(l,e),l.colSpan=u.colspan,n.appendChild(l)}}s.appendChild(n)}n.appendChild(s),e.appendChild(n)}clear(){this.widthsMap.clear(),this.container=null}};t.default=i},7103:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(57691),i=r(76163),a=r(98887);var l=class{constructor(e,t){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"data",null),(0,s.default)(this,"plugin",void 0),(0,s.default)(this,"parentReference",new WeakMap),(0,s.default)(this,"cache",{levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}),this.hot=t,this.plugin=e}setData(e){this.data=e}getData(){return this.data}getRawSourceData(){let e=null;return this.plugin.disableCoreAPIModifiers(),e=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),e}updateWithData(e){this.setData(e),this.rewriteCache()}rewriteCache(){this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},(0,o.rangeEach)(0,this.data.length-1,(e=>{this.cacheNode(this.data[e],0,null)}))}cacheNode(e,t,r){this.cache.levels[t]||(this.cache.levels[t]=[],this.cache.levelCount+=1),this.cache.levels[t].push(e),this.cache.rows.push(e),this.cache.nodeInfo.set(e,{parent:r,row:this.cache.rows.length-1,level:t}),this.hasChildren(e)&&(0,a.arrayEach)(e.__children,(r=>{this.cacheNode(r,t+1,e)}))}getDataObject(e){return null==e?null:this.cache.rows[e]}readTreeNodes(e,t,r,n){let s=!1,o=t;if(isNaN(o)&&o.end)return o;let i=e;return i||(i={__children:this.data},s=!0,o-=1),null!=r&&o===r?{result:i,end:!0}:null!=n&&i===n?{result:o,end:!0}:(o+=1,i.__children&&(0,a.arrayEach)(i.__children,(e=>{if(this.parentReference.set(e,s?null:i),o=this.readTreeNodes(e,o,r,n),isNaN(o)&&o.end)return!1})),o)}mockParent(){const e=this.mockNode();return e.__children=this.data,e}mockNode(){const e={};return(0,i.objectEach)(this.data[0],((t,r)=>{e[r]=null})),e}getRowIndex(e){return null==e?null:this.cache.nodeInfo.get(e).row}getRowIndexWithinParent(e){let t=null;t=isNaN(e)?e:this.getDataObject(e);const r=this.getRowParent(e);return null==r?this.data.indexOf(t):r.__children.indexOf(t)}countAllRows(){const e={__children:this.data};return this.countChildren(e)}countChildren(e){let t=0,r=e;return isNaN(r)||(r=this.getDataObject(r)),r&&r.__children?((0,a.arrayEach)(r.__children,(e=>{t+=1,e.__children&&(t+=this.countChildren(e))})),t):0}getRowParent(e){let t;return t=isNaN(e)?e:this.getDataObject(e),this.getRowObjectParent(t)}getRowObjectParent(e){return e&&"object"==typeof e?this.cache.nodeInfo.get(e).parent:null}getRowLevel(e){let t=null;return t=isNaN(e)?e:this.getDataObject(e),t?this.getRowObjectLevel(t):null}getRowObjectLevel(e){return null==e?null:this.cache.nodeInfo.get(e).level}hasChildren(e){let t=e;return isNaN(t)||(t=this.getDataObject(t)),!(!t.__children||!t.__children.length)}isChild(e){return null!==this.getRowParent(e)}getChild(e,t){var r;return(null===(r=e.__children)||void 0===r?void 0:r[t])||null}isRowHighestLevel(e){return!this.isChild(e)}isParent(e){var t;let r=e;return isNaN(r)||(r=this.getDataObject(r)),r&&!!r.__children&&0!==(null===(t=r.__children)||void 0===t?void 0:t.length)}addChild(e,t){let r=t;this.hot.runHooks("beforeAddChild",e,r);let n=null;e&&(n=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",n+this.countChildren(e)+1,1);let s=e;e||(s=this.mockParent()),s.__children||(s.__children=[]),r||(r=this.mockNode()),s.__children.push(r),this.rewriteCache();const o=this.getRowIndex(r);this.hot.rowIndexMapper.insertIndexes(o,1),this.hot.runHooks("afterCreateRow",o,1),this.hot.runHooks("afterAddChild",e,r)}addChildAtIndex(e,t,r){let n,s=r;if(s||(s=this.mockNode()),this.hot.runHooks("beforeAddChild",e,s,t),e){const r=this.getRowIndex(e)+t+1;this.hot.runHooks("beforeCreateRow",r,1),e.__children.splice(t,null,s),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(r,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",r,1),n=r}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",t,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),n=this.getRowIndex(this.data[t]);s=this.getDataObject(n),this.hot.runHooks("afterAddChild",e,s,t)}addSibling(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const r=this.translateTrimmedRow(e),n=this.getRowParent(r),s=this.getRowIndexWithinParent(r);switch(t){case"below":this.addChildAtIndex(n,s+1,null);break;case"above":this.addChildAtIndex(n,s,null)}}detachFromParent(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=null;const n=[];Array.isArray(e)?((0,o.rangeEach)(e[0],e[2],(e=>{const t=this.translateTrimmedRow(e);n.push(this.getDataObject(t))})),(0,o.rangeEach)(0,n.length-2,(e=>{this.detachFromParent(n[e],!1)})),r=n[n.length-1]):r=e;const s=this.getRowIndex(r),i=this.countChildren(r),a=this.getRowIndexWithinParent(r),l=this.getRowParent(r),u=this.getRowParent(l),h=this.getRowIndex(u);let c=null;if(this.hot.runHooks("beforeDetachChild",l,r),null!=a){const e=Array.from(new Array(s+i+1).keys()).splice(-1*(i+1));if(this.hot.runHooks("beforeRemoveRow",s,i+1,e,this.plugin.pluginName),l.__children.splice(a,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",s,i+1,e,this.plugin.pluginName),u){c=h+this.countChildren(u);const e=this.getChild(u,this.countChildren(u)-1),t=this.getRowIndex(e);this.hot.runHooks("beforeCreateRow",t+1,i+1,this.plugin.pluginName),u.__children.push(r)}else c=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",c-2,i+1,this.plugin.pluginName),this.data.push(r)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",c-2,i+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",l,r,this.getRowIndex(r)),t&&this.hot.render()}filterData(e,t,r){const n=[];(0,a.arrayEach)(r,(e=>{n.push(this.getDataObject(e))})),(0,a.arrayEach)(n,(e=>{const t=this.getRowIndexWithinParent(e),r=this.getRowParent(e);null===r?this.data.splice(t,1):r.__children.splice(t,1)})),this.rewriteCache()}spliceData(e,t,r){const n=this.getDataObject(e-1);let s=null,o=e;n&&n.__children&&0===n.__children.length?(s=n,o=0):e<this.countAllRows()&&(s=this.getRowParent(e),o=this.getRowIndexWithinParent(e)),s?r?s.__children.splice(o,t,...r):s.__children.splice(o,t):r?this.data.splice(o,t,...r):this.data.splice(o,t),this.rewriteCache()}syncRowWithRawSource(e){let t=e,r=null;do{r=this.getRowParent(r),null!==r&&(t=r)}while(null!==r);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndex(t),"__children",t.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(e,t,r,n){const s=t===this.hot.countRows(),o=this.getRowParent(e),i=this.getRowIndexWithinParent(e),a=o.__children.slice(i,i+1),l=e>t;let u=s?this.getRowParent(t-1):this.getRowParent(t);null==u&&(u=this.getRowParent(t-1)),null==u&&(u=this.getDataObject(t-1)),u?u.__children||(u.__children=[]):(u=this.getDataObject(t),u.__children=[]);const h=s||r||n?u.__children.length:this.getRowIndexWithinParent(t),c=o===u;u.__children.splice(h,0,a[0]),o.__children.splice(i+(l&&c?1:0),1),this.syncRowWithRawSource(o),c||this.syncRowWithRawSource(u)}translateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}untranslateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(e):e}};t.default=l},6604:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(905);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.NestedRows=n.NestedRows},905:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=n(r(42538)),i=n(r(48427)),a=r(33997),l=n(r(7103)),u=n(r(23640)),h=n(r(15113)),c=n(r(43509)),d=r(31990),f=r(56020),p=r(41789),g=n(r(51915));function m(e,t){y(e,t),t.add(e)}function E(e,t,r){y(e,t),t.set(e,r)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(23118);const C="nestedRows";t.PLUGIN_KEY=C;t.PLUGIN_PRIORITY=300;const v=C;var R=new WeakMap,S=new WeakMap,T=new WeakSet,N=new WeakSet,O=new WeakSet,M=new WeakSet,_=new WeakSet,A=new WeakSet,b=new WeakSet,I=new WeakSet,x=new WeakSet,L=new WeakSet,P=new WeakSet,D=new WeakSet,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet;class V extends a.BasePlugin{constructor(){super(...arguments),m(this,U),m(this,F),m(this,H),m(this,k),m(this,D),m(this,P),m(this,L),m(this,x),m(this,I),m(this,b),m(this,A),m(this,_),m(this,M),m(this,O),m(this,N),m(this,T),(0,s.default)(this,"dataManager",null),(0,s.default)(this,"headersUI",null),(0,s.default)(this,"collapsedRowsMap",null),E(this,R,{writable:!0,value:!1}),E(this,S,{writable:!0,value:!1})}static get PLUGIN_KEY(){return C}static get PLUGIN_PRIORITY(){return 300}isEnabled(){return!!this.hot.getSettings()[C]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new p.TrimmingMap),this.dataManager=new l.default(this,this.hot),this.collapsingUI=new u.default(this,this.hot),this.headersUI=new h.default(this,this.hot),this.contextMenuUI=new c.default(this,this.hot),this.rowMoveController=new g.default(this),this.addHook("afterInit",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,H,ee).call(e,...r)})),this.addHook("beforeViewRender",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,F,te).call(e,...r)})),this.addHook("modifyRowData",(function(){return e.onModifyRowData(...arguments)})),this.addHook("modifySourceLength",(function(){return e.onModifySourceLength(...arguments)})),this.addHook("beforeDataSplice",(function(){return e.onBeforeDataSplice(...arguments)})),this.addHook("filterData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,O,Y).call(e,...r)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,M,G).call(e,...r)})),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,_,j).call(e,...r)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,N,W).call(e,...r)})),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,I,K).call(e,...r)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,b,$).call(e,...r)})),this.addHook("beforeAddChild",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,x,X).call(e,...r)})),this.addHook("afterAddChild",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,L,q).call(e,...r)})),this.addHook("beforeDetachChild",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,P,Q).call(e,...r)})),this.addHook("afterDetachChild",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,D,Z).call(e,...r)})),this.addHook("modifyRowHeaderWidth",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,A,z).call(e,...r)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,k,J).call(e,...r)})),this.addHook("beforeRowMove",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,T,B).call(e,...r)})),this.addHook("beforeLoadData",(e=>w(this,U,re).call(this,e))),this.addHook("beforeUpdateData",(e=>w(this,U,re).call(this,e))),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){this.disablePlugin();const e=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(e),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if(-1===e.col&&e.row>=0){const t=this.collapsingUI.translateTrimmedRow(e.row);this.collapsingUI.areChildrenCollapsed(t)?this.collapsingUI.expandChildren(t):this.collapsingUI.collapseChildren(t)}},runOnlyIf:()=>{var e;return null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader()},group:v})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(v)}disableCoreAPIModifiers(){(0,i.default)(this,S,!0)}enableCoreAPIModifiers(){(0,i.default)(this,S,!1)}onModifyRowData(e){if(!(0,o.default)(this,S))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!(0,o.default)(this,S))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,r){return!(!(0,o.default)(this,S)&&!this.dataManager.isRowHighestLevel(e))||(this.dataManager.spliceData(e,t,r),!1)}destroy(){super.destroy()}}function B(e,t,r,n){return this.rowMoveController.onBeforeRowMove(e,t,r,n)}function W(e,t,r){this.collapsingUI.toggleState(e,t,r)}function Y(e,t,r){return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(r[0],t),this.collapsingUI.collapsedRowsStash.shiftStash(r[0],null,-1*t),this.dataManager.filterData(e,t,r),(0,i.default)(this,R,!0),this.dataManager.getData().slice()}function G(e){return this.contextMenuUI.appendOptions(e)}function j(e,t){this.headersUI.appendLevelIndicators(e,t)}function z(e){return this.headersUI.rowHeaderWidthCache||e}function $(e,t,r,n){n!==this.pluginName&&this.hot._registerTimeout((()=>{(0,i.default)(this,R,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()}),0)}function K(e,t,r){const n=Array.from(r.reduce(((e,t)=>{if(this.dataManager.isParent(t)){const r=this.dataManager.getDataObject(t).__children;return e.add(t),Array.isArray(r)&&r.forEach((t=>e.add(this.dataManager.getRowIndex(t)))),e}return e.add(t)}),new Set));r.length=0,r.push(...n)}function X(){this.collapsingUI.collapsedRowsStash.stash()}function q(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function Q(){this.collapsingUI.collapsedRowsStash.stash()}function Z(e,t,r){this.collapsingUI.collapsedRowsStash.shiftStash(r,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function J(){this.dataManager.rewriteCache()}function ee(){this.headersUI.updateRowHeaderWidth()}function te(e,t){(0,o.default)(this,R)&&(t.skipRender=!0)}function re(e){if(!(0,f.isArrayOfObjects)(e))return(0,d.error)("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),this.hot.getSettings()[C]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}t.NestedRows=V},61619:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));var o=class{constructor(e,t){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"plugin",void 0),this.hot=t,this.plugin=e}};t.default=o},23640:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=r(30369),o=r(98887),i=r(57691),a=r(49587),l=n(r(61619)),u=n(r(15113));class h extends l.default{constructor(e,t){var r;super(e,t),r=this,this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];r.lastCollapsedRows=r.collapsedRows.slice(0),r.expandMultipleChildren(r.lastCollapsedRows,e)},shiftStash:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null==t&&(t=1/0),(0,o.arrayEach)(r.lastCollapsedRows,((s,o)=>{s>=e&&s<t&&(r.lastCollapsedRows[o]=s+n)}))},applyStash:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];r.collapseMultipleChildren(r.lastCollapsedRows,e),r.lastCollapsedRows=void 0},trimStash:(e,t)=>{(0,i.rangeEach)(e,e+t-1,(e=>{const t=this.lastCollapsedRows.indexOf(e);t>-1&&this.lastCollapsedRows.splice(t,1)}))}}}collapseChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];let s=null,i=null,a=null;return isNaN(e)?(s=e,i=this.dataManager.getRowIndex(s)):(s=this.dataManager.getDataObject(e),i=e),this.dataManager.hasChildren(s)&&(0,o.arrayEach)(s.__children,(e=>{n.push(this.dataManager.getRowIndex(e))})),a=this.collapseRows(n,!0,!1),r&&this.trimRows(a),t&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(i)&&this.collapsedRows.push(i),a}collapseMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];(0,o.arrayEach)(e,(e=>{n.push(...this.collapseChildren(e,!1,!1))})),r&&this.trimRows(n),t&&this.renderAndAdjust()}collapseRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([e],t)}collapseRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=[];return(0,o.arrayEach)(e,(e=>{n.push(e),t&&this.collapseChildRows(e,n)})),r&&this.trimRows(n),n}collapseChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const r=this.dataManager.getDataObject(e);(0,o.arrayEach)(r.__children,(e=>{const r=this.dataManager.getRowIndex(e);t.push(r),this.collapseChildRows(r,t)}))}r&&this.trimRows(t)}expandRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([e],t)}expandRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=[];return(0,o.arrayEach)(e,(e=>{n.push(e),t&&this.expandChildRows(e,n)})),r&&this.untrimRows(n),n}expandChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const r=this.dataManager.getDataObject(e);(0,o.arrayEach)(r.__children,(e=>{if(!this.isAnyParentCollapsed(e)){const r=this.dataManager.getRowIndex(e);t.push(r),this.expandChildRows(r,t)}}))}r&&this.untrimRows(t)}expandChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];let s=null,i=null,a=null;return isNaN(e)?(s=e,i=this.dataManager.getRowIndex(e)):(s=this.dataManager.getDataObject(e),i=e),this.collapsedRows.splice(this.collapsedRows.indexOf(i),1),this.dataManager.hasChildren(s)&&(0,o.arrayEach)(s.__children,(e=>{const t=this.dataManager.getRowIndex(e);n.push(t)})),a=this.expandRows(n,!0,!1),r&&this.untrimRows(a),t&&this.renderAndAdjust(),a}expandMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];(0,o.arrayEach)(e,(e=>{n.push(...this.expandChildren(e,!1,!1))})),r&&this.untrimRows(n),t&&this.renderAndAdjust()}collapseAll(){const e=this.dataManager.getData(),t=[];(0,o.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];(0,o.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution((()=>{(0,o.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!0)}))}),!0)}untrimRows(e){this.hot.batchExecution((()=>{(0,o.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!1)}))}),!0)}areChildrenCollapsed(e){let t=isNaN(e)?e:this.dataManager.getDataObject(e),r=!0;return null===t&&(t={__children:this.dataManager.data}),this.dataManager.hasChildren(t)&&(0,o.arrayEach)(t.__children,(e=>{const t=this.dataManager.getRowIndex(e);if(!this.plugin.collapsedRowsMap.getValueAtIndex(t))return r=!1,!1})),r}isAnyParentCollapsed(e){let t=e;for(;null!==t;){t=this.dataManager.getRowParent(t);const e=this.dataManager.getRowIndex(t);if(this.collapsedRows.indexOf(e)>-1)return!0}return!1}toggleState(e,t){if(t.col>=0)return;const r=this.translateTrimmedRow(t.row);(0,a.hasClass)(e.target,u.default.CSS_CLASSES.button)&&(this.areChildrenCollapsed(r)?this.expandChildren(r):this.collapseChildren(r),(0,s.stopImmediatePropagation)(e))}translateTrimmedRow(e){return this.hot.toPhysicalRow(e)}untranslateTrimmedRow(e){return this.hot.toVisualRow(e)}renderAndAdjust(){this.hot.render(),this.hot.view.adjustElementsSize()}}var c=h;t.default=c},43509:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=n(r(42538)),i=r(57691),a=r(98887),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=h(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),u=n(r(61619));function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(h=function(e){return e?r:t})(e)}function c(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var d=new WeakMap;class f extends u.default{constructor(){super(...arguments),(0,s.default)(this,"dataManager",this.plugin.dataManager),c(this,d,{writable:!0,value:{row_above:(e,t)=>{const r=t[t.length-1];this.dataManager.addSibling(r.start.row,"above")},row_below:(e,t)=>{const r=t[t.length-1];this.dataManager.addSibling(r.start.row,"below")}}})}appendOptions(e){const t=[{key:"add_child",name(){return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD)},callback:()=>{const e=this.dataManager.translateTrimmedRow(this.hot.getSelectedLast()[0]),t=this.dataManager.getDataObject(e);this.dataManager.addChild(t)},disabled:()=>{const e=this.hot.getSelectedLast();return!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{key:"detach_from_parent",name(){return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD)},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedLast())},disabled:()=>{const e=this.hot.getSelectedLast(),t=this.dataManager.translateTrimmedRow(e[0]);return!this.dataManager.getRowParent(t)||!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return(0,i.rangeEach)(0,e.items.length-1,(r=>{if(0===r)return(0,a.arrayEach)(t,((t,n)=>{e.items.splice(r+n,0,t)})),!1})),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){return(0,i.rangeEach)(0,e.items.length-1,(t=>{const r=(0,o.default)(this,d)[e.items[t].key];null!=r&&(e.items[t].callback=r)})),e}}var p=f;t.default=p},15113:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(98887),o=r(57691),i=r(49587),a=n(r(61619)),l=r(66862),u=r(497);class h extends a.default{static get CSS_CLASSES(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}constructor(e,t){super(e,t),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}appendLevelIndicators(e,t){const r=this.hot.toPhysicalRow(e),n=this.dataManager.getRowLevel(r),a=this.dataManager.getDataObject(r),c=t.getElementsByTagName("DIV")[0],d=c.querySelector("span.rowHeader"),f=c.querySelectorAll('[class^="ht_nesting"]'),p=this.hot.getSettings().ariaTags;if((0,s.arrayEach)(f,(e=>{e&&c.removeChild(e)})),(0,i.addClass)(t,h.CSS_CLASSES.indicatorContainer),n){const{rootDocument:e}=this.hot,t=d.cloneNode(!0);c.innerHTML="",(0,o.rangeEach)(0,n-1,(()=>{const t=e.createElement("SPAN");(0,i.addClass)(t,h.CSS_CLASSES.emptyIndicator),c.appendChild(t)})),c.appendChild(t)}if(this.dataManager.hasChildren(a)){const e=this.hot.rootDocument.createElement("DIV");p&&(0,i.setAttribute)(e,[(0,l.A11Y_HIDDEN)()]),(0,i.addClass)(t,h.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(r)?((0,i.addClass)(e,`${h.CSS_CLASSES.button} ${h.CSS_CLASSES.expandButton}`),p&&(0,i.setAttribute)(t,[(0,l.A11Y_EXPANDED)(!1),(0,l.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(u.ROW_HEADER_DESCRIPTION_EXPAND_ROW))])):((0,i.addClass)(e,`${h.CSS_CLASSES.button} ${h.CSS_CLASSES.collapseButton}`),p&&(0,i.setAttribute)(t,[(0,l.A11Y_EXPANDED)(!0),(0,l.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(u.ROW_HEADER_DESCRIPTION_COLLAPSE_ROW))])),c.appendChild(e)}}updateRowHeaderWidth(e){let t=e;t||(t=this.dataManager.cache.levelCount),this.rowHeaderWidthCache=Math.max(50,11+10*t+25),this.hot.render()}}var c=h;t.default=c},51915:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(97639),i=r(31990),a=r(45561);t.default=class{constructor(e){(0,s.default)(this,"plugin",void 0),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"dataManager",void 0),(0,s.default)(this,"collapsingUI",void 0),this.plugin=e,this.hot=e.hot,this.dataManager=e.dataManager,this.collapsingUI=e.collapsingUI}onBeforeRowMove(e,t,r,n){if(this.displayAPICompatibilityWarning({rows:e,finalIndex:t,dropIndex:r,movePossible:n}))return!1;this.movedToCollapsed=!1;const s=r===this.hot.countRows(),o=s?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(r);let i=!0;const a=e.map((e=>{if(!i)return!1;const t=this.dataManager.translateTrimmedRow(e);return i=this.shouldAllowMoving(t,o),t})),l=-1===a.indexOf(o);if(!i||!l)return!1;const u=this.getBaseParent(a),h=this.getTargetParent(s,o),c=u===h;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(h),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(a,o,c),this.moveRows(a,o,h),this.dataManager.rewriteCache(),this.moveCellsMeta(a,o),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",e,t,r,n,n&&this.isRowOrderChanged(e,t)),this.hot.render(),this.selectCells(e,r),!1}displayAPICompatibilityWarning(e){const{rows:t,finalIndex:r,dropIndex:n,movePossible:s}=e;let l=!1;return(0,o.isUndefined)(n)&&((0,i.warn)(a.toSingleLine`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
972
- when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,r,n,s,!1),l=!0),l}shouldAllowMoving(e,t){return!(this.dataManager.isParent(e)||this.dataManager.isRowHighestLevel(e)||e===t||0===t)}getBaseParent(e){return this.dataManager.getRowParent(e[0])}getTargetParent(e,t){let r=this.dataManager.getRowParent(e?t-1:t);return null==r&&(r=this.dataManager.getRowParent(t-1)),r}shiftCollapsibleParentsLocations(e,t,r){r||(Math.max(...e)<=t?this.collapsingUI.collapsedRowsStash.shiftStash(e[0],t,-1*e.length):this.collapsingUI.collapsedRowsStash.shiftStash(t,e[0],e.length))}moveRows(e,t,r){const n=t===this.dataManager.getRowIndex(r)+this.dataManager.countChildren(r)+1;this.hot.batchRender((()=>{e.forEach((e=>{this.dataManager.moveRow(e,t,this.movedToCollapsed,n)}))}))}moveCellsMeta(e,t){const r=[],n=Math.max(...e)<t;e.forEach((e=>{r.push(this.hot.getCellMetaAtRow(e))})),this.hot.spliceCellsMeta(e[0],e.length),this.hot.spliceCellsMeta(t-(n?r.length:0),0,...r)}selectCells(e,t){const r=e.length;let n=0,s=0,o=null,i=null;if(this.movedToCollapsed){let o=null;o=e[r-1]<t?this.dataManager.translateTrimmedRow(t-r):this.dataManager.translateTrimmedRow(t);const i=this.dataManager.getRowParent(null===o?this.hot.countSourceRows()-1:o-1),a=this.dataManager.getRowIndex(i);n=this.dataManager.untranslateTrimmedRow(a),s=n}else e[r-1]<t?(s=t-1,n=s-r+1):(n=t,s=n+r-1);o=this.hot.selection,i=this.hot.countCols()-1,o.setRangeStart(this.hot._createCellCoords(n,0)),o.setRangeEnd(this.hot._createCellCoords(s,i),!0)}isRowOrderChanged(e,t){return e.some(((e,r)=>e-r!==t))}}},46271:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(94241);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.PersistentState=n.PersistentState},94241:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(33997),i=n(r(91718)),a=n(r(54925));a.default.getSingleton().register("persistentStateSave"),a.default.getSingleton().register("persistentStateLoad"),a.default.getSingleton().register("persistentStateReset");const l="persistentState";t.PLUGIN_KEY=l;t.PLUGIN_PRIORITY=0;class u extends o.BasePlugin{constructor(){super(...arguments),(0,s.default)(this,"storage",void 0)}static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return 0}isEnabled(){return!!this.hot.getSettings()[l]}enablePlugin(){this.enabled||(this.storage||(this.storage=new i.default(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",((e,t)=>this.saveValue(e,t))),this.addHook("persistentStateLoad",((e,t)=>this.loadValue(e,t))),this.addHook("persistentStateReset",(()=>this.resetValue())),super.enablePlugin())}disablePlugin(){this.storage=void 0,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}loadValue(e,t){t.value=this.storage.loadValue(e)}saveValue(e,t){this.storage.saveValue(e,t)}resetValue(e){void 0===e?this.storage.resetAll():this.storage.reset(e)}destroy(){super.destroy()}}t.PersistentState=u},91718:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95735),r(95988);var s=n(r(93231)),o=r(98887);var i=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;(0,s.default)(this,"rootWindow",void 0),(0,s.default)(this,"prefix",void 0),(0,s.default)(this,"savedKeys",[]),this.rootWindow=t,this.prefix=e,this.loadSavedKeys()}saveValue(e,t){this.rootWindow.localStorage.setItem(`${this.prefix}_${e}`,JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}loadValue(e,t){const r=void 0===e?t:e,n=this.rootWindow.localStorage.getItem(`${this.prefix}_${r}`);return null===n?void 0:JSON.parse(n)}reset(e){this.rootWindow.localStorage.removeItem(`${this.prefix}_${e}`)}resetAll(){(0,o.arrayEach)(this.savedKeys,((e,t)=>{this.rootWindow.localStorage.removeItem(`${this.prefix}_${this.savedKeys[t]}`)})),this.clearSavedKeys()}loadSavedKeys(){const e=this.rootWindow.localStorage.getItem(`${this.prefix}__persistentStateKeys`),t="string"==typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}saveSavedKeys(){this.rootWindow.localStorage.setItem(`${this.prefix}__persistentStateKeys`,JSON.stringify(this.savedKeys))}clearSavedKeys(){this.savedKeys.length=0,this.saveSavedKeys()}};t.default=i},5280:(e,t,r)=>{"use strict";t.__esModule=!0,t.getPlugin=c,t.getPluginsNames=function(){return[...l.getItems(),...u.getItems()]},t.hasPlugin=function(e){return!!c(e)},t.registerPlugin=function(e,t,r){[e,t,r]=function(e,t,r){"function"==typeof e&&(e=(t=e).PLUGIN_KEY,r=t.PLUGIN_PRIORITY);return[e,t,r]}(e,t,r),void 0===c(e)&&function(e,t,r){const s=(0,n.toUpperCaseFirst)(e);if(h.hasItem(s))throw new Error(a(s));void 0===r?u.addItem(s):l.addItem(r,s);h.addItem(s,t)}(e,t,r)},r(60740);var n=r(37913),s=r(22111),o=r(8815),i=r(6344);const a=e=>`There is already registered "${e}" plugin.`,l=(0,s.createPriorityMap)({errorPriorityExists:e=>`There is already registered plugin on priority "${e}".`,errorPriorityNaN:e=>`The priority "${e}" is not a number.`}),u=(0,i.createUniqueSet)({errorItemExists:a}),h=(0,o.createUniqueMap)({errorIdExists:a});function c(e){const t=(0,n.toUpperCaseFirst)(e);return h.getItem(t)}},24:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(74639);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.Search=n.Search},74639:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(33997),i=r(76163),a=r(57691),l=r(97639);function u(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function h(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const c="search";t.PLUGIN_KEY=c;t.PLUGIN_PRIORITY=190;const d=function(e,t,r,n,s){e.getCellMeta(t,r).isSearchResult=s},f=function(e,t,r){return!((0,l.isUndefined)(e)||null===e||!e.toLocaleLowerCase||0===e.length)&&(!(0,l.isUndefined)(t)&&null!==t&&-1!==t.toString().toLocaleLowerCase(r.locale).indexOf(e.toLocaleLowerCase(r.locale)))};var p=new WeakSet;class g extends o.BasePlugin{constructor(){super(...arguments),u(this,p),(0,s.default)(this,"callback",d),(0,s.default)(this,"queryMethod",f),(0,s.default)(this,"searchResultClass","htSearchResult")}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return 190}isEnabled(){return this.hot.getSettings()[c]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[c];this.updatePluginSettings(t),this.addHook("beforeRenderer",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(e,p,m).call(e,...r)})),super.enablePlugin()}disablePlugin(){var e=this;const t=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(e,p,m).call(e,...r)};this.hot.addHook("beforeRenderer",t),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("beforeRenderer",t)})),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const n=this.hot.countRows(),s=this.hot.countCols(),o=[],i=this.hot;return(0,a.rangeEach)(0,n-1,(n=>{(0,a.rangeEach)(0,s-1,(s=>{const a=this.hot.getDataAtCell(n,s),l=this.hot.getCellMeta(n,s),u=l.search.callback||t,h=(l.search.queryMethod||r)(e,a,l);if(h){const e={row:n,col:s,data:a};o.push(e)}u&&u(i,n,s,a,h)}))})),o}getCallback(){return this.callback}setCallback(e){this.callback=e}getQueryMethod(){return this.queryMethod}setQueryMethod(e){this.queryMethod=e}getSearchResultClass(){return this.searchResultClass}setSearchResultClass(e){this.searchResultClass=e}updatePluginSettings(e){(0,i.isObject)(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}destroy(){super.destroy()}}function m(e,t,r,n,s,o){const i=o.className||[];let a=[];"string"==typeof i?a=i.split(" "):a.push(...i),this.isEnabled()&&o.isSearchResult?a.includes(this.searchResultClass)||a.push(`${this.searchResultClass}`):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),o.className=a.join(" ")}t.Search=g},8458:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(51111);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.TouchScroll=n.TouchScroll},51111:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=r(49587),i=r(98887),a=r(33997),l=r(6022);function u(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function h(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const c="touchScroll";t.PLUGIN_KEY=c;t.PLUGIN_PRIORITY=200;var d=new WeakSet,f=new WeakSet,p=new WeakSet;class g extends a.BasePlugin{constructor(){super(...arguments),u(this,p),u(this,f),u(this,d),(0,s.default)(this,"scrollbars",[]),(0,s.default)(this,"clones",[]),(0,s.default)(this,"lockedCollection",!1),(0,s.default)(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return 200}static get SETTING_KEYS(){return!0}isEnabled(){return(0,l.isTouchSupported)()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",(()=>h(this,d,m).call(this))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",(()=>h(this,f,E).call(this))),this.addHook("afterMomentumScroll",(()=>h(this,p,y).call(this)))}}function m(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:r,topInlineStartCornerOverlay:n,bottomInlineStartCornerOverlay:s}=this.hot.view._wt.wtOverlays;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(e),t.clone&&this.scrollbars.push(t),this.scrollbars.push(r),n&&this.scrollbars.push(n),s&&s.clone&&this.scrollbars.push(s),this.clones=[],e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),r.needFullRender&&this.clones.push(r.clone.wtTable.holder.parentNode),n&&this.clones.push(n.clone.wtTable.holder.parentNode),s&&s.clone&&this.clones.push(s.clone.wtTable.holder.parentNode)}function E(){this.freezeOverlays=!0,(0,i.arrayEach)(this.clones,(e=>{(0,o.addClass)(e,"hide-tween")}))}function y(){this.freezeOverlays=!1,(0,i.arrayEach)(this.clones,(e=>{(0,o.removeClass)(e,"hide-tween"),(0,o.addClass)(e,"show-tween")})),this.hot._registerTimeout((()=>{(0,i.arrayEach)(this.clones,(e=>{(0,o.removeClass)(e,"show-tween")}))}),400),(0,i.arrayEach)(this.scrollbars,(e=>{e.refresh(),e.resetFixedPosition()})),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}t.TouchScroll=g},80044:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(94821);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.TrimRows=n.TrimRows},94821:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(33997),i=r(41789),a=r(98887);function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}const u="trimRows";t.PLUGIN_KEY=u;t.PLUGIN_PRIORITY=330;var h=new WeakSet;class c extends o.BasePlugin{constructor(){super(...arguments),l(this,h),(0,s.default)(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return 330}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new i.TrimmingMap),this.trimmedRowsMap.addLocalHook("init",(()=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,h,d).call(this))),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[u];Array.isArray(e)&&this.hot.batchExecution((()=>{this.trimmedRowsMap.clear(),(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("trimRows"),super.disablePlugin()}getTrimmedRows(){return this.trimmedRowsMap.getTrimmedIndexes()}trimRows(e){const t=this.getTrimmedRows(),r=this.isValidConfig(e);let n=t;r&&(n=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeTrimRow",t,n,r)&&(r&&this.hot.batchExecution((()=>{(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),this.hot.runHooks("afterTrimRow",t,n,r,r&&n.length>t.length))}trimRow(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.trimRows(t)}untrimRows(e){const t=this.getTrimmedRows(),r=this.isValidConfig(e);let n=t;const s=this.trimmedRowsMap.getValues().slice(),o=e.length>0;r&&o&&((0,a.arrayEach)(e,(e=>{s[e]=!1})),n=(0,a.arrayReduce)(s,((e,t,r)=>(t&&e.push(r),e)),[]));!1!==this.hot.runHooks("beforeUntrimRow",t,n,r&&o)&&(r&&o&&this.trimmedRowsMap.setValues(s),this.hot.runHooks("afterUntrimRow",t,n,r&&o,r&&n.length<t.length))}untrimRow(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.untrimRows(t)}isTrimmed(e){return this.trimmedRowsMap.getValueAtIndex(e)||!1}untrimAll(){this.untrimRows(this.getTrimmedRows())}isValidConfig(e){const t=this.hot.countSourceRows();return e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}destroy(){super.destroy()}}function d(){const e=this.hot.getSettings()[u];Array.isArray(e)&&this.hot.batchExecution((()=>{(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0)}t.TrimRows=c},91515:(e,t,r)=>{"use strict";t.__esModule=!0;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(66677));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}t.UndoRedo=n.default,t.PLUGIN_KEY=n.PLUGIN_KEY},66677:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(54925)),o=r(98887),i=r(57691),a=r(76163),l=r(12208);const u="undoRedo",h="undoRedo";function c(e){const t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,this.enabled=!1,e.addHook("afterChange",(function(r,n){const s=r&&r.length;if(!s)return;if(!r.find((e=>{const[,,t,r]=e;return t!==r})))return;t.done((()=>{const t=r.reduce(((e,t)=>(e.push([...t]),e)),[]);(0,o.arrayEach)(t,(t=>{t[1]=e.propToCol(t[1])}));const n=s>1?this.getSelected():[[t[0][0],t[0][1]]];return new c.ChangeAction(t,n)}),n)})),e.addHook("afterCreateRow",((e,r,n)=>{t.done((()=>new c.CreateRowAction(e,r)),n)})),e.addHook("beforeRemoveRow",((r,n,s,o)=>{t.done((()=>{const s=e.toPhysicalRow(r),o=(0,a.deepClone)(t.instance.getSourceData(s,0,s+n-1,t.instance.countSourceCols()-1));return new c.RemoveRowAction(s,o,e.getSettings().fixedRowsBottom,e.getSettings().fixedRowsTop,e.rowIndexMapper.getIndexesSequence())}),o)})),e.addHook("afterCreateCol",((e,r,n)=>{t.done((()=>new c.CreateColumnAction(e,r)),n)})),e.addHook("beforeRemoveCol",((r,n,s,o)=>{t.done((()=>{const s=t.instance.getSourceDataArray(),o=(t.instance.countCols()+r)%t.instance.countCols(),a=[],l=[],u=[];(0,i.rangeEach)(s.length-1,(t=>{const r=[],l=s[t];(0,i.rangeEach)(o,o+(n-1),(t=>{r.push(l[e.toPhysicalColumn(t)])})),a.push(r)})),(0,i.rangeEach)(n-1,(t=>{u.push(e.toPhysicalColumn(o+t))})),Array.isArray(e.getSettings().colHeaders)&&(0,i.rangeEach)(n-1,(t=>{l.push(e.getSettings().colHeaders[e.toPhysicalColumn(o+t)]||null)}));const h=e.columnIndexMapper.getIndexesSequence(),d=e.rowIndexMapper.getIndexesSequence();return new c.RemoveColumnAction(o,u,a,l,h,d,e.getSettings().fixedColumnsStart)}),o)})),e.addHook("beforeCellAlignment",((e,r,n,s)=>{t.done((()=>new c.CellAlignmentAction(e,r,n,s)))})),e.addHook("beforeFilter",(e=>{t.done((()=>new c.FiltersAction(e)))})),e.addHook("beforeRowMove",((e,r)=>{!1!==e&&t.done((()=>new c.RowMoveAction(e,r)))})),e.addHook("beforeMergeCells",((r,n)=>{n||t.done((()=>new c.MergeCellsAction(e,r)))})),e.addHook("afterUnmergeCells",((r,n)=>{n||t.done((()=>new c.UnmergeCellsAction(e,r)))})),e.addHook("afterInit",(()=>{t.init()}))}t.PLUGIN_KEY=h,c.prototype.done=function(e,t){if(this.ignoreNewActions)return;if("UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t)return;const r=this.doneActions.slice();if(!1===this.instance.runHooks("beforeUndoStackChange",r,t))return;const n=e(),s=this.undoneActions.slice();this.doneActions.push(n),this.instance.runHooks("afterUndoStackChange",r,this.doneActions.slice()),this.instance.runHooks("beforeRedoStackChange",s),this.undoneActions.length=0,this.instance.runHooks("afterRedoStackChange",s,this.undoneActions.slice())},c.prototype.undo=function(){if(this.isUndoAvailable()){const e=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",e);const t=this.doneActions.pop();this.instance.runHooks("afterUndoStackChange",e,this.doneActions.slice());const r=(0,a.deepClone)(t);if(!1===this.instance.runHooks("beforeUndo",r))return;this.ignoreNewActions=!0;const n=this,s=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",s),t.undo(this.instance,(()=>{n.ignoreNewActions=!1,n.undoneActions.push(t)})),this.instance.runHooks("afterRedoStackChange",s,this.undoneActions.slice()),this.instance.runHooks("afterUndo",r)}},c.prototype.redo=function(){if(this.isRedoAvailable()){const e=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",e);const t=this.undoneActions.pop();this.instance.runHooks("afterRedoStackChange",e,this.undoneActions.slice());const r=(0,a.deepClone)(t);if(!1===this.instance.runHooks("beforeRedo",r))return;this.ignoreNewActions=!0;const n=this,s=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",s),t.redo(this.instance,(()=>{n.ignoreNewActions=!1,n.doneActions.push(t)})),this.instance.runHooks("afterUndoStackChange",s,this.doneActions.slice()),this.instance.runHooks("afterRedo",r)}},c.prototype.isUndoAvailable=function(){return this.doneActions.length>0},c.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},c.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},c.prototype.isEnabled=function(){return this.enabled},c.prototype.enable=function(){if(this.isEnabled())return;const e=this.instance;var t;this.enabled=!0,(t=e).undo=function(){return t.undoRedo.undo()},t.redo=function(){return t.undoRedo.redo()},t.isUndoAvailable=function(){return t.undoRedo.isUndoAvailable()},t.isRedoAvailable=function(){return t.undoRedo.isRedoAvailable()},t.clearUndo=function(){return t.undoRedo.clear()},this.registerShortcuts(),e.addHook("afterChange",p)},c.prototype.disable=function(){if(!this.isEnabled())return;const e=this.instance;var t;this.enabled=!1,delete(t=e).undo,delete t.redo,delete t.isUndoAvailable,delete t.isRedoAvailable,delete t.clearUndo,this.unregisterShortcuts(),e.removeHook("afterChange",p)},c.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null},c.Action=function(){},c.Action.prototype.undo=function(){},c.Action.prototype.redo=function(){},c.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},(0,a.inherit)(c.ChangeAction,c.Action),c.ChangeAction.prototype.undo=function(e,t){const r=(0,a.deepClone)(this.changes),n=e.countEmptyRows(!0),s=e.countEmptyCols(!0);for(let e=0,t=r.length;e<t;e++)r[e].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(r,null,null,"UndoRedo.undo");for(let t=0,o=r.length;t<o;t++){const[o,i]=r[t];e.getSettings().minSpareRows&&o+1+e.getSettings().minSpareRows===e.countRows()&&n===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(o+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&i+1+e.getSettings().minSpareCols===e.countCols()&&s===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(i+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())}e.selectCells(this.selected,!1,!1)},c.ChangeAction.prototype.redo=function(e,t){const r=(0,a.deepClone)(this.changes);for(let e=0,t=r.length;e<t;e++)r[e].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(r,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)},c.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},(0,a.inherit)(c.CreateRowAction,c.Action),c.CreateRowAction.prototype.undo=function(e,t){const r=e.countRows(),n=e.getSettings().minSpareRows;this.index>=r&&this.index-n<r&&(this.index-=n),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},c.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")},c.RemoveRowAction=function(e,t,r,n,s){this.index=e,this.data=t,this.actionType="remove_row",this.fixedRowsBottom=r,this.fixedRowsTop=n,this.rowIndexesSequence=s},(0,a.inherit)(c.RemoveRowAction,c.Action),c.RemoveRowAction.prototype.undo=function(e,t){const r=e.getSettings(),n=[];r.fixedRowsBottom=this.fixedRowsBottom,r.fixedRowsTop=this.fixedRowsTop,this.data.forEach(((e,t)=>{Object.keys(e).forEach((r=>{const s=parseInt(r,10);n.push([this.index+t,isNaN(s)?r:s,e[r]])}))})),e.alter("insert_row_above",this.index,this.data.length,"UndoRedo.undo"),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(n,null,null,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence)},c.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},c.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},(0,a.inherit)(c.CreateColumnAction,c.Action),c.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},c.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")},c.RemoveColumnAction=function(e,t,r,n,s,o,i){this.index=e,this.indexes=t,this.data=r,this.amount=this.data[0].length,this.headers=n,this.columnPositions=s.slice(0),this.rowPositions=o.slice(0),this.actionType="remove_col",this.fixedColumnsStart=i},(0,a.inherit)(c.RemoveColumnAction,c.Action),c.RemoveColumnAction.prototype.undo=function(e,t){e.getSettings().fixedColumnsStart=this.fixedColumnsStart;const r=this.indexes.slice(0).sort(),n=(e,t,n)=>n[this.indexes.indexOf(r[t])],s=this.data.length,i=[];for(let e=0;e<s;e++)i.push((0,o.arrayMap)(this.data[e],n));const a=(0,o.arrayMap)(this.headers,n),l=[];e.alter("insert_col_start",this.indexes[0],this.indexes.length,"UndoRedo.undo"),(0,o.arrayEach)(e.getSourceDataArray(),((e,t)=>{(0,o.arrayEach)(r,((r,n)=>{e[r]=i[t][n],l.push([t,r,e[r]])}))})),e.setSourceDataAtCell(l,void 0,void 0,"UndoRedo.undo"),void 0!==this.headers&&(0,o.arrayEach)(a,((t,n)=>{e.getSettings().colHeaders[r[n]]=t})),e.batchExecution((()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)}),!0),e.addHookOnce("afterViewRender",t),e.render()},c.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},c.CellAlignmentAction=function(e,t,r,n){this.stateBefore=e,this.range=t,this.type=r,this.alignment=n},c.CellAlignmentAction.prototype.undo=function(e,t){(0,o.arrayEach)(this.range,(t=>{t.forAll(((t,r)=>{t>=0&&r>=0&&e.setCellMeta(t,r,"className",this.stateBefore[t][r]||" htLeft")}))})),e.addHookOnce("afterViewRender",t),e.render()},c.CellAlignmentAction.prototype.redo=function(e,t){(0,l.align)(this.range,this.type,this.alignment,((t,r)=>e.getCellMeta(t,r)),((t,r,n,s)=>e.setCellMeta(t,r,n,s))),e.addHookOnce("afterViewRender",t),e.render()},c.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"},(0,a.inherit)(c.FiltersAction,c.Action),c.FiltersAction.prototype.undo=function(e,t){const r=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),r.conditionCollection.importAllConditions(this.conditionsStack.slice(0,this.conditionsStack.length-1)),r.filter()},c.FiltersAction.prototype.redo=function(e,t){const r=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),r.conditionCollection.importAllConditions(this.conditionsStack),r.filter()};class d extends c.Action{constructor(e,t){super(),this.cellRange=t;const r=this.cellRange.getTopStartCorner(),n=this.cellRange.getBottomEndCorner();this.rangeData=e.getData(r.row,r.col,n.row,n.col)}undo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.unmergeRange(this.cellRange,!0);const n=this.cellRange.getTopStartCorner();e.populateFromArray(n.row,n.col,this.rangeData,void 0,void 0,"MergeCells")}redo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.mergeRange(this.cellRange)}}c.MergeCellsAction=d;class f extends c.Action{constructor(e,t){super(),this.cellRange=t}undo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.mergeRange(this.cellRange,!0)}redo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.unmergeRange(this.cellRange,!0),e.render()}}function p(e,t){if("loadData"===t)return this.undoRedo.clear()}c.UnmergeCellsAction=f,c.RowMoveAction=function(e,t){this.rows=e.slice(),this.finalIndex=t,this.actionType="row_move"},(0,a.inherit)(c.RowMoveAction,c.Action),c.RowMoveAction.prototype.undo=function(e,t){const r=e.getPlugin("manualRowMove"),n=[].concat(this.rows),s=n.filter((e=>e>this.finalIndex)),o=n.filter((e=>e<=this.finalIndex)),i=s.sort(((e,t)=>t-e)).concat(o.sort(((e,t)=>e-t)));e.addHookOnce("afterViewRender",t);for(let t=0;t<i.length;t+=1){const n=e.toVisualRow(i[t]);r.moveRow(n,i[t])}e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)},c.RowMoveAction.prototype.redo=function(e,t){const r=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),r.moveRows(this.rows.slice(),this.finalIndex),e.render(),e.deselectCell(),e.selectRows(this.finalIndex,this.finalIndex+this.rows.length-1)},c.prototype.init=function(){const e=this.instance.getSettings().undo,t=void 0===e||e;this.instance.undoRedo||(this.instance.undoRedo=this),t?this.instance.undoRedo.enable():this.instance.undoRedo.disable()},c.prototype.registerShortcuts=function(){const e=this.instance.getShortcutManager().getContext("grid"),t={runOnlyIf:e=>!e.altKey,group:u};e.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],t)},c.prototype.unregisterShortcuts=function(){this.instance.getShortcutManager().getContext("grid").removeShortcutsByGroup(u)};const g=s.default.getSingleton();g.add("afterUpdateSettings",(function(){var e;null===(e=this.getPlugin("undoRedo"))||void 0===e||e.init()})),g.register("beforeUndo"),g.register("afterUndo"),g.register("beforeRedo"),g.register("afterRedo"),c.PLUGIN_KEY=h,c.SETTING_KEYS=!0;var m=c;t.default=m},87396:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllModules=function(){(0,n.registerAllEditors)(),(0,s.registerAllRenderers)(),(0,o.registerAllValidators)(),(0,i.registerAllCellTypes)(),(0,a.registerAllPlugins)()};var n=r(5944);t.registerAllEditors=n.registerAllEditors;var s=r(19433);t.registerAllRenderers=s.registerAllRenderers;var o=r(65967);t.registerAllValidators=o.registerAllValidators;var i=r(419);t.registerAllCellTypes=i.registerAllCellTypes;var a=r(6191);t.registerAllPlugins=a.registerAllPlugins},36330:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.autocompleteRenderer=h;var s=r(36017),o=r(26031),i=n(r(57340)),a=r(49587);r(67004);var l=r(66862);const u="autocomplete";function h(e,t,r,n,u,h,c){const{rootDocument:d}=e,f=c.allowHtml?s.htmlRenderer:o.textRenderer,p=d.createElement("DIV"),g=e.getSettings().ariaTags;if(p.className="htAutocompleteArrow",g&&p.setAttribute(...(0,l.A11Y_HIDDEN)()),p.appendChild(d.createTextNode(String.fromCharCode(9660))),f.apply(this,[e,t,r,n,u,h,c]),t.firstChild||t.appendChild(d.createTextNode(String.fromCharCode(160))),t.insertBefore(p,t.firstChild),(0,a.addClass)(t,"htAutocomplete"),g&&t.setAttribute(...(0,l.A11Y_HASPOPUP)("listbox")),!e.acArrowListener){const s=new i.default(e);e.acArrowListener=function(s){(0,a.hasClass)(s.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(r,n),t)},s.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(()=>{s.destroy()}))}}t.RENDERER_TYPE=u,h.RENDERER_TYPE=u},20395:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(36330);t.RENDERER_TYPE=n.RENDERER_TYPE,t.autocompleteRenderer=n.autocompleteRenderer},15052:(e,t,r)=>{"use strict";t.__esModule=!0,t.baseRenderer=i,r(95988);var n=r(49587),s=r(66862);const o="base";function i(e,t,r,o,i,a,l){const u=l.ariaTags,h=[],c=[],d=[],f=[];l.className&&(0,n.addClass)(t,l.className),l.readOnly?(h.push(l.readOnlyCellClassName),u&&f.push((0,s.A11Y_READONLY)())):u&&d.push((0,s.A11Y_READONLY)()[0]),!1===l.valid&&l.invalidCellClassName?(h.push(l.invalidCellClassName),u&&f.push((0,s.A11Y_INVALID)())):(c.push(l.invalidCellClassName),u&&d.push((0,s.A11Y_INVALID)()[0])),!1===l.wordWrap&&l.noWordWrapClassName&&h.push(l.noWordWrapClassName),!a&&l.placeholder&&h.push(l.placeholderCellClassName),(0,n.removeClass)(t,c),(0,n.addClass)(t,h),(0,n.removeAttribute)(t,d),(0,n.setAttribute)(t,f)}t.RENDERER_TYPE=o,i.RENDERER_TYPE=o},21755:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(15052);t.RENDERER_TYPE=n.RENDERER_TYPE,t.baseRenderer=n.baseRenderer},31494:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.checkboxRenderer=w,r(95988);var s=r(21755),o=n(r(57340)),i=r(49587),a=r(97639),l=r(51377),u=n(r(54925)),h=r(66862),c=r(497);r(51768);const d=new WeakMap,f=new WeakMap,p="htBadValue",g="data-row",m="data-col",E="checkboxRenderer",y="checkbox";function w(e,t,r,n,u,y,w){const{rootDocument:v}=e,R=e.getSettings().ariaTags;s.baseRenderer.apply(this,[e,t,r,n,u,y,w]),function(e){let t=f.get(e);if(!t){const{rootElement:r}=e;t=new o.default(e),t.addEventListener(r,"click",(t=>function(e,t){const{target:r}=e;if(!C(r))return;if(!r.hasAttribute(g)||!r.hasAttribute(m))return;const n=parseInt(r.getAttribute(g),10),s=parseInt(r.getAttribute(m),10),o=t.getCellMeta(n,s);o.readOnly&&e.preventDefault()}(t,e))),t.addEventListener(r,"mouseup",(t=>function(e,t){const{target:r}=e;if(!C(r))return;if(!r.hasAttribute(g)||!r.hasAttribute(m))return;setTimeout(t.listen,10)}(t,e))),t.addEventListener(r,"change",(t=>function(e,t){const{target:r}=e;if(!C(r))return;if(!r.hasAttribute(g)||!r.hasAttribute(m))return;const n=parseInt(r.getAttribute(g),10),s=parseInt(r.getAttribute(m),10),o=t.getCellMeta(n,s);if(!o.readOnly){let r=null;r=e.target.checked?void 0===o.uncheckedTemplate||o.checkedTemplate:void 0!==o.uncheckedTemplate&&o.uncheckedTemplate,t.setDataAtCell(n,s,r)}}(t,e))),f.set(e,t)}}(e);let S=function(e){const t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("autocomplete","off"),t.setAttribute("tabindex","-1"),t.cloneNode(!1)}(v);const T=w.label;let N=!1;if(void 0===w.checkedTemplate&&(w.checkedTemplate=!0),void 0===w.uncheckedTemplate&&(w.uncheckedTemplate=!1),(0,i.empty)(t),y===w.checkedTemplate||(0,a.stringify)(y).toLocaleLowerCase(w.locale)===(0,a.stringify)(w.checkedTemplate).toLocaleLowerCase(w.locale)?S.checked=!0:y===w.uncheckedTemplate||(0,a.stringify)(y).toLocaleLowerCase(w.locale)===(0,a.stringify)(w.uncheckedTemplate).toLocaleLowerCase(w.locale)?S.checked=!1:(0,a.isEmpty)(y)?(0,i.addClass)(S,"noValue"):(S.style.display="none",(0,i.addClass)(S,p),N=!0),(0,i.setAttribute)(S,[[g,r],[m,n]]),R&&(0,i.setAttribute)(S,[(0,h.A11Y_LABEL)(S.checked?e.getTranslatedPhrase(c.CHECKBOX_CHECKED):e.getTranslatedPhrase(c.CHECKBOX_UNCHECKED)),(0,h.A11Y_CHECKED)(S.checked),(0,h.A11Y_CHECKBOX)()]),!N&&T){let s="";if(T.value)s="function"==typeof T.value?T.value.call(this,r,n,u,y):T.value;else if(T.property){const t=e.getDataAtRowProp(r,T.property);s=null!==t?t:""}const o=function(e,t,r){const n=e.createElement("label");return n.className="htCheckboxRendererLabel "+(r?"fullWidth":""),n.appendChild(e.createTextNode(t)),n.cloneNode(!0)}(v,s,!0!==T.separated);"before"===T.position?T.separated?(t.appendChild(o),t.appendChild(S)):(o.appendChild(S),S=o):T.position&&"after"!==T.position||(T.separated?(t.appendChild(S),t.appendChild(o)):(o.insertBefore(S,o.firstChild),S=o))}function O(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const r=e.getSelectedRange();if(r)for(let n=0;n<r.length;n++){const{row:s,col:o}=r[n].getTopStartCorner(),{row:i,col:a}=r[n].getBottomEndCorner(),l=[];for(let r=s;r<=i;r+=1)for(let n=o;n<=a;n+=1){const s=e.getCellMeta(r,n);if("checkbox"!==s.type)return;if(!0===s.readOnly)continue;void 0===s.checkedTemplate&&(s.checkedTemplate=!0),void 0===s.uncheckedTemplate&&(s.uncheckedTemplate=!1);const o=e.getDataAtCell(r,n);!1===t?[s.checkedTemplate,s.checkedTemplate.toString()].includes(o)?l.push([r,n,s.uncheckedTemplate]):[s.uncheckedTemplate,s.uncheckedTemplate.toString(),null,void 0].includes(o)&&l.push([r,n,s.checkedTemplate]):l.push([r,n,s.uncheckedTemplate])}l.length>0&&e.setDataAtCell(l)}}function M(){const t=e.getSelectedRange();if(t){for(let r=0;r<t.length;r++){const n=t[r].getTopStartCorner(),s=t[r].getBottomEndCorner();for(let t=n.row;t<=s.row;t++)for(let r=n.col;r<=s.col;r++){const n=e.getCellMeta(t,r);if("checkbox"!==n.type)return!1;const s=e.getCell(t,r);if(null==s)return!0;if(s.querySelectorAll("input[type=checkbox]").length>0&&!n.readOnly)return!0}}return!1}}(!T||T&&!T.separated)&&t.appendChild(S),N&&t.appendChild(v.createTextNode("#bad-value#")),d.has(e)||(d.set(e,!0),function(){const t=e.getShortcutManager().getContext("grid"),r={group:E};t.addShortcuts([{keys:[["space"]],callback:()=>(O(),!M())},{keys:[["enter"]],callback:()=>(O(),!M()),runOnlyIf:()=>e.getSettings().enterBeginsEditing},{keys:[["delete"],["backspace"]],callback:()=>(O(!0),!M()),relativeToGroup:l.EDITOR_EDIT_GROUP,position:"before"}],r)}())}function C(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}t.RENDERER_TYPE=y,u.default.getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,r){const{label:n,type:s,row:o,column:i,prop:a}=t;if(s===y){if(n){const{value:t,property:s}=n;let l=r;if(t)l="function"==typeof t?t(o,i,a,r):t;else if(s){const e=this.getDataAtRowProp(o,s);l=null!==e?e:r}e=l}return e}})),w.RENDERER_TYPE=y},30201:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(31494);t.RENDERER_TYPE=n.RENDERER_TYPE,t.checkboxRenderer=n.checkboxRenderer},7066:(e,t,r)=>{"use strict";t.__esModule=!0,t.dateRenderer=a;var n=r(20395),s=r(66862),o=r(49587);const i="date";function a(e,t,r,i,a,l,u){n.autocompleteRenderer.apply(this,[e,t,r,i,a,l,u]),e.getSettings().ariaTags&&(0,o.setAttribute)(t,[(0,s.A11Y_HASPOPUP)("dialog"),(0,s.A11Y_EXPANDED)("false")])}t.RENDERER_TYPE=i,a.RENDERER_TYPE=i},61795:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(7066);t.RENDERER_TYPE=n.RENDERER_TYPE,t.dateRenderer=n.dateRenderer},25708:(e,t,r)=>{"use strict";t.__esModule=!0,t.handsontableRenderer=a;var n=r(20395),s=r(66862),o=r(49587);const i="handsontable";function a(e,t,r,i,a,l,u){n.autocompleteRenderer.apply(this,[e,t,r,i,a,l,u]),e.getSettings().ariaTags&&(0,o.setAttribute)(t,[(0,s.A11Y_HASPOPUP)("true"),(0,s.A11Y_EXPANDED)("false")])}t.RENDERER_TYPE=i,a.RENDERER_TYPE=i},75067:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(25708);t.RENDERER_TYPE=n.RENDERER_TYPE,t.handsontableRenderer=n.handsontableRenderer},54914:(e,t,r)=>{"use strict";t.__esModule=!0,t.htmlRenderer=i;var n=r(21755),s=r(49587);const o="html";function i(e,t,r,o,i,a,l){n.baseRenderer.apply(this,[e,t,r,o,i,a,l]),(0,s.fastInnerHTML)(t,null==a?"":a,!1)}t.RENDERER_TYPE=o,i.RENDERER_TYPE=o},36017:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(54914);t.RENDERER_TYPE=n.RENDERER_TYPE,t.htmlRenderer=n.htmlRenderer},19433:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllRenderers=function(){(0,c.registerRenderer)(n.autocompleteRenderer),(0,c.registerRenderer)(s.baseRenderer),(0,c.registerRenderer)(o.checkboxRenderer),(0,c.registerRenderer)(i.htmlRenderer),(0,c.registerRenderer)(a.numericRenderer),(0,c.registerRenderer)(l.passwordRenderer),(0,c.registerRenderer)(u.textRenderer),(0,c.registerRenderer)(h.timeRenderer)};var n=r(20395);t.autocompleteRenderer=n.autocompleteRenderer,t.AUTOCOMPLETE_RENDERER=n.RENDERER_TYPE;var s=r(21755);t.baseRenderer=s.baseRenderer,t.BASE_RENDERER=s.RENDERER_TYPE;var o=r(30201);t.checkboxRenderer=o.checkboxRenderer,t.CHECKBOX_RENDERER=o.RENDERER_TYPE;var i=r(36017);t.htmlRenderer=i.htmlRenderer,t.HTML_RENDERER=i.RENDERER_TYPE;var a=r(94350);t.numericRenderer=a.numericRenderer,t.NUMERIC_RENDERER=a.RENDERER_TYPE;var l=r(32991);t.passwordRenderer=l.passwordRenderer,t.PASSWORD_RENDERER=l.RENDERER_TYPE;var u=r(26031);t.textRenderer=u.textRenderer,t.TEXT_RENDERER=u.RENDERER_TYPE;var h=r(78279);t.timeRenderer=h.timeRenderer,t.TIME_RENDERER=h.RENDERER_TYPE;var c=r(36996);t.registerRenderer=c.registerRenderer,t.getRegisteredRendererNames=c.getRegisteredRendererNames,t.getRegisteredRenderers=c.getRegisteredRenderers,t.getRenderer=c.getRenderer,t.hasRenderer=c.hasRenderer},94350:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(65677);t.RENDERER_TYPE=n.RENDERER_TYPE,t.numericRenderer=n.numericRenderer},65677:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.numericRenderer=l,r(95988);var s=n(r(75586)),o=r(26031),i=r(57691);const a="numeric";function l(e,t,r,n,a,l,u){let h=l;if((0,i.isNumeric)(h)){const e=u.numericFormat,r=e&&e.culture||"-",n=e&&e.pattern,o=u.className||"",i=o.length?o.split(" "):[];if(void 0!==r&&!s.default.languages()[r]){const e=r.replace("-",""),t=s.default.allLanguages?s.default.allLanguages[r]:s.default[e];t&&s.default.registerLanguage(t)}s.default.setLanguage(r),h=(0,s.default)(h).format(n||"0"),i.indexOf("htLeft")<0&&i.indexOf("htCenter")<0&&i.indexOf("htRight")<0&&i.indexOf("htJustify")<0&&i.push("htRight"),i.indexOf("htNumeric")<0&&i.push("htNumeric"),u.className=i.join(" "),t.dir="ltr"}(0,o.textRenderer)(e,t,r,n,a,h,u)}t.RENDERER_TYPE=a,l.RENDERER_TYPE=a},32991:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(88090);t.RENDERER_TYPE=n.RENDERER_TYPE,t.passwordRenderer=n.passwordRenderer},88090:(e,t,r)=>{"use strict";t.__esModule=!0,t.passwordRenderer=a;var n=r(26031),s=r(49587),o=r(57691);const i="password";function a(e,t,r,i,a,l,u){n.textRenderer.apply(this,[e,t,r,i,a,l,u]);const h=u.hashLength||t.innerHTML.length,c=u.hashSymbol||"*";let d="";(0,o.rangeEach)(h-1,(()=>{d+=c})),(0,s.fastInnerHTML)(t,d)}t.RENDERER_TYPE=i,a.RENDERER_TYPE=i},36996:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getRenderer=function(e){if("function"==typeof e)return e;if(!a(e))throw Error(`No registered renderer found under "${e}" name`);return i(e)},t.registerRenderer=function(e,t){"string"!=typeof e&&(e=(t=e).RENDERER_TYPE);o(e,t)},r(60740);var s=n(r(31056));const{register:o,getItem:i,hasItem:a,getNames:l,getValues:u}=(0,s.default)("renderers");t.getRegisteredRenderers=u,t.getRegisteredRendererNames=l,t.hasRenderer=a},9126:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(3145);t.RENDERER_TYPE=n.RENDERER_TYPE,t.selectRenderer=n.selectRenderer},3145:(e,t,r)=>{"use strict";t.__esModule=!0,t.selectRenderer=a;var n=r(26031),s=r(66862),o=r(49587);const i="select";function a(e,t,r,i,a,l,u){n.textRenderer.apply(this,[e,t,r,i,a,l,u]),e.getSettings().ariaTags&&(0,o.setAttribute)(t,...(0,s.A11Y_HASPOPUP)("listbox"))}t.RENDERER_TYPE=i,a.RENDERER_TYPE=i},26031:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(80071);t.RENDERER_TYPE=n.RENDERER_TYPE,t.textRenderer=n.textRenderer},80071:(e,t,r)=>{"use strict";t.__esModule=!0,t.textRenderer=a;var n=r(21755),s=r(49587),o=r(97639);const i="text";function a(e,t,r,i,a,l,u){n.baseRenderer.apply(this,[e,t,r,i,a,l,u]);let h=l;if(!h&&u.placeholder&&(h=u.placeholder),h=(0,o.stringify)(h),u.trimWhitespace&&(h=h.trim()),u.rendererTemplate){(0,s.empty)(t);const n=e.rootDocument.createElement("TEMPLATE");n.setAttribute("bind","{{}}"),n.innerHTML=u.rendererTemplate,HTMLTemplateElement.decorate(n),n.model=e.getSourceDataAtRow(r),t.appendChild(n)}else(0,s.fastInnerText)(t,h)}t.RENDERER_TYPE=i,a.RENDERER_TYPE=i},78279:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(73874);t.RENDERER_TYPE=n.RENDERER_TYPE,t.timeRenderer=n.timeRenderer},73874:(e,t,r)=>{"use strict";t.__esModule=!0,t.timeRenderer=o;var n=r(26031);const s="time";function o(e,t,r,s,o,i,a){n.textRenderer.apply(this,[e,t,r,s,o,i,a]),t.dir="ltr"}t.RENDERER_TYPE=s,o.RENDERER_TYPE=s},41294:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(41418),i=r(75821),a=r(59616),l=r(15574),u=r(24413),h=r(37765),c=r(79456),d=r(66786),f=r(98309),p=r(94699);t.ACTIVE_HEADER_TYPE=p.HIGHLIGHT_ACTIVE_HEADER_TYPE,t.AREA_TYPE=p.HIGHLIGHT_AREA_TYPE,t.FOCUS_TYPE=p.HIGHLIGHT_FOCUS_TYPE,t.CUSTOM_SELECTION_TYPE=p.HIGHLIGHT_CUSTOM_SELECTION_TYPE,t.FILL_TYPE=p.HIGHLIGHT_FILL_TYPE,t.HEADER_TYPE=p.HIGHLIGHT_HEADER_TYPE,t.ROW_TYPE=p.HIGHLIGHT_ROW_TYPE,t.COLUMN_TYPE=p.HIGHLIGHT_COLUMN_TYPE;var g=r(98887);let m;function E(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var w=new WeakSet;m=Symbol.iterator;function C(e,t){const r=this.layerLevel;if(e.has(r))return e.get(r);const n=t({layerLevel:r,...this.options});return e.set(r,n),n}var v=class{constructor(e){E(this,w),(0,s.default)(this,"options",void 0),(0,s.default)(this,"layerLevel",0),(0,s.default)(this,"focus",void 0),(0,s.default)(this,"fill",void 0),(0,s.default)(this,"layeredAreas",new Map),(0,s.default)(this,"areas",new Map),(0,s.default)(this,"rowHeaders",new Map),(0,s.default)(this,"columnHeaders",new Map),(0,s.default)(this,"activeRowHeaders",new Map),(0,s.default)(this,"activeColumnHeaders",new Map),(0,s.default)(this,"activeCornerHeaders",new Map),(0,s.default)(this,"rowHighlights",new Map),(0,s.default)(this,"columnHighlights",new Map),(0,s.default)(this,"customSelections",[]),this.options=e,this.focus=(0,u.createHighlight)(e),this.fill=(0,c.createHighlight)(e)}isEnabledFor(e,t){let r=e;e===p.HIGHLIGHT_FOCUS_TYPE&&(r="current");let n=this.options.disabledCellSelection(t.row,t.col);return"string"==typeof n&&(n=[n]),!1===n||Array.isArray(n)&&!n.includes(r)}useLayerLevel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return y(this,w,C).call(this,this.layeredAreas,i.createHighlight)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return y(this,w,C).call(this,this.areas,a.createHighlight)}getAreas(){return[...this.areas.values()]}createRowHeader(){return y(this,w,C).call(this,this.rowHeaders,d.createHighlight)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return y(this,w,C).call(this,this.columnHeaders,d.createHighlight)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return y(this,w,C).call(this,this.activeRowHeaders,o.createHighlight)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return y(this,w,C).call(this,this.activeColumnHeaders,o.createHighlight)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return y(this,w,C).call(this,this.activeCornerHeaders,o.createHighlight)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return y(this,w,C).call(this,this.rowHighlights,f.createHighlight)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return y(this,w,C).call(this,this.columnHighlights,l.createHighlight)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push((0,h.createHighlight)({...this.options,...e}))}clear(){this.focus.clear(),this.fill.clear(),(0,g.arrayEach)(this.areas.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.layeredAreas.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.rowHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.columnHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.activeRowHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.activeColumnHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.activeCornerHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.rowHighlights.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.columnHighlights.values(),(e=>{e.clear()}))}[m](){return[this.focus,this.fill,...this.areas.values(),...this.layeredAreas.values(),...this.rowHeaders.values(),...this.columnHeaders.values(),...this.activeRowHeaders.values(),...this.activeColumnHeaders.values(),...this.activeCornerHeaders.values(),...this.rowHighlights.values(),...this.columnHighlights.values(),...this.customSelections][Symbol.iterator]()}};t.default=v},41418:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{activeHeaderClassName:t,...r}=e;return new o.default({className:t,...r,selectionType:s.HIGHLIGHT_ACTIVE_HEADER_TYPE})};var s=r(94699),o=n(r(6250))},59616:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new o.default({className:"highlight",...t,selectionType:s.HIGHLIGHT_AREA_TYPE})};var s=r(94699),o=n(r(6250))},75821:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{areaCornerVisible:t,...r}=e;return new o.default({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...r,selectionType:s.HIGHLIGHT_AREA_TYPE})};var s=r(94699),o=n(r(6250))},15574:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{columnClassName:t,...r}=e;return new o.default({className:t,...r,selectionType:s.HIGHLIGHT_COLUMN_TYPE})};var s=r(94699),o=n(r(6250))},37765:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{border:t,visualCellRange:r,...n}=e;return new o.default({...t,...n,selectionType:s.HIGHLIGHT_CUSTOM_SELECTION_TYPE},r)};var s=r(94699),o=n(r(6250))},79456:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new o.default({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:s.HIGHLIGHT_FILL_TYPE})};var s=r(94699),o=n(r(6250))},24413:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{cellCornerVisible:t,...r}=e;return new o.default({className:"current",border:{width:2,color:"#4b89ff",cornerVisible:t},...r,selectionType:s.HIGHLIGHT_FOCUS_TYPE})};var s=r(94699),o=n(r(6250))},66786:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{headerClassName:t,...r}=e;return new o.default({className:t,...r,selectionType:s.HIGHLIGHT_HEADER_TYPE})};var s=r(94699),o=n(r(6250))},98309:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{rowClassName:t,...r}=e;return new o.default({className:t,...r,selectionType:s.HIGHLIGHT_ROW_TYPE})};var s=r(94699),o=n(r(6250))},6250:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(94699);class i extends o.Selection{constructor(e,t){super(e,null),(0,s.default)(this,"visualCellRange",null),this.visualCellRange=t||null,this.commit()}add(e){return null===this.visualCellRange?this.visualCellRange=this.settings.createCellRange(e):this.visualCellRange.expand(e),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly(e){let{from:t,to:r}=e,n=this.getNearestNotHiddenCoords(t,1),s=this.getNearestNotHiddenCoords(r,-1);return null===n||null===s?null:((n.row>s.row||n.col>s.col)&&(n=t,s=r),this.settings.createCellRange(n,n,s))}getNearestNotHiddenCoords(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const n=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,e.row,t);if(null===n)return null;const s=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,r);return null===s?null:this.settings.createCellCoords(n,s)}getNearestNotHiddenIndex(e,t,r){return t<0?t:e.getNearestNotHiddenIndex(t,r)}commit(){if(null===this.visualCellRange)return this;const e=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return this.cellRange=null===e?null:this.createRenderableCellRange(e.from,e.to),this}syncWith(e){const t=e.from.clone().normalize(),r="N-S"===e.getVerticalDirection()?1:-1,n="W-E"===e.getHorizontalDirection()?1:-1,s=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let o=null;if(null!==s&&null!==s.col&&null!==s.row||(o=this.getNearestNotHiddenCoords(t,r,n)),null!==o&&e.overlaps(o)){const t=e.highlight.clone();if(t.row>=0&&(t.row=o.row),t.col>=0&&(t.col=o.col),null===this.cellRange){const e=this.settings.visualToRenderableCoords(t);this.cellRange=this.settings.createCellRange(e)}e.setHighlight(t)}return"focus"===this.settings.selectionType&&null!==s&&null===o&&e.setHighlight(this.visualCellRange.highlight),this}getCorners(){const{from:e,to:t}=this.cellRange;return[Math.min(e.row,t.row),Math.min(e.col,t.col),Math.max(e.row,t.row),Math.max(e.col,t.col)]}getVisualCorners(){const e=this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner()),t=this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());return[e.row,e.col,t.row,t.col]}createRenderableCellRange(e,t){const r=this.settings.visualToRenderableCoords(e),n=this.settings.visualToRenderableCoords(t);return null===r.row||null===r.col||null===n.row||null===n.col?null:this.settings.createCellRange(r,r,n)}}var a=i;t.default=a},79055:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s={Selection:!0,handleMouseEvent:!0,detectSelectionType:!0,normalizeSelectionFactory:!0},o=n(r(30392));t.Selection=o.default;var i=r(56740);t.handleMouseEvent=i.handleMouseEvent;var a=r(7763);t.detectSelectionType=a.detectSelectionType,t.normalizeSelectionFactory=a.normalizeSelectionFactory;var l=r(41294);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},56740:(e,t,r)=>{"use strict";t.__esModule=!0,t.handleMouseEvent=function(e,t){let{coords:r,selection:s,controller:o,cellCoordsFactory:a}=t;i.get(e.type)({coords:r,selection:s,controller:o,cellCoordsFactory:a,isShiftKey:e.shiftKey,isLeftClick:(0,n.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,n.isRightClick)(e)})},t.mouseDown=s,t.mouseOver=o;var n=r(30369);function s(e){let{isShiftKey:t,isLeftClick:r,isRightClick:n,coords:s,selection:o,controller:i,cellCoordsFactory:a}=e;const l=o.isSelected()?o.getSelectedRange().current():null,u=o.isSelectedByCorner(),h=o.isSelectedByRowHeader();if(t&&l)s.row>=0&&s.col>=0&&!i.cell?o.setRangeEnd(s):(u||h)&&s.row>=0&&s.col>=0&&!i.cell?o.setRangeEnd(a(s.row,s.col)):u&&s.row<0&&!i.column?o.setRangeEnd(a(l.to.row,s.col)):h&&s.col<0&&!i.row?o.setRangeEnd(a(s.row,l.to.col)):(!u&&!h&&s.col<0||u&&s.col<0)&&!i.row?o.selectRows(Math.max(l.from.row,0),s.row,s.col):(!u&&!h&&s.row<0||h&&s.row<0)&&!i.column&&o.selectColumns(Math.max(l.from.col,0),s.col,s.row);else{const e=!o.inInSelection(s),t=r||n&&e;s.row<0&&s.col>=0&&!i.column?t&&o.selectColumns(s.col,s.col,s.row):s.col<0&&s.row>=0&&!i.row?t&&o.selectRows(s.row,s.row,s.col):s.col>=0&&s.row>=0&&!i.cell?t&&o.setRangeStart(s):s.col<0&&s.row<0&&o.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}}function o(e){let{isLeftClick:t,coords:r,selection:n,controller:s,cellCoordsFactory:o}=e;if(!t)return;const i=n.isSelectedByRowHeader(),a=n.isSelectedByColumnHeader(),l=n.tableProps.countCols(),u=n.tableProps.countRows();a&&!s.column?n.setRangeEnd(o(u-1,r.col)):i&&!s.row?n.setRangeEnd(o(r.row,l-1)):s.cell||n.setRangeEnd(r)}const i=new Map([["mousedown",s],["mouseover",o],["touchstart",s]])},61764:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231));let o;o=Symbol.iterator;var i=class{constructor(e){(0,s.default)(this,"ranges",[]),(0,s.default)(this,"createCellRange",void 0),this.createCellRange=e}isEmpty(){return 0===this.size()}set(e){return this.clear(),this.ranges.push(this.createCellRange(e)),this}add(e){return this.ranges.push(this.createCellRange(e)),this}pop(){return this.ranges.pop(),this}current(){return this.peekByIndex(this.size()-1)}previous(){return this.peekByIndex(this.size()-2)}includes(e){return this.ranges.some((t=>t.includes(e)))}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}peekByIndex(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t>=0&&t<this.size()&&(e=this.ranges[t]),e}[o](){return this.ranges[Symbol.iterator]()}};t.default=i},30392:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=n(r(48427)),i=n(r(42538)),a=r(94699),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=w(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(41294)),u=n(r(61764)),h=r(76163),c=r(97639),d=r(57691),f=r(98887),p=n(r(63806)),g=n(r(64396)),m=r(7763),E=r(45561),y=r(66862);function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(w=function(e){return e?r:t})(e)}function C(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var v=new WeakMap;class R{constructor(e,t){var r=this;(0,s.default)(this,"settings",void 0),(0,s.default)(this,"tableProps",void 0),(0,s.default)(this,"inProgress",!1),(0,s.default)(this,"selectedRange",new u.default(((e,t,r)=>this.tableProps.createCellRange(e,t,r)))),(0,s.default)(this,"highlight",void 0),(0,s.default)(this,"transformation",void 0),(0,s.default)(this,"selectedByRowHeader",new Set),(0,s.default)(this,"selectedByColumnHeader",new Set),C(this,v,{writable:!0,value:!1}),this.settings=e,this.tableProps=t,this.highlight=new l.default({headerClassName:e.currentHeaderClassName,headerAttributes:[(0,y.A11Y_SELECTED)()],activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[(0,y.A11Y_SELECTED)()],rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(e,t)=>this.tableProps.isDisabledCellSelection(e,t),cellCornerVisible:function(){return r.isCellCornerVisible(...arguments)},areaCornerVisible:function(){return r.isAreaCornerVisible(...arguments)},visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),createCellRange:(e,t,r)=>this.tableProps.createCellRange(e,t,r)}),this.transformation=new g.default(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>this.tableProps.countRenderableRows(),countRenderableColumns:()=>this.tableProps.countRenderableColumns(),countRowHeaders:()=>this.tableProps.countRowHeaders(),countColHeaders:()=>this.tableProps.countColHeaders(),visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),navigableHeaders:()=>e.navigableHeaders,fixedRowsBottom:()=>e.fixedRowsBottom,minSpareRows:()=>e.minSpareRows,minSpareCols:()=>e.minSpareCols,autoWrapRow:()=>e.autoWrapRow,autoWrapCol:()=>e.autoWrapCol}),this.transformation.addLocalHook("beforeTransformStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeModifyTransformStart",...t)})),this.transformation.addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("afterModifyTransformStart",...t)})),this.transformation.addLocalHook("beforeTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeModifyTransformEnd",...t)})),this.transformation.addLocalHook("afterTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("afterModifyTransformEnd",...t)})),this.transformation.addLocalHook("insertRowRequire",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("insertRowRequire",...t)})),this.transformation.addLocalHook("insertColRequire",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("insertColRequire",...t)})),this.transformation.addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeRowWrap",...t)})),this.transformation.addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeColumnWrap",...t)}))}getSelectedRange(){return this.selectedRange}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1}isInProgress(){return this.inProgress}setRangeStart(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e;const s="multiple"===this.settings.selectionMode,o=(0,c.isUndefined)(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,i=e.clone();this.runLocalHooks("beforeSetRangeStart"+(r?"Only":""),i),(!s||s&&!o&&(0,c.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(i).current().setHighlight(n.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),r||this.setRangeEnd(e)}setRangeStartOnly(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;this.setRangeStart(e,t,!0,r)}setRangeEnd(e){if(this.selectedRange.isEmpty())return;const t=e.clone(),r=this.tableProps.countRows(),n=this.tableProps.countCols(),s=this.selectedRange.current().clone().setTo(e).isSingleHeader();if((r>0||n>0)&&(0===r&&t.col<0&&!s||0===n&&t.row<0&&!s))return;this.runLocalHooks("beforeSetRangeEnd",t),this.begin();const o=this.selectedRange.current();this.settings.navigableHeaders||o.highlight.normalize(),"single"===this.settings.selectionMode?(o.setFrom(o.highlight),o.setTo(o.highlight)):o.setTo(t),r>0&&n>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!o.isSingleHeader())&&o.to.normalize(),this.runLocalHooks("beforeHighlightSet");const a=this.highlight.getFocus();a.clear(),this.highlight.isEnabledFor(l.FOCUS_TYPE,o.highlight)&&a.add(this.selectedRange.current().highlight).commit().syncWith(o);const u=this.getLayerLevel();u<this.highlight.layerLevel&&((0,f.arrayEach)(this.highlight.getAreas(),(e=>{e.clear()})),(0,f.arrayEach)(this.highlight.getLayeredAreas(),(e=>{e.clear()})),(0,f.arrayEach)(this.highlight.getRowHeaders(),(e=>{e.clear()})),(0,f.arrayEach)(this.highlight.getColumnHeaders(),(e=>{e.clear()})),(0,f.arrayEach)(this.highlight.getActiveRowHeaders(),(e=>{e.clear()})),(0,f.arrayEach)(this.highlight.getActiveColumnHeaders(),(e=>{e.clear()})),(0,f.arrayEach)(this.highlight.getActiveCornerHeaders(),(e=>{e.clear()})),(0,f.arrayEach)(this.highlight.getRowHighlights(),(e=>{e.clear()})),(0,f.arrayEach)(this.highlight.getColumnHighlights(),(e=>{e.clear()}))),this.highlight.useLayerLevel(u);const h=this.highlight.createArea(),c=this.highlight.createLayeredArea(),d=this.highlight.createRowHeader(),p=this.highlight.createColumnHeader(),g=this.highlight.createActiveRowHeader(),m=this.highlight.createActiveColumnHeader(),E=this.highlight.createActiveCornerHeader(),y=this.highlight.createRowHighlight(),w=this.highlight.createColumnHighlight();if(h.clear(),c.clear(),d.clear(),p.clear(),g.clear(),m.clear(),E.clear(),y.clear(),w.clear(),this.highlight.isEnabledFor(l.AREA_TYPE,o.highlight)&&(this.isMultiple()||u>=1)&&(h.add(o.from).add(o.to).commit(),c.add(o.from).add(o.to).commit(),1===u)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(u-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(u)}if(this.highlight.isEnabledFor(l.HEADER_TYPE,o.highlight)){if(!o.isSingleHeader()){const e=this.tableProps.createCellCoords(Math.max(o.from.row,0),-1),t=this.tableProps.createCellCoords(o.to.row,-1),r=this.tableProps.createCellCoords(-1,Math.max(o.from.col,0)),n=this.tableProps.createCellCoords(-1,o.to.col);"single"===this.settings.selectionMode?(d.add(e).commit(),p.add(r).commit(),y.add(e).commit(),w.add(r).commit()):(d.add(e).add(t).commit(),p.add(r).add(n).commit(),y.add(e).add(t).commit(),w.add(r).add(n).commit())}const e=!(0,i.default)(this,v)&&this.isEntireRowSelected()&&(n>0&&n===o.getWidth()||0===n&&this.isSelectedByRowHeader()),t=!(0,i.default)(this,v)&&this.isEntireColumnSelected()&&(r>0&&r===o.getHeight()||0===r&&this.isSelectedByColumnHeader());e&&g.add(this.tableProps.createCellCoords(Math.max(o.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(o.to.row,0),-1)).commit(),t&&m.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(o.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(o.to.col,0))).commit(),e&&t&&E.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}this.runLocalHooks("afterSetRangeEnd",e)}isMultiple(){const e=(0,h.createObjectPropListener)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}transformStart(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.setRangeStart(this.transformation.transformStart(e,t,r))}transformEnd(e,t){this.setRangeEnd(this.transformation.transformEnd(e,t))}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isSelectedByRowHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner(e)&&(-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e))}isEntireRowSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{col:t}=e.getOuterTopStartCorner(),r=this.tableProps.countRowHeaders(),n=this.tableProps.countCols();return(r>0&&t<0||0===r)&&e.getWidth()===n};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const r=this.selectedRange.peekByIndex(e);return!!r&&t(r)}isSelectedByColumnHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner()&&(-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e))}isEntireColumnSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{row:t}=e.getOuterTopStartCorner(),r=this.tableProps.countColHeaders(),n=this.tableProps.countRows();return(r>0&&t<0||0===r)&&e.getHeight()===n};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const r=this.selectedRange.peekByIndex(e);return!!r&&t(r)}isSelectedByAnyHeader(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}isSelectedByCorner(){return this.selectedByColumnHeader.has(this.getLayerLevel())&&this.selectedByRowHeader.has(this.getLayerLevel())}inInSelection(e){return this.selectedRange.includes(e)}isCellCornerVisible(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}isAreaCornerVisible(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}clear(){this.selectedRange.clear(),this.highlight.clear()}deselect(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}selectAll(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{focusPosition:!1,disableHeadersHighlight:!1};const s=this.tableProps.countRows(),i=this.tableProps.countCols(),a=this.tableProps.countRowHeaders(),l=this.tableProps.countColHeaders(),u=r?-l:0,h=t?-a:0;if(0===u&&0===h&&(0===s||0===i))return;let c=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight;const{focusPosition:f,disableHeadersHighlight:p}=n;(0,o.default)(this,v,p),f&&Number.isInteger(null==f?void 0:f.row)&&Number.isInteger(null==f?void 0:f.col)&&(c=this.tableProps.createCellCoords((0,d.clamp)(f.row,u,s-1),(0,d.clamp)(f.col,h,i-1)));const g=this.tableProps.createCellCoords(u,h),m=this.tableProps.createCellCoords(s-1,i-1);this.clear(),this.setRangeStartOnly(g,void 0,c),h<0&&this.selectedByRowHeader.add(this.getLayerLevel()),u<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(m),this.finish(),(0,o.default)(this,v,!1)}selectCells(e){const t=(0,m.detectSelectionType)(e);if(t===m.SELECTION_TYPE_EMPTY)return!1;if(t===m.SELECTION_TYPE_UNRECOGNIZED)throw new Error(E.toSingleLine`Unsupported format of the selection ranges was passed. To select cells pass\x20
971
+ the last node, the show column modification can be applied.`);const{crossHiddenColumns:r}=e.data;if(!r.includes(t))return;let s=!1;if(e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return s=!0,!1})),s)return;e.walkUp((e=>{const{data:r}=e;r.crossHiddenColumns.splice(r.crossHiddenColumns.indexOf(t),1),!r.isHidden&&r.colspan<r.origColspan&&(r.colspan+=1),r.isHidden=!1}))},r(60740);var n=r(45561)},5985:(e,t)=>{"use strict";function r(e,t){let{childs:r}=e;if(0!==r.length)return r[0].data[t]}t.__esModule=!0,t.getFirstChildProperty=r,t.isNodeReflectsFirstChildColspan=function(e){return r(e,"origColspan")===e.data.origColspan},t.traverseHiddenNodeColumnIndexes=function(e,t){e.walkDown((e=>{let{data:r,childs:n}=e;if(!r.isHidden&&(t(r.columnIndex),0===n.length))for(let e=1;e<r.colspan;e++)t(r.columnIndex+e)}))}},15914:(e,t,r)=>{"use strict";t.__esModule=!0,t.normalizeSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const r=[];if(0===t)return r;(0,n.arrayEach)(e,(e=>{const a=[];let l=0;r.push(a),(0,n.arrayEach)(e,(e=>{const r=(0,i.createDefaultHeaderSettings)();if((0,s.isObject)(e)){const{label:t,colspan:n}=e;r.label=(0,o.stringify)(t),"number"==typeof n&&n>1&&(r.colspan=n,r.origColspan=n)}else r.label=(0,o.stringify)(e);l+=r.origColspan;let n=!1;if(l>=t&&(r.colspan=r.origColspan-(l-t),r.origColspan=r.colspan,n=!0),a.push(r),r.colspan>1)for(let e=0;e<r.colspan-1;e++)a.push((0,i.createPlaceholderHeaderSettings)());return!n}))}));const a=Math.max(...(0,n.arrayMap)(r,(e=>e.length)));return(0,n.arrayEach)(r,(e=>{if(e.length<a){const t=(0,n.arrayMap)(new Array(a-e.length),(()=>(0,i.createDefaultHeaderSettings)()));e.splice(e.length,0,...t)}})),r},r(95988);var n=r(98887),s=r(76163),o=r(97639),i=r(27122)},14135:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(42538)),o=n(r(48427)),i=r(76163),a=r(98887),l=r(15914);function u(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}const h=["label","collapsible"];t.HEADER_CONFIGURABLE_PROPS=h;var c=new WeakMap,d=new WeakMap,f=new WeakMap;t.default=class{constructor(){u(this,c,{writable:!0,value:[]}),u(this,d,{writable:!0,value:0}),u(this,f,{writable:!0,value:1/0})}setColumnsLimit(e){(0,o.default)(this,f,e)}setData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,o.default)(this,c,(0,l.normalizeSettings)(e,(0,s.default)(this,f))),(0,o.default)(this,d,(0,s.default)(this,c).length)}getData(){return(0,s.default)(this,c)}mergeWith(e){(0,a.arrayEach)(e,(e=>{let{row:t,col:r,...n}=e;const s=this.getHeaderSettings(t,r);null!==s&&(0,i.extend)(s,n,h)}))}map(e){(0,a.arrayEach)((0,s.default)(this,c),(t=>{(0,a.arrayEach)(t,(t=>{const r=e({...t});(0,i.isObject)(r)&&(0,i.extend)(t,r,h)}))}))}getHeaderSettings(e,t){var r;if(e>=(0,s.default)(this,d)||e<0)return null;const n=(0,s.default)(this,c)[e];return t>=n.length?null:null!==(r=n[t])&&void 0!==r?r:null}getHeadersSettings(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const n=[];if(e>=(0,s.default)(this,d)||e<0)return n;const o=(0,s.default)(this,c)[e];let i=0;for(let e=t;e<o.length;e++){const t=o[e];if(t.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(i+=t.colspan,n.push(t),t.colspan>1&&(e+=t.colspan-1),i===r)break;if(i>r)throw new Error("The last column settings cannot overlap the other header layers")}return n}getLayersCount(){return(0,s.default)(this,d)}getColumnsCount(){return(0,s.default)(this,d)>0?(0,s.default)(this,c)[0].length:0}clear(){(0,o.default)(this,c,[]),(0,o.default)(this,d,0)}}},27122:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultHeaderSettings=function(){let{label:e="",colspan:t=1,origColspan:r=1,collapsible:n=!1,crossHiddenColumns:s=[],isCollapsed:o=!1,isHidden:i=!1,isRoot:a=!1,isPlaceholder:l=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:e,colspan:t,origColspan:r,collapsible:n,isCollapsed:o,crossHiddenColumns:s,isHidden:i,isRoot:a,isPlaceholder:l}},t.createPlaceholderHeaderSettings=function(){return{label:"",isPlaceholder:!0}}},65177:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(49587);var i=class{constructor(e,t){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"nestedHeaderSettingsGetter",void 0),(0,s.default)(this,"layersCount",0),(0,s.default)(this,"container",void 0),(0,s.default)(this,"widthsMap",void 0),this.hot=e,this.nestedHeaderSettingsGetter=t,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}setLayersCount(e){return this.layersCount=e,this}getWidth(e){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e))}buildWidthsMap(){this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize"),this._buildGhostTable(this.container),this.hot.rootDocument.body.appendChild(this.container);const e=this.container.querySelectorAll("tr:last-of-type th"),t=e.length;this.widthsMap.clear();for(let r=0;r<t;r++){const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(r),n=this.hot.toPhysicalColumn(t);this.widthsMap.setValueAtIndex(n,e[r].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}_buildGhostTable(e){const{rootDocument:t,columnIndexMapper:r}=this.hot,n=t.createDocumentFragment(),s=t.createElement("table"),i=!!this.hot.getSettings().dropdownMenu,a=r.getRenderableIndexesLength();for(let e=0;e<this.layersCount;e++){const n=t.createElement("tr");for(let s=0;s<a;s++){let a=r.getVisualFromRenderableIndex(s);null===a&&(a=s);const l=t.createElement("th"),u=this.nestedHeaderSettingsGetter(e,a);if(u&&(!u.isPlaceholder||u.isHidden)){let e=u.label;i&&(e+='<button class="changeType"></button>'),(0,o.fastInnerHTML)(l,e),l.colSpan=u.colspan,n.appendChild(l)}}s.appendChild(n)}n.appendChild(s),e.appendChild(n)}clear(){this.widthsMap.clear(),this.container=null}};t.default=i},7103:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(57691),i=r(76163),a=r(98887);var l=class{constructor(e,t){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"data",null),(0,s.default)(this,"plugin",void 0),(0,s.default)(this,"parentReference",new WeakMap),(0,s.default)(this,"cache",{levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}),this.hot=t,this.plugin=e}setData(e){this.data=e}getData(){return this.data}getRawSourceData(){let e=null;return this.plugin.disableCoreAPIModifiers(),e=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),e}updateWithData(e){this.setData(e),this.rewriteCache()}rewriteCache(){this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},(0,o.rangeEach)(0,this.data.length-1,(e=>{this.cacheNode(this.data[e],0,null)}))}cacheNode(e,t,r){this.cache.levels[t]||(this.cache.levels[t]=[],this.cache.levelCount+=1),this.cache.levels[t].push(e),this.cache.rows.push(e),this.cache.nodeInfo.set(e,{parent:r,row:this.cache.rows.length-1,level:t}),this.hasChildren(e)&&(0,a.arrayEach)(e.__children,(r=>{this.cacheNode(r,t+1,e)}))}getDataObject(e){return null==e?null:this.cache.rows[e]}readTreeNodes(e,t,r,n){let s=!1,o=t;if(isNaN(o)&&o.end)return o;let i=e;return i||(i={__children:this.data},s=!0,o-=1),null!=r&&o===r?{result:i,end:!0}:null!=n&&i===n?{result:o,end:!0}:(o+=1,i.__children&&(0,a.arrayEach)(i.__children,(e=>{if(this.parentReference.set(e,s?null:i),o=this.readTreeNodes(e,o,r,n),isNaN(o)&&o.end)return!1})),o)}mockParent(){const e=this.mockNode();return e.__children=this.data,e}mockNode(){const e={};return(0,i.objectEach)(this.data[0],((t,r)=>{e[r]=null})),e}getRowIndex(e){return null==e?null:this.cache.nodeInfo.get(e).row}getRowIndexWithinParent(e){let t=null;t=isNaN(e)?e:this.getDataObject(e);const r=this.getRowParent(e);return null==r?this.data.indexOf(t):r.__children.indexOf(t)}countAllRows(){const e={__children:this.data};return this.countChildren(e)}countChildren(e){let t=0,r=e;return isNaN(r)||(r=this.getDataObject(r)),r&&r.__children?((0,a.arrayEach)(r.__children,(e=>{t+=1,e.__children&&(t+=this.countChildren(e))})),t):0}getRowParent(e){let t;return t=isNaN(e)?e:this.getDataObject(e),this.getRowObjectParent(t)}getRowObjectParent(e){return e&&"object"==typeof e?this.cache.nodeInfo.get(e).parent:null}getRowLevel(e){let t=null;return t=isNaN(e)?e:this.getDataObject(e),t?this.getRowObjectLevel(t):null}getRowObjectLevel(e){return null==e?null:this.cache.nodeInfo.get(e).level}hasChildren(e){let t=e;return isNaN(t)||(t=this.getDataObject(t)),!(!t.__children||!t.__children.length)}isChild(e){return null!==this.getRowParent(e)}getChild(e,t){var r;return(null===(r=e.__children)||void 0===r?void 0:r[t])||null}isRowHighestLevel(e){return!this.isChild(e)}isParent(e){var t;let r=e;return isNaN(r)||(r=this.getDataObject(r)),r&&!!r.__children&&0!==(null===(t=r.__children)||void 0===t?void 0:t.length)}addChild(e,t){let r=t;this.hot.runHooks("beforeAddChild",e,r);let n=null;e&&(n=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",n+this.countChildren(e)+1,1);let s=e;e||(s=this.mockParent()),s.__children||(s.__children=[]),r||(r=this.mockNode()),s.__children.push(r),this.rewriteCache();const o=this.getRowIndex(r);this.hot.rowIndexMapper.insertIndexes(o,1),this.hot.runHooks("afterCreateRow",o,1),this.hot.runHooks("afterAddChild",e,r)}addChildAtIndex(e,t,r){let n,s=r;if(s||(s=this.mockNode()),this.hot.runHooks("beforeAddChild",e,s,t),e){const r=this.getRowIndex(e)+t+1;this.hot.runHooks("beforeCreateRow",r,1),e.__children.splice(t,null,s),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(r,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",r,1),n=r}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",t,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),n=this.getRowIndex(this.data[t]);s=this.getDataObject(n),this.hot.runHooks("afterAddChild",e,s,t)}addSibling(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const r=this.translateTrimmedRow(e),n=this.getRowParent(r),s=this.getRowIndexWithinParent(r);switch(t){case"below":this.addChildAtIndex(n,s+1,null);break;case"above":this.addChildAtIndex(n,s,null)}}detachFromParent(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=null;const n=[];Array.isArray(e)?((0,o.rangeEach)(e[0],e[2],(e=>{const t=this.translateTrimmedRow(e);n.push(this.getDataObject(t))})),(0,o.rangeEach)(0,n.length-2,(e=>{this.detachFromParent(n[e],!1)})),r=n[n.length-1]):r=e;const s=this.getRowIndex(r),i=this.countChildren(r),a=this.getRowIndexWithinParent(r),l=this.getRowParent(r),u=this.getRowParent(l),h=this.getRowIndex(u);let c=null;if(this.hot.runHooks("beforeDetachChild",l,r),null!=a){const e=Array.from(new Array(s+i+1).keys()).splice(-1*(i+1));if(this.hot.runHooks("beforeRemoveRow",s,i+1,e,this.plugin.pluginName),l.__children.splice(a,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",s,i+1,e,this.plugin.pluginName),u){c=h+this.countChildren(u);const e=this.getChild(u,this.countChildren(u)-1),t=this.getRowIndex(e);this.hot.runHooks("beforeCreateRow",t+1,i+1,this.plugin.pluginName),u.__children.push(r)}else c=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",c-2,i+1,this.plugin.pluginName),this.data.push(r)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",c-2,i+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",l,r,this.getRowIndex(r)),t&&this.hot.render()}filterData(e,t,r){const n=[];(0,a.arrayEach)(r,(e=>{n.push(this.getDataObject(e))})),(0,a.arrayEach)(n,(e=>{const t=this.getRowIndexWithinParent(e),r=this.getRowParent(e);null===r?this.data.splice(t,1):r.__children.splice(t,1)})),this.rewriteCache()}spliceData(e,t,r){const n=this.getDataObject(e-1);let s=null,o=e;n&&n.__children&&0===n.__children.length?(s=n,o=0):e<this.countAllRows()&&(s=this.getRowParent(e),o=this.getRowIndexWithinParent(e)),s?r?s.__children.splice(o,t,...r):s.__children.splice(o,t):r?this.data.splice(o,t,...r):this.data.splice(o,t),this.rewriteCache()}syncRowWithRawSource(e){let t=e,r=null;do{r=this.getRowParent(r),null!==r&&(t=r)}while(null!==r);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndex(t),"__children",t.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(e,t,r,n){const s=t===this.hot.countRows(),o=this.getRowParent(e),i=this.getRowIndexWithinParent(e),a=o.__children.slice(i,i+1),l=e>t;let u=s?this.getRowParent(t-1):this.getRowParent(t);null==u&&(u=this.getRowParent(t-1)),null==u&&(u=this.getDataObject(t-1)),u?u.__children||(u.__children=[]):(u=this.getDataObject(t),u.__children=[]);const h=s||r||n?u.__children.length:this.getRowIndexWithinParent(t),c=o===u;u.__children.splice(h,0,a[0]),o.__children.splice(i+(l&&c?1:0),1),this.syncRowWithRawSource(o),c||this.syncRowWithRawSource(u)}translateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}untranslateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(e):e}};t.default=l},6604:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(905);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.NestedRows=n.NestedRows},905:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=n(r(42538)),i=n(r(48427)),a=r(33997),l=n(r(7103)),u=n(r(23640)),h=n(r(15113)),c=n(r(43509)),d=r(31990),f=r(56020),p=r(41789),g=n(r(51915));function m(e,t){y(e,t),t.add(e)}function E(e,t,r){y(e,t),t.set(e,r)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(23118);const C="nestedRows";t.PLUGIN_KEY=C;t.PLUGIN_PRIORITY=300;const v=C;var R=new WeakMap,S=new WeakMap,T=new WeakSet,N=new WeakSet,O=new WeakSet,M=new WeakSet,_=new WeakSet,A=new WeakSet,b=new WeakSet,I=new WeakSet,x=new WeakSet,L=new WeakSet,P=new WeakSet,D=new WeakSet,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet;class V extends a.BasePlugin{constructor(){super(...arguments),m(this,U),m(this,F),m(this,H),m(this,k),m(this,D),m(this,P),m(this,L),m(this,x),m(this,I),m(this,b),m(this,A),m(this,_),m(this,M),m(this,O),m(this,N),m(this,T),(0,s.default)(this,"dataManager",null),(0,s.default)(this,"headersUI",null),(0,s.default)(this,"collapsedRowsMap",null),E(this,R,{writable:!0,value:!1}),E(this,S,{writable:!0,value:!1})}static get PLUGIN_KEY(){return C}static get PLUGIN_PRIORITY(){return 300}isEnabled(){return!!this.hot.getSettings()[C]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new p.TrimmingMap),this.dataManager=new l.default(this,this.hot),this.collapsingUI=new u.default(this,this.hot),this.headersUI=new h.default(this,this.hot),this.contextMenuUI=new c.default(this,this.hot),this.rowMoveController=new g.default(this),this.addHook("afterInit",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,H,ee).call(e,...r)})),this.addHook("beforeViewRender",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,F,te).call(e,...r)})),this.addHook("modifyRowData",(function(){return e.onModifyRowData(...arguments)})),this.addHook("modifySourceLength",(function(){return e.onModifySourceLength(...arguments)})),this.addHook("beforeDataSplice",(function(){return e.onBeforeDataSplice(...arguments)})),this.addHook("filterData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,O,Y).call(e,...r)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,M,G).call(e,...r)})),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,_,j).call(e,...r)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,N,W).call(e,...r)})),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,I,K).call(e,...r)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,b,$).call(e,...r)})),this.addHook("beforeAddChild",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,x,X).call(e,...r)})),this.addHook("afterAddChild",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,L,q).call(e,...r)})),this.addHook("beforeDetachChild",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,P,Q).call(e,...r)})),this.addHook("afterDetachChild",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,D,Z).call(e,...r)})),this.addHook("modifyRowHeaderWidth",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,A,z).call(e,...r)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,k,J).call(e,...r)})),this.addHook("beforeRowMove",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w(e,T,B).call(e,...r)})),this.addHook("beforeLoadData",(e=>w(this,U,re).call(this,e))),this.addHook("beforeUpdateData",(e=>w(this,U,re).call(this,e))),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){this.disablePlugin();const e=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(e),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if(-1===e.col&&e.row>=0){const t=this.collapsingUI.translateTrimmedRow(e.row);this.collapsingUI.areChildrenCollapsed(t)?this.collapsingUI.expandChildren(t):this.collapsingUI.collapseChildren(t)}},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()},group:v})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(v)}disableCoreAPIModifiers(){(0,i.default)(this,S,!0)}enableCoreAPIModifiers(){(0,i.default)(this,S,!1)}onModifyRowData(e){if(!(0,o.default)(this,S))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!(0,o.default)(this,S))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,r){return!(!(0,o.default)(this,S)&&!this.dataManager.isRowHighestLevel(e))||(this.dataManager.spliceData(e,t,r),!1)}destroy(){super.destroy()}}function B(e,t,r,n){return this.rowMoveController.onBeforeRowMove(e,t,r,n)}function W(e,t,r){this.collapsingUI.toggleState(e,t,r)}function Y(e,t,r){return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(r[0],t),this.collapsingUI.collapsedRowsStash.shiftStash(r[0],null,-1*t),this.dataManager.filterData(e,t,r),(0,i.default)(this,R,!0),this.dataManager.getData().slice()}function G(e){return this.contextMenuUI.appendOptions(e)}function j(e,t){this.headersUI.appendLevelIndicators(e,t)}function z(e){return Math.max(this.headersUI.rowHeaderWidthCache,e)}function $(e,t,r,n){n!==this.pluginName&&this.hot._registerTimeout((()=>{(0,i.default)(this,R,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()}))}function K(e,t,r){const n=Array.from(r.reduce(((e,t)=>{if(this.dataManager.isParent(t)){const r=this.dataManager.getDataObject(t).__children;return e.add(t),Array.isArray(r)&&r.forEach((t=>e.add(this.dataManager.getRowIndex(t)))),e}return e.add(t)}),new Set));r.length=0,r.push(...n)}function X(){this.collapsingUI.collapsedRowsStash.stash()}function q(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function Q(){this.collapsingUI.collapsedRowsStash.stash()}function Z(e,t,r){this.collapsingUI.collapsedRowsStash.shiftStash(r,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function J(){this.dataManager.rewriteCache()}function ee(){this.headersUI.updateRowHeaderWidth()}function te(e,t){(0,o.default)(this,R)&&(t.skipRender=!0)}function re(e){if(!(0,f.isArrayOfObjects)(e))return(0,d.error)("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),this.hot.getSettings()[C]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}t.NestedRows=V},61619:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));var o=class{constructor(e,t){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"plugin",void 0),this.hot=t,this.plugin=e}};t.default=o},23640:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=r(30369),o=r(98887),i=r(57691),a=r(49587),l=n(r(61619)),u=n(r(15113));class h extends l.default{constructor(e,t){var r;super(e,t),r=this,this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];r.lastCollapsedRows=r.collapsedRows.slice(0),r.expandMultipleChildren(r.lastCollapsedRows,e)},shiftStash:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null==t&&(t=1/0),(0,o.arrayEach)(r.lastCollapsedRows,((s,o)=>{s>=e&&s<t&&(r.lastCollapsedRows[o]=s+n)}))},applyStash:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];r.collapseMultipleChildren(r.lastCollapsedRows,e),r.lastCollapsedRows=void 0},trimStash:(e,t)=>{(0,i.rangeEach)(e,e+t-1,(e=>{const t=this.lastCollapsedRows.indexOf(e);t>-1&&this.lastCollapsedRows.splice(t,1)}))}}}collapseChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];let s=null,i=null,a=null;return isNaN(e)?(s=e,i=this.dataManager.getRowIndex(s)):(s=this.dataManager.getDataObject(e),i=e),this.dataManager.hasChildren(s)&&(0,o.arrayEach)(s.__children,(e=>{n.push(this.dataManager.getRowIndex(e))})),a=this.collapseRows(n,!0,!1),r&&this.trimRows(a),t&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(i)&&this.collapsedRows.push(i),a}collapseMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];(0,o.arrayEach)(e,(e=>{n.push(...this.collapseChildren(e,!1,!1))})),r&&this.trimRows(n),t&&this.renderAndAdjust()}collapseRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([e],t)}collapseRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=[];return(0,o.arrayEach)(e,(e=>{n.push(e),t&&this.collapseChildRows(e,n)})),r&&this.trimRows(n),n}collapseChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const r=this.dataManager.getDataObject(e);(0,o.arrayEach)(r.__children,(e=>{const r=this.dataManager.getRowIndex(e);t.push(r),this.collapseChildRows(r,t)}))}r&&this.trimRows(t)}expandRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([e],t)}expandRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=[];return(0,o.arrayEach)(e,(e=>{n.push(e),t&&this.expandChildRows(e,n)})),r&&this.untrimRows(n),n}expandChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const r=this.dataManager.getDataObject(e);(0,o.arrayEach)(r.__children,(e=>{if(!this.isAnyParentCollapsed(e)){const r=this.dataManager.getRowIndex(e);t.push(r),this.expandChildRows(r,t)}}))}r&&this.untrimRows(t)}expandChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];let s=null,i=null,a=null;return isNaN(e)?(s=e,i=this.dataManager.getRowIndex(e)):(s=this.dataManager.getDataObject(e),i=e),this.collapsedRows.splice(this.collapsedRows.indexOf(i),1),this.dataManager.hasChildren(s)&&(0,o.arrayEach)(s.__children,(e=>{const t=this.dataManager.getRowIndex(e);n.push(t)})),a=this.expandRows(n,!0,!1),r&&this.untrimRows(a),t&&this.renderAndAdjust(),a}expandMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];(0,o.arrayEach)(e,(e=>{n.push(...this.expandChildren(e,!1,!1))})),r&&this.untrimRows(n),t&&this.renderAndAdjust()}collapseAll(){const e=this.dataManager.getData(),t=[];(0,o.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];(0,o.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution((()=>{(0,o.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!0)}))}),!0)}untrimRows(e){this.hot.batchExecution((()=>{(0,o.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!1)}))}),!0)}areChildrenCollapsed(e){let t=isNaN(e)?e:this.dataManager.getDataObject(e),r=!0;return null===t&&(t={__children:this.dataManager.data}),this.dataManager.hasChildren(t)&&(0,o.arrayEach)(t.__children,(e=>{const t=this.dataManager.getRowIndex(e);if(!this.plugin.collapsedRowsMap.getValueAtIndex(t))return r=!1,!1})),r}isAnyParentCollapsed(e){let t=e;for(;null!==t;){t=this.dataManager.getRowParent(t);const e=this.dataManager.getRowIndex(t);if(this.collapsedRows.indexOf(e)>-1)return!0}return!1}toggleState(e,t){if(t.col>=0)return;const r=this.translateTrimmedRow(t.row);(0,a.hasClass)(e.target,u.default.CSS_CLASSES.button)&&(this.areChildrenCollapsed(r)?this.expandChildren(r):this.collapseChildren(r),(0,s.stopImmediatePropagation)(e))}translateTrimmedRow(e){return this.hot.toPhysicalRow(e)}untranslateTrimmedRow(e){return this.hot.toVisualRow(e)}renderAndAdjust(){this.hot.render(),this.hot.view.adjustElementsSize()}}var c=h;t.default=c},43509:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=n(r(42538)),i=r(57691),a=r(98887),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=h(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(497)),u=n(r(61619));function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(h=function(e){return e?r:t})(e)}function c(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var d=new WeakMap;class f extends u.default{constructor(){super(...arguments),(0,s.default)(this,"dataManager",this.plugin.dataManager),c(this,d,{writable:!0,value:{row_above:(e,t)=>{const r=t[t.length-1];this.dataManager.addSibling(r.start.row,"above")},row_below:(e,t)=>{const r=t[t.length-1];this.dataManager.addSibling(r.start.row,"below")}}})}appendOptions(e){const t=[{key:"add_child",name(){return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD)},callback:()=>{const e=this.dataManager.translateTrimmedRow(this.hot.getSelectedLast()[0]),t=this.dataManager.getDataObject(e);this.dataManager.addChild(t)},disabled:()=>{const e=this.hot.getSelectedLast();return!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{key:"detach_from_parent",name(){return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD)},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedLast())},disabled:()=>{const e=this.hot.getSelectedLast(),t=this.dataManager.translateTrimmedRow(e[0]);return!this.dataManager.getRowParent(t)||!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return(0,i.rangeEach)(0,e.items.length-1,(r=>{if(0===r)return(0,a.arrayEach)(t,((t,n)=>{e.items.splice(r+n,0,t)})),!1})),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){return(0,i.rangeEach)(0,e.items.length-1,(t=>{const r=(0,o.default)(this,d)[e.items[t].key];null!=r&&(e.items[t].callback=r)})),e}}var p=f;t.default=p},15113:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(98887),o=r(57691),i=r(49587),a=n(r(61619)),l=r(66862),u=r(497);class h extends a.default{static get CSS_CLASSES(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}constructor(e,t){super(e,t),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}appendLevelIndicators(e,t){const r=this.hot.toPhysicalRow(e),n=this.dataManager.getRowLevel(r),a=this.dataManager.getDataObject(r),c=t.getElementsByTagName("DIV")[0],d=c.querySelector("span.rowHeader"),f=c.querySelectorAll('[class^="ht_nesting"]'),p=this.hot.getSettings().ariaTags;if((0,s.arrayEach)(f,(e=>{e&&c.removeChild(e)})),(0,i.addClass)(t,h.CSS_CLASSES.indicatorContainer),n){const{rootDocument:e}=this.hot,t=d.cloneNode(!0);c.innerHTML="",(0,o.rangeEach)(0,n-1,(()=>{const t=e.createElement("SPAN");(0,i.addClass)(t,h.CSS_CLASSES.emptyIndicator),c.appendChild(t)})),c.appendChild(t)}if(this.dataManager.hasChildren(a)){const e=this.hot.rootDocument.createElement("DIV");p&&(0,i.setAttribute)(e,[(0,l.A11Y_HIDDEN)()]),(0,i.addClass)(t,h.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(r)?((0,i.addClass)(e,`${h.CSS_CLASSES.button} ${h.CSS_CLASSES.expandButton}`),p&&(0,i.setAttribute)(t,[(0,l.A11Y_EXPANDED)(!1),(0,l.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(u.ROW_HEADER_DESCRIPTION_EXPAND_ROW))])):((0,i.addClass)(e,`${h.CSS_CLASSES.button} ${h.CSS_CLASSES.collapseButton}`),p&&(0,i.setAttribute)(t,[(0,l.A11Y_EXPANDED)(!0),(0,l.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(u.ROW_HEADER_DESCRIPTION_COLLAPSE_ROW))])),c.appendChild(e)}}updateRowHeaderWidth(e){let t=e;t||(t=this.dataManager.cache.levelCount),this.rowHeaderWidthCache=Math.max(50,11+10*t+25),this.hot.render()}}var c=h;t.default=c},51915:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(97639),i=r(31990),a=r(45561);t.default=class{constructor(e){(0,s.default)(this,"plugin",void 0),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"dataManager",void 0),(0,s.default)(this,"collapsingUI",void 0),this.plugin=e,this.hot=e.hot,this.dataManager=e.dataManager,this.collapsingUI=e.collapsingUI}onBeforeRowMove(e,t,r,n){if(this.displayAPICompatibilityWarning({rows:e,finalIndex:t,dropIndex:r,movePossible:n}))return!1;this.movedToCollapsed=!1;const s=r===this.hot.countRows(),o=s?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(r);let i=!0;const a=e.map((e=>{if(!i)return!1;const t=this.dataManager.translateTrimmedRow(e);return i=this.shouldAllowMoving(t,o),t})),l=-1===a.indexOf(o);if(!i||!l)return!1;const u=this.getBaseParent(a),h=this.getTargetParent(s,o),c=u===h;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(h),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(a,o,c),this.moveRows(a,o,h),this.dataManager.rewriteCache(),this.moveCellsMeta(a,o),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",e,t,r,n,n&&this.isRowOrderChanged(e,t)),this.hot.render(),this.selectCells(e,r),!1}displayAPICompatibilityWarning(e){const{rows:t,finalIndex:r,dropIndex:n,movePossible:s}=e;let l=!1;return(0,o.isUndefined)(n)&&((0,i.warn)(a.toSingleLine`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
972
+ when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,r,n,s,!1),l=!0),l}shouldAllowMoving(e,t){return!(this.dataManager.isParent(e)||this.dataManager.isRowHighestLevel(e)||e===t||0===t)}getBaseParent(e){return this.dataManager.getRowParent(e[0])}getTargetParent(e,t){let r=this.dataManager.getRowParent(e?t-1:t);return null==r&&(r=this.dataManager.getRowParent(t-1)),r}shiftCollapsibleParentsLocations(e,t,r){r||(Math.max(...e)<=t?this.collapsingUI.collapsedRowsStash.shiftStash(e[0],t,-1*e.length):this.collapsingUI.collapsedRowsStash.shiftStash(t,e[0],e.length))}moveRows(e,t,r){const n=t===this.dataManager.getRowIndex(r)+this.dataManager.countChildren(r)+1;this.hot.batchRender((()=>{e.forEach((e=>{this.dataManager.moveRow(e,t,this.movedToCollapsed,n)}))}))}moveCellsMeta(e,t){const r=[],n=Math.max(...e)<t;e.forEach((e=>{r.push(this.hot.getCellMetaAtRow(e))})),this.hot.spliceCellsMeta(e[0],e.length),this.hot.spliceCellsMeta(t-(n?r.length:0),0,...r)}selectCells(e,t){const r=e.length;let n=0,s=0,o=null,i=null;if(this.movedToCollapsed){let o=null;o=e[r-1]<t?this.dataManager.translateTrimmedRow(t-r):this.dataManager.translateTrimmedRow(t);const i=this.dataManager.getRowParent(null===o?this.hot.countSourceRows()-1:o-1),a=this.dataManager.getRowIndex(i);n=this.dataManager.untranslateTrimmedRow(a),s=n}else e[r-1]<t?(s=t-1,n=s-r+1):(n=t,s=n+r-1);o=this.hot.selection,i=this.hot.countCols()-1,o.setRangeStart(this.hot._createCellCoords(n,0)),o.setRangeEnd(this.hot._createCellCoords(s,i),!0)}isRowOrderChanged(e,t){return e.some(((e,r)=>e-r!==t))}}},46271:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(94241);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.PersistentState=n.PersistentState},94241:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(33997),i=n(r(91718)),a=n(r(54925));a.default.getSingleton().register("persistentStateSave"),a.default.getSingleton().register("persistentStateLoad"),a.default.getSingleton().register("persistentStateReset");const l="persistentState";t.PLUGIN_KEY=l;t.PLUGIN_PRIORITY=0;class u extends o.BasePlugin{constructor(){super(...arguments),(0,s.default)(this,"storage",void 0)}static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return 0}isEnabled(){return!!this.hot.getSettings()[l]}enablePlugin(){this.enabled||(this.storage||(this.storage=new i.default(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",((e,t)=>this.saveValue(e,t))),this.addHook("persistentStateLoad",((e,t)=>this.loadValue(e,t))),this.addHook("persistentStateReset",(()=>this.resetValue())),super.enablePlugin())}disablePlugin(){this.storage=void 0,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}loadValue(e,t){t.value=this.storage.loadValue(e)}saveValue(e,t){this.storage.saveValue(e,t)}resetValue(e){void 0===e?this.storage.resetAll():this.storage.reset(e)}destroy(){super.destroy()}}t.PersistentState=u},91718:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95735),r(95988);var s=n(r(93231)),o=r(98887);var i=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;(0,s.default)(this,"rootWindow",void 0),(0,s.default)(this,"prefix",void 0),(0,s.default)(this,"savedKeys",[]),this.rootWindow=t,this.prefix=e,this.loadSavedKeys()}saveValue(e,t){this.rootWindow.localStorage.setItem(`${this.prefix}_${e}`,JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}loadValue(e,t){const r=void 0===e?t:e,n=this.rootWindow.localStorage.getItem(`${this.prefix}_${r}`);return null===n?void 0:JSON.parse(n)}reset(e){this.rootWindow.localStorage.removeItem(`${this.prefix}_${e}`)}resetAll(){(0,o.arrayEach)(this.savedKeys,((e,t)=>{this.rootWindow.localStorage.removeItem(`${this.prefix}_${this.savedKeys[t]}`)})),this.clearSavedKeys()}loadSavedKeys(){const e=this.rootWindow.localStorage.getItem(`${this.prefix}__persistentStateKeys`),t="string"==typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}saveSavedKeys(){this.rootWindow.localStorage.setItem(`${this.prefix}__persistentStateKeys`,JSON.stringify(this.savedKeys))}clearSavedKeys(){this.savedKeys.length=0,this.saveSavedKeys()}};t.default=i},5280:(e,t,r)=>{"use strict";t.__esModule=!0,t.getPlugin=c,t.getPluginsNames=function(){return[...l.getItems(),...u.getItems()]},t.hasPlugin=function(e){return!!c(e)},t.registerPlugin=function(e,t,r){[e,t,r]=function(e,t,r){"function"==typeof e&&(e=(t=e).PLUGIN_KEY,r=t.PLUGIN_PRIORITY);return[e,t,r]}(e,t,r),void 0===c(e)&&function(e,t,r){const s=(0,n.toUpperCaseFirst)(e);if(h.hasItem(s))throw new Error(a(s));void 0===r?u.addItem(s):l.addItem(r,s);h.addItem(s,t)}(e,t,r)},r(60740);var n=r(37913),s=r(22111),o=r(8815),i=r(6344);const a=e=>`There is already registered "${e}" plugin.`,l=(0,s.createPriorityMap)({errorPriorityExists:e=>`There is already registered plugin on priority "${e}".`,errorPriorityNaN:e=>`The priority "${e}" is not a number.`}),u=(0,i.createUniqueSet)({errorItemExists:a}),h=(0,o.createUniqueMap)({errorIdExists:a});function c(e){const t=(0,n.toUpperCaseFirst)(e);return h.getItem(t)}},24:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(74639);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.Search=n.Search},74639:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(33997),i=r(76163),a=r(57691),l=r(97639);function u(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function h(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const c="search";t.PLUGIN_KEY=c;t.PLUGIN_PRIORITY=190;const d=function(e,t,r,n,s){e.getCellMeta(t,r).isSearchResult=s},f=function(e,t,r){return!((0,l.isUndefined)(e)||null===e||!e.toLocaleLowerCase||0===e.length)&&(!(0,l.isUndefined)(t)&&null!==t&&-1!==t.toString().toLocaleLowerCase(r.locale).indexOf(e.toLocaleLowerCase(r.locale)))};var p=new WeakSet;class g extends o.BasePlugin{constructor(){super(...arguments),u(this,p),(0,s.default)(this,"callback",d),(0,s.default)(this,"queryMethod",f),(0,s.default)(this,"searchResultClass","htSearchResult")}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return 190}isEnabled(){return this.hot.getSettings()[c]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[c];this.updatePluginSettings(t),this.addHook("beforeRenderer",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(e,p,m).call(e,...r)})),super.enablePlugin()}disablePlugin(){var e=this;const t=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(e,p,m).call(e,...r)};this.hot.addHook("beforeRenderer",t),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("beforeRenderer",t)})),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const n=this.hot.countRows(),s=this.hot.countCols(),o=[],i=this.hot;return(0,a.rangeEach)(0,n-1,(n=>{(0,a.rangeEach)(0,s-1,(s=>{const a=this.hot.getDataAtCell(n,s),l=this.hot.getCellMeta(n,s),u=l.search.callback||t,h=(l.search.queryMethod||r)(e,a,l);if(h){const e={row:n,col:s,data:a};o.push(e)}u&&u(i,n,s,a,h)}))})),o}getCallback(){return this.callback}setCallback(e){this.callback=e}getQueryMethod(){return this.queryMethod}setQueryMethod(e){this.queryMethod=e}getSearchResultClass(){return this.searchResultClass}setSearchResultClass(e){this.searchResultClass=e}updatePluginSettings(e){(0,i.isObject)(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}destroy(){super.destroy()}}function m(e,t,r,n,s,o){const i=o.className||[];let a=[];"string"==typeof i?a=i.split(" "):a.push(...i),this.isEnabled()&&o.isSearchResult?a.includes(this.searchResultClass)||a.push(`${this.searchResultClass}`):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),o.className=a.join(" ")}t.Search=g},8458:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(51111);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.TouchScroll=n.TouchScroll},51111:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=r(49587),i=r(98887),a=r(33997),l=r(6022);function u(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function h(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const c="touchScroll";t.PLUGIN_KEY=c;t.PLUGIN_PRIORITY=200;var d=new WeakSet,f=new WeakSet,p=new WeakSet;class g extends a.BasePlugin{constructor(){super(...arguments),u(this,p),u(this,f),u(this,d),(0,s.default)(this,"scrollbars",[]),(0,s.default)(this,"clones",[]),(0,s.default)(this,"lockedCollection",!1),(0,s.default)(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return 200}static get SETTING_KEYS(){return!0}isEnabled(){return(0,l.isTouchSupported)()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",(()=>h(this,d,m).call(this))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",(()=>h(this,f,E).call(this))),this.addHook("afterMomentumScroll",(()=>h(this,p,y).call(this)))}}function m(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:r,topInlineStartCornerOverlay:n,bottomInlineStartCornerOverlay:s}=this.hot.view._wt.wtOverlays;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(e),t.clone&&this.scrollbars.push(t),this.scrollbars.push(r),n&&this.scrollbars.push(n),s&&s.clone&&this.scrollbars.push(s),this.clones=[],e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),r.needFullRender&&this.clones.push(r.clone.wtTable.holder.parentNode),n&&this.clones.push(n.clone.wtTable.holder.parentNode),s&&s.clone&&this.clones.push(s.clone.wtTable.holder.parentNode)}function E(){this.freezeOverlays=!0,(0,i.arrayEach)(this.clones,(e=>{(0,o.addClass)(e,"hide-tween")}))}function y(){this.freezeOverlays=!1,(0,i.arrayEach)(this.clones,(e=>{(0,o.removeClass)(e,"hide-tween"),(0,o.addClass)(e,"show-tween")})),this.hot._registerTimeout((()=>{(0,i.arrayEach)(this.clones,(e=>{(0,o.removeClass)(e,"show-tween")}))}),400),(0,i.arrayEach)(this.scrollbars,(e=>{e.refresh(),e.resetFixedPosition()})),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}t.TouchScroll=g},80044:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(94821);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.TrimRows=n.TrimRows},94821:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(33997),i=r(41789),a=r(98887);function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}const u="trimRows";t.PLUGIN_KEY=u;t.PLUGIN_PRIORITY=330;var h=new WeakSet;class c extends o.BasePlugin{constructor(){super(...arguments),l(this,h),(0,s.default)(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return 330}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new i.TrimmingMap),this.trimmedRowsMap.addLocalHook("init",(()=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,h,d).call(this))),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[u];Array.isArray(e)&&this.hot.batchExecution((()=>{this.trimmedRowsMap.clear(),(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("trimRows"),super.disablePlugin()}getTrimmedRows(){return this.trimmedRowsMap.getTrimmedIndexes()}trimRows(e){const t=this.getTrimmedRows(),r=this.isValidConfig(e);let n=t;r&&(n=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeTrimRow",t,n,r)&&(r&&this.hot.batchExecution((()=>{(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),this.hot.runHooks("afterTrimRow",t,n,r,r&&n.length>t.length))}trimRow(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.trimRows(t)}untrimRows(e){const t=this.getTrimmedRows(),r=this.isValidConfig(e);let n=t;const s=this.trimmedRowsMap.getValues().slice(),o=e.length>0;r&&o&&((0,a.arrayEach)(e,(e=>{s[e]=!1})),n=(0,a.arrayReduce)(s,((e,t,r)=>(t&&e.push(r),e)),[]));!1!==this.hot.runHooks("beforeUntrimRow",t,n,r&&o)&&(r&&o&&this.trimmedRowsMap.setValues(s),this.hot.runHooks("afterUntrimRow",t,n,r&&o,r&&n.length<t.length))}untrimRow(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.untrimRows(t)}isTrimmed(e){return this.trimmedRowsMap.getValueAtIndex(e)||!1}untrimAll(){this.untrimRows(this.getTrimmedRows())}isValidConfig(e){const t=this.hot.countSourceRows();return e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}destroy(){super.destroy()}}function d(){const e=this.hot.getSettings()[u];Array.isArray(e)&&this.hot.batchExecution((()=>{(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0)}t.TrimRows=c},91515:(e,t,r)=>{"use strict";t.__esModule=!0;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(66677));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}t.UndoRedo=n.default,t.PLUGIN_KEY=n.PLUGIN_KEY},66677:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(54925)),o=r(98887),i=r(57691),a=r(76163),l=r(12208);const u="undoRedo",h="undoRedo";function c(e){const t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,this.enabled=!1,e.addHook("afterChange",(function(r,n){const s=r&&r.length;if(!s)return;if(!r.find((e=>{const[,,t,r]=e;return t!==r})))return;t.done((()=>{const t=r.reduce(((e,t)=>(e.push([...t]),e)),[]);(0,o.arrayEach)(t,(t=>{t[1]=e.propToCol(t[1])}));const n=s>1?this.getSelected():[[t[0][0],t[0][1]]];return new c.ChangeAction(t,n)}),n)})),e.addHook("afterCreateRow",((e,r,n)=>{t.done((()=>new c.CreateRowAction(e,r)),n)})),e.addHook("beforeRemoveRow",((r,n,s,o)=>{t.done((()=>{const s=e.toPhysicalRow(r),o=(0,a.deepClone)(t.instance.getSourceData(s,0,s+n-1,t.instance.countSourceCols()-1));return new c.RemoveRowAction(s,o,e.getSettings().fixedRowsBottom,e.getSettings().fixedRowsTop,e.rowIndexMapper.getIndexesSequence())}),o)})),e.addHook("afterCreateCol",((e,r,n)=>{t.done((()=>new c.CreateColumnAction(e,r)),n)})),e.addHook("beforeRemoveCol",((r,n,s,o)=>{t.done((()=>{const s=t.instance.getSourceDataArray(),o=(t.instance.countCols()+r)%t.instance.countCols(),a=[],l=[],u=[];(0,i.rangeEach)(s.length-1,(t=>{const r=[],l=s[t];(0,i.rangeEach)(o,o+(n-1),(t=>{r.push(l[e.toPhysicalColumn(t)])})),a.push(r)})),(0,i.rangeEach)(n-1,(t=>{u.push(e.toPhysicalColumn(o+t))})),Array.isArray(e.getSettings().colHeaders)&&(0,i.rangeEach)(n-1,(t=>{l.push(e.getSettings().colHeaders[e.toPhysicalColumn(o+t)]||null)}));const h=e.columnIndexMapper.getIndexesSequence(),d=e.rowIndexMapper.getIndexesSequence();return new c.RemoveColumnAction(o,u,a,l,h,d,e.getSettings().fixedColumnsStart)}),o)})),e.addHook("beforeCellAlignment",((e,r,n,s)=>{t.done((()=>new c.CellAlignmentAction(e,r,n,s)))})),e.addHook("beforeFilter",(e=>{t.done((()=>new c.FiltersAction(e)))})),e.addHook("beforeRowMove",((e,r)=>{!1!==e&&t.done((()=>new c.RowMoveAction(e,r)))})),e.addHook("beforeMergeCells",((r,n)=>{n||t.done((()=>new c.MergeCellsAction(e,r)))})),e.addHook("afterUnmergeCells",((r,n)=>{n||t.done((()=>new c.UnmergeCellsAction(e,r)))})),e.addHook("afterInit",(()=>{t.init()}))}t.PLUGIN_KEY=h,c.prototype.done=function(e,t){if(this.ignoreNewActions)return;if("UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t)return;const r=this.doneActions.slice();if(!1===this.instance.runHooks("beforeUndoStackChange",r,t))return;const n=e(),s=this.undoneActions.slice();this.doneActions.push(n),this.instance.runHooks("afterUndoStackChange",r,this.doneActions.slice()),this.instance.runHooks("beforeRedoStackChange",s),this.undoneActions.length=0,this.instance.runHooks("afterRedoStackChange",s,this.undoneActions.slice())},c.prototype.undo=function(){if(this.isUndoAvailable()){const e=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",e);const t=this.doneActions.pop();this.instance.runHooks("afterUndoStackChange",e,this.doneActions.slice());const r=(0,a.deepClone)(t);if(!1===this.instance.runHooks("beforeUndo",r))return;this.ignoreNewActions=!0;const n=this,s=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",s),t.undo(this.instance,(()=>{n.ignoreNewActions=!1,n.undoneActions.push(t)})),this.instance.runHooks("afterRedoStackChange",s,this.undoneActions.slice()),this.instance.runHooks("afterUndo",r)}},c.prototype.redo=function(){if(this.isRedoAvailable()){const e=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",e);const t=this.undoneActions.pop();this.instance.runHooks("afterRedoStackChange",e,this.undoneActions.slice());const r=(0,a.deepClone)(t);if(!1===this.instance.runHooks("beforeRedo",r))return;this.ignoreNewActions=!0;const n=this,s=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",s),t.redo(this.instance,(()=>{n.ignoreNewActions=!1,n.doneActions.push(t)})),this.instance.runHooks("afterUndoStackChange",s,this.doneActions.slice()),this.instance.runHooks("afterRedo",r)}},c.prototype.isUndoAvailable=function(){return this.doneActions.length>0},c.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},c.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},c.prototype.isEnabled=function(){return this.enabled},c.prototype.enable=function(){if(this.isEnabled())return;const e=this.instance;var t;this.enabled=!0,(t=e).undo=function(){return t.undoRedo.undo()},t.redo=function(){return t.undoRedo.redo()},t.isUndoAvailable=function(){return t.undoRedo.isUndoAvailable()},t.isRedoAvailable=function(){return t.undoRedo.isRedoAvailable()},t.clearUndo=function(){return t.undoRedo.clear()},this.registerShortcuts(),e.addHook("afterChange",p)},c.prototype.disable=function(){if(!this.isEnabled())return;const e=this.instance;var t;this.enabled=!1,delete(t=e).undo,delete t.redo,delete t.isUndoAvailable,delete t.isRedoAvailable,delete t.clearUndo,this.unregisterShortcuts(),e.removeHook("afterChange",p)},c.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null},c.Action=function(){},c.Action.prototype.undo=function(){},c.Action.prototype.redo=function(){},c.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},(0,a.inherit)(c.ChangeAction,c.Action),c.ChangeAction.prototype.undo=function(e,t){const r=(0,a.deepClone)(this.changes),n=e.countEmptyRows(!0),s=e.countEmptyCols(!0);for(let e=0,t=r.length;e<t;e++)r[e].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(r,null,null,"UndoRedo.undo");for(let t=0,o=r.length;t<o;t++){const[o,i]=r[t];e.getSettings().minSpareRows&&o+1+e.getSettings().minSpareRows===e.countRows()&&n===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(o+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&i+1+e.getSettings().minSpareCols===e.countCols()&&s===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(i+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())}e.selectCells(this.selected,!1,!1)},c.ChangeAction.prototype.redo=function(e,t){const r=(0,a.deepClone)(this.changes);for(let e=0,t=r.length;e<t;e++)r[e].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(r,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)},c.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},(0,a.inherit)(c.CreateRowAction,c.Action),c.CreateRowAction.prototype.undo=function(e,t){const r=e.countRows(),n=e.getSettings().minSpareRows;this.index>=r&&this.index-n<r&&(this.index-=n),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},c.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")},c.RemoveRowAction=function(e,t,r,n,s){this.index=e,this.data=t,this.actionType="remove_row",this.fixedRowsBottom=r,this.fixedRowsTop=n,this.rowIndexesSequence=s},(0,a.inherit)(c.RemoveRowAction,c.Action),c.RemoveRowAction.prototype.undo=function(e,t){const r=e.getSettings(),n=[];r.fixedRowsBottom=this.fixedRowsBottom,r.fixedRowsTop=this.fixedRowsTop,this.data.forEach(((e,t)=>{Object.keys(e).forEach((r=>{const s=parseInt(r,10);n.push([this.index+t,isNaN(s)?r:s,e[r]])}))})),e.alter("insert_row_above",this.index,this.data.length,"UndoRedo.undo"),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(n,null,null,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence)},c.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},c.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},(0,a.inherit)(c.CreateColumnAction,c.Action),c.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},c.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")},c.RemoveColumnAction=function(e,t,r,n,s,o,i){this.index=e,this.indexes=t,this.data=r,this.amount=this.data[0].length,this.headers=n,this.columnPositions=s.slice(0),this.rowPositions=o.slice(0),this.actionType="remove_col",this.fixedColumnsStart=i},(0,a.inherit)(c.RemoveColumnAction,c.Action),c.RemoveColumnAction.prototype.undo=function(e,t){e.getSettings().fixedColumnsStart=this.fixedColumnsStart;const r=this.indexes.slice(0).sort(),n=(e,t,n)=>n[this.indexes.indexOf(r[t])],s=this.data.length,i=[];for(let e=0;e<s;e++)i.push((0,o.arrayMap)(this.data[e],n));const a=(0,o.arrayMap)(this.headers,n),l=[];e.alter("insert_col_start",this.indexes[0],this.indexes.length,"UndoRedo.undo"),(0,o.arrayEach)(e.getSourceDataArray(),((e,t)=>{(0,o.arrayEach)(r,((r,n)=>{e[r]=i[t][n],l.push([t,r,e[r]])}))})),e.setSourceDataAtCell(l,void 0,void 0,"UndoRedo.undo"),void 0!==this.headers&&(0,o.arrayEach)(a,((t,n)=>{e.getSettings().colHeaders[r[n]]=t})),e.batchExecution((()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)}),!0),e.addHookOnce("afterViewRender",t),e.render()},c.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},c.CellAlignmentAction=function(e,t,r,n){this.stateBefore=e,this.range=t,this.type=r,this.alignment=n},c.CellAlignmentAction.prototype.undo=function(e,t){(0,o.arrayEach)(this.range,(t=>{t.forAll(((t,r)=>{t>=0&&r>=0&&e.setCellMeta(t,r,"className",this.stateBefore[t][r]||" htLeft")}))})),e.addHookOnce("afterViewRender",t),e.render()},c.CellAlignmentAction.prototype.redo=function(e,t){(0,l.align)(this.range,this.type,this.alignment,((t,r)=>e.getCellMeta(t,r)),((t,r,n,s)=>e.setCellMeta(t,r,n,s))),e.addHookOnce("afterViewRender",t),e.render()},c.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"},(0,a.inherit)(c.FiltersAction,c.Action),c.FiltersAction.prototype.undo=function(e,t){const r=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),r.conditionCollection.importAllConditions(this.conditionsStack.slice(0,this.conditionsStack.length-1)),r.filter()},c.FiltersAction.prototype.redo=function(e,t){const r=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),r.conditionCollection.importAllConditions(this.conditionsStack),r.filter()};class d extends c.Action{constructor(e,t){super(),this.cellRange=t;const r=this.cellRange.getTopStartCorner(),n=this.cellRange.getBottomEndCorner();this.rangeData=e.getData(r.row,r.col,n.row,n.col)}undo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.unmergeRange(this.cellRange,!0);const n=this.cellRange.getTopStartCorner();e.populateFromArray(n.row,n.col,this.rangeData,void 0,void 0,"MergeCells")}redo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.mergeRange(this.cellRange)}}c.MergeCellsAction=d;class f extends c.Action{constructor(e,t){super(),this.cellRange=t}undo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.mergeRange(this.cellRange,!0)}redo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.unmergeRange(this.cellRange,!0),e.render()}}function p(e,t){if("loadData"===t)return this.undoRedo.clear()}c.UnmergeCellsAction=f,c.RowMoveAction=function(e,t){this.rows=e.slice(),this.finalIndex=t,this.actionType="row_move"},(0,a.inherit)(c.RowMoveAction,c.Action),c.RowMoveAction.prototype.undo=function(e,t){const r=e.getPlugin("manualRowMove"),n=[].concat(this.rows),s=n.filter((e=>e>this.finalIndex)),o=n.filter((e=>e<=this.finalIndex)),i=s.sort(((e,t)=>t-e)).concat(o.sort(((e,t)=>e-t)));e.addHookOnce("afterViewRender",t);for(let t=0;t<i.length;t+=1){const n=e.toVisualRow(i[t]);r.moveRow(n,i[t])}e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)},c.RowMoveAction.prototype.redo=function(e,t){const r=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),r.moveRows(this.rows.slice(),this.finalIndex),e.render(),e.deselectCell(),e.selectRows(this.finalIndex,this.finalIndex+this.rows.length-1)},c.prototype.init=function(){const e=this.instance.getSettings().undo,t=void 0===e||e;this.instance.undoRedo||(this.instance.undoRedo=this),t?this.instance.undoRedo.enable():this.instance.undoRedo.disable()},c.prototype.registerShortcuts=function(){const e=this.instance.getShortcutManager().getContext("grid"),t={runOnlyIf:e=>!e.altKey,group:u};e.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],t)},c.prototype.unregisterShortcuts=function(){this.instance.getShortcutManager().getContext("grid").removeShortcutsByGroup(u)};const g=s.default.getSingleton();g.add("afterUpdateSettings",(function(){var e;null===(e=this.getPlugin("undoRedo"))||void 0===e||e.init()})),g.register("beforeUndo"),g.register("afterUndo"),g.register("beforeRedo"),g.register("afterRedo"),c.PLUGIN_KEY=h,c.SETTING_KEYS=!0;var m=c;t.default=m},87396:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllModules=function(){(0,n.registerAllEditors)(),(0,s.registerAllRenderers)(),(0,o.registerAllValidators)(),(0,i.registerAllCellTypes)(),(0,a.registerAllPlugins)()};var n=r(5944);t.registerAllEditors=n.registerAllEditors;var s=r(19433);t.registerAllRenderers=s.registerAllRenderers;var o=r(65967);t.registerAllValidators=o.registerAllValidators;var i=r(419);t.registerAllCellTypes=i.registerAllCellTypes;var a=r(6191);t.registerAllPlugins=a.registerAllPlugins},36330:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.autocompleteRenderer=h;var s=r(36017),o=r(26031),i=n(r(57340)),a=r(49587);r(67004);var l=r(66862);const u="autocomplete";function h(e,t,r,n,u,h,c){const{rootDocument:d}=e,f=c.allowHtml?s.htmlRenderer:o.textRenderer,p=d.createElement("DIV"),g=e.getSettings().ariaTags;if(p.className="htAutocompleteArrow",g&&p.setAttribute(...(0,l.A11Y_HIDDEN)()),p.appendChild(d.createTextNode(String.fromCharCode(9660))),f.apply(this,[e,t,r,n,u,h,c]),t.firstChild||t.appendChild(d.createTextNode(String.fromCharCode(160))),t.insertBefore(p,t.firstChild),(0,a.addClass)(t,"htAutocomplete"),g&&t.setAttribute(...(0,l.A11Y_HASPOPUP)("listbox")),!e.acArrowListener){const s=new i.default(e);e.acArrowListener=function(s){(0,a.hasClass)(s.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(r,n),t)},s.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(()=>{s.destroy()}))}}t.RENDERER_TYPE=u,h.RENDERER_TYPE=u},20395:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(36330);t.RENDERER_TYPE=n.RENDERER_TYPE,t.autocompleteRenderer=n.autocompleteRenderer},15052:(e,t,r)=>{"use strict";t.__esModule=!0,t.baseRenderer=i,r(95988);var n=r(49587),s=r(66862);const o="base";function i(e,t,r,o,i,a,l){const u=l.ariaTags,h=[],c=[],d=[],f=[];l.className&&(0,n.addClass)(t,l.className),l.readOnly?(h.push(l.readOnlyCellClassName),u&&f.push((0,s.A11Y_READONLY)())):u&&d.push((0,s.A11Y_READONLY)()[0]),!1===l.valid&&l.invalidCellClassName?(h.push(l.invalidCellClassName),u&&f.push((0,s.A11Y_INVALID)())):(c.push(l.invalidCellClassName),u&&d.push((0,s.A11Y_INVALID)()[0])),!1===l.wordWrap&&l.noWordWrapClassName&&h.push(l.noWordWrapClassName),!a&&l.placeholder&&h.push(l.placeholderCellClassName),(0,n.removeClass)(t,c),(0,n.addClass)(t,h),(0,n.removeAttribute)(t,d),(0,n.setAttribute)(t,f)}t.RENDERER_TYPE=o,i.RENDERER_TYPE=o},21755:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(15052);t.RENDERER_TYPE=n.RENDERER_TYPE,t.baseRenderer=n.baseRenderer},31494:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.checkboxRenderer=w,r(95988);var s=r(21755),o=n(r(57340)),i=r(49587),a=r(97639),l=r(51377),u=n(r(54925)),h=r(66862),c=r(497);r(51768);const d=new WeakMap,f=new WeakMap,p="htBadValue",g="data-row",m="data-col",E="checkboxRenderer",y="checkbox";function w(e,t,r,n,u,y,w){const{rootDocument:v}=e,R=e.getSettings().ariaTags;s.baseRenderer.apply(this,[e,t,r,n,u,y,w]),function(e){let t=f.get(e);if(!t){const{rootElement:r}=e;t=new o.default(e),t.addEventListener(r,"click",(t=>function(e,t){const{target:r}=e;if(!C(r))return;if(!r.hasAttribute(g)||!r.hasAttribute(m))return;const n=parseInt(r.getAttribute(g),10),s=parseInt(r.getAttribute(m),10),o=t.getCellMeta(n,s);o.readOnly&&e.preventDefault()}(t,e))),t.addEventListener(r,"mouseup",(t=>function(e,t){const{target:r}=e;if(!C(r))return;if(!r.hasAttribute(g)||!r.hasAttribute(m))return;setTimeout(t.listen,10)}(t,e))),t.addEventListener(r,"change",(t=>function(e,t){const{target:r}=e;if(!C(r))return;if(!r.hasAttribute(g)||!r.hasAttribute(m))return;const n=parseInt(r.getAttribute(g),10),s=parseInt(r.getAttribute(m),10),o=t.getCellMeta(n,s);if(!o.readOnly){let r=null;r=e.target.checked?void 0===o.uncheckedTemplate||o.checkedTemplate:void 0!==o.uncheckedTemplate&&o.uncheckedTemplate,t.setDataAtCell(n,s,r)}}(t,e))),f.set(e,t)}}(e);let S=function(e){const t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("autocomplete","off"),t.setAttribute("tabindex","-1"),t.cloneNode(!1)}(v);const T=w.label;let N=!1;if(void 0===w.checkedTemplate&&(w.checkedTemplate=!0),void 0===w.uncheckedTemplate&&(w.uncheckedTemplate=!1),(0,i.empty)(t),y===w.checkedTemplate||(0,a.stringify)(y).toLocaleLowerCase(w.locale)===(0,a.stringify)(w.checkedTemplate).toLocaleLowerCase(w.locale)?S.checked=!0:y===w.uncheckedTemplate||(0,a.stringify)(y).toLocaleLowerCase(w.locale)===(0,a.stringify)(w.uncheckedTemplate).toLocaleLowerCase(w.locale)?S.checked=!1:(0,a.isEmpty)(y)?(0,i.addClass)(S,"noValue"):(S.style.display="none",(0,i.addClass)(S,p),N=!0),(0,i.setAttribute)(S,[[g,r],[m,n]]),R&&(0,i.setAttribute)(S,[(0,h.A11Y_LABEL)(S.checked?e.getTranslatedPhrase(c.CHECKBOX_CHECKED):e.getTranslatedPhrase(c.CHECKBOX_UNCHECKED)),(0,h.A11Y_CHECKED)(S.checked),(0,h.A11Y_CHECKBOX)()]),!N&&T){let s="";if(T.value)s="function"==typeof T.value?T.value.call(this,r,n,u,y):T.value;else if(T.property){const t=e.getDataAtRowProp(r,T.property);s=null!==t?t:""}const o=function(e,t,r){const n=e.createElement("label");return n.className="htCheckboxRendererLabel "+(r?"fullWidth":""),n.appendChild(e.createTextNode(t)),n.cloneNode(!0)}(v,s,!0!==T.separated);"before"===T.position?T.separated?(t.appendChild(o),t.appendChild(S)):(o.appendChild(S),S=o):T.position&&"after"!==T.position||(T.separated?(t.appendChild(S),t.appendChild(o)):(o.insertBefore(S,o.firstChild),S=o))}function O(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const r=e.getSelectedRange();if(r)for(let n=0;n<r.length;n++){const{row:s,col:o}=r[n].getTopStartCorner(),{row:i,col:a}=r[n].getBottomEndCorner(),l=[];for(let r=s;r<=i;r+=1)for(let n=o;n<=a;n+=1){const s=e.getCellMeta(r,n);if("checkbox"!==s.type)return;if(!0===s.readOnly)continue;void 0===s.checkedTemplate&&(s.checkedTemplate=!0),void 0===s.uncheckedTemplate&&(s.uncheckedTemplate=!1);const o=e.getDataAtCell(r,n);!1===t?[s.checkedTemplate,s.checkedTemplate.toString()].includes(o)?l.push([r,n,s.uncheckedTemplate]):[s.uncheckedTemplate,s.uncheckedTemplate.toString(),null,void 0].includes(o)&&l.push([r,n,s.checkedTemplate]):l.push([r,n,s.uncheckedTemplate])}l.length>0&&e.setDataAtCell(l)}}function M(){const t=e.getSelectedRange();if(t){for(let r=0;r<t.length;r++){const n=t[r].getTopStartCorner(),s=t[r].getBottomEndCorner();for(let t=n.row;t<=s.row;t++)for(let r=n.col;r<=s.col;r++){const n=e.getCellMeta(t,r);if("checkbox"!==n.type)return!1;const s=e.getCell(t,r);if(null==s)return!0;if(s.querySelectorAll("input[type=checkbox]").length>0&&!n.readOnly)return!0}}return!1}}(!T||T&&!T.separated)&&t.appendChild(S),N&&t.appendChild(v.createTextNode("#bad-value#")),d.has(e)||(d.set(e,!0),function(){const t=e.getShortcutManager().getContext("grid"),r={group:E};t.addShortcuts([{keys:[["space"]],callback:()=>(O(),!M())},{keys:[["enter"]],callback:()=>(O(),!M()),runOnlyIf:()=>e.getSettings().enterBeginsEditing},{keys:[["delete"],["backspace"]],callback:()=>(O(!0),!M()),relativeToGroup:l.EDITOR_EDIT_GROUP,position:"before"}],r)}())}function C(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}t.RENDERER_TYPE=y,u.default.getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,r){const{label:n,type:s,row:o,column:i,prop:a}=t;if(s===y){if(n){const{value:t,property:s}=n;let l=r;if(t)l="function"==typeof t?t(o,i,a,r):t;else if(s){const e=this.getDataAtRowProp(o,s);l=null!==e?e:r}e=l}return e}})),w.RENDERER_TYPE=y},30201:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(31494);t.RENDERER_TYPE=n.RENDERER_TYPE,t.checkboxRenderer=n.checkboxRenderer},7066:(e,t,r)=>{"use strict";t.__esModule=!0,t.dateRenderer=a;var n=r(20395),s=r(66862),o=r(49587);const i="date";function a(e,t,r,i,a,l,u){n.autocompleteRenderer.apply(this,[e,t,r,i,a,l,u]),e.getSettings().ariaTags&&(0,o.setAttribute)(t,[(0,s.A11Y_HASPOPUP)("dialog"),(0,s.A11Y_EXPANDED)("false")])}t.RENDERER_TYPE=i,a.RENDERER_TYPE=i},61795:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(7066);t.RENDERER_TYPE=n.RENDERER_TYPE,t.dateRenderer=n.dateRenderer},25708:(e,t,r)=>{"use strict";t.__esModule=!0,t.handsontableRenderer=a;var n=r(20395),s=r(66862),o=r(49587);const i="handsontable";function a(e,t,r,i,a,l,u){n.autocompleteRenderer.apply(this,[e,t,r,i,a,l,u]),e.getSettings().ariaTags&&(0,o.setAttribute)(t,[(0,s.A11Y_HASPOPUP)("true"),(0,s.A11Y_EXPANDED)("false")])}t.RENDERER_TYPE=i,a.RENDERER_TYPE=i},75067:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(25708);t.RENDERER_TYPE=n.RENDERER_TYPE,t.handsontableRenderer=n.handsontableRenderer},54914:(e,t,r)=>{"use strict";t.__esModule=!0,t.htmlRenderer=i;var n=r(21755),s=r(49587);const o="html";function i(e,t,r,o,i,a,l){n.baseRenderer.apply(this,[e,t,r,o,i,a,l]),(0,s.fastInnerHTML)(t,null==a?"":a,!1)}t.RENDERER_TYPE=o,i.RENDERER_TYPE=o},36017:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(54914);t.RENDERER_TYPE=n.RENDERER_TYPE,t.htmlRenderer=n.htmlRenderer},19433:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllRenderers=function(){(0,c.registerRenderer)(n.autocompleteRenderer),(0,c.registerRenderer)(s.baseRenderer),(0,c.registerRenderer)(o.checkboxRenderer),(0,c.registerRenderer)(i.htmlRenderer),(0,c.registerRenderer)(a.numericRenderer),(0,c.registerRenderer)(l.passwordRenderer),(0,c.registerRenderer)(u.textRenderer),(0,c.registerRenderer)(h.timeRenderer)};var n=r(20395);t.autocompleteRenderer=n.autocompleteRenderer,t.AUTOCOMPLETE_RENDERER=n.RENDERER_TYPE;var s=r(21755);t.baseRenderer=s.baseRenderer,t.BASE_RENDERER=s.RENDERER_TYPE;var o=r(30201);t.checkboxRenderer=o.checkboxRenderer,t.CHECKBOX_RENDERER=o.RENDERER_TYPE;var i=r(36017);t.htmlRenderer=i.htmlRenderer,t.HTML_RENDERER=i.RENDERER_TYPE;var a=r(94350);t.numericRenderer=a.numericRenderer,t.NUMERIC_RENDERER=a.RENDERER_TYPE;var l=r(32991);t.passwordRenderer=l.passwordRenderer,t.PASSWORD_RENDERER=l.RENDERER_TYPE;var u=r(26031);t.textRenderer=u.textRenderer,t.TEXT_RENDERER=u.RENDERER_TYPE;var h=r(78279);t.timeRenderer=h.timeRenderer,t.TIME_RENDERER=h.RENDERER_TYPE;var c=r(36996);t.registerRenderer=c.registerRenderer,t.getRegisteredRendererNames=c.getRegisteredRendererNames,t.getRegisteredRenderers=c.getRegisteredRenderers,t.getRenderer=c.getRenderer,t.hasRenderer=c.hasRenderer},94350:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(65677);t.RENDERER_TYPE=n.RENDERER_TYPE,t.numericRenderer=n.numericRenderer},65677:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.numericRenderer=l,r(95988);var s=n(r(75586)),o=r(26031),i=r(57691);const a="numeric";function l(e,t,r,n,a,l,u){let h=l;if((0,i.isNumeric)(h)){const e=u.numericFormat,r=e&&e.culture||"-",n=e&&e.pattern,o=u.className||"",i=o.length?o.split(" "):[];if(void 0!==r&&!s.default.languages()[r]){const e=r.replace("-",""),t=s.default.allLanguages?s.default.allLanguages[r]:s.default[e];t&&s.default.registerLanguage(t)}s.default.setLanguage(r),h=(0,s.default)(h).format(n||"0"),i.indexOf("htLeft")<0&&i.indexOf("htCenter")<0&&i.indexOf("htRight")<0&&i.indexOf("htJustify")<0&&i.push("htRight"),i.indexOf("htNumeric")<0&&i.push("htNumeric"),u.className=i.join(" "),t.dir="ltr"}(0,o.textRenderer)(e,t,r,n,a,h,u)}t.RENDERER_TYPE=a,l.RENDERER_TYPE=a},32991:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(88090);t.RENDERER_TYPE=n.RENDERER_TYPE,t.passwordRenderer=n.passwordRenderer},88090:(e,t,r)=>{"use strict";t.__esModule=!0,t.passwordRenderer=a;var n=r(26031),s=r(49587),o=r(57691);const i="password";function a(e,t,r,i,a,l,u){n.textRenderer.apply(this,[e,t,r,i,a,l,u]);const h=u.hashLength||t.innerHTML.length,c=u.hashSymbol||"*";let d="";(0,o.rangeEach)(h-1,(()=>{d+=c})),(0,s.fastInnerHTML)(t,d)}t.RENDERER_TYPE=i,a.RENDERER_TYPE=i},36996:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getRenderer=function(e){if("function"==typeof e)return e;if(!a(e))throw Error(`No registered renderer found under "${e}" name`);return i(e)},t.registerRenderer=function(e,t){"string"!=typeof e&&(e=(t=e).RENDERER_TYPE);o(e,t)},r(60740);var s=n(r(31056));const{register:o,getItem:i,hasItem:a,getNames:l,getValues:u}=(0,s.default)("renderers");t.getRegisteredRenderers=u,t.getRegisteredRendererNames=l,t.hasRenderer=a},9126:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(3145);t.RENDERER_TYPE=n.RENDERER_TYPE,t.selectRenderer=n.selectRenderer},3145:(e,t,r)=>{"use strict";t.__esModule=!0,t.selectRenderer=a;var n=r(26031),s=r(66862),o=r(49587);const i="select";function a(e,t,r,i,a,l,u){n.textRenderer.apply(this,[e,t,r,i,a,l,u]),e.getSettings().ariaTags&&(0,o.setAttribute)(t,...(0,s.A11Y_HASPOPUP)("listbox"))}t.RENDERER_TYPE=i,a.RENDERER_TYPE=i},26031:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(80071);t.RENDERER_TYPE=n.RENDERER_TYPE,t.textRenderer=n.textRenderer},80071:(e,t,r)=>{"use strict";t.__esModule=!0,t.textRenderer=a;var n=r(21755),s=r(49587),o=r(97639);const i="text";function a(e,t,r,i,a,l,u){n.baseRenderer.apply(this,[e,t,r,i,a,l,u]);let h=l;if(!h&&u.placeholder&&(h=u.placeholder),h=(0,o.stringify)(h),u.trimWhitespace&&(h=h.trim()),u.rendererTemplate){(0,s.empty)(t);const n=e.rootDocument.createElement("TEMPLATE");n.setAttribute("bind","{{}}"),n.innerHTML=u.rendererTemplate,HTMLTemplateElement.decorate(n),n.model=e.getSourceDataAtRow(r),t.appendChild(n)}else(0,s.fastInnerText)(t,h)}t.RENDERER_TYPE=i,a.RENDERER_TYPE=i},78279:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(73874);t.RENDERER_TYPE=n.RENDERER_TYPE,t.timeRenderer=n.timeRenderer},73874:(e,t,r)=>{"use strict";t.__esModule=!0,t.timeRenderer=o;var n=r(26031);const s="time";function o(e,t,r,s,o,i,a){n.textRenderer.apply(this,[e,t,r,s,o,i,a]),t.dir="ltr"}t.RENDERER_TYPE=s,o.RENDERER_TYPE=s},41294:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988),r(60740);var s=n(r(93231)),o=r(41418),i=r(75821),a=r(59616),l=r(15574),u=r(24413),h=r(37765),c=r(79456),d=r(66786),f=r(98309),p=r(94699);t.ACTIVE_HEADER_TYPE=p.HIGHLIGHT_ACTIVE_HEADER_TYPE,t.AREA_TYPE=p.HIGHLIGHT_AREA_TYPE,t.FOCUS_TYPE=p.HIGHLIGHT_FOCUS_TYPE,t.CUSTOM_SELECTION_TYPE=p.HIGHLIGHT_CUSTOM_SELECTION_TYPE,t.FILL_TYPE=p.HIGHLIGHT_FILL_TYPE,t.HEADER_TYPE=p.HIGHLIGHT_HEADER_TYPE,t.ROW_TYPE=p.HIGHLIGHT_ROW_TYPE,t.COLUMN_TYPE=p.HIGHLIGHT_COLUMN_TYPE;var g=r(98887);let m;function E(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var w=new WeakSet;m=Symbol.iterator;function C(e,t){const r=this.layerLevel;if(e.has(r))return e.get(r);const n=t({layerLevel:r,...this.options});return e.set(r,n),n}var v=class{constructor(e){E(this,w),(0,s.default)(this,"options",void 0),(0,s.default)(this,"layerLevel",0),(0,s.default)(this,"focus",void 0),(0,s.default)(this,"fill",void 0),(0,s.default)(this,"layeredAreas",new Map),(0,s.default)(this,"areas",new Map),(0,s.default)(this,"rowHeaders",new Map),(0,s.default)(this,"columnHeaders",new Map),(0,s.default)(this,"activeRowHeaders",new Map),(0,s.default)(this,"activeColumnHeaders",new Map),(0,s.default)(this,"activeCornerHeaders",new Map),(0,s.default)(this,"rowHighlights",new Map),(0,s.default)(this,"columnHighlights",new Map),(0,s.default)(this,"customSelections",[]),this.options=e,this.focus=(0,u.createHighlight)(e),this.fill=(0,c.createHighlight)(e)}isEnabledFor(e,t){let r=e;e===p.HIGHLIGHT_FOCUS_TYPE&&(r="current");let n=this.options.disabledCellSelection(t.row,t.col);return"string"==typeof n&&(n=[n]),!1===n||Array.isArray(n)&&!n.includes(r)}useLayerLevel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return y(this,w,C).call(this,this.layeredAreas,i.createHighlight)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return y(this,w,C).call(this,this.areas,a.createHighlight)}getAreas(){return[...this.areas.values()]}createRowHeader(){return y(this,w,C).call(this,this.rowHeaders,d.createHighlight)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return y(this,w,C).call(this,this.columnHeaders,d.createHighlight)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return y(this,w,C).call(this,this.activeRowHeaders,o.createHighlight)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return y(this,w,C).call(this,this.activeColumnHeaders,o.createHighlight)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return y(this,w,C).call(this,this.activeCornerHeaders,o.createHighlight)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return y(this,w,C).call(this,this.rowHighlights,f.createHighlight)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return y(this,w,C).call(this,this.columnHighlights,l.createHighlight)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push((0,h.createHighlight)({...this.options,...e}))}clear(){this.focus.clear(),this.fill.clear(),(0,g.arrayEach)(this.areas.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.layeredAreas.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.rowHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.columnHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.activeRowHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.activeColumnHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.activeCornerHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.rowHighlights.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.columnHighlights.values(),(e=>{e.clear()}))}[m](){return[this.focus,this.fill,...this.areas.values(),...this.layeredAreas.values(),...this.rowHeaders.values(),...this.columnHeaders.values(),...this.activeRowHeaders.values(),...this.activeColumnHeaders.values(),...this.activeCornerHeaders.values(),...this.rowHighlights.values(),...this.columnHighlights.values(),...this.customSelections][Symbol.iterator]()}};t.default=v},41418:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{activeHeaderClassName:t,...r}=e;return new o.default({className:t,...r,selectionType:s.HIGHLIGHT_ACTIVE_HEADER_TYPE})};var s=r(94699),o=n(r(6250))},59616:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new o.default({className:"highlight",...t,selectionType:s.HIGHLIGHT_AREA_TYPE})};var s=r(94699),o=n(r(6250))},75821:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{areaCornerVisible:t,...r}=e;return new o.default({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...r,selectionType:s.HIGHLIGHT_AREA_TYPE})};var s=r(94699),o=n(r(6250))},15574:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{columnClassName:t,...r}=e;return new o.default({className:t,...r,selectionType:s.HIGHLIGHT_COLUMN_TYPE})};var s=r(94699),o=n(r(6250))},37765:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{border:t,visualCellRange:r,...n}=e;return new o.default({...t,...n,selectionType:s.HIGHLIGHT_CUSTOM_SELECTION_TYPE},r)};var s=r(94699),o=n(r(6250))},79456:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new o.default({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:s.HIGHLIGHT_FILL_TYPE})};var s=r(94699),o=n(r(6250))},24413:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{cellCornerVisible:t,...r}=e;return new o.default({className:"current",border:{width:2,color:"#4b89ff",cornerVisible:t},...r,selectionType:s.HIGHLIGHT_FOCUS_TYPE})};var s=r(94699),o=n(r(6250))},66786:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{headerClassName:t,...r}=e;return new o.default({className:t,...r,selectionType:s.HIGHLIGHT_HEADER_TYPE})};var s=r(94699),o=n(r(6250))},98309:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{rowClassName:t,...r}=e;return new o.default({className:t,...r,selectionType:s.HIGHLIGHT_ROW_TYPE})};var s=r(94699),o=n(r(6250))},6250:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(94699);class i extends o.Selection{constructor(e,t){super(e,null),(0,s.default)(this,"visualCellRange",null),this.visualCellRange=t||null,this.commit()}add(e){return null===this.visualCellRange?this.visualCellRange=this.settings.createCellRange(e):this.visualCellRange.expand(e),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly(e){let{from:t,to:r}=e,n=this.getNearestNotHiddenCoords(t,1),s=this.getNearestNotHiddenCoords(r,-1);return null===n||null===s?null:((n.row>s.row||n.col>s.col)&&(n=t,s=r),this.settings.createCellRange(n,n,s))}getNearestNotHiddenCoords(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const n=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,e.row,t);if(null===n)return null;const s=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,r);return null===s?null:this.settings.createCellCoords(n,s)}getNearestNotHiddenIndex(e,t,r){return t<0?t:e.getNearestNotHiddenIndex(t,r)}commit(){if(null===this.visualCellRange)return this;const e=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return this.cellRange=null===e?null:this.createRenderableCellRange(e.from,e.to),this}syncWith(e){const t=e.from.clone().normalize(),r="N-S"===e.getVerticalDirection()?1:-1,n="W-E"===e.getHorizontalDirection()?1:-1,s=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let o=null;if(null!==s&&null!==s.col&&null!==s.row||(o=this.getNearestNotHiddenCoords(t,r,n)),null!==o&&e.overlaps(o)){const t=e.highlight.clone();if(t.row>=0&&(t.row=o.row),t.col>=0&&(t.col=o.col),null===this.cellRange){const e=this.settings.visualToRenderableCoords(t);this.cellRange=this.settings.createCellRange(e)}e.setHighlight(t)}return"focus"===this.settings.selectionType&&null!==s&&null===o&&e.setHighlight(this.visualCellRange.highlight),this}getCorners(){const{from:e,to:t}=this.cellRange;return[Math.min(e.row,t.row),Math.min(e.col,t.col),Math.max(e.row,t.row),Math.max(e.col,t.col)]}getVisualCorners(){const e=this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner()),t=this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());return[e.row,e.col,t.row,t.col]}createRenderableCellRange(e,t){const r=this.settings.visualToRenderableCoords(e),n=this.settings.visualToRenderableCoords(t);return null===r.row||null===r.col||null===n.row||null===n.col?null:this.settings.createCellRange(r,r,n)}}var a=i;t.default=a},79055:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s={Selection:!0,handleMouseEvent:!0,detectSelectionType:!0,normalizeSelectionFactory:!0},o=n(r(30392));t.Selection=o.default;var i=r(56740);t.handleMouseEvent=i.handleMouseEvent;var a=r(7763);t.detectSelectionType=a.detectSelectionType,t.normalizeSelectionFactory=a.normalizeSelectionFactory;var l=r(41294);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},56740:(e,t,r)=>{"use strict";t.__esModule=!0,t.handleMouseEvent=function(e,t){let{coords:r,selection:s,controller:o,cellCoordsFactory:a}=t;i.get(e.type)({coords:r,selection:s,controller:o,cellCoordsFactory:a,isShiftKey:e.shiftKey,isLeftClick:(0,n.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,n.isRightClick)(e)})},t.mouseDown=s,t.mouseOver=o;var n=r(30369);function s(e){let{isShiftKey:t,isLeftClick:r,isRightClick:n,coords:s,selection:o,controller:i,cellCoordsFactory:a}=e;const l=o.isSelected()?o.getSelectedRange().current():null,u=o.isSelectedByCorner(),h=o.isSelectedByRowHeader();if(t&&l)s.row>=0&&s.col>=0&&!i.cell?o.setRangeEnd(s):(u||h)&&s.row>=0&&s.col>=0&&!i.cell?o.setRangeEnd(a(s.row,s.col)):u&&s.row<0&&!i.column?o.setRangeEnd(a(l.to.row,s.col)):h&&s.col<0&&!i.row?o.setRangeEnd(a(s.row,l.to.col)):(!u&&!h&&s.col<0||u&&s.col<0)&&!i.row?o.selectRows(Math.max(l.from.row,0),s.row,s.col):(!u&&!h&&s.row<0||h&&s.row<0)&&!i.column&&o.selectColumns(Math.max(l.from.col,0),s.col,s.row);else{const e=!o.inInSelection(s),t=r||n&&e;s.row<0&&s.col>=0&&!i.column?t&&o.selectColumns(s.col,s.col,s.row):s.col<0&&s.row>=0&&!i.row?t&&o.selectRows(s.row,s.row,s.col):s.col>=0&&s.row>=0&&!i.cell?t&&o.setRangeStart(s):s.col<0&&s.row<0&&o.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}}function o(e){let{isLeftClick:t,coords:r,selection:n,controller:s,cellCoordsFactory:o}=e;if(!t)return;const i=n.isSelectedByRowHeader(),a=n.isSelectedByColumnHeader(),l=n.tableProps.countCols(),u=n.tableProps.countRows();a&&!s.column?n.setRangeEnd(o(u-1,r.col)):i&&!s.row?n.setRangeEnd(o(r.row,l-1)):s.cell||n.setRangeEnd(r)}const i=new Map([["mousedown",s],["mouseover",o],["touchstart",s]])},61764:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231));let o;o=Symbol.iterator;var i=class{constructor(e){(0,s.default)(this,"ranges",[]),(0,s.default)(this,"createCellRange",void 0),this.createCellRange=e}isEmpty(){return 0===this.size()}set(e){return this.clear(),this.ranges.push(this.createCellRange(e)),this}add(e){return this.ranges.push(this.createCellRange(e)),this}pop(){return this.ranges.pop(),this}current(){return this.peekByIndex(this.size()-1)}previous(){return this.peekByIndex(this.size()-2)}includes(e){return this.ranges.some((t=>t.includes(e)))}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}peekByIndex(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t>=0&&t<this.size()&&(e=this.ranges[t]),e}[o](){return this.ranges[Symbol.iterator]()}};t.default=i},30392:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=n(r(48427)),i=n(r(42538)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=y(t);if(r&&r.has(e))return r.get(e);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(41294)),l=n(r(61764)),u=r(76163),h=r(97639),c=r(57691),d=r(98887),f=n(r(63806)),p=n(r(64396)),g=r(7763),m=r(45561),E=r(66862);function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(y=function(e){return e?r:t})(e)}function w(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var C=new WeakMap;class v{constructor(e,t){var r=this;(0,s.default)(this,"settings",void 0),(0,s.default)(this,"tableProps",void 0),(0,s.default)(this,"inProgress",!1),(0,s.default)(this,"selectedRange",new l.default(((e,t,r)=>this.tableProps.createCellRange(e,t,r)))),(0,s.default)(this,"highlight",void 0),(0,s.default)(this,"transformation",void 0),(0,s.default)(this,"selectedByRowHeader",new Set),(0,s.default)(this,"selectedByColumnHeader",new Set),w(this,C,{writable:!0,value:!1}),this.settings=e,this.tableProps=t,this.highlight=new a.default({headerClassName:e.currentHeaderClassName,headerAttributes:[(0,E.A11Y_SELECTED)()],activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[(0,E.A11Y_SELECTED)()],rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(e,t)=>this.tableProps.isDisabledCellSelection(e,t),cellCornerVisible:function(){return r.isCellCornerVisible(...arguments)},areaCornerVisible:function(){return r.isAreaCornerVisible(...arguments)},visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),createCellRange:(e,t,r)=>this.tableProps.createCellRange(e,t,r)}),this.transformation=new p.default(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>this.tableProps.countRenderableRows(),countRenderableColumns:()=>this.tableProps.countRenderableColumns(),countRowHeaders:()=>this.tableProps.countRowHeaders(),countColHeaders:()=>this.tableProps.countColHeaders(),visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),navigableHeaders:()=>e.navigableHeaders,fixedRowsBottom:()=>e.fixedRowsBottom,minSpareRows:()=>e.minSpareRows,minSpareCols:()=>e.minSpareCols,autoWrapRow:()=>e.autoWrapRow,autoWrapCol:()=>e.autoWrapCol}),this.transformation.addLocalHook("beforeTransformStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeModifyTransformStart",...t)})),this.transformation.addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("afterModifyTransformStart",...t)})),this.transformation.addLocalHook("beforeTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeModifyTransformEnd",...t)})),this.transformation.addLocalHook("afterTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("afterModifyTransformEnd",...t)})),this.transformation.addLocalHook("insertRowRequire",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("insertRowRequire",...t)})),this.transformation.addLocalHook("insertColRequire",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("insertColRequire",...t)})),this.transformation.addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeRowWrap",...t)})),this.transformation.addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeColumnWrap",...t)}))}getSelectedRange(){return this.selectedRange}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1}isInProgress(){return this.inProgress}setRangeStart(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e;const s="multiple"===this.settings.selectionMode,o=(0,h.isUndefined)(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,i=e.clone();this.runLocalHooks("beforeSetRangeStart"+(r?"Only":""),i),(!s||s&&!o&&(0,h.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(i).current().setHighlight(n.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),r||this.setRangeEnd(e)}setRangeStartOnly(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;this.setRangeStart(e,t,!0,r)}setRangeEnd(e){if(this.selectedRange.isEmpty())return;const t=e.clone(),r=this.tableProps.countRows(),n=this.tableProps.countCols(),s=this.selectedRange.current().clone().setTo(e).isSingleHeader();if((r>0||n>0)&&(0===r&&t.col<0&&!s||0===n&&t.row<0&&!s))return;this.runLocalHooks("beforeSetRangeEnd",t),this.begin();const o=this.selectedRange.current();this.settings.navigableHeaders||o.highlight.normalize(),"single"===this.settings.selectionMode?(o.setFrom(o.highlight),o.setTo(o.highlight)):o.setTo(t),r>0&&n>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!o.isSingleHeader())&&o.to.normalize(),this.runLocalHooks("beforeHighlightSet");const l=this.highlight.getFocus();l.clear(),this.highlight.isEnabledFor(a.FOCUS_TYPE,o.highlight)&&l.add(this.selectedRange.current().highlight).commit().syncWith(o);const u=this.getLayerLevel();u<this.highlight.layerLevel&&((0,d.arrayEach)(this.highlight.getAreas(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getLayeredAreas(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getRowHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getColumnHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveRowHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveColumnHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveCornerHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getRowHighlights(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getColumnHighlights(),(e=>{e.clear()}))),this.highlight.useLayerLevel(u);const h=this.highlight.createArea(),c=this.highlight.createLayeredArea(),f=this.highlight.createRowHeader(),p=this.highlight.createColumnHeader(),g=this.highlight.createActiveRowHeader(),m=this.highlight.createActiveColumnHeader(),E=this.highlight.createActiveCornerHeader(),y=this.highlight.createRowHighlight(),w=this.highlight.createColumnHighlight();if(h.clear(),c.clear(),f.clear(),p.clear(),g.clear(),m.clear(),E.clear(),y.clear(),w.clear(),this.highlight.isEnabledFor(a.AREA_TYPE,o.highlight)&&(this.isMultiple()||u>=1)&&(h.add(o.from).add(o.to).commit(),c.add(o.from).add(o.to).commit(),1===u)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(u-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(u)}if(this.highlight.isEnabledFor(a.HEADER_TYPE,o.highlight)){if(!o.isSingleHeader()){const e=this.tableProps.createCellCoords(Math.max(o.from.row,0),-1),t=this.tableProps.createCellCoords(o.to.row,-1),r=this.tableProps.createCellCoords(-1,Math.max(o.from.col,0)),n=this.tableProps.createCellCoords(-1,o.to.col);"single"===this.settings.selectionMode?(f.add(e).commit(),p.add(r).commit(),y.add(e).commit(),w.add(r).commit()):(f.add(e).add(t).commit(),p.add(r).add(n).commit(),y.add(e).add(t).commit(),w.add(r).add(n).commit())}const e=!(0,i.default)(this,C)&&this.isEntireRowSelected()&&(n>0&&n===o.getWidth()||0===n&&this.isSelectedByRowHeader()),t=!(0,i.default)(this,C)&&this.isEntireColumnSelected()&&(r>0&&r===o.getHeight()||0===r&&this.isSelectedByColumnHeader());e&&g.add(this.tableProps.createCellCoords(Math.max(o.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(o.to.row,0),-1)).commit(),t&&m.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(o.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(o.to.col,0))).commit(),e&&t&&E.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}this.runLocalHooks("afterSetRangeEnd",e)}isMultiple(){const e=(0,u.createObjectPropListener)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}transformStart(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.setRangeStart(this.transformation.transformStart(e,t,r))}transformEnd(e,t){this.setRangeEnd(this.transformation.transformEnd(e,t))}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isSelectedByRowHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner(e)&&(-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e))}isEntireRowSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{col:t}=e.getOuterTopStartCorner(),r=this.tableProps.countRowHeaders(),n=this.tableProps.countCols();return(r>0&&t<0||0===r)&&e.getWidth()===n};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const r=this.selectedRange.peekByIndex(e);return!!r&&t(r)}isSelectedByColumnHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner()&&(-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e))}isEntireColumnSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{row:t}=e.getOuterTopStartCorner(),r=this.tableProps.countColHeaders(),n=this.tableProps.countRows();return(r>0&&t<0||0===r)&&e.getHeight()===n};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const r=this.selectedRange.peekByIndex(e);return!!r&&t(r)}isSelectedByAnyHeader(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}isSelectedByCorner(){return this.selectedByColumnHeader.has(this.getLayerLevel())&&this.selectedByRowHeader.has(this.getLayerLevel())}inInSelection(e){return this.selectedRange.includes(e)}isCellCornerVisible(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}isCellVisible(e){const t=this.tableProps.visualToRenderableCoords(e);return null!==t.row&&null!==t.col}isAreaCornerVisible(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}clear(){this.selectedRange.clear(),this.highlight.clear()}deselect(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}selectAll(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{focusPosition:!1,disableHeadersHighlight:!1};const s=this.tableProps.countRows(),i=this.tableProps.countCols(),a=this.tableProps.countRowHeaders(),l=this.tableProps.countColHeaders(),u=r?-l:0,h=t?-a:0;if(0===u&&0===h&&(0===s||0===i))return;let d=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight;const{focusPosition:f,disableHeadersHighlight:p}=n;(0,o.default)(this,C,p),f&&Number.isInteger(null==f?void 0:f.row)&&Number.isInteger(null==f?void 0:f.col)&&(d=this.tableProps.createCellCoords((0,c.clamp)(f.row,u,s-1),(0,c.clamp)(f.col,h,i-1)));const g=this.tableProps.createCellCoords(u,h),m=this.tableProps.createCellCoords(s-1,i-1);this.clear(),this.setRangeStartOnly(g,void 0,d),h<0&&this.selectedByRowHeader.add(this.getLayerLevel()),u<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(m),this.finish(),(0,o.default)(this,C,!1)}selectCells(e){var t=this;const r=(0,g.detectSelectionType)(e);if(r===g.SELECTION_TYPE_EMPTY)return!1;if(r===g.SELECTION_TYPE_UNRECOGNIZED)throw new Error(m.toSingleLine`Unsupported format of the selection ranges was passed. To select cells pass\x20
973
973
  the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
974
- columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const r=(0,m.normalizeSelectionFactory)(t,{propToCol:e=>this.tableProps.propToCol(e),keepDirection:!0}),n=this.settings.navigableHeaders,s={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:n?this.tableProps.countRowHeaders():0,countColHeaders:n?this.tableProps.countColHeaders():0},o=!e.some((e=>{const t=r(e),n=t.isValid(s);return!(n&&!t.containsHeaders()||n&&t.containsHeaders()&&t.isSingleHeader())}));return o&&(this.clear(),(0,f.arrayEach)(e,(e=>{const{from:t,to:n}=r(e);this.setRangeStartOnly(t.clone(),!1),this.setRangeEnd(n.clone()),this.finish()}))),o}selectColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n="string"==typeof e?this.tableProps.propToCol(e):e,s="string"==typeof t?this.tableProps.propToCol(t):t,o=this.tableProps.countRows(),i=this.tableProps.countCols(),l=this.tableProps.countColHeaders(),u=0===l?0:-l,h=new a.CellCoords(u,n),c=new a.CellCoords(o-1,s),f=new a.CellRange(h,h,c).isValid({countRows:o,countCols:i,countRowHeaders:0,countColHeaders:l});if(f){const e=0===l?0:(0,d.clamp)(r,u,-1),t=o-1,i=this.tableProps.createCellCoords(e,n),a=this.tableProps.createCellCoords(t,s),h=this.tableProps.createCellCoords((0,d.clamp)(r,u,o-1),n);this.runLocalHooks("beforeSelectColumns",i,a,h),i.row=e,a.row=t,this.setRangeStartOnly(i,void 0,h),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(a),this.runLocalHooks("afterSelectColumns",i,a,h),this.finish()}return f}selectRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=this.tableProps.countRows(),s=this.tableProps.countCols(),o=this.tableProps.countRowHeaders(),i=0===o?0:-o,l=new a.CellCoords(e,i),u=new a.CellCoords(t,s-1),h=new a.CellRange(l,l,u).isValid({countRows:n,countCols:s,countRowHeaders:o,countColHeaders:0});if(h){const n=0===o?0:(0,d.clamp)(r,i,-1),a=s-1,l=this.tableProps.createCellCoords(e,n),u=this.tableProps.createCellCoords(t,a),h=this.tableProps.createCellCoords(e,(0,d.clamp)(r,i,s-1));this.runLocalHooks("beforeSelectRows",l,u,h),l.col=n,u.col=a,this.setRangeStartOnly(l,void 0,h),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.runLocalHooks("afterSelectRows",l,u,h),this.finish()}return h}refresh(){if(this.highlight.getCustomSelections().forEach((e=>{e.commit()})),!this.isSelected())return;const e=this.highlight.getFocus(),t=this.getLayerLevel();e.commit().syncWith(this.selectedRange.current());for(let e=0;e<this.selectedRange.size();e+=1){this.highlight.useLayerLevel(e);const t=this.highlight.createArea(),r=this.highlight.createLayeredArea(),n=this.highlight.createRowHeader(),s=this.highlight.createColumnHeader(),o=this.highlight.createActiveRowHeader(),i=this.highlight.createActiveColumnHeader(),a=this.highlight.createActiveCornerHeader(),l=this.highlight.createRowHighlight(),u=this.highlight.createColumnHighlight();t.commit(),r.commit(),n.commit(),s.commit(),o.commit(),i.commit(),a.commit(),l.commit(),u.commit()}this.highlight.useLayerLevel(t)}}(0,h.mixin)(R,p.default);var S=R;t.default=S},64396:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),o=n(r(48427)),i=r(76163),a=n(r(63806));function l(e,t){h(e,t),t.add(e)}function u(e,t,r){h(e,t),t.set(e,r)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakSet,m=new WeakSet,E=new WeakSet,y=new WeakSet,w=new WeakSet;class C{constructor(e,t){l(this,w),l(this,y),l(this,E),l(this,m),l(this,g),u(this,d,{writable:!0,value:void 0}),u(this,f,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:{x:0,y:0}}),(0,o.default)(this,d,e),(0,o.default)(this,f,t)}transformStart(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];c(this,g,v).call(this,{x:(0,s.default)(this,f).navigableHeaders()?(0,s.default)(this,f).countRowHeaders():0,y:(0,s.default)(this,f).navigableHeaders()?(0,s.default)(this,f).countColHeaders():0});const n=(0,s.default)(this,f).createCellCoords(e,t);let o=(0,s.default)(this,d).current().highlight;const i=(0,s.default)(this,f).visualToRenderableCoords(o);let a=0,l=0;if(this.runLocalHooks("beforeTransformStart",n),null!==i.row&&null!==i.col){const{width:e,height:t}=c(this,E,S).call(this),{row:i,col:u}=c(this,y,T).call(this,o),h=(0,s.default)(this,f).fixedRowsBottom(),d=(0,s.default)(this,f).minSpareRows(),p=(0,s.default)(this,f).minSpareCols(),g=(0,s.default)(this,f).autoWrapRow(),C=(0,s.default)(this,f).autoWrapCol(),v=(0,s.default)(this,f).createCellCoords(i+n.row,u+n.col);if(v.row>=t){const n=r&&d>0&&0===h,o=!n&&C,i=v.col+1,a=(0,s.default)(this,f).createCellCoords(v.row-t,i>=e?i-e:i);this.runLocalHooks("beforeColumnWrap",o,c(this,w,N).call(this,a),i>=e),n?this.runLocalHooks("insertRowRequire",(0,s.default)(this,f).countRenderableRows()):o&&v.assign(a)}else if(v.row<0){const r=v.col-1,n=(0,s.default)(this,f).createCellCoords(t+v.row,r<0?e+r:r);this.runLocalHooks("beforeColumnWrap",C,c(this,w,N).call(this,n),r<0),C&&v.assign(n)}if(v.col>=e){const n=r&&p>0,o=!n&&g,i=v.row+1,a=(0,s.default)(this,f).createCellCoords(i>=t?i-t:i,v.col-e);this.runLocalHooks("beforeRowWrap",o,c(this,w,N).call(this,a),i>=t),n?this.runLocalHooks("insertColRequire",(0,s.default)(this,f).countRenderableColumns()):o&&v.assign(a)}else if(v.col<0){const r=v.row-1,n=(0,s.default)(this,f).createCellCoords(r<0?t+r:r,e+v.col);this.runLocalHooks("beforeRowWrap",g,c(this,w,N).call(this,n),r<0),g&&v.assign(n)}const{rowDir:O,colDir:M}=c(this,m,R).call(this,v);a=O,l=M,o=c(this,w,N).call(this,v)}return this.runLocalHooks("afterTransformStart",o,a,l),o}transformEnd(e,t){c(this,g,v).call(this,{x:(0,s.default)(this,f).navigableHeaders()?(0,s.default)(this,f).countRowHeaders():0,y:(0,s.default)(this,f).navigableHeaders()?(0,s.default)(this,f).countColHeaders():0});const r=(0,s.default)(this,f).createCellCoords(e,t),n=(0,s.default)(this,d).current(),o=(0,s.default)(this,f).visualToRenderableCoords(n.highlight),i=n.to.clone();let a=0,l=0;if(this.runLocalHooks("beforeTransformEnd",r),null!==o.row&&null!==o.col){const{row:e,col:t}=c(this,y,T).call(this,n.to),o=(0,s.default)(this,f).createCellCoords(e+r.row,t+r.col),{rowDir:u,colDir:h}=c(this,m,R).call(this,o);a=u,l=h;const d=c(this,w,N).call(this,o);0===r.row&&0!==r.col?i.col=d.col:0!==r.row&&0===r.col?i.row=d.row:(i.row=d.row,i.col=d.col)}return this.runLocalHooks("afterTransformEnd",i,a,l),i}}function v(e){let{x:t,y:r}=e;(0,o.default)(this,p,{x:t,y:r})}function R(e){const{width:t,height:r}=c(this,E,S).call(this);let n=0,s=0;return e.row<0?(n=-1,e.row=0):e.row>0&&e.row>=r&&(n=1,e.row=r-1),e.col<0?(s=-1,e.col=0):e.col>0&&e.col>=t&&(s=1,e.col=t-1),{rowDir:n,colDir:s}}function S(){return{width:(0,s.default)(this,p).x+(0,s.default)(this,f).countRenderableColumns(),height:(0,s.default)(this,p).y+(0,s.default)(this,f).countRenderableRows()}}function T(e){const{row:t,col:r}=(0,s.default)(this,f).visualToRenderableCoords(e);return(0,s.default)(this,f).createCellCoords((0,s.default)(this,p).y+t,(0,s.default)(this,p).x+r)}function N(e){const t=e.clone();return t.col=e.col-(0,s.default)(this,p).x,t.row=e.row-(0,s.default)(this,p).y,(0,s.default)(this,f).renderableToVisualCoords(t)}(0,i.mixin)(C,a.default);var O=C;t.default=O},7763:(e,t,r)=>{"use strict";t.__esModule=!0,t.detectSelectionType=p,t.normalizeSelectionFactory=g,t.transformSelectionToColumnDistance=function(e){const t=p(e);if(t===i||t===a)return[];const r=g(t),n=new Set;(0,s.arrayEach)(e,(e=>{const{from:t,to:o}=r(e),i=Math.max(t.col,0),a=o.col-i+1;(0,s.arrayEach)(Array.from(new Array(a),((e,t)=>i+t)),(e=>{n.has(e)||n.add(e)}))}));const o=Array.from(n).sort(((e,t)=>e-t));return(0,s.arrayReduce)(o,((e,t,r,n)=>(0!==r&&t===n[r-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])},t.transformSelectionToRowDistance=function(e){const t=p(e);if(t===i||t===a)return[];const r=g(t),n=new Set;(0,s.arrayEach)(e,(e=>{const{from:t,to:o}=r(e),i=Math.max(t.row,0),a=o.row-i+1;(0,s.arrayEach)(Array.from(new Array(a),((e,t)=>i+t)),(e=>{n.has(e)||n.add(e)}))}));const o=Array.from(n).sort(((e,t)=>e-t));return(0,s.arrayReduce)(o,((e,t,r,n)=>(0!==r&&t===n[r-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])},r(60740),r(95988);var n=r(94699),s=r(98887),o=r(97639);const i=0;t.SELECTION_TYPE_UNRECOGNIZED=i;const a=1;t.SELECTION_TYPE_EMPTY=a;const l=2;t.SELECTION_TYPE_ARRAY=l;const u=3;t.SELECTION_TYPE_OBJECT=u;const h=[u,l];t.SELECTION_TYPES=h;const c=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],d=Symbol("root"),f=Symbol("child");function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;if(t!==d&&t!==f)throw new Error("The second argument is used internally only and cannot be overwritten.");const r=Array.isArray(e),s=t===d;let o=i;if(r){const t=e[0];if(0===e.length)o=a;else if(s&&t instanceof n.CellRange)o=u;else if(s&&Array.isArray(t))o=p(t,f);else if(e.length>=2&&e.length<=4){!e.some(((e,t)=>!c[t].includes(typeof e)))&&(o=l)}}return o}function g(e){let{keepDirection:t=!1,propToCol:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!h.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(s){const i=e===u;let a=i?s.from.row:s[0],l=i?s.from.col:s[1],h=i?s.to.row:s[2],c=i?s.to.col:s[3];if("function"==typeof r&&("string"==typeof l&&(l=r(l)),"string"==typeof c&&(c=r(c))),(0,o.isUndefined)(h)&&(h=a),(0,o.isUndefined)(c)&&(c=l),!t){const e=a,t=l,r=h,n=c;a=Math.min(e,r),l=Math.min(t,n),h=Math.max(e,r),c=Math.max(t,n)}const d=new n.CellCoords(a,l),f=new n.CellCoords(h,c);return new n.CellRange(d,d,f)}}},23714:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"editorCloseAndSave",callback(e,t,r){const n=e._getEditorManager();n.closeEditorAndSaveChanges(e.getShortcutManager().isCtrlPressed()),n.moveSelectionAfterEnter(r.includes("shift"))}};t.command=r},26817:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"editorCloseWithoutSaving",callback(e){const t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor.focus()}};t.command=r},44392:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"editorFastOpen",callback(e,t){const{highlight:r}=e.getSelectedRangeLast();r.isHeader()||e._getEditorManager().openEditor(null,t,!0)}};t.command=r},45286:(e,t,r)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[n.command,s.command,o.command,i.command]};var n=r(23714),s=r(26817),o=r(44392),i=r(16400)},16400:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(30369);const s={name:"editorOpen",callback(e,t,r){const s=e._getEditorManager(),{highlight:o}=e.getSelectedRangeLast();o.isHeader()||(e.getSettings().enterBeginsEditing?s.cellProperties.readOnly?s.moveSelectionAfterEnter():s.openEditor(null,t,!0):s.moveSelectionAfterEnter(r.includes("shift")),(0,n.stopImmediatePropagation)(t))}};t.command=s},89433:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}};t.command=r},41762:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionDown",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())&&e.selection.transformEnd(1,0)}};t.command=r},34928:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionDownByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),r=Math.min(t.row+e.countVisibleRows(),e.countRows()-1),n=e.rowIndexMapper.getNearestNotHiddenIndex(r,-1);if(null!==n){const r=e._createCellCoords(n,t.col),s=t.row-e.view.getFirstFullyVisibleRow(),o=Math.min(r.row-s,e.countRows()-1);e.selection.setRangeEnd(r),e.scrollViewportTo({row:o,verticalSnap:"top",horizontalSnap:"start"})}}};t.command=r},39259:(e,t,r)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[n.command,s.command,o.command,i.command,a.command,l.command,u.command,h.command,c.command,d.command,f.command,p.command,g.command,m.command]};var n=r(41762),s=r(34928),o=r(73951),i=r(6197),a=r(91685),l=r(89248),u=r(94976),h=r(4680),c=r(84615),d=r(28971),f=r(908),p=r(26082),g=r(23137),m=r(30846)},73951:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionLeft",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())&&e.selection.transformEnd(0,-1*e.getDirectionFactor())}};t.command=r},6197:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionRight",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())&&e.selection.transformEnd(0,e.getDirectionFactor())}};t.command=r},91685:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToColumns",callback(e){const{highlight:t,from:r,to:n}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()?e.selection.selectAll(!0,!0):e.selectColumns(r.col,n.col,t.row)}};t.command=r},89248:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToMostBottom",callback(e){const{selection:t,rowIndexMapper:r}=e,{highlight:n,from:s,to:o}=e.getSelectedRangeLast(),i=n.isHeader()&&e.selection.isSelectedByRowHeader();if(n.isCell()||i){const n=r.getNearestNotHiddenIndex(e.countRows()-1,-1);t.setRangeStart(s.clone()),i&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(n,o.col))}}};t.command=r},94976:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:r}=e,{highlight:n}=e.getSelectedRangeLast();n.isCell()&&t.setRangeEnd(e._createCellCoords(t.selectedRange.current().from.row,r.getNearestNotHiddenIndex(e.countCols()-1,-1)))}};t.command=r},4680:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:r}=e,{highlight:n}=e.getSelectedRangeLast();n.isCell()&&t.setRangeEnd(e._createCellCoords(t.selectedRange.current().from.row,r.getNearestNotHiddenIndex(0,1)))}};t.command=r},84615:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:r}=e,{highlight:n,from:s,to:o}=e.getSelectedRangeLast(),i=n.isHeader()&&e.selection.isSelectedByColumnHeader();if(n.isCell()||i){const n=r.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);t.setRangeStart(s.clone()),i&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(o.row,n))}}};t.command=r},28971:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:r}=e,{highlight:n,from:s,to:o}=e.getSelectedRangeLast(),i=n.isHeader()&&e.selection.isSelectedByColumnHeader();if(n.isCell()||i){const n=r.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);t.setRangeStart(s.clone()),i&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(o.row,n))}}};t.command=r},908:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToMostTop",callback(e){const{selection:t,rowIndexMapper:r}=e,{highlight:n,from:s,to:o}=e.getSelectedRangeLast(),i=n.isHeader()&&e.selection.isSelectedByRowHeader();if(n.isCell()||i){const n=r.getNearestNotHiddenIndex(0,1);t.setRangeStart(s.clone()),i&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(n,o.col))}}};t.command=r},26082:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToRows",callback(e){const{highlight:t,from:r,to:n}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()?e.selection.selectAll(!0,!0):e.selectRows(r.row,n.row,t.col)}};t.command=r},23137:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionUp",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())&&e.selection.transformEnd(-1,0)}};t.command=r},30846:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionUpByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),r=Math.max(t.row-e.countVisibleRows(),0),n=e.rowIndexMapper.getNearestNotHiddenIndex(r,1);if(null!==n){const r=e._createCellCoords(n,t.col),s=t.row-e.view.getFirstFullyVisibleRow(),o=Math.max(r.row-s,0);e.selection.setRangeEnd(r),e.scrollViewportTo({row:o,verticalSnap:"top",horizontalSnap:"start"})}}};t.command=r},12506:(e,t,r)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutCommandsPool=function(e){const t={};return h.forEach((r=>{let{name:n,callback:s}=r;t[n]=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return s(e,...r)}})),t};var n=r(45286),s=r(39259),o=r(90565),i=r(89433),a=r(51211),l=r(61905),u=r(39452);const h=[...(0,n.getAllCommands)(),...(0,s.getAllCommands)(),...(0,o.getAllCommands)(),i.command,a.command,l.command,u.command]},42927:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.transformStart(1,0)}};t.command=r},98638:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionDownByViewportHeight",callback(e){const{navigableHeaders:t}=e.getSettings(),r=t?e.countColHeaders():0,{row:n}=e.getSelectedRangeLast().highlight;let s=e.countVisibleRows()+r;n===e.countRows()-1?s=1:n+s>e.countRows()&&(s=e.countRows()-n-1),e.selection.transformStart(s,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}};t.command=r},90565:(e,t,r)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[n.command,s.command,o.command,i.command,a.command,l.command,u.command,h.command,c.command,d.command,f.command,p.command,g.command,m.command,E.command,y.command]};var n=r(42927),s=r(98638),o=r(69198),i=r(29772),a=r(59848),l=r(72893),u=r(77729),h=r(39817),c=r(53648),d=r(81489),f=r(92880),p=r(84064),g=r(8959),m=r(67295),E=r(63212),y=r(24915)},69198:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionInlineEnd",callback(e,t){const r=e.getSettings(),n="function"==typeof r.tabMoves?r.tabMoves(t):r.tabMoves;e.selection.transformStart(-n.row,-n.col)}};t.command=r},29772:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionInlineStart",callback(e,t){const r=e.getSettings(),n="function"==typeof r.tabMoves?r.tabMoves(t):r.tabMoves;e.selection.transformStart(n.row,n.col,!0)}};t.command=r},59848:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionLeft",callback(e){e.selection.transformStart(0,-1*e.getDirectionFactor())}};t.command=r},72893:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionRight",callback(e){e.selection.transformStart(0,e.getDirectionFactor())}};t.command=r},77729:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostBottom",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let r=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===r&&(r=-1),e.selection.setRangeStart(e._createCellCoords(r,t))}};t.command=r},39817:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostBottomInlineEnd",callback(e){const{selection:t,rowIndexMapper:r,columnIndexMapper:n}=e,s=parseInt(e.getSettings().fixedRowsBottom,10),o=r.getNearestNotHiddenIndex(e.countRows()-s-1,-1),i=n.getNearestNotHiddenIndex(e.countCols()-1,-1);t.setRangeStart(e._createCellCoords(o,i))}};t.command=r},53648:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:r}=e;t.setRangeStart(e._createCellCoords(e.getSelectedRangeLast().highlight.row,r.getNearestNotHiddenIndex(e.countCols()-1,-1)))}};t.command=r},81489:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:r}=e,n=parseInt(e.getSettings().fixedColumnsStart,10),s=e.getSelectedRangeLast().highlight.row,o=r.getNearestNotHiddenIndex(n,1);t.setRangeStart(e._createCellCoords(s,o))}};t.command=r},92880:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeLast().highlight.row;let s=r.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);null===s&&(s=e.isRtl()?-1:-e.countRowHeaders()),t.setRangeStart(e._createCellCoords(n,s))}};t.command=r},84064:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:r}=e,{row:n}=e.getSelectedRangeLast().highlight;let s=r.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);null===s&&(s=e.isRtl()?-e.countRowHeaders():-1),t.setRangeStart(e._createCellCoords(n,s))}};t.command=r},8959:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostTop",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let r=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===r&&(r=-e.countColHeaders()),e.selection.setRangeStart(e._createCellCoords(r,t))}};t.command=r},67295:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostTopInlineStart",callback(e){const{selection:t,rowIndexMapper:r,columnIndexMapper:n}=e,s=parseInt(e.getSettings().fixedRowsTop,10),o=parseInt(e.getSettings().fixedColumnsStart,10),i=r.getNearestNotHiddenIndex(s,1),a=n.getNearestNotHiddenIndex(o,1);t.setRangeStart(e._createCellCoords(i,a))}};t.command=r},63212:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.transformStart(-1,0)}};t.command=r},24915:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionUpByViewportHight",callback(e){const{navigableHeaders:t}=e.getSettings(),r=t?e.countColHeaders():0,{row:n}=e.getSelectedRangeLast().highlight;let s=-(e.countVisibleRows()+r);n===-r?s=-1:n+s<r&&(s=-(n+r)),e.selection.transformStart(s,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}};t.command=r},39452:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"populateSelectedCellsData",callback(e){const t=e.getSelectedRange(),{row:r,col:n}=t[t.length-1].highlight.normalize(),s=e.getDataAtCell(r,n),o=new Map;for(let i=0;i<t.length;i++)t[i].forAll(((t,i)=>{if(t>=0&&i>=0&&(t!==r||i!==n)){const{readOnly:r}=e.getCellMeta(t,i);r||o.set(`${t}x${i}`,[t,i,s])}}));e.setDataAtCell(Array.from(o.values()))}};t.command=r},51211:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"scrollToFocusedCell",callback(e){const{highlight:t}=e.getSelectedRangeLast(),r=e.view.getFirstFullyVisibleRow()-1,n=e.view.getFirstFullyVisibleColumn()-1,s=e.view.getLastFullyVisibleRow()+1,o=e.view.getLastFullyVisibleColumn()+1,i=e._createCellCoords(r,n),a=e._createCellCoords(s,o);if(!e._createCellRange(i,i,a).includes(t)&&(t.row>=0||t.col>=0)){const r={};if(t.col>=0){const n=Math.floor(e.countVisibleCols()/2);r.col=Math.max(t.col-n,0)}if(t.row>=0){const n=Math.floor(e.countVisibleRows()/2);r.row=Math.max(t.row-n,0)}e.scrollViewportTo({...r,verticalSnap:"top",horizontalSnap:"start"})}}};t.command=r},61905:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"selectAll",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!0})}};t.command=r},95479:(e,t)=>{"use strict";t.__esModule=!0;t.GRID_GROUP="gridDefault";t.EDITOR_EDIT_GROUP="editorManager.handlingEditor"},14160:(e,t,r)=>{"use strict";t.__esModule=!0,t.shortcutsEditorContext=function(e){const t=e.getShortcutManager().addContext("editor"),r=(0,s.createKeyboardShortcutCommandsPool)(e),o={group:n.EDITOR_EDIT_GROUP};t.addShortcuts([{keys:[["Enter"],["Enter","Shift"],["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],callback:(e,t)=>r.editorCloseAndSave(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>r.editorCloseWithoutSaving()}],o)};var n=r(95479),s=r(12506)},67630:(e,t,r)=>{"use strict";t.__esModule=!0,t.shortcutsGridContext=function(e){const t=e.getShortcutManager().addContext("grid"),r=(0,o.createKeyboardShortcutCommandsPool)(e),i={runOnlyIf:()=>{const{navigableHeaders:t}=e.getSettings();return(0,n.isDefined)(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:s.GRID_GROUP};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:s.EDITOR_EDIT_GROUP,runOnlyIf:()=>(0,n.isDefined)(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"],["Control/Meta","Shift","Space"]],callback:()=>r.selectAll()},{keys:[["Control/Meta","Enter"]],callback:()=>r.populateSelectedCellsData(),runOnlyIf:()=>!e.getSelectedRangeLast().highlight.isHeader()&&e.getSelectedRangeLast().getCellsCount()>1},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>r.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>r.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>r.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostTop(),runOnlyIf:()=>!(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:()=>!(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:()=>!(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:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>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:()=>r.moveCellSelectionInlineStart()},{keys:[["Shift","Tab"]],preventDefault:!1,callback:()=>r.moveCellSelectionInlineEnd()},{keys:[["Control/Meta","Backspace"]],callback:()=>r.scrollToFocusedCell()}],i)};var n=r(97639),s=r(95479),o=r(12506)},51377:(e,t,r)=>{"use strict";t.__esModule=!0;var n={registerAllShortcutContexts:!0};t.registerAllShortcutContexts=function(e){[s.shortcutsEditorContext,o.shortcutsGridContext].forEach((t=>t(e)))};var s=r(14160),o=r(67630),i=r(95479);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===i[e]||(t[e]=i[e]))}))},76435:(e,t,r)=>{"use strict";t.__esModule=!0,t.isContextObject=h,r(60740),r(95988);var n=r(8815),s=r(15870),o=r(97639),i=r(46029),a=r(76163),l=r(45561);const u=Symbol("shortcut-context");function h(e){return(0,a.isObject)(e)&&e.__kindOf===u}t.createContext=e=>{const t=(0,n.createUniqueMap)({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),r=function(){let{keys:e,callback:r,group:n,runOnlyIf:a=(()=>!0),captureCtrl:u=!1,preventDefault:c=!0,stopPropagation:d=!1,relativeToGroup:f,position:p,forwardToContext:g}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,o.isUndefined)(n))throw new Error("You need to define the shortcut's group.");if(!1===(0,i.isFunction)(r))throw new Error("The shortcut's callback needs to be a function.");if(!1===Array.isArray(e))throw new Error(l.toSingleLine`Pass the shortcut\'s keys as an array of arrays,\x20
974
+ columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const n=(0,g.normalizeSelectionFactory)(r,{createCellCoords:function(){return t.tableProps.createCellCoords(...arguments)},createCellRange:function(){return t.tableProps.createCellRange(...arguments)},propToCol:e=>this.tableProps.propToCol(e),keepDirection:!0}),s=this.settings.navigableHeaders,o={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:s?this.tableProps.countRowHeaders():0,countColHeaders:s?this.tableProps.countColHeaders():0},i=!e.some((e=>{const t=n(e),r=t.isValid(o);return!(r&&!t.containsHeaders()||r&&t.containsHeaders()&&t.isSingleHeader())}));return i&&(this.clear(),(0,d.arrayEach)(e,(e=>{const{from:t,to:r}=n(e);this.setRangeStartOnly(t.clone(),!1),this.setRangeEnd(r.clone()),this.finish()}))),i}selectColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n="string"==typeof e?this.tableProps.propToCol(e):e,s="string"==typeof t?this.tableProps.propToCol(t):t,o=this.tableProps.countRows(),i=this.tableProps.countCols(),a=this.tableProps.countColHeaders(),l=0===a?0:-a,u=this.tableProps.createCellCoords(l,n),h=this.tableProps.createCellCoords(o-1,s),d=this.tableProps.createCellRange(u,u,h).isValid({countRows:o,countCols:i,countRowHeaders:0,countColHeaders:a});if(d){const e=0===a?0:(0,c.clamp)(r,l,-1),t=o-1,i=this.tableProps.createCellCoords(e,n),u=this.tableProps.createCellCoords(t,s),h=this.tableProps.createCellCoords((0,c.clamp)(r,l,o-1),n);this.runLocalHooks("beforeSelectColumns",i,u,h),i.row=e,u.row=t,this.setRangeStartOnly(i,void 0,h),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.runLocalHooks("afterSelectColumns",i,u,h),this.finish()}return d}selectRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=this.tableProps.countRows(),s=this.tableProps.countCols(),o=this.tableProps.countRowHeaders(),i=0===o?0:-o,a=this.tableProps.createCellCoords(e,i),l=this.tableProps.createCellCoords(t,s-1),u=this.tableProps.createCellRange(a,a,l).isValid({countRows:n,countCols:s,countRowHeaders:o,countColHeaders:0});if(u){const n=0===o?0:(0,c.clamp)(r,i,-1),a=s-1,l=this.tableProps.createCellCoords(e,n),u=this.tableProps.createCellCoords(t,a),h=this.tableProps.createCellCoords(e,(0,c.clamp)(r,i,s-1));this.runLocalHooks("beforeSelectRows",l,u,h),l.col=n,u.col=a,this.setRangeStartOnly(l,void 0,h),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.runLocalHooks("afterSelectRows",l,u,h),this.finish()}return u}refresh(){if(this.highlight.getCustomSelections().forEach((e=>{e.commit()})),!this.isSelected())return;const e=this.highlight.getFocus(),t=this.getLayerLevel();e.commit().syncWith(this.selectedRange.current());for(let e=0;e<this.selectedRange.size();e+=1){this.highlight.useLayerLevel(e);const t=this.highlight.createArea(),r=this.highlight.createLayeredArea(),n=this.highlight.createRowHeader(),s=this.highlight.createColumnHeader(),o=this.highlight.createActiveRowHeader(),i=this.highlight.createActiveColumnHeader(),a=this.highlight.createActiveCornerHeader(),l=this.highlight.createRowHighlight(),u=this.highlight.createColumnHighlight();t.commit(),r.commit(),n.commit(),s.commit(),o.commit(),i.commit(),a.commit(),l.commit(),u.commit()}this.highlight.useLayerLevel(t)}}(0,u.mixin)(v,f.default);var R=v;t.default=R},64396:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),o=n(r(48427)),i=r(76163),a=n(r(63806));function l(e,t){h(e,t),t.add(e)}function u(e,t,r){h(e,t),t.set(e,r)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakSet,m=new WeakSet,E=new WeakSet,y=new WeakSet,w=new WeakSet;class C{constructor(e,t){l(this,w),l(this,y),l(this,E),l(this,m),l(this,g),u(this,d,{writable:!0,value:void 0}),u(this,f,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:{x:0,y:0}}),(0,o.default)(this,d,e),(0,o.default)(this,f,t)}transformStart(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];c(this,g,v).call(this,{x:(0,s.default)(this,f).navigableHeaders()?(0,s.default)(this,f).countRowHeaders():0,y:(0,s.default)(this,f).navigableHeaders()?(0,s.default)(this,f).countColHeaders():0});const n=(0,s.default)(this,f).createCellCoords(e,t);let o=(0,s.default)(this,d).current().highlight;const i=(0,s.default)(this,f).visualToRenderableCoords(o);let a=0,l=0;if(this.runLocalHooks("beforeTransformStart",n),null!==i.row&&null!==i.col){const{width:e,height:t}=c(this,E,S).call(this),{row:i,col:u}=c(this,y,T).call(this,o),h=(0,s.default)(this,f).fixedRowsBottom(),d=(0,s.default)(this,f).minSpareRows(),p=(0,s.default)(this,f).minSpareCols(),g=(0,s.default)(this,f).autoWrapRow(),C=(0,s.default)(this,f).autoWrapCol(),v=(0,s.default)(this,f).createCellCoords(i+n.row,u+n.col);if(v.row>=t){const n=r&&d>0&&0===h,o=!n&&C,i=v.col+1,a=(0,s.default)(this,f).createCellCoords(v.row-t,i>=e?i-e:i);this.runLocalHooks("beforeColumnWrap",o,c(this,w,N).call(this,a),i>=e),n?this.runLocalHooks("insertRowRequire",(0,s.default)(this,f).countRenderableRows()):o&&v.assign(a)}else if(v.row<0){const r=v.col-1,n=(0,s.default)(this,f).createCellCoords(t+v.row,r<0?e+r:r);this.runLocalHooks("beforeColumnWrap",C,c(this,w,N).call(this,n),r<0),C&&v.assign(n)}if(v.col>=e){const n=r&&p>0,o=!n&&g,i=v.row+1,a=(0,s.default)(this,f).createCellCoords(i>=t?i-t:i,v.col-e);this.runLocalHooks("beforeRowWrap",o,c(this,w,N).call(this,a),i>=t),n?this.runLocalHooks("insertColRequire",(0,s.default)(this,f).countRenderableColumns()):o&&v.assign(a)}else if(v.col<0){const r=v.row-1,n=(0,s.default)(this,f).createCellCoords(r<0?t+r:r,e+v.col);this.runLocalHooks("beforeRowWrap",g,c(this,w,N).call(this,n),r<0),g&&v.assign(n)}const{rowDir:O,colDir:M}=c(this,m,R).call(this,v);a=O,l=M,o=c(this,w,N).call(this,v)}return this.runLocalHooks("afterTransformStart",o,a,l),o}transformEnd(e,t){c(this,g,v).call(this,{x:(0,s.default)(this,f).navigableHeaders()?(0,s.default)(this,f).countRowHeaders():0,y:(0,s.default)(this,f).navigableHeaders()?(0,s.default)(this,f).countColHeaders():0});const r=(0,s.default)(this,f).createCellCoords(e,t),n=(0,s.default)(this,d).current(),o=(0,s.default)(this,f).visualToRenderableCoords(n.highlight),i=n.to.clone();let a=0,l=0;if(this.runLocalHooks("beforeTransformEnd",r),null!==o.row&&null!==o.col){const{row:e,col:t}=c(this,y,T).call(this,n.to),o=(0,s.default)(this,f).createCellCoords(e+r.row,t+r.col),{rowDir:u,colDir:h}=c(this,m,R).call(this,o);a=u,l=h;const d=c(this,w,N).call(this,o);0===r.row&&0!==r.col?i.col=d.col:0!==r.row&&0===r.col?i.row=d.row:(i.row=d.row,i.col=d.col)}return this.runLocalHooks("afterTransformEnd",i,a,l),i}}function v(e){let{x:t,y:r}=e;(0,o.default)(this,p,{x:t,y:r})}function R(e){const{width:t,height:r}=c(this,E,S).call(this);let n=0,s=0;return e.row<0?(n=-1,e.row=0):e.row>0&&e.row>=r&&(n=1,e.row=r-1),e.col<0?(s=-1,e.col=0):e.col>0&&e.col>=t&&(s=1,e.col=t-1),{rowDir:n,colDir:s}}function S(){return{width:(0,s.default)(this,p).x+(0,s.default)(this,f).countRenderableColumns(),height:(0,s.default)(this,p).y+(0,s.default)(this,f).countRenderableRows()}}function T(e){const{row:t,col:r}=(0,s.default)(this,f).visualToRenderableCoords(e);return(0,s.default)(this,f).createCellCoords((0,s.default)(this,p).y+t,(0,s.default)(this,p).x+r)}function N(e){const t=e.clone();return t.col=e.col-(0,s.default)(this,p).x,t.row=e.row-(0,s.default)(this,p).y,(0,s.default)(this,f).renderableToVisualCoords(t)}(0,i.mixin)(C,a.default);var O=C;t.default=O},7763:(e,t,r)=>{"use strict";t.__esModule=!0,t.detectSelectionType=p,t.normalizeSelectionFactory=g,t.transformSelectionToColumnDistance=function(e){const t=p(e.getSelected());if(t===i||t===a)return[];const r=g(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),n=new Set;(0,s.arrayEach)(e.getSelected(),(e=>{const{from:t,to:o}=r(e),i=Math.max(t.col,0),a=o.col-i+1;(0,s.arrayEach)(Array.from(new Array(a),((e,t)=>i+t)),(e=>{n.has(e)||n.add(e)}))}));const o=Array.from(n).sort(((e,t)=>e-t));return(0,s.arrayReduce)(o,((e,t,r,n)=>(0!==r&&t===n[r-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])},t.transformSelectionToRowDistance=function(e){const t=p(e.getSelected());if(t===i||t===a)return[];const r=g(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),n=new Set;(0,s.arrayEach)(e.getSelected(),(e=>{const{from:t,to:o}=r(e),i=Math.max(t.row,0),a=o.row-i+1;(0,s.arrayEach)(Array.from(new Array(a),((e,t)=>i+t)),(e=>{n.has(e)||n.add(e)}))}));const o=Array.from(n).sort(((e,t)=>e-t));return(0,s.arrayReduce)(o,((e,t,r,n)=>(0!==r&&t===n[r-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])},r(60740),r(95988);var n=r(94699),s=r(98887),o=r(97639);const i=0;t.SELECTION_TYPE_UNRECOGNIZED=i;const a=1;t.SELECTION_TYPE_EMPTY=a;const l=2;t.SELECTION_TYPE_ARRAY=l;const u=3;t.SELECTION_TYPE_OBJECT=u;const h=[u,l];t.SELECTION_TYPES=h;const c=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],d=Symbol("root"),f=Symbol("child");function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;if(t!==d&&t!==f)throw new Error("The second argument is used internally only and cannot be overwritten.");const r=Array.isArray(e),s=t===d;let o=i;if(r){const t=e[0];if(0===e.length)o=a;else if(s&&t instanceof n.CellRange)o=u;else if(s&&Array.isArray(t))o=p(t,f);else if(e.length>=2&&e.length<=4){!e.some(((e,t)=>!c[t].includes(typeof e)))&&(o=l)}}return o}function g(e){let{createCellCoords:t,createCellRange:r,keepDirection:n=!1,propToCol:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!h.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(i){const a=e===u;let l=a?i.from.row:i[0],h=a?i.from.col:i[1],c=a?i.to.row:i[2],d=a?i.to.col:i[3];if("function"==typeof s&&("string"==typeof h&&(h=s(h)),"string"==typeof d&&(d=s(d))),(0,o.isUndefined)(c)&&(c=l),(0,o.isUndefined)(d)&&(d=h),!n){const e=l,t=h,r=c,n=d;l=Math.min(e,r),h=Math.min(t,n),c=Math.max(e,r),d=Math.max(t,n)}const f=t(l,h),p=t(c,d);return r(f,f,p)}}},23714:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"editorCloseAndSave",callback(e,t,r){const n=e._getEditorManager();n.closeEditorAndSaveChanges(e.getShortcutManager().isCtrlPressed()),n.moveSelectionAfterEnter(r.includes("shift"))}};t.command=r},26817:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"editorCloseWithoutSaving",callback(e){const t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor.focus()}};t.command=r},44392:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"editorFastOpen",callback(e,t){const{highlight:r}=e.getSelectedRangeLast();r.isHeader()||e._getEditorManager().openEditor(null,t,!0)}};t.command=r},45286:(e,t,r)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[n.command,s.command,o.command,i.command]};var n=r(23714),s=r(26817),o=r(44392),i=r(16400)},16400:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(30369);const s={name:"editorOpen",callback(e,t,r){const s=e._getEditorManager(),{highlight:o}=e.getSelectedRangeLast();o.isHeader()||(e.getSettings().enterBeginsEditing?s.cellProperties.readOnly?s.moveSelectionAfterEnter():s.openEditor(null,t,!0):s.moveSelectionAfterEnter(r.includes("shift")),(0,n.stopImmediatePropagation)(t))}};t.command=s},89433:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}};t.command=r},41762:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionDown",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())&&e.selection.transformEnd(1,0)}};t.command=r},34928:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionDownByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),r=Math.min(t.row+e.countVisibleRows(),e.countRows()-1),n=e.rowIndexMapper.getNearestNotHiddenIndex(r,-1);if(null!==n){const r=e._createCellCoords(n,t.col),s=t.row-e.view.getFirstFullyVisibleRow(),o=Math.min(r.row-s,e.countRows()-1);e.selection.setRangeEnd(r),e.scrollViewportTo({row:o,verticalSnap:"top",horizontalSnap:"start"})}}};t.command=r},39259:(e,t,r)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[n.command,s.command,o.command,i.command,a.command,l.command,u.command,h.command,c.command,d.command,f.command,p.command,g.command,m.command]};var n=r(41762),s=r(34928),o=r(73951),i=r(6197),a=r(91685),l=r(89248),u=r(94976),h=r(4680),c=r(84615),d=r(28971),f=r(908),p=r(26082),g=r(23137),m=r(30846)},73951:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionLeft",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())&&e.selection.transformEnd(0,-1*e.getDirectionFactor())}};t.command=r},6197:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionRight",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())&&e.selection.transformEnd(0,e.getDirectionFactor())}};t.command=r},91685:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToColumns",callback(e){const{highlight:t,from:r,to:n}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()?e.selection.selectAll(!0,!0):e.selectColumns(r.col,n.col,t.row)}};t.command=r},89248:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToMostBottom",callback(e){const{selection:t,rowIndexMapper:r}=e,{highlight:n,from:s,to:o}=e.getSelectedRangeLast(),i=n.isHeader()&&e.selection.isSelectedByRowHeader();if(n.isCell()||i){const n=r.getNearestNotHiddenIndex(e.countRows()-1,-1);t.setRangeStart(s.clone()),i&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(n,o.col))}}};t.command=r},94976:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:r}=e,{highlight:n}=e.getSelectedRangeLast();n.isCell()&&t.setRangeEnd(e._createCellCoords(t.selectedRange.current().from.row,r.getNearestNotHiddenIndex(e.countCols()-1,-1)))}};t.command=r},4680:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:r}=e,{highlight:n}=e.getSelectedRangeLast();n.isCell()&&t.setRangeEnd(e._createCellCoords(t.selectedRange.current().from.row,r.getNearestNotHiddenIndex(0,1)))}};t.command=r},84615:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:r}=e,{highlight:n,from:s,to:o}=e.getSelectedRangeLast(),i=n.isHeader()&&e.selection.isSelectedByColumnHeader();if(n.isCell()||i){const n=r.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);t.setRangeStart(s.clone()),i&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(o.row,n))}}};t.command=r},28971:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:r}=e,{highlight:n,from:s,to:o}=e.getSelectedRangeLast(),i=n.isHeader()&&e.selection.isSelectedByColumnHeader();if(n.isCell()||i){const n=r.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);t.setRangeStart(s.clone()),i&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(o.row,n))}}};t.command=r},908:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToMostTop",callback(e){const{selection:t,rowIndexMapper:r}=e,{highlight:n,from:s,to:o}=e.getSelectedRangeLast(),i=n.isHeader()&&e.selection.isSelectedByRowHeader();if(n.isCell()||i){const n=r.getNearestNotHiddenIndex(0,1);t.setRangeStart(s.clone()),i&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(n,o.col))}}};t.command=r},26082:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionToRows",callback(e){const{highlight:t,from:r,to:n}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()?e.selection.selectAll(!0,!0):e.selectRows(r.row,n.row,t.col)}};t.command=r},23137:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionUp",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())&&e.selection.transformEnd(-1,0)}};t.command=r},30846:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"extendCellsSelectionUpByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),r=Math.max(t.row-e.countVisibleRows(),0),n=e.rowIndexMapper.getNearestNotHiddenIndex(r,1);if(null!==n){const r=e._createCellCoords(n,t.col),s=t.row-e.view.getFirstFullyVisibleRow(),o=Math.max(r.row-s,0);e.selection.setRangeEnd(r),e.scrollViewportTo({row:o,verticalSnap:"top",horizontalSnap:"start"})}}};t.command=r},12506:(e,t,r)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutCommandsPool=function(e){const t={};return h.forEach((r=>{let{name:n,callback:s}=r;t[n]=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return s(e,...r)}})),t};var n=r(45286),s=r(39259),o=r(90565),i=r(89433),a=r(51211),l=r(61905),u=r(39452);const h=[...(0,n.getAllCommands)(),...(0,s.getAllCommands)(),...(0,o.getAllCommands)(),i.command,a.command,l.command,u.command]},42927:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.transformStart(1,0)}};t.command=r},98638:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionDownByViewportHeight",callback(e){const{navigableHeaders:t}=e.getSettings(),r=t?e.countColHeaders():0,{row:n}=e.getSelectedRangeLast().highlight;let s=e.countVisibleRows()+r;n===e.countRows()-1?s=1:n+s>e.countRows()&&(s=e.countRows()-n-1),e.selection.transformStart(s,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}};t.command=r},90565:(e,t,r)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[n.command,s.command,o.command,i.command,a.command,l.command,u.command,h.command,c.command,d.command,f.command,p.command,g.command,m.command,E.command,y.command]};var n=r(42927),s=r(98638),o=r(69198),i=r(29772),a=r(59848),l=r(72893),u=r(77729),h=r(39817),c=r(53648),d=r(81489),f=r(92880),p=r(84064),g=r(8959),m=r(67295),E=r(63212),y=r(24915)},69198:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionInlineEnd",callback(e,t){const r=e.getSettings(),n="function"==typeof r.tabMoves?r.tabMoves(t):r.tabMoves;e.selection.transformStart(-n.row,-n.col)}};t.command=r},29772:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionInlineStart",callback(e,t){const r=e.getSettings(),n="function"==typeof r.tabMoves?r.tabMoves(t):r.tabMoves;e.selection.transformStart(n.row,n.col,!0)}};t.command=r},59848:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionLeft",callback(e){e.selection.transformStart(0,-1*e.getDirectionFactor())}};t.command=r},72893:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionRight",callback(e){e.selection.transformStart(0,e.getDirectionFactor())}};t.command=r},77729:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostBottom",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let r=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===r&&(r=-1),e.selection.setRangeStart(e._createCellCoords(r,t))}};t.command=r},39817:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostBottomInlineEnd",callback(e){const{selection:t,rowIndexMapper:r,columnIndexMapper:n}=e,s=parseInt(e.getSettings().fixedRowsBottom,10),o=r.getNearestNotHiddenIndex(e.countRows()-s-1,-1),i=n.getNearestNotHiddenIndex(e.countCols()-1,-1);t.setRangeStart(e._createCellCoords(o,i))}};t.command=r},53648:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:r}=e;t.setRangeStart(e._createCellCoords(e.getSelectedRangeLast().highlight.row,r.getNearestNotHiddenIndex(e.countCols()-1,-1)))}};t.command=r},81489:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:r}=e,n=parseInt(e.getSettings().fixedColumnsStart,10),s=e.getSelectedRangeLast().highlight.row,o=r.getNearestNotHiddenIndex(n,1);t.setRangeStart(e._createCellCoords(s,o))}};t.command=r},92880:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeLast().highlight.row;let s=r.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);null===s&&(s=e.isRtl()?-1:-e.countRowHeaders()),t.setRangeStart(e._createCellCoords(n,s))}};t.command=r},84064:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:r}=e,{row:n}=e.getSelectedRangeLast().highlight;let s=r.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);null===s&&(s=e.isRtl()?-e.countRowHeaders():-1),t.setRangeStart(e._createCellCoords(n,s))}};t.command=r},8959:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostTop",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let r=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===r&&(r=-e.countColHeaders()),e.selection.setRangeStart(e._createCellCoords(r,t))}};t.command=r},67295:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionToMostTopInlineStart",callback(e){const{selection:t,rowIndexMapper:r,columnIndexMapper:n}=e,s=parseInt(e.getSettings().fixedRowsTop,10),o=parseInt(e.getSettings().fixedColumnsStart,10),i=r.getNearestNotHiddenIndex(s,1),a=n.getNearestNotHiddenIndex(o,1);t.setRangeStart(e._createCellCoords(i,a))}};t.command=r},63212:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.transformStart(-1,0)}};t.command=r},24915:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"moveCellSelectionUpByViewportHight",callback(e){const{navigableHeaders:t}=e.getSettings(),r=t?e.countColHeaders():0,{row:n}=e.getSelectedRangeLast().highlight;let s=-(e.countVisibleRows()+r);n===-r?s=-1:n+s<r&&(s=-(n+r)),e.selection.transformStart(s,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}};t.command=r},39452:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"populateSelectedCellsData",callback(e){const t=e.getSelectedRange(),{row:r,col:n}=t[t.length-1].highlight.normalize(),s=e.getDataAtCell(r,n),o=new Map;for(let i=0;i<t.length;i++)t[i].forAll(((t,i)=>{if(t>=0&&i>=0&&(t!==r||i!==n)){const{readOnly:r}=e.getCellMeta(t,i);r||o.set(`${t}x${i}`,[t,i,s])}}));e.setDataAtCell(Array.from(o.values()))}};t.command=r},51211:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"scrollToFocusedCell",callback(e){const{highlight:t}=e.getSelectedRangeLast(),r=e.view.getFirstFullyVisibleRow()-1,n=e.view.getFirstFullyVisibleColumn()-1,s=e.view.getLastFullyVisibleRow()+1,o=e.view.getLastFullyVisibleColumn()+1,i=e._createCellCoords(r,n),a=e._createCellCoords(s,o);if(!e._createCellRange(i,i,a).includes(t)&&(t.row>=0||t.col>=0)){const r={};if(t.col>=0){const n=Math.floor(e.countVisibleCols()/2);r.col=Math.max(t.col-n,0)}if(t.row>=0){const n=Math.floor(e.countVisibleRows()/2);r.row=Math.max(t.row-n,0)}e.scrollViewportTo({...r,verticalSnap:"top",horizontalSnap:"start"})}}};t.command=r},61905:(e,t)=>{"use strict";t.__esModule=!0;const r={name:"selectAll",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!0})}};t.command=r},95479:(e,t)=>{"use strict";t.__esModule=!0;t.GRID_GROUP="gridDefault";t.EDITOR_EDIT_GROUP="editorManager.handlingEditor"},14160:(e,t,r)=>{"use strict";t.__esModule=!0,t.shortcutsEditorContext=function(e){const t=e.getShortcutManager().addContext("editor"),r=(0,s.createKeyboardShortcutCommandsPool)(e),o={group:n.EDITOR_EDIT_GROUP};t.addShortcuts([{keys:[["Enter"],["Enter","Shift"],["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],callback:(e,t)=>r.editorCloseAndSave(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>r.editorCloseWithoutSaving()}],o)};var n=r(95479),s=r(12506)},67630:(e,t,r)=>{"use strict";t.__esModule=!0,t.shortcutsGridContext=function(e){const t=e.getShortcutManager().addContext("grid"),r=(0,o.createKeyboardShortcutCommandsPool)(e),i={runOnlyIf:()=>{const{navigableHeaders:t}=e.getSettings();return(0,n.isDefined)(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:s.GRID_GROUP};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:s.EDITOR_EDIT_GROUP,runOnlyIf:()=>(0,n.isDefined)(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"],["Control/Meta","Shift","Space"]],callback:()=>r.selectAll()},{keys:[["Control/Meta","Enter"]],callback:()=>r.populateSelectedCellsData(),runOnlyIf:()=>!e.getSelectedRangeLast().highlight.isHeader()&&e.getSelectedRangeLast().getCellsCount()>1},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>r.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>r.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>r.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostTop(),runOnlyIf:()=>!(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:()=>!(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:()=>!(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:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>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:()=>r.moveCellSelectionInlineStart()},{keys:[["Shift","Tab"]],preventDefault:!1,callback:()=>r.moveCellSelectionInlineEnd()},{keys:[["Control/Meta","Backspace"]],callback:()=>r.scrollToFocusedCell()}],i)};var n=r(97639),s=r(95479),o=r(12506)},51377:(e,t,r)=>{"use strict";t.__esModule=!0;var n={registerAllShortcutContexts:!0};t.registerAllShortcutContexts=function(e){[s.shortcutsEditorContext,o.shortcutsGridContext].forEach((t=>t(e)))};var s=r(14160),o=r(67630),i=r(95479);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===i[e]||(t[e]=i[e]))}))},76435:(e,t,r)=>{"use strict";t.__esModule=!0,t.isContextObject=h,r(60740),r(95988);var n=r(8815),s=r(15870),o=r(97639),i=r(46029),a=r(76163),l=r(45561);const u=Symbol("shortcut-context");function h(e){return(0,a.isObject)(e)&&e.__kindOf===u}t.createContext=e=>{const t=(0,n.createUniqueMap)({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),r=function(){let{keys:e,callback:r,group:n,runOnlyIf:a=(()=>!0),captureCtrl:u=!1,preventDefault:c=!0,stopPropagation:d=!1,relativeToGroup:f,position:p,forwardToContext:g}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,o.isUndefined)(n))throw new Error("You need to define the shortcut's group.");if(!1===(0,i.isFunction)(r))throw new Error("The shortcut's callback needs to be a function.");if(!1===Array.isArray(e))throw new Error(l.toSingleLine`Pass the shortcut\'s keys as an array of arrays,\x20
975
975
  using the KeyboardEvent.key properties:\x20
976
- https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const m={callback:r,group:n,runOnlyIf:a,captureCtrl:u,preventDefault:c,stopPropagation:d};(0,o.isDefined)(f)&&([m.relativeToGroup,m.position]=[f,p]),h(g)&&(m.forwardToContext=g),e.forEach((e=>{const r=(0,s.normalizeKeys)(e);if(t.hasItem(r)){const e=t.getItem(r);let n=e.findIndex((e=>e.group===f));-1!==n?"before"===p?n-=1:n+=1:n=e.length,e.splice(n,0,m)}else t.addItem(r,[m])}))},c=e=>{const r=(0,s.normalizeKeys)(e);t.removeItem(r)};return{__kindOf:u,addShortcut:r,addShortcuts:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach((e=>{(0,a.objectEach)(t,((r,n)=>{!1===Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])})),r(e)}))},getShortcuts:e=>{const r=(0,s.normalizeKeys)(e),n=t.getItem(r);return(0,o.isDefined)(n)?n.slice():[]},hasShortcut:e=>{const r=(0,s.normalizeKeys)(e);return t.hasItem(r)},removeShortcutsByKeys:c,removeShortcutsByGroup:e=>{t.getItems().forEach((t=>{let[r,n]=t;const o=n.filter((t=>t.group!==e));0===o.length?c((0,s.getKeysList)(r)):(n.length=0,n.push(...o))}))}}}},48120:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(2086);t.createShortcutManager=n.createShortcutManager},33362:(e,t)=>{"use strict";t.__esModule=!0,t.createKeysObserver=function(){const e=new Set;return{press(t){e.add(t)},release(t){e.delete(t)},releaseAll(){e.clear()},isPressed:t=>e.has(t)}}},2086:(e,t,r)=>{"use strict";t.__esModule=!0,r(60740);var n=r(8815),s=r(30369),o=r(76435),i=r(17386),a=r(45561);t.createShortcutManager=e=>{let{ownerWindow:t,handleEvent:r,beforeKeyDown:l,afterKeyDown:u}=e;const h=(0,n.createUniqueMap)({errorIdExists:e=>`The "${e}" context name is already registered.`});let c="grid";const d=()=>c,f=e=>h.getItem(e);let p=!1;const g=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d();const n=(0,o.isContextObject)(r)?r:f(r);let i=!1;if(!n.hasShortcut(t))return i;const a=n.getShortcuts(t);for(let r=0;r<a.length;r++){const{callback:n,runOnlyIf:o,preventDefault:l,stopPropagation:u,captureCtrl:h,forwardToContext:c}=a[r];if(!1!==o(e)){if(p=h,i=!1===n(e,t),p=!1,l&&e.preventDefault(),u&&((0,s.stopImmediatePropagation)(e),e.stopPropagation()),i)break;c&&g(e,t,c)}}return i},m=(0,i.useRecorder)(t,r,l,u,g);return m.mount(),{addContext:e=>{const t=(0,o.createContext)(e);return h.addItem(e,t),t},getActiveContextName:d,getContext:f,setActiveContextName:e=>{if(!h.hasItem(e))throw new Error(a.toSingleLine`You've tried to activate the "${e}" shortcut context\x20
976
+ https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const m={callback:r,group:n,runOnlyIf:a,captureCtrl:u,preventDefault:c,stopPropagation:d};(0,o.isDefined)(f)&&([m.relativeToGroup,m.position]=[f,p]),h(g)&&(m.forwardToContext=g),e.forEach((e=>{const r=(0,s.normalizeKeys)(e);if(t.hasItem(r)){const e=t.getItem(r);let n=e.findIndex((e=>e.group===f));-1!==n?"before"===p?n-=1:n+=1:n=e.length,e.splice(n,0,m)}else t.addItem(r,[m])}))},c=e=>{const r=(0,s.normalizeKeys)(e);t.removeItem(r)};return{__kindOf:u,addShortcut:r,addShortcuts:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach((e=>{(0,a.objectEach)(t,((r,n)=>{!1===Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])})),r(e)}))},getShortcuts:e=>{const r=(0,s.normalizeKeys)(e),n=t.getItem(r);return(0,o.isDefined)(n)?n.slice():[]},hasShortcut:e=>{const r=(0,s.normalizeKeys)(e);return t.hasItem(r)},removeShortcutsByKeys:c,removeShortcutsByGroup:e=>{t.getItems().forEach((t=>{let[r,n]=t;const o=n.filter((t=>t.group!==e));0===o.length?c((0,s.getKeysList)(r)):(n.length=0,n.push(...o))}))}}}},48120:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(2086);t.createShortcutManager=n.createShortcutManager},33362:(e,t)=>{"use strict";t.__esModule=!0,t.createKeysObserver=function(){const e=new Set;return{press(t){e.add(t)},release(t){e.delete(t)},releaseAll(){e.clear()},isPressed:t=>e.has(t)}}},2086:(e,t,r)=>{"use strict";t.__esModule=!0,r(60740);var n=r(8815),s=r(30369),o=r(76435),i=r(17386),a=r(45561);t.createShortcutManager=e=>{let{ownerWindow:t,handleEvent:r,beforeKeyDown:l,afterKeyDown:u}=e;const h=(0,n.createUniqueMap)({errorIdExists:e=>`The "${e}" context name is already registered.`});let c="grid";const d=()=>c,f=e=>h.getItem(e);let p=!1;const g=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d();const n=(0,o.isContextObject)(r)?r:f(r);let i=!1;if(!n.hasShortcut(t))return i;const a=n.getShortcuts(t);for(let r=0;r<a.length;r++){const{callback:n,runOnlyIf:o,preventDefault:l,stopPropagation:u,captureCtrl:h,forwardToContext:c}=a[r];if(!0===o(e)){if(p=h,i=!1===n(e,t),p=!1,l&&e.preventDefault(),u&&((0,s.stopImmediatePropagation)(e),e.stopPropagation()),i)break;c&&g(e,t,c)}}return i},m=(0,i.useRecorder)(t,r,l,u,g);return m.mount(),{addContext:e=>{const t=(0,o.createContext)(e);return h.addItem(e,t),t},getActiveContextName:d,getContext:f,setActiveContextName:e=>{if(!h.hasItem(e))throw new Error(a.toSingleLine`You've tried to activate the "${e}" shortcut context\x20
977
977
  that does not exist. Before activation, register the context using the "addContext" method.`);c=e},isCtrlPressed:()=>!p&&(m.isPressed("control")||m.isPressed("meta")),releasePressedKeys:()=>m.releasePressedKeys(),destroy:()=>m.unmount()}}},17386:(e,t,r)=>{"use strict";t.__esModule=!0,t.useRecorder=function(e,t,r,n,c){const d=e=>l.includes(e),f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const 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},p=e=>{if(!1===t(e))return;const i=r(e);if(229===e.keyCode||!1===i||(0,o.isImmediatePropagationStopped)(e))return;const l=(0,s.normalizeEventKey)(e);let u=[];d(l)||(u=f(e));const h=[l].concat(u);!c(e,h)&&((0,a.isMacOS)()&&u.includes("meta")||!(0,a.isMacOS)()&&u.includes("control"))&&c(e,[l].concat(f(e,!0))),n(e)},g=e=>{const t=(0,s.normalizeEventKey)(e);d(t)&&u.press(t)},m=e=>{const t=(0,s.normalizeEventKey)(e);d(t)&&u.release(t)},E=()=>{u.releaseAll()};return{mount:()=>{let t=e;for(h+=1;t;)1===h&&(t.document.documentElement.addEventListener("keydown",g),t.document.documentElement.addEventListener("keyup",m)),t.document.documentElement.addEventListener("keydown",p),t.document.documentElement.addEventListener("blur",E),t=(0,i.getParentWindow)(t)},unmount:()=>{let t=e;for(h-=1;t;)0===h&&(t.document.documentElement.removeEventListener("keydown",g),t.document.documentElement.removeEventListener("keyup",m)),t.document.documentElement.removeEventListener("keydown",p),t.document.documentElement.removeEventListener("blur",E),t=(0,i.getParentWindow)(t)},isPressed:e=>u.isPressed(e),releasePressedKeys:()=>u.releaseAll()}},r(95988);var n=r(33362),s=r(15870),o=r(30369),i=r(49587),a=r(78498);const l=["meta","alt","shift","control"],u=(0,n.createKeysObserver)();let h=0},15870:(e,t)=>{"use strict";t.__esModule=!0;const r=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"]]);t.normalizeKeys=e=>e.map((e=>{const t=e.toLowerCase();return r.has(t)?r.get(t):t})).sort().join("+");t.getKeysList=e=>e.split("+");const n=new RegExp("^(?:Key|Digit)([A-Z0-9])$");t.normalizeEventKey=e=>{let{key:t,code:r}=e;return(n.test(r)?r.replace(n,"$1"):t).toLowerCase()}},26969:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=n(r(42538)),i=n(r(48427)),a=r(49587),l=n(r(57340)),u=r(30369),h=n(r(94699)),c=r(56740),d=r(83059),f=r(66862);function p(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var g=new WeakMap,m=new WeakMap,E=new WeakMap,y=new WeakMap,w=new WeakMap,C=new WeakMap,v=new WeakMap;var R=class{constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"eventManager",void 0),(0,s.default)(this,"settings",void 0),(0,s.default)(this,"THEAD",void 0),(0,s.default)(this,"TBODY",void 0),(0,s.default)(this,"_wt",void 0),(0,s.default)(this,"activeWt",void 0),p(this,g,{writable:!0,value:0}),p(this,m,{writable:!0,value:0}),(0,s.default)(this,"postponedAdjustElementsSize",!1),p(this,E,{writable:!0,value:!1}),p(this,y,{writable:!0,value:void 0}),p(this,w,{writable:!0,value:void 0}),p(this,C,{writable:!0,value:0}),p(this,v,{writable:!0,value:0}),this.hot=e,this.eventManager=new l.default(this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}render(){this.hot.isRenderSuspended()||(this.hot.runHooks("beforeRender",this.hot.forceFullRender),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize(!0)),this._wt.draw(!this.hot.forceFullRender),this.hot.runHooks("afterRender",this.hot.forceFullRender),this.hot.forceFullRender=!1,this.hot.renderCall=!1)}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.hot.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this._wt.wtOverlays.adjustElementsSize(e)}getCellAtCoords(e,t){const r=this._wt.getCell(e,t);return r<0?null:r}scrollViewport(e,t,r,n,s){return this._wt.scrollViewport(e,t,r,n,s)}scrollViewportHorizontally(e,t,r){return this._wt.scrollViewportHorizontally(e,t,r)}scrollViewportVertically(e,t,r){return this._wt.scrollViewportVertically(e,t,r)}createElements(){const{rootElement:e,rootDocument:t}=this.hot,r=e.getAttribute("style");r&&e.setAttribute("data-originalstyle",r),(0,a.addClass)(e,"handsontable"),(0,i.default)(this,w,t.createElement("TABLE")),(0,a.addClass)((0,o.default)(this,w),"htCore"),this.hot.getSettings().tableClassName&&(0,a.addClass)((0,o.default)(this,w),this.hot.getSettings().tableClassName),this.settings.ariaTags&&((0,a.setAttribute)((0,o.default)(this,w),[(0,f.A11Y_PRESENTATION)()]),(0,a.setAttribute)(e,[(0,f.A11Y_TREEGRID)(),(0,f.A11Y_ROWCOUNT)(this.hot.countRows()),(0,f.A11Y_COLCOUNT)(this.hot.countCols()),(0,f.A11Y_MULTISELECTABLE)()])),this.THEAD=t.createElement("THEAD"),(0,o.default)(this,w).appendChild(this.THEAD),this.TBODY=t.createElement("TBODY"),(0,o.default)(this,w).appendChild(this.TBODY),this.hot.table=(0,o.default)(this,w),this.hot.container.insertBefore((0,o.default)(this,w),this.hot.container.firstChild)}registerEvents(){const{rootElement:e,rootDocument:t,selection:r}=this.hot,n=t.documentElement;this.eventManager.addEventListener(e,"mousedown",(e=>{if((0,i.default)(this,E,!0),!this.isTextSelectionAllowed(e.target)){const{rootWindow:t}=this.hot;(0,a.clearTextSelection)(t),e.preventDefault(),t.focus()}})),this.eventManager.addEventListener(e,"mouseup",(()=>{(0,i.default)(this,E,!1)})),this.eventManager.addEventListener(e,"mousemove",(e=>{(0,o.default)(this,E)&&!this.isTextSelectionAllowed(e.target)&&(this.settings.fragmentSelection&&(0,a.clearTextSelection)(this.hot.rootWindow),e.preventDefault())})),this.eventManager.addEventListener(n,"keyup",(e=>{r.isInProgress()&&!e.shiftKey&&r.finish()})),this.eventManager.addEventListener(n,"mouseup",(n=>{r.isInProgress()&&(0,u.isLeftClick)(n)&&r.finish(),(0,i.default)(this,y,!1);const s=(0,a.isOutsideInput)(t.activeElement);s&&(!s&&(r.isSelected()||r.isSelectedByAnyHeader()||e.contains(n.target)||(0,u.isRightClick)(n))||this.hot.unlisten())})),this.eventManager.addEventListener(n,"contextmenu",(e=>{r.isInProgress()&&(0,u.isRightClick)(e)&&(r.finish(),(0,i.default)(this,y,!1))})),this.eventManager.addEventListener(n,"touchend",(()=>{r.isInProgress()&&r.finish(),(0,i.default)(this,y,!1)})),this.eventManager.addEventListener(n,"mousedown",(r=>{const s=r.target,i=r.x||r.clientX,l=r.y||r.clientY;let u=r.target;if((0,o.default)(this,y)||!e||!this.hot.view)return;const{holder:h}=this.hot.view._wt.wtTable;if(u===h){const e=(0,a.getScrollbarWidth)(t);if(t.elementFromPoint(i+e,l)!==h||t.elementFromPoint(i,l+e)!==h)return}else for(;u!==n;){if(null===u){if(r.isTargetWebComponent)break;return}if(u===e)return;u=u.parentNode}("function"==typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(s):this.settings.outsideClickDeselects)?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)})),this.eventManager.addEventListener((0,o.default)(this,w),"selectstart",(e=>{this.settings.fragmentSelection||(0,a.isInput)(e.target)||e.preventDefault()}))}translateFromRenderableToVisualCoords(e){let{row:t,col:r}=e;return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(t,r))}translateFromRenderableToVisualIndex(e,t){let r=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e,n=t>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(t):t;return null===r&&(r=e),null===n&&(n=t),[r,n]}countRenderableIndexes(e,t){const r=Math.min(e.getNotTrimmedIndexesLength(),t),n=e.getNearestNotHiddenIndex(r-1,-1);return null===n?0:e.getRenderableFromVisualIndex(n)+1}countRenderableColumns(){return this.countRenderableIndexes(this.hot.columnIndexMapper,this.settings.maxCols)}countRenderableRows(){return this.countRenderableIndexes(this.hot.rowIndexMapper,this.settings.maxRows)}countNotHiddenRowIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.rowIndexMapper,this.countRenderableRows())}countNotHiddenColumnIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.columnIndexMapper,this.countRenderableColumns())}countNotHiddenIndexes(e,t,r,n){if(isNaN(e)||e<0)return 0;const s=r.getNearestNotHiddenIndex(e,t),o=r.getRenderableFromVisualIndex(s);if(!Number.isInteger(o))return 0;let i=0;return t<0?i=o+1:t>0&&(i=n-o),i}countNotHiddenFixedColumnsStart(){const e=this.hot.countCols(),t=Math.min(parseInt(this.settings.fixedColumnsStart,10),e)-1;return this.countNotHiddenColumnIndexes(t,-1)}countNotHiddenFixedRowsTop(){const e=this.hot.countRows(),t=Math.min(parseInt(this.settings.fixedRowsTop,10),e)-1;return this.countNotHiddenRowIndexes(t,-1)}countNotHiddenFixedRowsBottom(){const e=this.hot.countRows(),t=Math.max(e-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(t,1)}countRenderableColumnsInRange(e,t){let r=0;for(let n=e;n<=t;n++)null!==this.hot.columnIndexMapper.getRenderableFromVisualIndex(n)&&(r+=1);return r}countRenderableRowsInRange(e,t){let r=0;for(let n=e;n<=t;n++)null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(n)&&(r+=1);return r}isMainTableNotFullyCoveredByOverlays(){const e=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),t=this.countNotHiddenFixedColumnsStart();return this.hot.countRenderedRows()>e&&this.hot.countRenderedCols()>t}initializeWalkontable(){const e={ariaTags:this.settings.ariaTags,rtlMode:this.hot.isRtl(),externalRowCalculator:this.hot.getPlugin("autoRowSize")&&this.hot.getPlugin("autoRowSize").isEnabled(),table:(0,o.default)(this,w),isDataViewInstance:()=>(0,d.isRootInstance)(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,stretchH:()=>this.settings.stretchH,data:(e,t)=>this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(e,t)),totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>this.settings.fixedColumnsStart>0||e.rowHeaders().length>0,shouldRenderTopOverlay:()=>this.settings.fixedRowsTop>0||e.columnHeaders().length>0,shouldRenderBottomOverlay:()=>this.settings.fixedRowsBottom>0,minSpareRows:()=>this.settings.minSpareRows,renderAllRows:this.settings.renderAllRows,rowHeaders:()=>{const e=[];return this.hot.hasRowHeaders()&&e.push(((e,t)=>{const r=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e;this.appendRowHeader(r,t)})),this.hot.runHooks("afterGetRowHeaderRenderers",e),(0,i.default)(this,m,e.length),e},columnHeaders:()=>{const e=[];return this.hot.hasColHeaders()&&e.push(((e,t)=>{const r=e>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(e):e;this.appendColHeader(r,t)})),this.hot.runHooks("afterGetColumnHeaderRenderers",e),(0,i.default)(this,g,e.length),e},columnWidth:e=>{const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getColWidth(null===t?e:t)},rowHeight:e=>{const t=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getRowHeight(null===t?e:t)},cellRenderer:(e,t,r)=>{const[n,s]=this.translateFromRenderableToVisualIndex(e,t),o=this.hot.runHooks("modifyGetCellCoords",n,s);let i=n,a=s;Array.isArray(o)&&([i,a]=o);const l=this.hot.getCellMeta(i,a),u=this.hot.colToProp(a);let h=this.hot.getDataAtRowProp(i,u);this.hot.hasHook("beforeValueRender")&&(h=this.hot.runHooks("beforeValueRender",h,l)),this.hot.runHooks("beforeRenderer",r,n,s,u,h,l),this.hot.getCellRenderer(l)(this.hot,r,n,s,u,h,l),this.hot.runHooks("afterRenderer",r,n,s,u,h,l)},selections:this.hot.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.hot&&!this.hot.isDestroyed&&this.hot.refreshDimensions()},onContainerElementResize:()=>{this.hot&&!this.hot.isDestroyed&&(0,a.isVisible)(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t),o={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=n,(0,i.default)(this,y,!0),this.hot.runHooks("beforeOnCellMouseDown",e,s,r,o),(0,u.isImmediatePropagationStopped)(e)||((0,c.handleMouseEvent)(e,{coords:s,selection:this.hot.selection,controller:o,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseDown",e,s,r),this.activeWt=this._wt)},onCellContextMenu:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t);this.activeWt=n,(0,i.default)(this,y,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",e,s,r),(0,u.isImmediatePropagationStopped)(e)||(this.hot.runHooks("afterOnCellContextMenu",e,s,r),this.activeWt=this._wt)},onCellMouseOut:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t);this.activeWt=n,this.hot.runHooks("beforeOnCellMouseOut",e,s,r),(0,u.isImmediatePropagationStopped)(e)||(this.hot.runHooks("afterOnCellMouseOut",e,s,r),this.activeWt=this._wt)},onCellMouseOver:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t),i={row:!1,column:!1,cell:!1};this.activeWt=n,this.hot.runHooks("beforeOnCellMouseOver",e,s,r,i),(0,u.isImmediatePropagationStopped)(e)||((0,o.default)(this,y)&&(0,c.handleMouseEvent)(e,{coords:s,selection:this.hot.selection,controller:i,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseOver",e,s,r),this.activeWt=this._wt)},onCellMouseUp:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t);this.activeWt=n,this.hot.runHooks("beforeOnCellMouseUp",e,s,r),(0,u.isImmediatePropagationStopped)(e)||this.hot.isDestroyed||(this.hot.runHooks("afterOnCellMouseUp",e,s,r),this.activeWt=this._wt)},onCellCornerMouseDown:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerMouseDown",e)},onCellCornerDblClick:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerDblClick",e)},beforeDraw:(e,t)=>this.beforeRender(e,t),onDraw:e=>this.afterRender(e),onBeforeViewportScrollVertically:e=>{const t=this.hot.rowIndexMapper,r=e<0;let n=e;return r||(n=t.getVisualFromRenderableIndex(e),null!==n)?(n=this.hot.runHooks("beforeViewportScrollVertically",n),this.hot.runHooks("beforeViewportScroll"),r?n:t.getRenderableFromVisualIndex(n)):e},onBeforeViewportScrollHorizontally:e=>{const t=this.hot.columnIndexMapper,r=e<0;let n=e;return r||(n=t.getVisualFromRenderableIndex(e),null!==n)?(n=this.hot.runHooks("beforeViewportScrollHorizontally",n),this.hot.runHooks("beforeViewportScroll"),r?n:t.getRenderableFromVisualIndex(n)):e},onScrollVertically:()=>{this.hot.runHooks("afterScrollVertically"),this.hot.runHooks("afterScroll")},onScrollHorizontally:()=>{this.hot.runHooks("afterScrollHorizontally"),this.hot.runHooks("afterScroll")},onBeforeRemoveCellClassNames:()=>this.hot.runHooks("beforeRemoveCellClassNames"),onBeforeHighlightingRowHeader:(e,t,r)=>{const n=this.hot.rowIndexMapper,s=e<0;let o=e;s||(o=n.getVisualFromRenderableIndex(e));const i=this.hot.runHooks("beforeHighlightingRowHeader",o,t,r);return s?i:n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(i,1))},onBeforeHighlightingColumnHeader:(e,t,r)=>{const n=this.hot.columnIndexMapper,s=e<0;let o=e;s||(o=n.getVisualFromRenderableIndex(e));const i=this.hot.runHooks("beforeHighlightingColumnHeader",o,t,r);return s?i:n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(i,1))},onAfterDrawSelection:(e,t,r)=>{let n;const[s,o]=this.translateFromRenderableToVisualIndex(e,t),i=this.hot.selection.getSelectedRange();if(i.size()>0){const e=i.peekByIndex(null!=r?r:0);n=[e.from.row,e.from.col,e.to.row,e.to.col]}return this.hot.runHooks("afterDrawSelection",s,o,n,r)},onBeforeDrawBorders:(e,t)=>{const[r,n,s,o]=e,i=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(r),this.hot.columnIndexMapper.getVisualFromRenderableIndex(n),this.hot.rowIndexMapper.getVisualFromRenderableIndex(s),this.hot.columnIndexMapper.getVisualFromRenderableIndex(o)];return this.hot.runHooks("beforeDrawBorders",i,t)},onBeforeTouchScroll:()=>this.hot.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.hot.runHooks("afterMomentumScroll"),onBeforeStretchingColumnWidth:(e,t)=>{const r=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t);return this.hot.runHooks("beforeStretchingColumnWidth",e,r)},onModifyRowHeaderWidth:e=>this.hot.runHooks("modifyRowHeaderWidth",e),onModifyGetCellCoords:(e,t,r)=>{const n=this.hot.rowIndexMapper,s=this.hot.columnIndexMapper,o=t>=0?s.getVisualFromRenderableIndex(t):t,i=e>=0?n.getVisualFromRenderableIndex(e):e,a=this.hot.runHooks("modifyGetCellCoords",i,o,r);if(Array.isArray(a)){const[e,t,r,o]=a;return[e>=0?n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(e,1)):e,t>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(t,1)):t,r>=0?n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r,-1)):r,o>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(o,-1)):o]}},viewportRowCalculatorOverride:e=>{let t=this.settings.viewportRowRenderingOffset;if("auto"===t&&this.settings.fixedRowsTop&&(t=10),t>0||"auto"===t){const r=this.countRenderableRows(),n=e.startRow,s=e.endRow;if("number"==typeof t)e.startRow=Math.max(n-t,0),e.endRow=Math.min(s+t,r-1);else if("auto"===t){const t=Math.ceil(s/r*12);e.startRow=Math.max(n-t,0),e.endRow=Math.min(s+t,r-1)}}this.hot.runHooks("afterViewportRowCalculatorOverride",e)},viewportColumnCalculatorOverride:e=>{let t=this.settings.viewportColumnRenderingOffset;if("auto"===t&&this.settings.fixedColumnsStart&&(t=10),t>0||"auto"===t){const r=this.countRenderableColumns(),n=e.startColumn,s=e.endColumn;if("number"==typeof t&&(e.startColumn=Math.max(n-t,0),e.endColumn=Math.min(s+t,r-1)),"auto"===t){const t=Math.ceil(s/r*6);e.startColumn=Math.max(n-t,0),e.endColumn=Math.min(s+t,r-1)}}this.hot.runHooks("afterViewportColumnCalculatorOverride",e)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const e=this.hot.runHooks("modifyColumnHeaderHeight");return this.settings.columnHeaderHeight||e}};this.hot.runHooks("beforeInitWalkontable",e),this._wt=new h.default(e),this.activeWt=this._wt;const t=this._wt.wtTable.spreader,{width:r,height:n}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(r,n),this.eventManager.addEventListener(t,"mousedown",(e=>{e.target===t&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(t,"contextmenu",(e=>{e.target===t&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"click",(()=>{this.settings.observeDOMVisibility&&this._wt.drawInterrupted&&(this.hot.forceFullRender=!0,this.render())}))}isTextSelectionAllowed(e){if((0,a.isInput)(e))return!0;const t=(0,a.isChildOf)(e,this.hot.view._wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))}isMouseDown(){return(0,o.default)(this,y)}isSelectedOnlyCell(){var e,t;return null!==(e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingleCell())&&void 0!==e&&e}isCellEdited(){const e=this.hot.getActiveEditor();return e&&e.isOpened()}beforeRender(e,t){e&&this.hot.runHooks("beforeViewRender",this.hot.forceFullRender,t)}afterRender(e){e&&this.hot.runHooks("afterViewRender",this.hot.forceFullRender)}appendRowHeader(e,t){if(t.firstChild){const r=t.firstChild;if(!(0,a.hasClass)(r,"relative"))return(0,a.empty)(t),void this.appendRowHeader(e,t);this.updateCellHeader(r.querySelector(".rowHeader"),e,this.hot.getRowHeader)}else{const{rootDocument:r,getRowHeader:n}=this.hot,s=r.createElement("div"),o=r.createElement("span");s.className="relative",o.className="rowHeader",this.updateCellHeader(o,e,n),s.appendChild(o),t.appendChild(s)}this.hot.runHooks("afterGetRowHeader",e,t)}appendColHeader(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hot.getColHeader,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(t.firstChild){const s=t.firstChild;(0,a.hasClass)(s,"relative")?this.updateCellHeader(s.querySelector(".colHeader"),e,r,n):((0,a.empty)(t),this.appendColHeader(e,t,r,n))}else{const{rootDocument:s}=this.hot,o=s.createElement("div"),i=s.createElement("span");o.className="relative",i.className="colHeader",this.updateCellHeader(i,e,r,n),o.appendChild(i),t.appendChild(o)}this.hot.runHooks("afterGetColHeader",e,t,n)}updateCellHeader(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=t;const o=this._wt.wtOverlays.getParentOverlay(e)||this._wt;e.parentNode&&((0,a.hasClass)(e,"colHeader")?s=o.wtTable.columnFilter.sourceToRendered(t):(0,a.hasClass)(e,"rowHeader")&&(s=o.wtTable.rowFilter.sourceToRendered(t))),s>-1?(0,a.fastInnerHTML)(e,r(t,n)):((0,a.fastInnerText)(e,String.fromCharCode(160)),(0,a.addClass)(e,"cornerHeader"))}maximumVisibleElementWidth(e){const t=this._wt.wtViewport.getWorkspaceWidth()-e;return t>0?t:0}maximumVisibleElementHeight(e){const t=this._wt.wtViewport.getWorkspaceHeight()-e;return t>0?t:0}setLastSize(e,t){(0,i.default)(this,C,e),(0,i.default)(this,v,t)}getLastSize(){return{width:(0,o.default)(this,C),height:(0,o.default)(this,v)}}getFirstFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstVisibleRow())}getLastFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastVisibleRow())}getFirstFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstVisibleColumn())}getLastFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastVisibleColumn())}getColumnHeadersCount(){return(0,o.default)(this,g)}getRowHeadersCount(){return(0,o.default)(this,m)}destroy(){this._wt.destroy(),this.eventManager.destroy()}};t.default=R},34952:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),o=n(r(48427)),i=r(47036),a=r(99681);function l(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var u=new WeakMap,h=new WeakMap,c=new WeakMap,d=new WeakMap,f=new WeakMap;t.ChangesObservable=class{constructor(){let{initialIndexValue:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(this,u,{writable:!0,value:new Set}),l(this,h,{writable:!0,value:[]}),l(this,c,{writable:!0,value:[]}),l(this,d,{writable:!0,value:!1}),l(this,f,{writable:!0,value:!1}),(0,o.default)(this,f,null!=e&&e)}createObserver(){const e=new i.ChangesObserver;return(0,s.default)(this,u).add(e),e.addLocalHook("unsubscribe",(()=>{(0,s.default)(this,u).delete(e)})),e._writeInitialChanges((0,a.arrayDiff)((0,s.default)(this,h),(0,s.default)(this,c))),e}emit(e){let t=(0,s.default)(this,c);(0,s.default)(this,d)&&(0,s.default)(this,h).length===e.length||(0===e.length?e=new Array(t.length).fill((0,s.default)(this,f)):(0,o.default)(this,h,new Array(e.length).fill((0,s.default)(this,f))),(0,s.default)(this,d)||((0,o.default)(this,d,!0),t=(0,s.default)(this,h)));const r=(0,a.arrayDiff)(t,e);(0,s.default)(this,u).forEach((e=>e._write(r))),(0,o.default)(this,c,e)}}},47036:(e,t,r)=>{"use strict";r(60740);var n=r(73203);t.__esModule=!0;var s=n(r(48427)),o=n(r(42538)),i=r(76163),a=n(r(63806));function l(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}var u=new WeakMap;class h{constructor(){l(this,u,{writable:!0,value:[]})}subscribe(e){return this.addLocalHook("change",e),this._write((0,o.default)(this,u)),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){(0,s.default)(this,u,e)}}t.ChangesObserver=h,(0,i.mixin)(h,a.default)},99681:(e,t,r)=>{"use strict";t.__esModule=!0,t.arrayDiff=function(e,t){const r=[];let n=0,s=0;for(;n<e.length&&s<t.length;n++,s++)e[n]!==t[s]&&r.push({op:"replace",index:s,oldValue:e[n],newValue:t[s]});for(;n<t.length;n++)r.push({op:"insert",index:n,oldValue:void 0,newValue:t[n]});for(;s<e.length;s++)r.push({op:"remove",index:s,oldValue:e[s],newValue:void 0});return r},r(95988)},41789:(e,t,r)=>{"use strict";t.__esModule=!0;var n={IndexMapper:!0,getRegisteredMapsCounter:!0,getIncreasedIndexes:!0,getDecreasedIndexes:!0,alterUtilsFactory:!0},s=r(47874);t.IndexMapper=s.IndexMapper;var o=r(18595);t.getRegisteredMapsCounter=o.getRegisteredMapsCounter;var i=r(34606);t.getIncreasedIndexes=i.getIncreasedIndexes,t.getDecreasedIndexes=i.getDecreasedIndexes,t.alterUtilsFactory=i.alterUtilsFactory;var a=r(1751);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}))},47874:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740);var s=n(r(93231)),o=r(98887),i=r(1751),a=r(70980),l=n(r(63806)),u=r(76163),h=r(97639),c=r(34952);new Set;class d{constructor(){(0,s.default)(this,"indexesSequence",new i.IndexesSequence),(0,s.default)(this,"trimmingMapsCollection",new a.AggregatedCollection((e=>e.some((e=>!0===e))),!1)),(0,s.default)(this,"hidingMapsCollection",new a.AggregatedCollection((e=>e.some((e=>!0===e))),!1)),(0,s.default)(this,"variousMapsCollection",new a.MapCollection),(0,s.default)(this,"hidingChangesObservable",new c.ChangesObservable({initialIndexValue:!1})),(0,s.default)(this,"notTrimmedIndexesCache",[]),(0,s.default)(this,"notHiddenIndexesCache",[]),(0,s.default)(this,"isBatched",!1),(0,s.default)(this,"indexesSequenceChanged",!1),(0,s.default)(this,"indexesChangeSource",void 0),(0,s.default)(this,"trimmedIndexesChanged",!1),(0,s.default)(this,"hiddenIndexesChanged",!1),(0,s.default)(this,"renderablePhysicalIndexesCache",[]),(0,s.default)(this,"fromPhysicalToVisualIndexesCache",new Map),(0,s.default)(this,"fromVisualToRenderableIndexesCache",new Map),this.indexesSequence.addLocalHook("change",(()=>{this.indexesSequenceChanged=!0,this.updateCache(),this.runLocalHooks("indexesSequenceChange",this.indexesChangeSource),this.runLocalHooks("change",this.indexesSequence,null)})),this.trimmingMapsCollection.addLocalHook("change",(e=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.trimmingMapsCollection)})),this.hidingMapsCollection.addLocalHook("change",(e=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.hidingMapsCollection)})),this.variousMapsCollection.addLocalHook("change",(e=>{this.runLocalHooks("change",e,this.variousMapsCollection)}))}suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache()}createChangesObserver(e){if("hiding"!==e)throw new Error(`Unsupported index map type "${e}".`);return this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(e,t,r){return this.registerMap(e,(0,i.createIndexMap)(t,r))}registerMap(e,t){if(this.trimmingMapsCollection.get(e)||this.hidingMapsCollection.get(e)||this.variousMapsCollection.get(e))throw Error(`Map with name "${e}" has been already registered.`);t instanceof i.TrimmingMap?this.trimmingMapsCollection.register(e,t):t instanceof i.HidingMap?this.hidingMapsCollection.register(e,t):this.variousMapsCollection.register(e,t);const r=this.getNumberOfIndexes();return r>0&&t.init(r),t}unregisterMap(e){this.trimmingMapsCollection.unregister(e),this.hidingMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(e){const t=this.notTrimmedIndexesCache[e];return(0,h.isDefined)(t)?t:null}getPhysicalFromRenderableIndex(e){const t=this.renderablePhysicalIndexesCache[e];return(0,h.isDefined)(t)?t:null}getVisualFromPhysicalIndex(e){const t=this.fromPhysicalToVisualIndexesCache.get(e);return(0,h.isDefined)(t)?t:null}getVisualFromRenderableIndex(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}getRenderableFromVisualIndex(e){const t=this.fromVisualToRenderableIndexesCache.get(e);return(0,h.isDefined)(t)?t:null}getNearestNotHiddenIndex(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null===this.getPhysicalFromVisualIndex(e))return null;if(this.fromVisualToRenderableIndexesCache.has(e))return e;const n=Array.from(this.fromVisualToRenderableIndexesCache.keys());let s=-1;return s=t>0?n.findIndex((t=>t>e)):n.reverse().findIndex((t=>t<e)),-1===s?r?this.getNearestNotHiddenIndex(e,-t,!1):null:n[s]}initToLength(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=[...new Array(e).keys()],this.notHiddenIndexesCache=[...new Array(e).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(e),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(e),this.variousMapsCollection.initEvery(e),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(e){const t=this.getNumberOfIndexes();if(e<t){const t=[...Array(this.getNumberOfIndexes()-e).keys()].map((t=>t+e));this.removeIndexes(t)}else this.insertIndexes(t,e-t)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(e){void 0===this.indexesChangeSource&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(e),"update"===this.indexesChangeSource&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notTrimmedIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isTrimmed(e)))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notHiddenIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isHidden(e)))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.renderablePhysicalIndexesCache;return this.getNotTrimmedIndexes().filter((e=>!1===this.isHidden(e)))}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(e,t){"number"==typeof e&&(e=[e]);const r=(0,o.arrayMap)(e,(e=>this.getPhysicalFromVisualIndex(e))),n=this.getNotTrimmedIndexesLength(),s=e.length,a=(0,i.getListWithRemovedItems)(this.getIndexesSequence(),r),l=a.filter((e=>!1===this.isTrimmed(e)));let u=a.indexOf(l[l.length-1])+1;if(t+s<n){const e=l[t];u=a.indexOf(e)}this.indexesChangeSource="move",this.setIndexesSequence((0,i.getListWithInsertedItems)(a,u,r)),this.indexesChangeSource=void 0}isTrimmed(e){return this.trimmingMapsCollection.getMergedValueAtIndex(e)}isHidden(e){return this.hidingMapsCollection.getMergedValueAtIndex(e)}insertIndexes(e,t){const r=this.getNotTrimmedIndexes()[e],n=(0,h.isDefined)(r)?r:this.getNumberOfIndexes(),s=this.getIndexesSequence().includes(r)?this.getIndexesSequence().indexOf(r):this.getNumberOfIndexes(),i=(0,o.arrayMap)(new Array(t).fill(n),((e,t)=>e+t));this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(s,i),this.indexesChangeSource=void 0,this.trimmingMapsCollection.insertToEvery(s,i),this.hidingMapsCollection.insertToEvery(s,i),this.variousMapsCollection.insertToEvery(s,i),this.resumeOperations()}removeIndexes(e){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(e),this.hidingMapsCollection.removeFromEvery(e),this.variousMapsCollection.removeFromEvery(e),this.resumeOperations()}updateCache(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===e||!1===this.isBatched&&!0===t)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderableIndexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}cacheFromPhysicalToVisualIndexes(){const e=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromVisualIndex(t);this.fromPhysicalToVisualIndexesCache.set(e,t)}}cacheFromVisualToRenderableIndexes(){const e=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromRenderableIndex(t),r=this.getVisualFromPhysicalIndex(e);this.fromVisualToRenderableIndexesCache.set(r,t)}}}t.IndexMapper=d,(0,u.mixin)(d,l.default)},13338:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(18595),i=r(98887),a=r(97639);class l extends o.MapCollection{constructor(e,t){super(),(0,s.default)(this,"mergedValuesCache",[]),(0,s.default)(this,"aggregationFunction",void 0),(0,s.default)(this,"fallbackValue",void 0),this.aggregationFunction=e,this.fallbackValue=t}getMergedValues(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.mergedValuesCache;if(0===this.getLength())return[];const e=(0,i.arrayMap)(this.get(),(e=>e.getValues())),t=[],r=(0,a.isDefined)(e[0])&&e[0].length||0;for(let n=0;n<r;n+=1){const r=[];for(let t=0;t<this.getLength();t+=1)r.push(e[t][n]);t.push(r)}return(0,i.arrayMap)(t,this.aggregationFunction)}getMergedValueAtIndex(e,t){const r=this.getMergedValues(t)[e];return(0,a.isDefined)(r)?r:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}t.AggregatedCollection=l},70980:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(13338);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}));var s=r(18595);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},18595:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getRegisteredMapsCounter=function(){return l};var s=n(r(93231)),o=r(97639),i=r(76163),a=n(r(63806));let l=0;class u{constructor(){(0,s.default)(this,"collection",new Map)}register(e,t){!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",(()=>this.runLocalHooks("change",t))),l+=1)}unregister(e){const t=this.collection.get(e);(0,o.isDefined)(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),l-=1)}unregisterAll(){this.collection.forEach(((e,t)=>this.unregister(t))),this.collection.clear()}get(e){return(0,o.isUndefined)(e)?Array.from(this.collection.values()):this.collection.get(e)}getLength(){return this.collection.size}removeFromEvery(e){this.collection.forEach((t=>{t.remove(e)}))}insertToEvery(e,t){this.collection.forEach((r=>{r.insert(e,t)}))}initEvery(e){this.collection.forEach((t=>{t.init(e)}))}}t.MapCollection=u,(0,i.mixin)(u,a.default)},52953:(e,t,r)=>{"use strict";t.__esModule=!0,r(95988);var n=r(85155),s=r(98887);class o extends n.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getHiddenIndexes(){return(0,s.arrayReduce)(this.getValues(),((e,t,r)=>(t&&e.push(r),e)),[])}}t.HidingMap=o},1751:(e,t,r)=>{"use strict";t.__esModule=!0;var n={createIndexMap:!0,HidingMap:!0,IndexMap:!0,LinkedPhysicalIndexToValueMap:!0,PhysicalIndexToValueMap:!0,TrimmingMap:!0};t.createIndexMap=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!c.has(e))throw new Error(`The provided map type ("${e}") does not exist.`);return new(c.get(e))(t)},r(60740);var s=r(52953);t.HidingMap=s.HidingMap;var o=r(42850);t.IndexMap=o.IndexMap;var i=r(63338);t.LinkedPhysicalIndexToValueMap=i.LinkedPhysicalIndexToValueMap;var a=r(85155);t.PhysicalIndexToValueMap=a.PhysicalIndexToValueMap;var l=r(57059);t.TrimmingMap=l.TrimmingMap;var u=r(46808);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===u[e]||(t[e]=u[e]))}));var h=r(50525);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===h[e]||(t[e]=h[e]))}));const c=new Map([["hiding",s.HidingMap],["index",o.IndexMap],["linkedPhysicalIndexToValue",i.LinkedPhysicalIndexToValueMap],["physicalIndexToValue",a.PhysicalIndexToValueMap],["trimming",l.TrimmingMap]])},42850:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(95988);var s=n(r(93231)),o=r(57691),i=r(76163),a=r(46029),l=n(r(63806));class u{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,s.default)(this,"indexedValues",[]),(0,s.default)(this,"initValueOrFn",void 0),this.initValueOrFn=e}getValues(){return this.indexedValues}getValueAtIndex(e){const t=this.indexedValues;if(e<t.length)return t[e]}setValues(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}setValueAtIndex(e,t){return e<this.indexedValues.length&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,(0,a.isFunction)(this.initValueOrFn)?(0,o.rangeEach)(e-1,(e=>this.indexedValues.push(this.initValueOrFn(e)))):(0,o.rangeEach)(e-1,(()=>this.indexedValues.push(this.initValueOrFn))),this.runLocalHooks("change")}init(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}t.IndexMap=u,(0,i.mixin)(u,l.default)},46808:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(42850),s=r(50525),o=r(34606);class i extends n.IndexMap{constructor(){super((e=>e))}insert(e,t){const r=(0,o.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=(0,s.getListWithInsertedItems)(r,e,t),super.insert(e,t)}remove(e){const t=(0,s.getListWithRemovedItems)(this.indexedValues,e);this.indexedValues=(0,o.getDecreasedIndexes)(t,e),super.remove(e)}}t.IndexesSequence=i},63338:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),o=r(42850),i=r(50296),a=r(50525),l=r(14410),u=r(46029);class h extends o.IndexMap{constructor(){super(...arguments),(0,s.default)(this,"orderOfIndexes",[])}getValues(){return this.orderOfIndexes.map((e=>this.indexedValues[e]))}setValues(e){this.orderOfIndexes=[...Array(e.length).keys()],super.setValues(e)}setValueAtIndex(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return e<this.indexedValues.length&&(this.indexedValues[e]=t,!1===this.orderOfIndexes.includes(e)&&this.orderOfIndexes.splice(r,0,e),this.runLocalHooks("change"),!0)}clearValue(e){this.orderOfIndexes=(0,a.getListWithRemovedItems)(this.orderOfIndexes,[e]),(0,u.isFunction)(this.initValueOrFn)?super.setValueAtIndex(e,this.initValueOrFn(e)):super.setValueAtIndex(e,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,super.setDefaultValues(e)}insert(e,t){this.indexedValues=(0,i.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),this.orderOfIndexes=(0,l.getIncreasedIndexes)(this.orderOfIndexes,t),super.insert(e,t)}remove(e){this.indexedValues=(0,i.getListWithRemovedItems)(this.indexedValues,e),this.orderOfIndexes=(0,a.getListWithRemovedItems)(this.orderOfIndexes,e),this.orderOfIndexes=(0,l.getDecreasedIndexes)(this.orderOfIndexes,e),super.remove(e)}getEntries(){return this.orderOfIndexes.map((e=>[e,this.getValueAtIndex(e)]))}}t.LinkedPhysicalIndexToValueMap=h},85155:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(42850),s=r(50296);class o extends n.IndexMap{insert(e,t){this.indexedValues=(0,s.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){this.indexedValues=(0,s.getListWithRemovedItems)(this.indexedValues,e),super.remove(e)}}t.PhysicalIndexToValueMap=o},57059:(e,t,r)=>{"use strict";t.__esModule=!0,r(95988);var n=r(85155),s=r(98887);class o extends n.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getTrimmedIndexes(){return(0,s.arrayReduce)(this.getValues(),((e,t,r)=>(t&&e.push(r),e)),[])}}t.TrimmingMap=o},14410:(e,t,r)=>{"use strict";t.__esModule=!0,t.getDecreasedIndexes=function(e,t){return(0,n.arrayMap)(e,(e=>e-t.filter((t=>t<e)).length))},t.getIncreasedIndexes=function(e,t){const r=t[0],s=t.length;return(0,n.arrayMap)(e,(e=>e>=r?e+s:e))};var n=r(98887)},34606:(e,t,r)=>{"use strict";t.__esModule=!0,r(60740);var n=r(14410);t.getDecreasedIndexes=n.getDecreasedIndexes,t.getIncreasedIndexes=n.getIncreasedIndexes;var s=r(50525),o=r(50296);const i=new Map([["indexesSequence",{getListWithInsertedItems:s.getListWithInsertedItems,getListWithRemovedItems:s.getListWithRemovedItems}],["physicallyIndexed",{getListWithInsertedItems:o.getListWithInsertedItems,getListWithRemovedItems:o.getListWithRemovedItems}]]);t.alterUtilsFactory=e=>{if(!1===i.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return i.get(e)}},50525:(e,t,r)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,r){return[...e.slice(0,t),...r,...e.slice(t)]},t.getListWithRemovedItems=function(e,t){return(0,n.arrayFilter)(e,(e=>!1===t.includes(e)))};var n=r(98887)},50296:(e,t,r)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,r,s){const o=r.length?r[0]:void 0;return[...e.slice(0,o),...r.map(((e,t)=>(0,n.isFunction)(s)?s(e,t):s)),...void 0===o?[]:e.slice(o)]},t.getListWithRemovedItems=function(e,t){return(0,s.arrayFilter)(e,((e,r)=>!1===t.includes(r)))};var n=r(46029),s=r(98887)},22111:(e,t,r)=>{"use strict";t.__esModule=!0,t.createPriorityMap=function(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=new Map;return e=(0,s.isFunction)(e)?e:l,t=(0,s.isFunction)(t)?t:u,{addItem:function(s,o){if(!(0,n.isNumeric)(s))throw new Error(t(s));if(r.has(s))throw new Error(e(s));r.set(s,o)},getItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;const[t,n]=a.get(e)||a.get(o);return[...r].sort(((e,r)=>e[0]<r[0]?t:n)).map((e=>e[1]))}}},r(60740);var n=r(57691),s=r(46029);const o="asc";t.ASC=o;const i="desc";t.DESC=i;const a=new Map([[o,[-1,1]],[i,[1,-1]]]),l=e=>`The priority '${e}' is already declared in a map.`,u=e=>`The priority '${e}' is not a number.`},96660:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.depthFirstPreOrder=i;var s=n(r(93231));r(95988),r(60740);const o="DF-pre-order";function i(e,t){let r=e.call(t,this);for(let n=0;n<this.childs.length;n++){if(!1===r)return!1;r=i.call(this.childs[n],e,t)}return r}t.TRAVERSAL_DF_PRE=o;const a="DF-post-order";t.TRAVERSAL_DF_POST=a;const l="BF";t.TRAVERSAL_BF=l;const u=l,h=new Map([[o,i],[a,function e(t,r){for(let n=0;n<this.childs.length;n++){if(!1===e.call(this.childs[n],t,r))return!1}return t.call(r,this)}],[l,function(e,t){const r=[this];!function n(){if(0===r.length)return;const s=r.shift();r.push(...s.childs),!1!==e.call(t,s)&&n()}()}]]);class c{constructor(e){(0,s.default)(this,"data",{}),(0,s.default)(this,"parent",null),(0,s.default)(this,"childs",[]),this.data=e}addChild(e){e.parent=this,this.childs.push(e)}cloneTree(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;const t=new c({...e.data});for(let r=0;r<e.childs.length;r++)t.addChild(this.cloneTree(e.childs[r]));return t}replaceTreeWith(e){this.data={...e.data},this.childs=[];for(let t=0;t<e.childs.length;t++)this.addChild(e.childs[t])}walkDown(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;if(!h.has(t))throw new Error(`Traversal strategy "${t}" does not exist`);h.get(t).call(this,e,this)}walkUp(e){const t=this,r=n=>{!1!==e.call(t,n)&&null!==n.parent&&r(n.parent)};r(this)}}t.default=c},8815:(e,t,r)=>{"use strict";t.__esModule=!0,t.createUniqueMap=function(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Map;function r(){return[...t]}function o(e){return t.has(e)}return e=(0,n.isFunction)(e)?e:s,{addItem:function(r,n){if(o(r))throw new Error(e(r));t.set(r,n)},clear:function(){t.clear()},getId:function(e){const[t]=r().find((t=>{let[r,n]=t;return e===n&&r}))||[null];return t},getItem:function(e){return t.get(e)},getItems:r,hasItem:o,removeItem:function(e){return t.delete(e)}}},r(60740);var n=r(46029);const s=e=>`The id '${e}' is already declared in a map.`},6344:(e,t,r)=>{"use strict";t.__esModule=!0,t.createUniqueSet=function(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Set;return e=(0,n.isFunction)(e)?e:s,{addItem:function(r){if(t.has(r))throw new Error(e(r));t.add(r)},clear:function(){t.clear()},getItems:function(){return[...t]}}},r(60740);var n=r(46029);const s=e=>`'${e}' value is already declared in a unique set.`},46998:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=r(49587),i=r(98887);var a=class{constructor(e){(0,s.default)(this,"hot",null),(0,s.default)(this,"container",null),(0,s.default)(this,"injected",!1),(0,s.default)(this,"rows",[]),(0,s.default)(this,"columns",[]),(0,s.default)(this,"samples",null),(0,s.default)(this,"settings",{useHeaders:!0}),this.hot=e}addRow(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const r={row:e};this.rows.push(r),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol(e)),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),r.table=this.table.table}addColumnHeadersRow(e){const t=this.hot.getColHeader(0);if(null!=t){const t={row:-1};this.rows.push(t),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),t.table=this.table.table}}addColumn(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const r={col:e};this.columns.push(r),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),r.table=this.table.table}getHeights(e){this.injected||this.injectTable(),(0,i.arrayEach)(this.rows,(t=>{e(t.row,(0,o.outerHeight)(t.table)-1)}))}getWidths(e){this.injected||this.injectTable(),(0,i.arrayEach)(this.columns,(t=>{const{width:r}=t.table.getBoundingClientRect();e(t.col,Math.ceil(r))}))}setSettings(e){this.settings=e}setSetting(e,t){this.settings||(this.settings={}),this.settings[e]=t}getSettings(){return this.settings}getSetting(e){return this.settings?this.settings[e]:null}createColGroupsCol(e){const t=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1,-1)),this.samples.forEach((r=>{(0,i.arrayEach)(r.strings,(r=>{t.appendChild(this.createColElement(r.col,e))}))})),t}createRow(e){const{rootDocument:t}=this.hot,r=t.createDocumentFragment(),n=t.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,n),r.appendChild(n)),this.samples.forEach((n=>{(0,i.arrayEach)(n.strings,(n=>{const s=n.col,o=this.hot.getCellMeta(e,s);o.col=s,o.row=e;const i=this.hot.getCellRenderer(o),a=t.createElement("td");a.setAttribute("ghost-table",1),i(this.hot,a,e,s,this.hot.colToProp(s),n.value,o),r.appendChild(a)}))})),r}appendColumnHeadersRow(){const{rootDocument:e}=this.hot,t=e.createDocumentFragment(),r=[];if(this.hot.hasRowHeaders()){const n=e.createElement("th");r.push([-1,n]),t.appendChild(n)}this.samples.forEach((n=>{(0,i.arrayEach)(n.strings,(n=>{const s=n.col,o=e.createElement("th");r.push([s,o]),t.appendChild(o)}))})),this.table.tHead.appendChild(t),(0,i.arrayEach)(r,(e=>{const[t,r]=e;this.hot.view.appendColHeader(t,r)}))}createCol(e){const{rootDocument:t}=this.hot,r=t.createDocumentFragment();return this.samples.forEach((n=>{(0,i.arrayEach)(n.strings,(n=>{const s=n.row,o=this.hot.getCellMeta(s,e);o.col=e,o.row=s;const i=this.hot.getCellRenderer(o),a=t.createElement("td"),l=t.createElement("tr");a.setAttribute("ghost-table",1),i(this.hot,a,s,e,this.hot.colToProp(e),n.value,o),l.appendChild(a),r.appendChild(l)}))})),r}clean(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}injectTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}removeTable(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}createColElement(e,t){const r=this.hot.rootDocument.createElement("col");let n=0;t>=0&&e>=0&&(n=this.hot.getCellMeta(t,e).colspan);let s=this.hot.view._wt.wtTable.getStretchedColumnWidth(e);if(n>1)for(let t=e+1;t<e+n;t++)s+=this.hot.view._wt.wtTable.getStretchedColumnWidth(t);return r.style.width=`${s}px`,r}createTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,r=t.createDocumentFragment(),n=t.createElement("table"),s=t.createElement("thead"),i=t.createElement("tbody"),a=t.createElement("colgroup"),l=t.createElement("tr"),u=t.createElement("th");return this.isVertical()&&n.appendChild(a),this.isHorizontal()&&(l.appendChild(u),s.appendChild(l),n.style.tableLayout="auto",n.style.width="auto"),n.appendChild(s),this.isVertical()&&i.appendChild(l),n.appendChild(i),(0,o.addClass)(n,e),r.appendChild(n),{fragment:r,table:n,tHead:s,tBody:i,colGroup:a,tr:l,th:u}}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,r=t.createDocumentFragment(),n=t.createElement("div"),s=`htGhostTable htAutoSize ${e.trim()}`;return(0,o.addClass)(n,s),r.appendChild(n),{fragment:r,container:n}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}};t.default=a},99850:(e,t,r)=>{"use strict";t.__esModule=!0,t.createPaginator=function(e){let{initialPage:t=-1,size:r=(()=>0),onItemSelect:s=(()=>{}),onClear:o=(()=>{})}=e;const i=new Set;let a=(0,n.clamp)(t,-1,u()-1);function l(e,t){const r=u()-1;if(e<0&&(e=r),e>r&&(e=0),i.has(e))return-1;i.add(e);return!1===s(e,!1)&&(e=l(1===t?++e:--e,t)),e}function u(){return Math.max(r(),0)}return{setCurrentPage:function(e){e>-1&&e<u()&&!1!==s(e,!0)&&(a=e)},getCurrentPage:function(){return a},toFirstItem:function(){u()>0&&(i.clear(),a=l(0,1))},toLastItem:function(){u()>0&&(i.clear(),a=l(u()-1,-1))},toNextItem:function(){u()>0&&(i.clear(),a=l(++a,1))},toPreviousItem:function(){u()>0&&(i.clear(),a=l(--a,-1))},getSize:u,clear:function(){i.clear(),a=t,o()}}};var n=r(57691)},65795:(e,t,r)=>{"use strict";t.__esModule=!0,t._dataToHTML=function(e){const t=e.length,r=["<table>"];for(let s=0;s<t;s+=1){const o=e[s],i=o.length,a=[];0===s&&r.push("<tbody>");for(let e=0;e<i;e+=1){const t=o[e],r=(0,n.isEmpty)(t)?"":t.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,(e=>`<span style="mso-spacerun: yes">${"&nbsp;".repeat(e.length-1)} </span>`)).replace(/\t/gi,"&#9;");a.push(`<td>${r}</td>`)}r.push("<tr>",...a,"</tr>"),s+1===t&&r.push("</tbody>")}return r.push("</table>"),r.join("")},t.htmlToGridSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;const r={},n=t.createDocumentFragment(),i=t.createElement("div");n.appendChild(i);let a=e;if("string"==typeof a){const e=a.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,(e=>{const t=e.match(/<td\b[^>]*?>/g)[0];return`${t}${e.substring(t.length,e.lastIndexOf("<")).replace(/(<(?!br)([^>]+)>)/gi,"")}</td>`}));i.insertAdjacentHTML("afterbegin",`${e}`),a=i.querySelector("table")}if(!a||!function(e){return"TABLE"===(e&&e.nodeName||"")}(a))return;const l=i.querySelector('meta[name$="enerator"]'),u=null!==a.querySelector("tbody th"),h=a.querySelector("tr"),c=h?Array.from(h.cells).reduce(((e,t)=>e+t.colSpan),0)-(u?1:0):0,d=a.tFoot&&Array.from(a.tFoot.rows)||[],f=[];let p=!1,g=0,m=0;if(a.tHead){const e=Array.from(a.tHead.rows).filter((e=>{const t=null!==e.querySelector("td");return t&&f.push(e),!t}));g=e.length,p=g>0,g>1?r.nestedHeaders=Array.from(e).reduce(((e,t)=>{const r=Array.from(t.cells).reduce(((e,t,r)=>{if(u&&0===r)return e;const{colSpan:n,innerHTML:s}=t,o=n>1?{label:s,colspan:n}:s;return e.push(o),e}),[]);return e.push(r),e}),[]):p&&(r.colHeaders=Array.from(e[0].children).reduce(((e,t,r)=>(u&&0===r||e.push(t.innerHTML),e)),[]))}f.length&&(r.fixedRowsTop=f.length);d.length&&(r.fixedRowsBottom=d.length);const E=[...f,...Array.from(a.tBodies).reduce(((e,t)=>(e.push(...Array.from(t.rows)),e)),[]),...d];m=E.length;const y=new Array(m);for(let e=0;e<m;e++)y[e]=new Array(c);const w=[],C=[];for(let e=0;e<m;e++){const t=E[e],r=Array.from(t.cells),n=r.length;for(let t=0;t<n;t++){const n=r[t],{nodeName:i,innerHTML:a,rowSpan:u,colSpan:h}=n,c=y[e].findIndex((e=>void 0===e));if("TD"===i){if(u>1||h>1){for(let t=e;t<e+u;t++)if(t<m)for(let e=c;e<c+h;e++)y[t][e]=null;const t=n.getAttribute("style");t&&t.includes("mso-ignore:colspan")||w.push({col:c,row:e,rowspan:u,colspan:h})}let t="";t=l&&/excel/gi.test(l.content)?a.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):a.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),y[e][c]=t.replace(o,(e=>s[e]))}else C.push(a)}}w.length&&(r.mergeCells=w);C.length&&(r.rowHeaders=C);y.length&&(r.data=y);return r},t.instanceToHTML=function(e){const t=e.hasColHeaders(),r=e.hasRowHeaders(),s=[t?-1:0,r?-1:0,e.countRows()-1,e.countCols()-1],o=e.getData(...s),i=o.length,a=i>0?o[0].length:0,l=["<table>","</table>"],u=t?["<thead>","</thead>"]:[],h=["<tbody>","</tbody>"],c=r?1:0,d=t?1:0;for(let s=0;s<i;s+=1){const i=t&&0===s,l=[];for(let t=0;t<a;t+=1){const a=!i&&r&&0===t;let u="";if(i)u=`<th>${e.getColHeader(t-c)}</th>`;else if(a)u=`<th>${e.getRowHeader(s-d)}</th>`;else{const r=o[s][t],{hidden:i,rowspan:a,colspan:l}=e.getCellMeta(s-d,t-c);if(!i){const e=[];if(a&&e.push(`rowspan="${a}"`),l&&e.push(`colspan="${l}"`),(0,n.isEmpty)(r))u=`<td ${e.join(" ")}></td>`;else{const t=r.toString().replace("<","&lt;").replace(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");u=`<td ${e.join(" ")}>${t}</td>`}}}l.push(u)}const f=["<tr>",...l,"</tr>"].join("");i?u.splice(1,0,f):h.splice(-1,0,f)}return l.splice(1,0,u.join(""),h.join("")),l.join("")},r(95988);var n=r(97639);const s={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},o=new RegExp(Object.keys(s).map((e=>`(${e})`)).join("|"),"gi")},83059:(e,t)=>{"use strict";t.__esModule=!0,t.hasValidParameter=function(e){return e===n},t.isRootInstance=function(e){return r.has(e)},t.registerAsRootInstance=function(e){r.set(e,!0)};const r=new WeakMap;t.holder=r;const n=Symbol("rootInstance");t.rootInstanceSymbol=n},30240:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(60740),r(95988);var s=n(r(93231)),o=r(76163),i=r(57691),a=r(97639);class l{static get SAMPLE_COUNT(){return 3}constructor(e){(0,s.default)(this,"samples",null),(0,s.default)(this,"dataFactory",null),(0,s.default)(this,"customSampleCount",null),(0,s.default)(this,"allowDuplicates",!1),this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:l.SAMPLE_COUNT}setSampleCount(e){this.customSampleCount=e}setAllowDuplicates(e){this.allowDuplicates=e}generateRowSamples(e,t){return this.generateSamples("row",t,e)}generateColumnSamples(e,t){return this.generateSamples("col",t,e)}generateSamples(e,t,r){const n=new Map,{from:s,to:o}="number"==typeof r?{from:r,to:r}:r;return(0,i.rangeEach)(s,o,(r=>{const s=this.generateSample(e,t,r);n.set(r,s)})),n}generateSample(e,t,r){if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");const n=new Map,s="row"===e?"col":"row",l=[];return(0,i.rangeEach)(t.from,t.to,(t=>{const i="row"===e?this.dataFactory(r,t):this.dataFactory(t,r);if(!1===i)return;const{value:u,bundleSeed:h}=i,c="string"==typeof h&&h.length>0;let d;d=c?h:(0,o.isObject)(u)?`${Object.keys(u).length}`:Array.isArray(u)?`${u.length}`:`${(0,a.stringify)(u).length}`,n.has(d)||n.set(d,{needed:this.getSampleCount(),strings:[]});const f=n.get(d);if(f.needed){(!(l.indexOf(u)>-1)||this.allowDuplicates||c)&&(f.strings.push({value:u,[s]:t}),l.push(u),f.needed-=1)}})),n}}var u=l;t.default=u},31056:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";r.has(e)||r.set(e,new Map);const t=r.get(e);return{register:function(e,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()]}}};const r=new Map;t.collection=r},33089:(e,t)=>{"use strict";t.__esModule=!0,t.autocompleteValidator=n;const r="autocomplete";function n(e,t){let r=e;null==r&&(r=""),this.allowEmpty&&""===r?t(!0):this.strict&&this.source?"function"==typeof this.source?this.source(r,s(r,t)):s(r,t)(this.source):t(!0)}function s(e,t){const r=e;return function(e){let n=!1;for(let t=0,s=e.length;t<s;t++)if(r===e[t]){n=!0;break}t(n)}}t.VALIDATOR_TYPE=r,n.VALIDATOR_TYPE=r},78420:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(33089);t.VALIDATOR_TYPE=n.VALIDATOR_TYPE,t.autocompleteValidator=n.autocompleteValidator},24087:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.correctFormat=h,t.dateValidator=u;var s=n(r(22418)),o=r(16691),i=r(92090),a=r(46680);const l="date";function u(e,t){const r=(0,o.getEditorInstance)(i.EDITOR_TYPE,this.instance);let n=e,a=!0;null==n&&(n="");let l=(0,s.default)(n,this.dateFormat||r.defaultDateFormat,!0).isValid(),u=(0,s.default)(new Date(n)).isValid()||l;if(this.allowEmpty&&""===n&&(u=!0,l=!0),u||(a=!1),!u&&l&&(a=!0),u&&!l)if(!0===this.correctFormat){const e=h(n,this.dateFormat),t=this.instance.toVisualRow(this.row),r=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(t,r,e,"dateValidator"),a=!0}else a=!1;t(a)}function h(e,t){const r=(0,s.default)((0,a.getNormalizedDate)(e)),n=(0,s.default)(e,t),o=e.search(/[A-z]/g)>-1;let i;return i=r.isValid()&&r.format("x")===n.format("x")||!n.isValid()||o?r:n,i.format(t)}t.VALIDATOR_TYPE=l,u.VALIDATOR_TYPE=l},63322:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(24087);t.VALIDATOR_TYPE=n.VALIDATOR_TYPE,t.correctFormat=n.correctFormat,t.dateValidator=n.dateValidator},65967:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllValidators=function(){(0,a.registerValidator)(n.autocompleteValidator),(0,a.registerValidator)(s.dateValidator),(0,a.registerValidator)(o.numericValidator),(0,a.registerValidator)(i.timeValidator)};var n=r(78420);t.autocompleteValidator=n.autocompleteValidator,t.AUTOCOMPLETE_VALIDATOR=n.VALIDATOR_TYPE;var s=r(63322);t.dateValidator=s.dateValidator,t.DATE_VALIDATOR=s.VALIDATOR_TYPE;var o=r(22905);t.numericValidator=o.numericValidator,t.NUMERIC_VALIDATOR=o.VALIDATOR_TYPE;var i=r(85137);t.timeValidator=i.timeValidator,t.TIME_VALIDATOR=i.VALIDATOR_TYPE;var a=r(59340);t.registerValidator=a.registerValidator,t.getRegisteredValidatorNames=a.getRegisteredValidatorNames,t.getRegisteredValidators=a.getRegisteredValidators,t.getValidator=a.getValidator,t.hasValidator=a.hasValidator},22905:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(86115);t.VALIDATOR_TYPE=n.VALIDATOR_TYPE,t.numericValidator=n.numericValidator},86115:(e,t,r)=>{"use strict";t.__esModule=!0,t.numericValidator=o;var n=r(57691);const s="numeric";function o(e,t){let r=e;null==r&&(r=""),this.allowEmpty&&""===r?t(!0):t(""!==r&&(0,n.isNumeric)(e))}t.VALIDATOR_TYPE=s,o.VALIDATOR_TYPE=s},59340:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getValidator=function(e){if("function"==typeof e)return e;if(!a(e))throw Error(`No registered validator found under "${e}" name`);return i(e)},t.registerValidator=function(e,t){"string"!=typeof e&&(e=(t=e).VALIDATOR_TYPE);o(e,t)},r(60740);var s=n(r(31056));const{register:o,getItem:i,hasItem:a,getNames:l,getValues:u}=(0,s.default)("validators");t.getRegisteredValidators=u,t.getRegisteredValidatorNames=l,t.hasValidator=a},85137:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(65033);t.VALIDATOR_TYPE=n.VALIDATOR_TYPE,t.timeValidator=n.timeValidator},65033:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.timeValidator=a;var s=n(r(22418));const o=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],i="time";function a(e,t){const r=this.timeFormat||"h:mm:ss a";let n=!0,i=e;null===i&&(i=""),i=/^\d{3,}$/.test(i)?parseInt(i,10):i;const a=/^\d{1,2}$/.test(i);a&&(i+=":00");const l=(0,s.default)(i,o,!0).isValid()?(0,s.default)(i):(0,s.default)(i,r);let u=l.isValid(),h=(0,s.default)(i,r,!0).isValid()&&!a;if(this.allowEmpty&&""===i&&(u=!0,h=!0),u||(n=!1),!u&&h&&(n=!0),u&&!h)if(!0===this.correctFormat){const e=l.format(r),t=this.instance.toVisualRow(this.row),s=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(t,s,e,"timeValidator"),n=!0}else n=!1;t(n)}t.VALIDATOR_TYPE=i,a.VALIDATOR_TYPE=i},8524:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Alternation:()=>Oe,CstParser:()=>kr,EMPTY_ALT:()=>Pr,EOF:()=>fe,EarlyExitException:()=>Qt,EmbeddedActionsParser:()=>Hr,Flat:()=>Ce,GAstVisitor:()=>xe,Lexer:()=>J,LexerDefinitionErrorType:()=>q,MismatchedTokenException:()=>Kt,NoViableAltException:()=>Xt,NonTerminal:()=>ye,NotAllInputParsedException:()=>qt,Option:()=>ve,Parser:()=>Dr,ParserDefinitionErrorType:()=>Ir,Repetition:()=>Te,RepetitionMandatory:()=>Re,RepetitionMandatoryWithSeparator:()=>Se,RepetitionWithSeparator:()=>Ne,Rule:()=>we,Terminal:()=>Me,VERSION:()=>n,assignOccurrenceIndices:()=>Bt,clearCache:()=>Xr,createSyntaxDiagramsCode:()=>Fr,createToken:()=>de,createTokenInstance:()=>pe,defaultGrammarResolverErrorProvider:()=>Dt,defaultGrammarValidatorErrorProvider:()=>kt,defaultLexerErrorProvider:()=>Q,defaultParserErrorProvider:()=>Pt,generateParserFactory:()=>$r,generateParserModule:()=>Kr,isRecognitionException:()=>$t,resolveGrammar:()=>Ut,serializeGrammar:()=>_e,serializeProduction:()=>Ae,tokenLabel:()=>ee,tokenMatcher:()=>ge,tokenName:()=>te,validateGrammar:()=>Vt});var n="6.5.0",s=r(46248),o=r(32380),i={},a=new o.RegExpParser;function l(e){var t=e.toString();if(i.hasOwnProperty(t))return i[t];var r=a.pattern(t);return i[t]=r,r}var u,h=(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])},u(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="Complement Sets are not supported for first char optimization",d='Unable to use "first char" lexer optimizations:\n';function f(e,t){void 0===t&&(t=!1);try{var r=l(e);return p(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===c)t&&(0,s.rr)(d+"\tUnable to optimize: < "+e.toString()+" >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");else{var n="";t&&(n="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),(0,s.WB)(d+"\n\tFailed parsing: < "+e.toString()+" >\n\tUsing the regexp-to-ast library version: "+o.VERSION+"\n\tPlease open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}function p(e,t,r){switch(e.type){case"Disjunction":for(var n=0;n<e.value.length;n++)p(e.value[n],t,r);break;case"Alternative":var o=e.value;for(n=0;n<o.length;n++){var i=o[n];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var a=i;switch(a.type){case"Character":g(a.value,t,r);break;case"Set":if(!0===a.complement)throw Error(c);(0,s.Ed)(a.value,(function(e){if("number"==typeof e)g(e,t,r);else{var n=e;if(!0===r)for(var s=n.from;s<=n.to;s++)g(s,t,r);else{for(s=n.from;s<=n.to&&s<F;s++)g(s,t,r);if(n.to>=F)for(var o=n.from>=F?n.from:F,i=n.to,a=U(o),l=U(i),u=a;u<=l;u++)t[u]=u}}}));break;case"Group":p(a.value,t,r);break;default:throw Error("Non Exhaustive Match")}var l=void 0!==a.quantifier&&0===a.quantifier.atLeast;if("Group"===a.type&&!1===E(a)||"Group"!==a.type&&!1===l)break}break;default:throw Error("non exhaustive match!")}return(0,s.VO)(t)}function g(e,t,r){var n=U(e);t[n]=n,!0===r&&function(e,t){var r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){t[s=U(n.charCodeAt(0))]=s}else{var s,o=r.toLowerCase();if(o!==r)t[s=U(o.charCodeAt(0))]=s}}(e,t)}function m(e,t){return(0,s.sE)(e.value,(function(e){if("number"==typeof e)return(0,s.r3)(t,e);var r=e;return void 0!==(0,s.sE)(t,(function(e){return r.from<=e&&e<=r.to}))}))}function E(e){return!(!e.quantifier||0!==e.quantifier.atLeast)||!!e.value&&((0,s.kJ)(e.value)?(0,s.yW)(e.value,E):E(e.value))}var y=function(e){function t(t){var r=e.call(this)||this;return r.targetCharCodes=t,r.found=!1,r}return h(t,e),t.prototype.visitChildren=function(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}e.prototype.visitChildren.call(this,t)}},t.prototype.visitCharacter=function(e){(0,s.r3)(this.targetCharCodes,e.value)&&(this.found=!0)},t.prototype.visitSet=function(e){e.complement?void 0===m(e,this.targetCharCodes)&&(this.found=!0):void 0!==m(e,this.targetCharCodes)&&(this.found=!0)},t}(o.BaseRegExpVisitor);function w(e,t){if(t instanceof RegExp){var r=l(t),n=new y(e);return n.visit(r),n.found}return void 0!==(0,s.sE)(t,(function(t){return(0,s.r3)(e,t.charCodeAt(0))}))}var C=function(){var e=function(t,r){return e=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,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),v="PATTERN",R="defaultMode",S="modes",T="boolean"==typeof new RegExp("(?:)").sticky;function N(e,t){var r,n=(t=(0,s.ce)(t,{useSticky:T,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(e,t){return t()}})).tracer;n("initCharCodeToOptimizedIndexMap",(function(){!function(){if((0,s.xb)(V)){V=new Array(65536);for(var e=0;e<65536;e++)V[e]=e>255?255+~~(e/255):e}}()})),n("Reject Lexer.NA",(function(){r=(0,s.d1)(e,(function(e){return e[v]===J.NA}))}));var o,i,a,l,u,h,c,p,g,m,E,y=!1;n("Transform Patterns",(function(){y=!1,o=(0,s.UI)(r,(function(e){var r=e[v];if((0,s.Kj)(r)){var n=r.source;return 1===n.length&&"^"!==n&&"$"!==n&&"."!==n?n:2!==n.length||"\\"!==n[0]||(0,s.r3)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],n[1])?t.useSticky?b(r):A(r):n[1]}if((0,s.mf)(r))return y=!0,{exec:r};if((0,s.e$)(r,"exec"))return y=!0,r;if("string"==typeof r){if(1===r.length)return r;var o=r.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),i=new RegExp(o);return t.useSticky?b(i):A(i)}throw Error("non exhaustive match")}))})),n("misc mapping",(function(){i=(0,s.UI)(r,(function(e){return e.tokenTypeIdx})),a=(0,s.UI)(r,(function(e){var t=e.GROUP;if(t!==J.SKIPPED){if((0,s.HD)(t))return t;if((0,s.o8)(t))return!1;throw Error("non exhaustive match")}})),l=(0,s.UI)(r,(function(e){var t=e.LONGER_ALT;if(t)return(0,s.cq)(r,t)})),u=(0,s.UI)(r,(function(e){return e.PUSH_MODE})),h=(0,s.UI)(r,(function(e){return(0,s.e$)(e,"POP_MODE")}))})),n("Line Terminator Handling",(function(){var e=k(t.lineTerminatorCharacters);c=(0,s.UI)(r,(function(e){return!1})),"onlyOffset"!==t.positionTracking&&(c=(0,s.UI)(r,(function(t){return(0,s.e$)(t,"LINE_BREAKS")?t.LINE_BREAKS:!1===D(t,e)?w(e,t.PATTERN):void 0})))})),n("Misc Mapping #2",(function(){p=(0,s.UI)(r,x),g=(0,s.UI)(o,L),m=(0,s.u4)(r,(function(e,t){var r=t.GROUP;return(0,s.HD)(r)&&r!==J.SKIPPED&&(e[r]=[]),e}),{}),E=(0,s.UI)(o,(function(e,t){return{pattern:o[t],longerAlt:l[t],canLineTerminator:c[t],isCustom:p[t],short:g[t],group:a[t],push:u[t],pop:h[t],tokenTypeIdx:i[t],tokenType:r[t]}}))}));var C=!0,R=[];return t.safeMode||n("First Char Optimization",(function(){R=(0,s.u4)(r,(function(e,r,n){if("string"==typeof r.PATTERN){var o=U(r.PATTERN.charCodeAt(0));H(e,o,E[n])}else if((0,s.kJ)(r.START_CHARS_HINT)){var i;(0,s.Ed)(r.START_CHARS_HINT,(function(t){var r=U("string"==typeof t?t.charCodeAt(0):t);i!==r&&(i=r,H(e,r,E[n]))}))}else if((0,s.Kj)(r.PATTERN))if(r.PATTERN.unicode)C=!1,t.ensureOptimizations&&(0,s.WB)(d+"\tUnable to analyze < "+r.PATTERN.toString()+" > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var a=f(r.PATTERN,t.ensureOptimizations);(0,s.xb)(a)&&(C=!1),(0,s.Ed)(a,(function(t){H(e,t,E[n])}))}else t.ensureOptimizations&&(0,s.WB)(d+"\tTokenType: <"+r.name+"> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),C=!1;return e}),[])})),n("ArrayPacking",(function(){R=(0,s.X0)(R)})),{emptyGroups:m,patternIdxToConfig:E,charCodeToPatternIdxToConfig:R,hasCustom:y,canBeOptimized:C}}function O(e,t){var r=[],n=function(e){var t=(0,s.hX)(e,(function(e){return!(0,s.e$)(e,v)})),r=(0,s.UI)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:q.MISSING_PATTERN,tokenTypes:[e]}})),n=(0,s.e5)(e,t);return{errors:r,valid:n}}(e);r=r.concat(n.errors);var i=function(e){var t=(0,s.hX)(e,(function(e){var t=e[v];return!((0,s.Kj)(t)||(0,s.mf)(t)||(0,s.e$)(t,"exec")||(0,s.HD)(t))})),r=(0,s.UI)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:q.INVALID_PATTERN,tokenTypes:[e]}})),n=(0,s.e5)(e,t);return{errors:r,valid:n}}(n.valid),a=i.valid;return r=(r=r.concat(i.errors)).concat(function(e){var t=[],r=(0,s.hX)(e,(function(e){return(0,s.Kj)(e[v])}));return t=t.concat(function(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return C(t,e),t.prototype.visitEndAnchor=function(e){this.found=!0},t}(o.BaseRegExpVisitor),r=(0,s.hX)(e,(function(e){var r=e[v];try{var n=l(r),s=new t;return s.visit(n),s.found}catch(e){return M.test(r.source)}})),n=(0,s.UI)(r,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:q.EOI_ANCHOR_FOUND,tokenTypes:[e]}}));return n}(r)),t=t.concat(function(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return C(t,e),t.prototype.visitStartAnchor=function(e){this.found=!0},t}(o.BaseRegExpVisitor),r=(0,s.hX)(e,(function(e){var r=e[v];try{var n=l(r),s=new t;return s.visit(n),s.found}catch(e){return _.test(r.source)}})),n=(0,s.UI)(r,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:q.SOI_ANCHOR_FOUND,tokenTypes:[e]}}));return n}(r)),t=t.concat(function(e){var t=(0,s.hX)(e,(function(e){var t=e[v];return t instanceof RegExp&&(t.multiline||t.global)})),r=(0,s.UI)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:q.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}}));return r}(r)),t=t.concat(function(e){var t=[],r=(0,s.UI)(e,(function(r){return(0,s.u4)(e,(function(e,n){return r.PATTERN.source!==n.PATTERN.source||(0,s.r3)(t,n)||n.PATTERN===J.NA||(t.push(n),e.push(n)),e}),[])}));r=(0,s.oA)(r);var n=(0,s.hX)(r,(function(e){return e.length>1})),o=(0,s.UI)(n,(function(e){var t=(0,s.UI)(e,(function(e){return e.name}));return{message:"The same RegExp pattern ->"+(0,s.Ps)(e).PATTERN+"<-has been used in all of the following Token Types: "+t.join(", ")+" <-",type:q.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}));return o}(r)),t=t.concat(function(e){var t=(0,s.hX)(e,(function(e){return e[v].test("")})),r=(0,s.UI)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:q.EMPTY_MATCH_PATTERN,tokenTypes:[e]}}));return r}(r)),t}(a)),r=r.concat(function(e){var t=(0,s.hX)(e,(function(e){if(!(0,s.e$)(e,"GROUP"))return!1;var t=e.GROUP;return t!==J.SKIPPED&&t!==J.NA&&!(0,s.HD)(t)})),r=(0,s.UI)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:q.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}}));return r}(a)),r=r.concat(function(e,t){var r=(0,s.hX)(e,(function(e){return void 0!==e.PUSH_MODE&&!(0,s.r3)(t,e.PUSH_MODE)})),n=(0,s.UI)(r,(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:q.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}}));return n}(a,t)),r=r.concat(function(e){var t=[],r=(0,s.u4)(e,(function(e,t,r){var n,o,i=t.PATTERN;return i===J.NA||((0,s.HD)(i)?e.push({str:i,idx:r,tokenType:t}):(0,s.Kj)(i)&&(n=i,o=[".","\\","[","]","|","^","$","(",")","?","*","+","{"],void 0===(0,s.sE)(o,(function(e){return-1!==n.source.indexOf(e)})))&&e.push({str:i.source,idx:r,tokenType:t})),e}),[]);return(0,s.Ed)(e,(function(e,n){(0,s.Ed)(r,(function(r){var o=r.str,i=r.idx,a=r.tokenType;if(n<i&&function(e,t){if((0,s.Kj)(t)){var r=t.exec(e);return null!==r&&0===r.index}if((0,s.mf)(t))return t(e,0,[],{});if((0,s.e$)(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}(o,e.PATTERN)){var l="Token: ->"+a.name+"<- can never be matched.\nBecause it appears AFTER the Token Type ->"+e.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";t.push({message:l,type:q.UNREACHABLE_PATTERN,tokenTypes:[e,a]})}}))})),t}(a)),r}var M=/[^\\][\$]/;var _=/[^\\[][\^]|^\^/;function A(e){var t=e.ignoreCase?"i":"";return new RegExp("^(?:"+e.source+")",t)}function b(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function I(e,t,r){var n=[],o=!1,i=(0,s.oA)((0,s.xH)((0,s.Q8)(e.modes,(function(e){return e})))),a=(0,s.d1)(i,(function(e){return e[v]===J.NA})),l=k(r);return t&&(0,s.Ed)(a,(function(e){var t=D(e,l);if(!1!==t){var r=function(e,t){if(t.issue===q.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"+e.name+"> Token Type\n\t Root cause: "+t.errMsg+".\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(t.issue===q.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <"+e.name+"> Token Type\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}(e,t),i={message:r,type:t.issue,tokenType:e};n.push(i)}else(0,s.e$)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(o=!0):w(l,e.PATTERN)&&(o=!0)})),t&&!o&&n.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:q.NO_LINE_BREAKS_FLAGS}),n}function x(e){var t=e.PATTERN;if((0,s.Kj)(t))return!1;if((0,s.mf)(t))return!0;if((0,s.e$)(t,"exec"))return!0;if((0,s.HD)(t))return!1;throw Error("non exhaustive match")}function L(e){return!(!(0,s.HD)(e)||1!==e.length)&&e.charCodeAt(0)}var P={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 D(e,t){if((0,s.e$)(e,"LINE_BREAKS"))return!1;if((0,s.Kj)(e.PATTERN)){try{w(t,e.PATTERN)}catch(e){return{issue:q.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if((0,s.HD)(e.PATTERN))return!1;if(x(e))return{issue:q.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function k(e){return(0,s.UI)(e,(function(e){return(0,s.HD)(e)&&e.length>0?e.charCodeAt(0):e}))}function H(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}var F=256;function U(e){return e<F?e:V[e]}var V=[];function B(e,t){var r=e.tokenTypeIdx;return r===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[r]}function W(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var Y=1,G={};function j(e){var t=function(e){var t=(0,s.Qw)(e),r=e,n=!0;for(;n;){r=(0,s.oA)((0,s.xH)((0,s.UI)(r,(function(e){return e.CATEGORIES}))));var o=(0,s.e5)(r,t);t=t.concat(o),(0,s.xb)(o)?n=!1:r=o}return t}(e);!function(e){(0,s.Ed)(e,(function(e){var t;$(e)||(G[Y]=e,e.tokenTypeIdx=Y++),K(e)&&!(0,s.kJ)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),K(e)||(e.CATEGORIES=[]),t=e,(0,s.e$)(t,"categoryMatches")||(e.categoryMatches=[]),function(e){return(0,s.e$)(e,"categoryMatchesMap")}(e)||(e.categoryMatchesMap={})}))}(t),function(e){(0,s.Ed)(e,(function(e){z([],e)}))}(t),function(e){(0,s.Ed)(e,(function(e){e.categoryMatches=[],(0,s.Ed)(e.categoryMatchesMap,(function(t,r){e.categoryMatches.push(G[r].tokenTypeIdx)}))}))}(t),(0,s.Ed)(t,(function(e){e.isParent=e.categoryMatches.length>0}))}function z(e,t){(0,s.Ed)(e,(function(e){t.categoryMatchesMap[e.tokenTypeIdx]=!0})),(0,s.Ed)(t.CATEGORIES,(function(r){var n=e.concat(t);(0,s.r3)(n,r)||z(n,r)}))}function $(e){return(0,s.e$)(e,"tokenTypeIdx")}function K(e){return(0,s.e$)(e,"CATEGORIES")}function X(e){return(0,s.e$)(e,"tokenTypeIdx")}var q,Q={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,s){return"unexpected character: ->"+e.charAt(t)+"<- at offset: "+t+", skipped "+r+" characters."}};!function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"}(q||(q={}));var Z={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Q,traceInitPerf:!1,skipValidations:!1};Object.freeze(Z);var J=function(){function e(e,t){var r=this;if(void 0===t&&(t=Z),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,s.TS)(Z,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===Z.lineTerminatorsPattern)r.config.lineTerminatorsPattern=P;else if(r.config.lineTerminatorCharacters===Z.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');r.trackStartLines=/full|onlyStart/i.test(r.config.positionTracking),r.trackEndLines=/full/i.test(r.config.positionTracking),(0,s.kJ)(e)?((n={modes:{}}).modes[R]=(0,s.Qw)(e),n[R]=R):(o=!1,n=(0,s.Cl)(e))})),!1===r.config.skipValidations&&(r.TRACE_INIT("performRuntimeChecks",(function(){r.lexerDefinitionErrors=r.lexerDefinitionErrors.concat(function(e,t,r){var n=[];return(0,s.e$)(e,R)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+R+"> property in its definition\n",type:q.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,s.e$)(e,S)||n.push({message:"A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",type:q.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,s.e$)(e,S)&&(0,s.e$)(e,R)&&!(0,s.e$)(e.modes,e.defaultMode)&&n.push({message:"A MultiMode Lexer cannot be initialized with a "+R+": <"+e.defaultMode+">which does not exist\n",type:q.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,s.e$)(e,S)&&(0,s.Ed)(e.modes,(function(e,t){(0,s.Ed)(e,(function(e,r){(0,s.o8)(e)&&n.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+t+"> at index: <"+r+">\n",type:q.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),n}(n,r.trackStartLines,r.config.lineTerminatorCharacters))})),r.TRACE_INIT("performWarningRuntimeChecks",(function(){r.lexerDefinitionWarning=r.lexerDefinitionWarning.concat(I(n,r.trackStartLines,r.config.lineTerminatorCharacters))}))),n.modes=n.modes?n.modes:{},(0,s.Ed)(n.modes,(function(e,t){n.modes[t]=(0,s.d1)(e,(function(e){return(0,s.o8)(e)}))}));var a=(0,s.XP)(n.modes);if((0,s.Ed)(n.modes,(function(e,n){r.TRACE_INIT("Mode: <"+n+"> processing",(function(){var o;(r.modes.push(n),!1===r.config.skipValidations&&r.TRACE_INIT("validatePatterns",(function(){r.lexerDefinitionErrors=r.lexerDefinitionErrors.concat(O(e,a))})),(0,s.xb)(r.lexerDefinitionErrors))&&(j(e),r.TRACE_INIT("analyzeTokenTypes",(function(){o=N(e,{lineTerminatorCharacters:r.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:r.TRACE_INIT.bind(r)})})),r.patternIdxToConfig[n]=o.patternIdxToConfig,r.charCodeToPatternIdxToConfig[n]=o.charCodeToPatternIdxToConfig,r.emptyGroups=(0,s.TS)(r.emptyGroups,o.emptyGroups),r.hasCustom=o.hasCustom||r.hasCustom,r.canModeBeOptimized[n]=o.canBeOptimized)}))})),r.defaultMode=n.defaultMode,!(0,s.xb)(r.lexerDefinitionErrors)&&!r.config.deferDefinitionErrorsHandling){var l=(0,s.UI)(r.lexerDefinitionErrors,(function(e){return e.message})).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+l)}(0,s.Ed)(r.lexerDefinitionWarning,(function(e){(0,s.rr)(e.message)})),r.TRACE_INIT("Choosing sub-methods implementations",(function(){if(T?(r.chopInput=s.Wd,r.match=r.matchWithTest):(r.updateLastIndex=s.dG,r.match=r.matchWithExec),o&&(r.handleModes=s.dG),!1===r.trackStartLines&&(r.computeNewColumn=s.Wd),!1===r.trackEndLines&&(r.updateTokenEndLineColumnLocation=s.dG),/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))throw Error('Invalid <positionTracking> config option: "'+r.config.positionTracking+'"');r.createTokenInstance=r.createOffsetOnlyToken}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,s.u4)(r.canModeBeOptimized,(function(e,t,r){return!1===t&&e.push(r),e}),[]);if(t.ensureOptimizations&&!(0,s.xb)(e))throw Error("Lexer Modes: < "+e.join(", ")+' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.')})),r.TRACE_INIT("clearRegExpParserCache",(function(){i={}})),r.TRACE_INIT("toFastProperties",(function(){(0,s.SV)(r)}))}))}return e.prototype.tokenize=function(e,t){if(void 0===t&&(t=this.defaultMode),!(0,s.xb)(this.lexerDefinitionErrors)){var r=(0,s.UI)(this.lexerDefinitionErrors,(function(e){return e.message})).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+r)}return this.tokenizeInternal(e,t)},e.prototype.tokenizeInternal=function(e,t){var r,n,o,i,a,l,u,h,c,d,f,p,g,m,E,y,w,C=this,v=e,R=v.length,S=0,T=0,N=this.hasCustom?0:Math.floor(e.length/10),O=new Array(N),M=[],_=this.trackStartLines?1:void 0,A=this.trackStartLines?1:void 0,b=(E=this.emptyGroups,y={},w=(0,s.XP)(E),(0,s.Ed)(w,(function(e){var t=E[e];if(!(0,s.kJ)(t))throw Error("non exhaustive match");y[e]=[]})),y),I=this.trackStartLines,x=this.config.lineTerminatorsPattern,L=0,P=[],D=[],k=[],H=[];Object.freeze(H);var F=void 0;function V(){return P}function B(e){var t=U(e),r=D[t];return void 0===r?H:r}var W,Y=function(e){if(1===k.length&&void 0===e.tokenType.PUSH_MODE){var t=C.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{k.pop();var r=(0,s.Z$)(k);P=C.patternIdxToConfig[r],D=C.charCodeToPatternIdxToConfig[r],L=P.length;var n=C.canModeBeOptimized[r]&&!1===C.config.safeMode;F=D&&n?B:V}};function G(e){k.push(e),D=this.charCodeToPatternIdxToConfig[e],P=this.patternIdxToConfig[e],L=P.length,L=P.length;var t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;F=D&&t?B:V}for(G.call(this,t);S<R;){a=null;var j=v.charCodeAt(S),z=F(j),$=z.length;for(r=0;r<$;r++){var K=(W=z[r]).pattern;if(l=null,!1!==(se=W.short)?j===se&&(a=K):!0===W.isCustom?null!==(m=K.exec(v,S,O,b))?(a=m[0],void 0!==m.payload&&(l=m.payload)):a=null:(this.updateLastIndex(K,S),a=this.match(K,e,S)),null!==a){if(void 0!==(i=W.longerAlt)){var X=P[i],q=X.pattern;u=null,!0===X.isCustom?null!==(m=q.exec(v,S,O,b))?(o=m[0],void 0!==m.payload&&(u=m.payload)):o=null:(this.updateLastIndex(q,S),o=this.match(q,e,S)),o&&o.length>a.length&&(a=o,l=u,W=X)}break}}if(null!==a){if(h=a.length,void 0!==(c=W.group)&&(d=W.tokenTypeIdx,f=this.createTokenInstance(a,S,d,W.tokenType,_,A,h),this.handlePayload(f,l),!1===c?T=this.addToken(O,T,f):b[c].push(f)),e=this.chopInput(e,h),S+=h,A=this.computeNewColumn(A,h),!0===I&&!0===W.canLineTerminator){var Q=0,Z=void 0,J=void 0;x.lastIndex=0;do{!0===(Z=x.test(a))&&(J=x.lastIndex-1,Q++)}while(!0===Z);0!==Q&&(_+=Q,A=h-J,this.updateTokenEndLineColumnLocation(f,c,J,Q,_,A,h))}this.handleModes(W,Y,G,f)}else{for(var ee=S,te=_,re=A,ne=!1;!ne&&S<R;)for(v.charCodeAt(S),e=this.chopInput(e,1),S++,n=0;n<L;n++){var se,oe=P[n];K=oe.pattern;if(!1!==(se=oe.short)?v.charCodeAt(S)===se&&(ne=!0):!0===oe.isCustom?ne=null!==K.exec(v,S,O,b):(this.updateLastIndex(K,S),ne=null!==K.exec(e)),!0===ne)break}p=S-ee,g=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(v,ee,p,te,re),M.push({offset:ee,line:te,column:re,length:p,message:g})}}return this.hasCustom||(O.length=T),{tokens:O,groups:b,errors:M}},e.prototype.handleModes=function(e,t,r,n){if(!0===e.pop){var s=e.push;t(n),void 0!==s&&r.call(this,s)}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,s,o,i){var a,l;void 0!==t&&(l=(a=r===i-1)?-1:0,1===n&&!0===a||(e.endLine=s+l,e.endColumn=o-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,s,o){return{image:e,startOffset:t,startLine:s,startColumn:o,tokenTypeIdx:r,tokenType:n}},e.prototype.createFullToken=function(e,t,r,n,s,o,i){return{image:e,startOffset:t,endOffset:t+i-1,startLine:s,endLine:s,startColumn:o,endColumn:o+i-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){this.traceInitIndent++;var r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+"--\x3e <"+e+">");var n=(0,s.HT)(t),o=n.time,i=n.value,a=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(r+"<-- <"+e+"> time: "+o+"ms"),this.traceInitIndent--,i}return t()},e.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",e.NA=/NOT_APPLICABLE/,e}();function ee(e){return re(e)?e.LABEL:e.name}function te(e){return e.name}function re(e){return(0,s.HD)(e.LABEL)&&""!==e.LABEL}var ne="parent",se="categories",oe="label",ie="group",ae="push_mode",le="pop_mode",ue="longer_alt",he="line_breaks",ce="start_chars_hint";function de(e){return function(e){var t=e.pattern,r={};r.name=e.name,(0,s.o8)(t)||(r.PATTERN=t);if((0,s.e$)(e,ne))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";(0,s.e$)(e,se)&&(r.CATEGORIES=e[se]);j([r]),(0,s.e$)(e,oe)&&(r.LABEL=e[oe]);(0,s.e$)(e,ie)&&(r.GROUP=e[ie]);(0,s.e$)(e,le)&&(r.POP_MODE=e[le]);(0,s.e$)(e,ae)&&(r.PUSH_MODE=e[ae]);(0,s.e$)(e,ue)&&(r.LONGER_ALT=e[ue]);(0,s.e$)(e,he)&&(r.LINE_BREAKS=e[he]);(0,s.e$)(e,ce)&&(r.START_CHARS_HINT=e[ce]);return r}(e)}var fe=de({name:"EOF",pattern:J.NA});function pe(e,t,r,n,s,o,i,a){return{image:t,startOffset:r,endOffset:n,startLine:s,endLine:o,startColumn:i,endColumn:a,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function ge(e,t){return B(e,t)}j([fe]);var me=function(){var e=function(t,r){return e=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,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ee=function(){function e(e){this.definition=e}return e.prototype.accept=function(e){e.visit(this),(0,s.Ed)(this.definition,(function(t){t.accept(e)}))},e}(),ye=function(e){function t(t){var r=e.call(this,[])||this;return r.idx=1,(0,s.f0)(r,(0,s.ei)(t,(function(e){return void 0!==e}))),r}return me(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}(Ee),we=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.orgText="",(0,s.f0)(r,(0,s.ei)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(Ee),Ce=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.ignoreAmbiguities=!1,(0,s.f0)(r,(0,s.ei)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(Ee),ve=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.f0)(r,(0,s.ei)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(Ee),Re=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.f0)(r,(0,s.ei)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(Ee),Se=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.f0)(r,(0,s.ei)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(Ee),Te=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.f0)(r,(0,s.ei)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(Ee),Ne=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.f0)(r,(0,s.ei)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(Ee),Oe=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,r.ignoreAmbiguities=!1,r.hasPredicates=!1,(0,s.f0)(r,(0,s.ei)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(Ee),Me=function(){function e(e){this.idx=1,(0,s.f0)(this,(0,s.ei)(e,(function(e){return void 0!==e})))}return e.prototype.accept=function(e){e.visit(this)},e}();function _e(e){return(0,s.UI)(e,Ae)}function Ae(e){function t(e){return(0,s.UI)(e,Ae)}if(e instanceof ye)return{type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(e instanceof Ce)return{type:"Flat",definition:t(e.definition)};if(e instanceof ve)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Re)return{type:"RepetitionMandatory",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof Se)return{type:"RepetitionMandatoryWithSeparator",name:e.name,idx:e.idx,separator:Ae(new Me({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Ne)return{type:"RepetitionWithSeparator",name:e.name,idx:e.idx,separator:Ae(new Me({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Te)return{type:"Repetition",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof Oe)return{type:"Alternation",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof Me){var r={type:"Terminal",name:e.terminalType.name,label:ee(e.terminalType),idx:e.idx},n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=(0,s.Kj)(n)?n.source:n),r}if(e instanceof we)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}var be=function(){function e(){}return e.prototype.walk=function(e,t){var r=this;void 0===t&&(t=[]),(0,s.Ed)(e.definition,(function(n,o){var i=(0,s.Cw)(e.definition,o+1);if(n instanceof ye)r.walkProdRef(n,i,t);else if(n instanceof Me)r.walkTerminal(n,i,t);else if(n instanceof Ce)r.walkFlat(n,i,t);else if(n instanceof ve)r.walkOption(n,i,t);else if(n instanceof Re)r.walkAtLeastOne(n,i,t);else if(n instanceof Se)r.walkAtLeastOneSep(n,i,t);else if(n instanceof Ne)r.walkManySep(n,i,t);else if(n instanceof Te)r.walkMany(n,i,t);else{if(!(n instanceof Oe))throw Error("non exhaustive match");r.walkOr(n,i,t)}}))},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 ve({definition:e.definition})].concat(t,r);this.walk(e,n)},e.prototype.walkAtLeastOneSep=function(e,t,r){var n=Ie(e,t,r);this.walk(e,n)},e.prototype.walkMany=function(e,t,r){var n=[new ve({definition:e.definition})].concat(t,r);this.walk(e,n)},e.prototype.walkManySep=function(e,t,r){var n=Ie(e,t,r);this.walk(e,n)},e.prototype.walkOr=function(e,t,r){var n=this,o=t.concat(r);(0,s.Ed)(e.definition,(function(e){var t=new Ce({definition:[e]});n.walk(t,o)}))},e}();function Ie(e,t,r){return[new ve({definition:[new Me({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var xe=function(){function e(){}return e.prototype.visit=function(e){var t=e;switch(t.constructor){case ye:return this.visitNonTerminal(t);case Ce:return this.visitFlat(t);case ve:return this.visitOption(t);case Re:return this.visitRepetitionMandatory(t);case Se:return this.visitRepetitionMandatoryWithSeparator(t);case Ne:return this.visitRepetitionWithSeparator(t);case Te:return this.visitRepetition(t);case Oe:return this.visitAlternation(t);case Me:return this.visitTerminal(t);case we:return this.visitRule(t);default:throw Error("non exhaustive match")}},e.prototype.visitNonTerminal=function(e){},e.prototype.visitFlat=function(e){},e.prototype.visitOption=function(e){},e.prototype.visitRepetition=function(e){},e.prototype.visitRepetitionMandatory=function(e){},e.prototype.visitRepetitionMandatoryWithSeparator=function(e){},e.prototype.visitRepetitionWithSeparator=function(e){},e.prototype.visitAlternation=function(e){},e.prototype.visitTerminal=function(e){},e.prototype.visitRule=function(e){},e}(),Le=function(){var e=function(t,r){return e=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,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Pe(e,t){return void 0===t&&(t=[]),!!(e instanceof ve||e instanceof Te||e instanceof Ne)||(e instanceof Oe?(0,s.G)(e.definition,(function(e){return Pe(e,t)})):!(e instanceof ye&&(0,s.r3)(t,e))&&(e instanceof Ee&&(e instanceof ye&&t.push(e),(0,s.yW)(e.definition,(function(e){return Pe(e,t)})))))}function De(e){if(e instanceof ye)return"SUBRULE";if(e instanceof ve)return"OPTION";if(e instanceof Oe)return"OR";if(e instanceof Re)return"AT_LEAST_ONE";if(e instanceof Se)return"AT_LEAST_ONE_SEP";if(e instanceof Ne)return"MANY_SEP";if(e instanceof Te)return"MANY";if(e instanceof Me)return"CONSUME";throw Error("non exhaustive match")}var ke=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 Le(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,s.e$)(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitNonTerminal=function(e){var t=e.nonTerminalName+this.separator+"Terminal";(0,s.e$)(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}(xe),He=new ke;function Fe(e){if(e instanceof ye)return Fe(e.referencedRule);if(e instanceof Me)return[e.terminalType];if(function(e){return e instanceof Ce||e instanceof ve||e instanceof Te||e instanceof Re||e instanceof Se||e instanceof Ne||e instanceof Me||e instanceof we}(e))return function(e){var t,r=[],n=e.definition,o=0,i=n.length>o,a=!0;for(;i&&a;)a=Pe(t=n[o]),r=r.concat(Fe(t)),o+=1,i=n.length>o;return(0,s.jj)(r)}(e);if(function(e){return e instanceof Oe}(e))return function(e){var t=(0,s.UI)(e.definition,(function(e){return Fe(e)}));return(0,s.jj)((0,s.xH)(t))}(e);throw Error("non exhaustive match")}var Ue="_~IN~_",Ve=function(){var e=function(t,r){return e=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,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Be=function(e){function t(t){var r=e.call(this)||this;return r.topProd=t,r.follows={},r}return Ve(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,s,o=(n=e.referencedRule,s=e.idx,n.name+s+Ue+this.topProd.name),i=t.concat(r),a=Fe(new Ce({definition:i}));this.follows[o]=a},t}(be);var We=256,Ye=512,Ge=768,je=1024,ze=1280,$e=1536;function Ke(e,t,r){return r|t|e}function Xe(e,t,r,n){var s=n+1<<24;return Ke(e,t,r)|s}var qe=function(){var e=function(t,r){return e=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,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Qe(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset)}function Ze(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 Je(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}var et=function(e){function t(t){var r=e.call(this)||this;return r.result=[],r.ruleIdx=t,r}return qe(t,e),t.prototype.collectNamedDSLMethod=function(e,t,r){if(!(0,s.o8)(e.name)){var n=void 0;if(e instanceof ve||e instanceof Te||e instanceof Re||e instanceof Oe)n=new t({definition:e.definition,idx:e.idx});else{if(!(e instanceof Se||e instanceof Ne))throw Error("non exhaustive match");n=new t({definition:e.definition,idx:e.idx,separator:e.separator})}var o=[n],i=Ke(this.ruleIdx,r,e.idx);this.result.push({def:o,key:i,name:e.name,orgProd:e})}},t.prototype.visitOption=function(e){this.collectNamedDSLMethod(e,ve,Ye)},t.prototype.visitRepetition=function(e){this.collectNamedDSLMethod(e,Te,Ge)},t.prototype.visitRepetitionMandatory=function(e){this.collectNamedDSLMethod(e,Re,je)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.collectNamedDSLMethod(e,Se,$e)},t.prototype.visitRepetitionWithSeparator=function(e){this.collectNamedDSLMethod(e,Ne,ze)},t.prototype.visitAlternation=function(e){var t=this;this.collectNamedDSLMethod(e,Oe,We);var r=e.definition.length>1;(0,s.Ed)(e.definition,(function(n,o){if(!(0,s.o8)(n.name)){var i=n.definition;i=r?[new ve({definition:n.definition})]:n.definition;var a=Xe(t.ruleIdx,We,e.idx,o);t.result.push({def:i,key:a,name:n.name,orgProd:n})}}))},t}(xe);var tt=function(){var e=function(t,r){return e=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,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rt=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 tt(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=t.concat(r),s=new Ce({definition:n});this.possibleTokTypes=Fe(s),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 tt(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,s.Qw)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,s.Qw)(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,s.xb)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},t}(be)),nt=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 tt(t,e),t.prototype.startWalking=function(){return this.walk(this.topRule),this.result},t}(be),st=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.walkMany=function(t,r,n){if(t.idx===this.occurrence){var o=(0,s.Ps)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof Me&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkMany.call(this,t,r,n)},t}(nt),ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.walkManySep=function(t,r,n){if(t.idx===this.occurrence){var o=(0,s.Ps)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof Me&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkManySep.call(this,t,r,n)},t}(nt),it=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.walkAtLeastOne=function(t,r,n){if(t.idx===this.occurrence){var o=(0,s.Ps)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof Me&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOne.call(this,t,r,n)},t}(nt),at=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.walkAtLeastOneSep=function(t,r,n){if(t.idx===this.occurrence){var o=(0,s.Ps)(r.concat(n));this.result.isEndOfRule=void 0===o,o instanceof Me&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,r,n)},t}(nt);function lt(e,t,r){void 0===r&&(r=[]),r=(0,s.Qw)(r);var n=[],o=0;function i(i){var a=lt(i.concat((0,s.Cw)(e,o+1)),t,r);return n.concat(a)}for(;r.length<t&&o<e.length;){var a=e[o];if(a instanceof Ce)return i(a.definition);if(a instanceof ye)return i(a.definition);if(a instanceof ve)n=i(a.definition);else{if(a instanceof Re)return i(l=a.definition.concat([new Te({definition:a.definition})]));if(a instanceof Se)return i(l=[new Ce({definition:a.definition}),new Te({definition:[new Me({terminalType:a.separator})].concat(a.definition)})]);if(a instanceof Ne){var l=a.definition.concat([new Te({definition:[new Me({terminalType:a.separator})].concat(a.definition)})]);n=i(l)}else if(a instanceof Te){l=a.definition.concat([new Te({definition:a.definition})]);n=i(l)}else{if(a instanceof Oe)return(0,s.Ed)(a.definition,(function(e){n=i(e.definition)})),n;if(!(a instanceof Me))throw Error("non exhaustive match");r.push(a.terminalType)}}o++}return n.push({partialPath:r,suffixDef:(0,s.Cw)(e,o)}),n}function ut(e,t,r,n){var o="EXIT_NONE_TERMINAL",i=[o],a="EXIT_ALTERNATIVE",l=!1,u=t.length,h=u-n-1,c=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,s.xb)(d);){var f=d.pop();if(f!==a){var p=f.def,g=f.idx,m=f.ruleStack,E=f.occurrenceStack;if(!(0,s.xb)(p)){var y=p[0];if(y===o){var w={idx:g,def:(0,s.Cw)(p),ruleStack:(0,s.j7)(m),occurrenceStack:(0,s.j7)(E)};d.push(w)}else if(y instanceof Me)if(g<u-1){var C=g+1;if(r(t[C],y.terminalType)){w={idx:C,def:(0,s.Cw)(p),ruleStack:m,occurrenceStack:E};d.push(w)}}else{if(g!==u-1)throw Error("non exhaustive match");c.push({nextTokenType:y.terminalType,nextTokenOccurrence:y.idx,ruleStack:m,occurrenceStack:E}),l=!0}else if(y instanceof ye){var v=(0,s.Qw)(m);v.push(y.nonTerminalName);var R=(0,s.Qw)(E);R.push(y.idx);w={idx:g,def:y.definition.concat(i,(0,s.Cw)(p)),ruleStack:v,occurrenceStack:R};d.push(w)}else if(y instanceof ve){var S={idx:g,def:(0,s.Cw)(p),ruleStack:m,occurrenceStack:E};d.push(S),d.push(a);var T={idx:g,def:y.definition.concat((0,s.Cw)(p)),ruleStack:m,occurrenceStack:E};d.push(T)}else if(y instanceof Re){var N=new Te({definition:y.definition,idx:y.idx});w={idx:g,def:y.definition.concat([N],(0,s.Cw)(p)),ruleStack:m,occurrenceStack:E};d.push(w)}else if(y instanceof Se){var O=new Me({terminalType:y.separator});N=new Te({definition:[O].concat(y.definition),idx:y.idx}),w={idx:g,def:y.definition.concat([N],(0,s.Cw)(p)),ruleStack:m,occurrenceStack:E};d.push(w)}else if(y instanceof Ne){S={idx:g,def:(0,s.Cw)(p),ruleStack:m,occurrenceStack:E};d.push(S),d.push(a);O=new Me({terminalType:y.separator});var M=new Te({definition:[O].concat(y.definition),idx:y.idx});T={idx:g,def:y.definition.concat([M],(0,s.Cw)(p)),ruleStack:m,occurrenceStack:E};d.push(T)}else if(y instanceof Te){S={idx:g,def:(0,s.Cw)(p),ruleStack:m,occurrenceStack:E};d.push(S),d.push(a);M=new Te({definition:y.definition,idx:y.idx}),T={idx:g,def:y.definition.concat([M],(0,s.Cw)(p)),ruleStack:m,occurrenceStack:E};d.push(T)}else if(y instanceof Oe)for(var _=y.definition.length-1;_>=0;_--){var A={idx:g,def:y.definition[_].definition.concat((0,s.Cw)(p)),ruleStack:m,occurrenceStack:E};d.push(A),d.push(a)}else if(y instanceof Ce)d.push({idx:g,def:y.definition.concat((0,s.Cw)(p)),ruleStack:m,occurrenceStack:E});else{if(!(y instanceof we))throw Error("non exhaustive match");d.push(ht(y,g,m,E))}}}else l&&(0,s.Z$)(d).idx<=h&&d.pop()}return c}function ht(e,t,r,n){var o=(0,s.Qw)(r);o.push(e.name);var i=(0,s.Qw)(n);return i.push(1),{idx:t,def:e.definition,ruleStack:o,occurrenceStack:i}}var ct,dt=function(){var e=function(t,r){return e=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,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"}(ct||(ct={}));var ft=function(e){function t(t,r,n){var s=e.call(this)||this;return s.topProd=t,s.targetOccurrence=r,s.targetProdType=n,s}return dt(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,ct.OPTION,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkAtLeastOne=function(t,r,n){this.checkIsTarget(t,ct.REPETITION_MANDATORY,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkAtLeastOneSep=function(t,r,n){this.checkIsTarget(t,ct.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkMany=function(t,r,n){this.checkIsTarget(t,ct.REPETITION,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkManySep=function(t,r,n){this.checkIsTarget(t,ct.REPETITION_WITH_SEPARATOR,r,n)||e.prototype.walkOption.call(this,t,r,n)},t}(be),pt=function(e){function t(t,r,n){var s=e.call(this)||this;return s.targetOccurrence=t,s.targetProdType=r,s.targetRef=n,s.result=[],s}return dt(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,ct.OPTION)},t.prototype.visitRepetition=function(e){this.checkIsTarget(e,ct.REPETITION)},t.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,ct.REPETITION_MANDATORY)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,ct.REPETITION_MANDATORY_WITH_SEPARATOR)},t.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,ct.REPETITION_WITH_SEPARATOR)},t.prototype.visitAlternation=function(e){this.checkIsTarget(e,ct.ALTERNATION)},t}(xe);function gt(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=[];return t}function mt(e){for(var t=[""],r=0;r<e.length;r++){for(var n=e[r],s=[],o=0;o<t.length;o++){var i=t[o];s.push(i+"_"+n.tokenTypeIdx);for(var a=0;a<n.categoryMatches.length;a++){var l="_"+n.categoryMatches[a];s.push(i+l)}}t=s}return t}function Et(e,t,r){for(var n=0;n<e.length;n++)if(n!==r)for(var s=e[n],o=0;o<t.length;o++){if(!0===s[t[o]])return!1}return!0}function yt(e,t){for(var r=(0,s.UI)(e,(function(e){return lt([e],1)})),n=gt(r.length),o=(0,s.UI)(r,(function(e){var t={};return(0,s.Ed)(e,(function(e){var r=mt(e.partialPath);(0,s.Ed)(r,(function(e){t[e]=!0}))})),t})),i=r,a=1;a<=t;a++){var l=i;i=gt(l.length);for(var u=function(e){for(var r=l[e],u=0;u<r.length;u++){var h=r[u].partialPath,c=r[u].suffixDef,d=mt(h);if(Et(o,d,e)||(0,s.xb)(c)||h.length===t){var f=n[e];if(!1===vt(f,h)){f.push(h);for(var p=0;p<d.length;p++){var g=d[p];o[e][g]=!0}}}else{var m=lt(c,a+1,h);i[e]=i[e].concat(m),(0,s.Ed)(m,(function(t){var r=mt(t.partialPath);(0,s.Ed)(r,(function(t){o[e][t]=!0}))}))}}},h=0;h<l.length;h++)u(h)}return n}function wt(e,t,r,n){var s=new pt(e,ct.ALTERNATION,n);return t.accept(s),yt(s.result,r)}function Ct(e,t,r,n){var s=new pt(e,r);t.accept(s);var o=s.result,i=new ft(t,e,r).startWalking();return yt([new Ce({definition:o}),new Ce({definition:i})],n)}function vt(e,t){e:for(var r=0;r<e.length;r++){var n=e[r];if(n.length===t.length){for(var s=0;s<n.length;s++){var o=t[s],i=n[s];if(!1===(o===i||void 0!==i.categoryMatchesMap[o.tokenTypeIdx]))continue e}return!0}}return!1}function Rt(e){return(0,s.yW)(e,(function(e){return(0,s.yW)(e,(function(e){return(0,s.yW)(e,(function(e){return(0,s.xb)(e.categoryMatches)}))}))}))}var St=function(){var e=function(t,r){return e=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,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Tt(e,t,r,n,o,i){var a=s.UI(e,(function(e){return function(e,t){var r=new Mt;e.accept(r);var n=r.allProductions,o=s.vM(n,Nt),i=s.ei(o,(function(e){return e.length>1})),a=s.UI(s.VO(i),(function(r){var n=s.Ps(r),o=t.buildDuplicateFoundError(e,r),i=De(n),a={message:o,type:Ir.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:i,occurrence:n.idx},l=Ot(n);return l&&(a.parameter=l),a}));return a}(e,o)})),l=s.UI(e,(function(e){return bt(e,e,o)})),u=[],h=[],c=[];(0,s.yW)(l,s.xb)&&(u=(0,s.UI)(e,(function(e){return function(e,t){var r=new xt;e.accept(r);var n=r.alternations,o=s.u4(n,(function(r,n){var o=s.j7(n.definition),i=s.UI(o,(function(r,o){var i=ut([r],[],null,1);return s.xb(i)?{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:o}),type:Ir.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:o+1}:null}));return r.concat(s.oA(i))}),[]);return o}(e,o)})),h=(0,s.UI)(e,(function(e){return function(e,t,r,n){var o=new xt;e.accept(o);var i=o.alternations,a=r[e.name];a&&(i=(0,s.d1)(i,(function(e){return a[De(e)+(0===e.idx?"":e.idx)]})));i=(0,s.d1)(i,(function(e){return!0===e.ignoreAmbiguities}));var l=s.u4(i,(function(r,o){var i=o.idx,a=o.maxLookahead||t,l=wt(i,e,a,o),u=function(e,t,r,n){var o=[],i=(0,s.u4)(e,(function(r,n,i){return!0===t.definition[i].ignoreAmbiguities||(0,s.Ed)(n,(function(n){var a=[i];(0,s.Ed)(e,(function(e,r){i!==r&&vt(e,n)&&!0!==t.definition[r].ignoreAmbiguities&&a.push(r)})),a.length>1&&!vt(o,n)&&(o.push(n),r.push({alts:a,path:n}))})),r}),[]),a=s.UI(i,(function(e){var o=(0,s.UI)(e.alts,(function(e){return e+1}));return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:o,prefixPath:e.path}),type:Ir.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:[e.alts]}}));return a}(l,o,e,n),h=function(e,t,r,n){var o=[],i=(0,s.u4)(e,(function(e,t,r){var n=(0,s.UI)(t,(function(e){return{idx:r,path:e}}));return e.concat(n)}),[]);return(0,s.Ed)(i,(function(e){if(!0!==t.definition[e.idx].ignoreAmbiguities){var a=e.idx,l=e.path,u=(0,s.Oq)(i,(function(e){return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<a&&(r=e.path,n=l,r.length<n.length&&(0,s.yW)(r,(function(e,t){var r=n[t];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]})));var r,n})),h=(0,s.UI)(u,(function(e){var s=[e.idx+1,a+1],o=0===t.idx?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:s,prefixPath:e.path}),type:Ir.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:o,alternatives:s}}));o=o.concat(h)}})),o}(l,o,e,n);return r.concat(u,h)}),[]);return l}(e,t,n,o)})),c=function(e,t,r){var n=[];return(0,s.Ed)(e,(function(e){var o=new Lt;e.accept(o);var i=o.allProductions;(0,s.Ed)(i,(function(o){var i=function(e){if(e instanceof ve)return ct.OPTION;if(e instanceof Te)return ct.REPETITION;if(e instanceof Re)return ct.REPETITION_MANDATORY;if(e instanceof Se)return ct.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Ne)return ct.REPETITION_WITH_SEPARATOR;if(e instanceof Oe)return ct.ALTERNATION;throw Error("non exhaustive match")}(o),a=o.maxLookahead||t,l=Ct(o.idx,e,i,a)[0];if((0,s.xb)((0,s.xH)(l))){var u=r.buildEmptyRepetitionError({topLevelRule:e,repetition:o});n.push({message:u,type:Ir.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))})),n}(e,t,o));var d=function(e,t,r){var n=[],o=(0,s.UI)(t,(function(e){return e.name}));return(0,s.Ed)(e,(function(e){var t=e.name;if((0,s.r3)(o,t)){var i=r.buildNamespaceConflictError(e);n.push({message:i,type:Ir.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}})),n}(e,r,o),f=s.UI(r,(function(e){return function(e,t){var r=[];e.name.match(_t)||r.push({message:t.buildTokenNameError({tokenType:e,expectedPattern:_t}),type:Ir.INVALID_TOKEN_NAME});return r}(e,o)})),p=function(e,t){var r=[];return(0,s.Ed)(e,(function(e){var n=new et("");e.accept(n);var o=(0,s.UI)(n.result,(function(e){return e.orgProd}));r.push((0,s.UI)(o,(function(r){return function(e,t,r){var n,s=[];t.name.match(At)||(n=r.buildInvalidNestedRuleNameError(e,t),s.push({message:n,type:Ir.INVALID_NESTED_RULE_NAME,ruleName:e.name}));return s}(e,r,t)})))})),(0,s.xH)(r)}(e,o),g=function(e,t){var r=[];return(0,s.Ed)(e,(function(e){var n=new et("");e.accept(n);var o=(0,s.vM)(n.result,(function(e){return e.name})),i=(0,s.ei)(o,(function(e){return e.length>1}));(0,s.Ed)((0,s.VO)(i),(function(n){var o=(0,s.UI)(n,(function(e){return e.orgProd})),i=t.buildDuplicateNestedRuleNameError(e,o);r.push({message:i,type:Ir.DUPLICATE_NESTED_NAME,ruleName:e.name})}))})),r}(e,o),m=(0,s.UI)(e,(function(e){return function(e,t){var r=new xt;e.accept(r);var n=r.alternations,o=s.u4(n,(function(r,n){return n.definition.length>255&&r.push({message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:Ir.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}),r}),[]);return o}(e,o)})),E=(0,s.UI)(e,(function(e){return function(e,t){var r=[],n=e.name;n.match(_t)||r.push({message:t.buildInvalidRuleNameError({topLevelRule:e,expectedPattern:_t}),type:Ir.INVALID_RULE_NAME,ruleName:n});return r}(e,o)})),y=(0,s.UI)(e,(function(t){return function(e,t,r,n){var o=[],i=(0,s.u4)(t,(function(t,r){return r.name===e.name?t+1:t}),0);if(i>1){var a=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});o.push({message:a,type:Ir.DUPLICATE_RULE_NAME,ruleName:e.name})}return o}(t,e,i,o)}));return s.xH(a.concat(f,p,g,c,l,u,h,d,m,E,y))}function Nt(e){return De(e)+"_#_"+e.idx+"_#_"+Ot(e)}function Ot(e){return e instanceof Me?e.terminalType.name:e instanceof ye?e.nonTerminalName:""}var Mt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return St(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}(xe),_t=/^[a-zA-Z_]\w*$/,At=new RegExp(_t.source.replace("^","^\\$"));function bt(e,t,r,n){void 0===n&&(n=[]);var o=[],i=It(t.definition);if(s.xb(i))return[];var a=e.name;s.r3(i,e)&&o.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:Ir.LEFT_RECURSION,ruleName:a});var l=s.e5(i,n.concat([e])),u=s.UI(l,(function(t){var o=s.Qw(n);return o.push(t),bt(e,t,r,o)}));return o.concat(s.xH(u))}function It(e){var t=[];if(s.xb(e))return t;var r=s.Ps(e);if(r instanceof ye)t.push(r.referencedRule);else if(r instanceof Ce||r instanceof ve||r instanceof Re||r instanceof Se||r instanceof Ne||r instanceof Te)t=t.concat(It(r.definition));else if(r instanceof Oe)t=s.xH(s.UI(r.definition,(function(e){return It(e.definition)})));else if(!(r instanceof Me))throw Error("non exhaustive match");var n=Pe(r),o=e.length>1;if(n&&o){var i=s.Cw(e);return t.concat(It(i))}return t}var xt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.alternations=[],t}return St(t,e),t.prototype.visitAlternation=function(e){this.alternations.push(e)},t}(xe);var Lt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return St(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}(xe);var Pt={buildMismatchTokenMessage:function(e){var t=e.expected,r=e.actual;e.previous,e.ruleName;return"Expecting "+(re(t)?"--\x3e "+ee(t)+" <--":"token of type --\x3e "+t.name+" <--")+" but found --\x3e '"+r.image+"' <--"},buildNotAllInputParsedMessage:function(e){var t=e.firstRedundant;e.ruleName;return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage:function(e){var t=e.expectedPathsPerAlt,r=e.actual,n=(e.previous,e.customUserDescription),o=(e.ruleName,"Expecting: "),i="\nbut found: '"+(0,s.Ps)(r).image+"'";if(n)return o+n+i;var a=(0,s.u4)(t,(function(e,t){return e.concat(t)}),[]),l=(0,s.UI)(a,(function(e){return"["+(0,s.UI)(e,(function(e){return ee(e)})).join(", ")+"]"}));return o+("one of these possible Token sequences:\n"+(0,s.UI)(l,(function(e,t){return" "+(t+1)+". "+e})).join("\n"))+i},buildEarlyExitMessage:function(e){var t=e.expectedIterationPaths,r=e.actual,n=e.customUserDescription,o=(e.ruleName,"Expecting: "),i="\nbut found: '"+(0,s.Ps)(r).image+"'";return n?o+n+i:o+("expecting at least one iteration which starts with one of these possible Token sequences::\n <"+(0,s.UI)(t,(function(e){return"["+(0,s.UI)(e,(function(e){return ee(e)})).join(",")+"]"})).join(" ,")+">")+i}};Object.freeze(Pt);var Dt={buildRuleNotFoundError:function(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"}},kt={buildDuplicateFoundError:function(e,t){var r,n=e.name,o=(0,s.Ps)(t),i=o.idx,a=De(o),l=(r=o)instanceof Me?r.terminalType.name:r instanceof ye?r.nonTerminalName:"",u="->"+a+(i>0?i:"")+"<- "+(l?"with argument: ->"+l+"<-":"")+"\n appears more than once ("+t.length+" times) in the top level rule: ->"+n+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return u=(u=u.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: ->"+At.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,s.Ps)(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,s.UI)(e.prefixPath,(function(e){return ee(e)})).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return"Ambiguous alternatives: <"+e.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\nin <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,s.UI)(e.prefixPath,(function(e){return ee(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=De(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),"The repetition <"+t+"> within Rule <"+e.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop."},buildTokenNameError:function(e){return"Invalid Grammar Token name: ->"+e.tokenType.name+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-"},buildEmptyAlternationError:function(e){return"Ambiguous empty alternative: <"+(e.emptyChoiceIdx+1)+"> in <OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative."},buildTooManyAlternativesError:function(e){return"An Alternation cannot have more than 256 alternatives:\n<OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\n has "+(e.alternation.definition.length+1)+" alternatives."},buildLeftRecursionError:function(e){var t=e.topLevelRule.name;return"Left Recursion found in grammar.\nrule: <"+t+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+(t+" --\x3e "+s.UI(e.leftRecursionPath,(function(e){return e.name})).concat([t]).join(" --\x3e "))+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring."},buildInvalidRuleNameError:function(e){return"Invalid grammar rule name: ->"+e.topLevelRule.name+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-"},buildDuplicateRuleNameError:function(e){return"Duplicate definition, rule: ->"+(e.topLevelRule instanceof we?e.topLevelRule.name:e.topLevelRule)+"<- is already defined in the grammar: ->"+e.grammarName+"<-"}},Ht=function(){var e=function(t,r){return e=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,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();var Ft=function(e){function t(t,r){var n=e.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=r,n.errors=[],n}return Ht(t,e),t.prototype.resolveRefs=function(){var e=this;(0,s.Ed)((0,s.VO)(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:Ir.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}},t}(xe);function Ut(e){e=(0,s.ce)(e,{errMsgProvider:Dt});var t,r,n,o={};return(0,s.Ed)(e.rules,(function(e){o[e.name]=e})),t=o,r=e.errMsgProvider,(n=new Ft(t,r)).resolveRefs(),n.errors}function Vt(e){return Tt((e=(0,s.ce)(e,{errMsgProvider:kt,ignoredIssues:{}})).rules,e.maxLookahead,e.tokenTypes,e.ignoredIssues,e.errMsgProvider,e.grammarName)}function Bt(e){(0,s.Ed)(e.rules,(function(e){var t=new ke;e.accept(t),(0,s.Ed)(t.dslMethods,(function(e){(0,s.Ed)(e,(function(e,t){e.idx=t+1}))}))}))}var Wt="MismatchedTokenException",Yt="NoViableAltException",Gt="EarlyExitException",jt="NotAllInputParsedException",zt=[Wt,Yt,Gt,jt];function $t(e){return(0,s.r3)(zt,e.name)}function Kt(e,t,r){this.name=Wt,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}function Xt(e,t,r){this.name=Yt,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}function qt(e,t){this.name=jt,this.message=e,this.token=t,this.resyncedTokens=[]}function Qt(e,t,r){this.name=Gt,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}Object.freeze(zt),Kt.prototype=Error.prototype,Xt.prototype=Error.prototype,qt.prototype=Error.prototype,Qt.prototype=Error.prototype;var Zt={},Jt="InRuleRecoveryException";function er(e){this.name=Jt,this.message=e}er.prototype=Error.prototype;var tr=function(){function e(){}return e.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,s.e$)(e,"recoveryEnabled")?e.recoveryEnabled:xr.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=rr)},e.prototype.getTokenToInsert=function(e){var t=pe(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(),a=this.exportLexerState(),l=[],u=!1,h=this.LA(1),c=this.LA(1),d=function(){var e=o.LA(0),t=new Kt(o.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:h,previous:e,ruleName:o.getCurrRuleFullName()}),h,o.LA(0));t.resyncedTokens=(0,s.j7)(l),o.SAVE_ERROR(t)};!u;){if(this.tokenMatcher(c,n))return void d();if(r.call(this))return d(),void e.apply(this,t);this.tokenMatcher(c,i)?u=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,l))}this.importLexerState(a)},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 er("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))return!1;if((0,s.xb)(t))return!1;var n=this.LA(1);return void 0!==(0,s.sE)(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,s.r3)(r,e)},e.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),r=2;;){var n=t.tokenType;if((0,s.r3)(e,n))return n;t=this.LA(r),r++}},e.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return Zt;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,s.xb)(this.LAST_EXPLICIT_RULE_STACK)||(t=(0,s.UI)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_STACK[t]})),r=(0,s.UI)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_OCCURRENCE_STACK[t]}))),(0,s.UI)(t,(function(n,s){return 0===s?Zt:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:r[s],inRule:e.shortRuleNameToFullName(t[s-1])}}))},e.prototype.flattenFollowSet=function(){var e=this,t=(0,s.UI)(this.buildFullFollowKeyStack(),(function(t){return e.getFollowSetFromFollowKey(t)}));return(0,s.xH)(t)},e.prototype.getFollowSetFromFollowKey=function(e){if(e===Zt)return[fe];var t=e.ruleName+e.idxInCallingRule+Ue+e.inRule;return this.resyncFollows[t]},e.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,fe)||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,s.j7)(t)},e.prototype.attemptInRepetitionRecovery=function(e,t,r,n,s,o,i){},e.prototype.getCurrentGrammarPath=function(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,s.Qw)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}},e.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,s.xb)(this.LAST_EXPLICIT_RULE_STACK)?(0,s.UI)(this.RULE_STACK,(function(t){return e.shortRuleNameToFullName(t)})):(0,s.UI)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.shortRuleNameToFullName(e.RULE_STACK[t])}))},e}();function rr(e,t,r,n,s,o,i){var a=this.getKeyForAutomaticLookahead(n,s),l=this.firstAfterRepMap[a];if(void 0===l){var u=this.getCurrRuleFullName();l=new o(this.getGAstProductions()[u],s).startWalking(),this.firstAfterRepMap[a]=l}var h=l.token,c=l.occurrence,d=l.isEndOfRule;1===this.RULE_STACK.length&&d&&void 0===h&&(h=fe,c=1),this.shouldInRepetitionRecoveryBeTried(h,c,i)&&this.tryInRepetitionRecovery(e,t,r,h)}var nr=function(){function e(){}return e.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,s.e$)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:xr.dynamicTokensEnabled,this.maxLookahead=(0,s.e$)(e,"maxLookahead")?e.maxLookahead:xr.maxLookahead,this.lookAheadFuncsCache=(0,s.dU)()?new Map:[],(0,s.dU)()?(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,s.Ed)(e,(function(e){t.TRACE_INIT(e.name+" Rule Lookahead",(function(){var r=function(e){He.reset(),e.accept(He);var t=He.dslMethods;return He.reset(),t}(e),n=r.alternation,o=r.repetition,i=r.option,a=r.repetitionMandatory,l=r.repetitionMandatoryWithSeparator,u=r.repetitionWithSeparator;(0,s.Ed)(n,(function(r){var n=0===r.idx?"":r.idx;t.TRACE_INIT(""+De(r)+n,(function(){var n,s,o,i,a,l,u,h=(n=r.idx,s=e,o=r.maxLookahead||t.maxLookahead,i=r.hasPredicates,a=t.dynamicTokensEnabled,l=t.lookAheadBuilderForAlternatives,u=wt(n,s,o),l(u,i,Rt(u)?W:B,a)),c=Ke(t.fullRuleNameToShort[e.name],We,r.idx);t.setLaFuncCache(c,h)}))})),(0,s.Ed)(o,(function(r){t.computeLookaheadFunc(e,r.idx,Ge,ct.REPETITION,r.maxLookahead,De(r))})),(0,s.Ed)(i,(function(r){t.computeLookaheadFunc(e,r.idx,Ye,ct.OPTION,r.maxLookahead,De(r))})),(0,s.Ed)(a,(function(r){t.computeLookaheadFunc(e,r.idx,je,ct.REPETITION_MANDATORY,r.maxLookahead,De(r))})),(0,s.Ed)(l,(function(r){t.computeLookaheadFunc(e,r.idx,$e,ct.REPETITION_MANDATORY_WITH_SEPARATOR,r.maxLookahead,De(r))})),(0,s.Ed)(u,(function(r){t.computeLookaheadFunc(e,r.idx,ze,ct.REPETITION_WITH_SEPARATOR,r.maxLookahead,De(r))}))}))}))},e.prototype.computeLookaheadFunc=function(e,t,r,n,s,o){var i=this;this.TRACE_INIT(""+o+(0===t?"":t),(function(){var o=function(e,t,r,n,s,o){var i=Ct(e,t,s,r),a=Rt(i)?W:B;return o(i[0],a,n)}(t,e,s||i.maxLookahead,i.dynamicTokensEnabled,n,i.lookAheadBuilderForOptional),a=Ke(i.fullRuleNameToShort[e.name],r,t);i.setLaFuncCache(a,o)}))},e.prototype.lookAheadBuilderForOptional=function(e,t,r){return function(e,t,r){var n=(0,s.yW)(e,(function(e){return 1===e.length})),o=e.length;if(n&&!r){var i=(0,s.xH)(e);if(1===i.length&&(0,s.xb)(i[0].categoryMatches)){var a=i[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===a}}var l=(0,s.u4)(i,(function(e,t,r){return e[t.tokenTypeIdx]=!0,(0,s.Ed)(t.categoryMatches,(function(t){e[t]=!0})),e}),[]);return function(){var e=this.LA(1);return!0===l[e.tokenTypeIdx]}}return function(){e:for(var r=0;r<o;r++){for(var n=e[r],s=n.length,i=0;i<s;i++){var a=this.LA(i+1);if(!1===t(a,n[i]))continue e}return!0}return!1}}(e,t,r)},e.prototype.lookAheadBuilderForAlternatives=function(e,t,r,n){return function(e,t,r,n){var o=e.length,i=(0,s.yW)(e,(function(e){return(0,s.yW)(e,(function(e){return 1===e.length}))}));if(t)return function(t){for(var n=(0,s.UI)(t,(function(e){return e.GATE})),i=0;i<o;i++){var a=e[i],l=a.length,u=n[i];if(void 0===u||!1!==u.call(this))e:for(var h=0;h<l;h++){for(var c=a[h],d=c.length,f=0;f<d;f++){var p=this.LA(f+1);if(!1===r(p,c[f]))continue e}return i}}};if(i&&!n){var a=(0,s.UI)(e,(function(e){return(0,s.xH)(e)})),l=(0,s.u4)(a,(function(e,t,r){return(0,s.Ed)(t,(function(t){(0,s.e$)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),(0,s.Ed)(t.categoryMatches,(function(t){(0,s.e$)(e,t)||(e[t]=r)}))})),e}),[]);return function(){var e=this.LA(1);return l[e.tokenTypeIdx]}}return function(){for(var t=0;t<o;t++){var n=e[t],s=n.length;e:for(var i=0;i<s;i++){for(var a=n[i],l=a.length,u=0;u<l;u++){var h=this.LA(u+1);if(!1===r(h,a[u]))continue e}return t}}}}(e,t,r,n)},e.prototype.getKeyForAutomaticLookahead=function(e,t){return Ke(this.getLastExplicitRuleShortName(),e,t)},e.prototype.getLaFuncFromCache=function(e){},e.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},e.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},e.prototype.setLaFuncCache=function(e,t){},e.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},e.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},e}();var sr,or=/^\s*function\s*(\S*)\s*\(/,ir="name";function ar(e){var t=e.name;return t||e.toString().match(or)[1]}function lr(e,t){var r=Object.getOwnPropertyDescriptor(e,ir);return!(!(0,s.o8)(r)&&!r.configurable)&&(Object.defineProperty(e,ir,{enumerable:!1,configurable:!0,writable:!1,value:t}),!0)}function ur(e,t){for(var r=(0,s.XP)(e),n=r.length,o=0;o<n;o++)for(var i=e[r[o]],a=i.length,l=0;l<a;l++){var u=i[l];void 0===u.tokenTypeIdx&&(void 0!==u.fullName?this[u.fullName](u.children,t):this[u.name](u.children,t))}}function hr(e,t){var r=function(){};lr(r,e+"BaseSemantics");var n={visit:function(e,t){if((0,s.kJ)(e)&&(e=e[0]),!(0,s.o8)(e))return void 0!==e.fullName?this[e.fullName](e.children,t):this[e.name](e.children,t)},validateVisitor:function(){var e=function(e,t){var r=function(e,t){var r=(0,s.UI)(t,(function(t){if(!(0,s.mf)(e[t]))return{msg:"Missing visitor method: <"+t+"> on "+ar(e.constructor)+" CST Visitor.",type:sr.MISSING_METHOD,methodName:t}}));return(0,s.oA)(r)}(e,t),n=function(e,t){var r=[];for(var n in e)_t.test(n)&&(0,s.mf)(e[n])&&!(0,s.r3)(cr,n)&&!(0,s.r3)(t,n)&&r.push({msg:"Redundant visitor method: <"+n+"> on "+ar(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 /"+_t.source+"/.",type:sr.REDUNDANT_METHOD,methodName:n});return r}(e,t);return r.concat(n)}(this,t);if(!(0,s.xb)(e)){var r=(0,s.UI)(e,(function(e){return e.msg}));throw Error("Errors Detected in CST Visitor <"+ar(this.constructor)+">:\n\t"+r.join("\n\n").replace(/\n/g,"\n\t"))}}};return(r.prototype=n).constructor=r,r._RULE_NAMES=t,r}!function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"}(sr||(sr={}));var cr=["constructor","visit","validateVisitor"];var dr=function(){function e(){}return e.prototype.initTreeBuilder=function(e){if(this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.outputCst=(0,s.e$)(e,"outputCst")?e.outputCst:xr.outputCst,this.nodeLocationTracking=(0,s.e$)(e,"nodeLocationTracking")?e.nodeLocationTracking:xr.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ze,this.setNodeLocationFromNode=Ze,this.cstPostRule=s.dG,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=s.dG,this.setNodeLocationFromNode=s.dG,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Qe,this.setNodeLocationFromNode=Qe,this.cstPostRule=s.dG,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=s.dG,this.setNodeLocationFromNode=s.dG,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error('Invalid <nodeLocationTracking> config option: "'+e.nodeLocationTracking+'"');this.setNodeLocationFromToken=s.dG,this.setNodeLocationFromNode=s.dG,this.cstPostRule=s.dG,this.setInitialNodeLocation=s.dG}else this.cstInvocationStateUpdate=s.dG,this.cstFinallyStateUpdate=s.dG,this.cstPostTerminal=s.dG,this.cstPostNonTerminal=s.dG,this.cstPostRule=s.dG,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,n,s,o=this.CST_STACK[this.CST_STACK.length-1];n=t,s=e,void 0===(r=o).children[s]?r.children[s]=[n]:r.children[s].push(n),this.setNodeLocationFromToken(o.location,t)},e.prototype.cstPostNonTerminal=function(e,t){if(!0!==this.isBackTracking()){var r=this.CST_STACK[this.CST_STACK.length-1];Je(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}},e.prototype.getBaseCstVisitorConstructor=function(){if((0,s.o8)(this.baseCstVisitorConstructor)){var e=hr(this.className,this.allRuleNames);return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},e.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,s.o8)(this.baseCstVisitorWithDefaultsConstructor)){var e=function(e,t,r){var n=function(){};lr(n,e+"BaseSemanticsWithDefaults");var o=Object.create(r.prototype);return(0,s.Ed)(t,(function(e){o[e]=ur})),(n.prototype=o).constructor=n,n}(this.className,this.allRuleNames,this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}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 s,o=Xe(this.getLastExplicitRuleShortName(),r,t,n);return void 0!==e.NAME?(s=e.NAME,this.nestedRuleInvocationStateUpdate(s,o),{shortName:o,nestedName:s}):void 0},e.prototype.nestedRuleFinallyClause=function(e,t){var r=this.CST_STACK,n=r[r.length-1];this.nestedRuleFinallyStateUpdate();var s=r[r.length-1];Je(s,t,n),this.setNodeLocationFromNode(s.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}(),fr=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)):br},e.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?br: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}(),pr=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=Lr),(0,s.r3)(this.definedRulesNames,e)){var n={message:kt.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Ir.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=Lr);var n,o,i,a,l,u=[];u=u.concat((n=e,o=this.definedRulesNames,i=this.className,l=[],s.r3(o,n)||(a="Invalid rule override, rule: ->"+n+"<- cannot be overridden in the grammar: ->"+i+"<-as it is not defined in any of the super grammars ",l.push({message:a,type:Ir.INVALID_RULE_OVERRIDE,ruleName:n})),l)),this.definitionErrors.push.apply(this.definitionErrors,u);var h=this.defineRule(e,t,r);return this[e]=h,h},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($t(e))return!1;throw e}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}},e.prototype.getGAstProductions=function(){return this.gastProductionsCache},e.prototype.getSerializedGastProductions=function(){return _e((0,s.VO)(this.gastProductionsCache))},e}(),gr=function(){function e(){}return e.prototype.initRecognizerEngine=function(e,t){if(this.className=ar(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=W,this.definedRulesNames=[],this.tokensMap={},this.allRuleNames=[],this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,s.e$)(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if((0,s.kJ)(e)){if((0,s.xb)(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if((0,s.kJ)(e))this.tokensMap=(0,s.u4)(e,(function(e,t){return e[t.name]=t,e}),{});else if((0,s.e$)(e,"modes")&&(0,s.yW)((0,s.xH)((0,s.VO)(e.modes)),X)){var r=(0,s.xH)((0,s.VO)(e.modes)),n=(0,s.jj)(r);this.tokensMap=(0,s.u4)(n,(function(e,t){return e[t.name]=t,e}),{})}else{if(!(0,s.Kn)(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=(0,s.Cl)(e)}this.tokensMap.EOF=fe;var o=(0,s.yW)((0,s.VO)(e),(function(e){return(0,s.xb)(e.categoryMatches)}));this.tokenMatcher=o?W:B,j((0,s.VO)(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,s.e$)(r,"resyncEnabled")?r.resyncEnabled:Lr.resyncEnabled,i=(0,s.e$)(r,"recoveryValueFunc")?r.recoveryValueFunc:Lr.recoveryValueFunc,a=this.ruleShortNameIdx<<12;function l(e){try{if(!0===this.outputCst){t.apply(this,e);var r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}return t.apply(this,e)}catch(e){return this.invokeRuleCatch(e,o,i)}finally{this.ruleFinallyStateUpdate()}}this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a;return(n=function(t,r){return void 0===t&&(t=0),this.ruleInvocationStateUpdate(a,e,t),l.call(this,r)}).ruleName=e,n.originalGrammarAction=t,n},e.prototype.invokeRuleCatch=function(e,t,r){var n=1===this.RULE_STACK.length,s=t&&!this.isBackTracking()&&this.recoveryEnabled;if($t(e)){var o=e;if(s){var i,a=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(a))return o.resyncedTokens=this.reSyncTo(a),this.outputCst?((i=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,i):r();throw this.outputCst&&((i=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,o.partialCstResult=i),o}if(n)return this.moveToTerminatedState(),r();throw o}throw e},e.prototype.optionInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(Ye,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(Ye,t);return this.optionInternalLogic(e,t,r)},e.prototype.optionInternalLogic=function(e,t,r){var n,s,o=this,i=this.getLaFuncFromCache(r);if(void 0!==e.DEF){if(n=e.DEF,void 0!==(s=e.GATE)){var a=i;i=function(){return s.call(o)&&a.call(o)}}}else n=e;if(!0===i.call(this))return n.call(this)},e.prototype.atLeastOneInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(je,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(je,e);this.atLeastOneInternalLogic(e,t,r)},e.prototype.atLeastOneInternalLogic=function(e,t,r){var n,s,o=this,i=this.getLaFuncFromCache(r);if(void 0!==t.DEF){if(n=t.DEF,void 0!==(s=t.GATE)){var a=i;i=function(){return s.call(o)&&a.call(o)}}}else n=t;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,ct.REPETITION_MANDATORY,t.ERR_MSG);for(var l=this.doSingleRepetition(n);!0===i.call(this)&&!0===l;)l=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,je,e,it)},e.prototype.atLeastOneSepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead($e,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($e,e);this.atLeastOneSepFirstInternalLogic(e,t,r)},e.prototype.atLeastOneSepFirstInternalLogic=function(e,t,r){var n=this,s=t.DEF,o=t.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(e,ct.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);s.call(this);for(var i=function(){return n.tokenMatcher(n.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),s.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,o,i,s,at],i,$e,e,at)},e.prototype.manyInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(Ge,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(Ge,e);return this.manyInternalLogic(e,t,r)},e.prototype.manyInternalLogic=function(e,t,r){var n,s,o=this,i=this.getLaFuncFromCache(r);if(void 0!==t.DEF){if(n=t.DEF,void 0!==(s=t.GATE)){var a=i;i=function(){return s.call(o)&&a.call(o)}}}else n=t;for(var l=!0;!0===i.call(this)&&!0===l;)l=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,Ge,e,st,l)},e.prototype.manySepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(ze,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(ze,e);this.manySepFirstInternalLogic(e,t,r)},e.prototype.manySepFirstInternalLogic=function(e,t,r){var n=this,s=t.DEF,o=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){s.call(this);for(var i=function(){return n.tokenMatcher(n.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),s.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,o,i,s,ot],i,ze,e,ot)}},e.prototype.repetitionSepSecondInternal=function(e,t,r,n,s){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,s],r,$e,e,s)},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,s.kJ)(e)?e:e.DEF,n=this.getKeyForAutomaticLookahead(We,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(We,t),n=this.nestedRuleBeforeClause(e,r);try{var o=(0,s.kJ)(e)?e:e.DEF,i=this.getLaFuncFromCache(r).call(this,o);if(void 0!==i){var a=o[i],l=this.nestedAltBeforeClause(a,t,We,i);try{return a.ALT.call(this)}finally{void 0!==l&&this.nestedRuleFinallyClause(l.shortName,l.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 qt(t,e))}},e.prototype.subruleInternal=function(e,t,r){var n;try{var s=void 0!==r?r.ARGS:void 0;return n=e.call(this,t,s),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 $t(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 s=this.LA(1);!0===this.tokenMatcher(s,e)?(this.consumeToken(),n=s):this.consumeInternalError(e,s,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,s=this.LA(0);throw n=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Kt(n,t,s))},e.prototype.consumeInternalRecovery=function(e,t,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;var n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(e){throw e.name===Jt?r:e}},e.prototype.saveRecogState=function(){var e=this.errors,t=(0,s.Qw)(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),fe)},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}(),mr=function(){function e(){}return e.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,s.ce)(e.errorMessageProvider,xr.errorMessageProvider)},e.prototype.SAVE_ERROR=function(e){if($t(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,s.Qw)(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,s.Qw)(this._errors)},set:function(e){this._errors=e},enumerable:!0,configurable:!0}),e.prototype.raiseEarlyExitException=function(e,t,r){for(var n=this.getCurrRuleFullName(),s=Ct(e,this.getGAstProductions()[n],t,this.maxLookahead)[0],o=[],i=1;i<=this.maxLookahead;i++)o.push(this.LA(i));var a=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:s,actual:o,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new Qt(a,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,t){for(var r=this.getCurrRuleFullName(),n=wt(e,this.getGAstProductions()[r],this.maxLookahead),s=[],o=1;o<=this.maxLookahead;o++)s.push(this.LA(o));var i=this.LA(0),a=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:n,actual:s,previous:i,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Xt(a,this.LA(1),i))},e}(),Er=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(e,t){var r=this.gastProductionsCache[e];if((0,s.o8)(r))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return ut([r],t,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(e){var t=(0,s.Ps)(e.ruleStack),r=this.getGAstProductions()[t];return new rt(r,e).startWalking()},e}(),yr={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(yr);var wr=Math.pow(2,8)-1,Cr=de({name:"RECORDING_PHASE_TOKEN",pattern:J.NA});j([Cr]);var vr=pe(Cr,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(vr);var Rr={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",children:{}},Sr=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 br},e.prototype.topLevelRuleRecord=function(e,t){try{var r=new we({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\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording'}catch(t){throw e}throw e}},e.prototype.optionInternalRecord=function(e,t){return Tr.call(this,ve,e,t)},e.prototype.atLeastOneInternalRecord=function(e,t){Tr.call(this,Re,t,e)},e.prototype.atLeastOneSepFirstInternalRecord=function(e,t){Tr.call(this,Se,t,e,true)},e.prototype.manyInternalRecord=function(e,t){Tr.call(this,Te,t,e)},e.prototype.manySepFirstInternalRecord=function(e,t){Tr.call(this,Ne,t,e,true)},e.prototype.orInternalRecord=function(e,t){return Nr.call(this,e,t)},e.prototype.subruleInternalRecord=function(e,t,r){if(Mr(t),!e||!1===(0,s.e$)(e,"ruleName")){var n=new Error("<SUBRULE"+Or(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,s.fj)(this.recordingProdStack),i=e.ruleName,a=new ye({idx:t,nonTerminalName:i,referencedRule:void 0});return o.definition.push(a),this.outputCst?Rr:yr},e.prototype.consumeInternalRecord=function(e,t,r){if(Mr(t),!$(e)){var n=new Error("<CONSUME"+Or(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,s.fj)(this.recordingProdStack),i=new Me({idx:t,terminalType:e});return o.definition.push(i),vr},e}();function Tr(e,t,r,n){void 0===n&&(n=!1),Mr(r);var o=(0,s.fj)(this.recordingProdStack),i=(0,s.mf)(t)?t:t.DEF,a=new e({definition:[],idx:r});return(0,s.e$)(t,"NAME")&&(a.name=t.NAME),n&&(a.separator=t.SEP),(0,s.e$)(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),i.call(this),o.definition.push(a),this.recordingProdStack.pop(),yr}function Nr(e,t){var r=this;Mr(t);var n=(0,s.fj)(this.recordingProdStack),o=!1===(0,s.kJ)(e),i=!1===o?e:e.DEF,a=new Oe({definition:[],idx:t,ignoreAmbiguities:o&&!0===e.IGNORE_AMBIGUITIES});(0,s.e$)(e,"NAME")&&(a.name=e.NAME),(0,s.e$)(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD);var l=(0,s.G)(i,(function(e){return(0,s.mf)(e.GATE)}));return a.hasPredicates=l,n.definition.push(a),(0,s.Ed)(i,(function(e){var t=new Ce({definition:[]});a.definition.push(t),(0,s.e$)(e,"NAME")&&(t.name=e.NAME),(0,s.e$)(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,s.e$)(e,"GATE")&&(t.ignoreAmbiguities=!0),r.recordingProdStack.push(t),e.ALT.call(r),r.recordingProdStack.pop()})),yr}function Or(e){return 0===e?"":""+e}function Mr(e){if(e<0||e>wr){var t=new Error("Invalid DSL Method idx value: <"+e+">\n\tIdx value must be a none negative value smaller than "+(wr+1));throw t.KNOWN_RECORDER_ERROR=!0,t}}var _r=function(){function e(){}return e.prototype.initPerformanceTracer=function(e){if((0,s.e$)(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=xr.traceInitPerf;this.traceInitIndent=-1},e.prototype.TRACE_INIT=function(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;var r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+"--\x3e <"+e+">");var n=(0,s.HT)(t),o=n.time,i=n.value,a=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(r+"<-- <"+e+"> time: "+o+"ms"),this.traceInitIndent--,i}return t()},e}(),Ar=function(){var e=function(t,r){return e=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,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),br=pe(fe,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(br);var Ir,xr=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Pt,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Lr=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function Pr(e){return void 0===e&&(e=void 0),function(){return e}}!function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.INVALID_NESTED_RULE_NAME=10]="INVALID_NESTED_RULE_NAME",e[e.DUPLICATE_NESTED_NAME=11]="DUPLICATE_NESTED_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=12]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=13]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=14]="TOO_MANY_ALTS"}(Ir||(Ir={}));var Dr=function(){function e(e,t){void 0===t&&(t=xr),this.ignoredIssues=xr.ignoredIssues,this.definitionErrors=[],this.selfAnalysisDone=!1;var r=this;r.initErrorHandler(t),r.initLexerAdapter(),r.initLooksAhead(t),r.initRecognizerEngine(e,t),r.initRecoverable(t),r.initTreeBuilder(t),r.initContentAssist(),r.initGastRecorder(t),r.initPerformanceTracer(t),(0,s.e$)(t,"ignoredIssues")&&t.ignoredIssues!==xr.ignoredIssues&&(0,s.rr)("The <ignoredIssues> IParserConfig property is soft-deprecated and will be removed in future versions.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead."),this.ignoredIssues=(0,s.e$)(t,"ignoredIssues")?t.ignoredIssues:xr.ignoredIssues,this.skipValidations=(0,s.e$)(t,"skipValidations")?t.skipValidations:xr.skipValidations}return e.performSelfAnalysis=function(e){e.performSelfAnalysis()},e.prototype.performSelfAnalysis=function(){var t=this;this.TRACE_INIT("performSelfAnalysis",(function(){var r;t.selfAnalysisDone=!0;var n=t.className;t.TRACE_INIT("toFastProps",(function(){(0,s.SV)(t)})),t.TRACE_INIT("Grammar Recording",(function(){try{t.enableRecording(),(0,s.Ed)(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 o=[];if(t.TRACE_INIT("Grammar Resolving",(function(){o=Ut({rules:(0,s.VO)(t.gastProductionsCache)}),t.definitionErrors.push.apply(t.definitionErrors,o)})),t.TRACE_INIT("Grammar Validations",(function(){if((0,s.xb)(o)&&!1===t.skipValidations){var e=Vt({rules:(0,s.VO)(t.gastProductionsCache),maxLookahead:t.maxLookahead,tokenTypes:(0,s.VO)(t.tokensMap),ignoredIssues:t.ignoredIssues,errMsgProvider:kt,grammarName:n});t.definitionErrors.push.apply(t.definitionErrors,e)}})),(0,s.xb)(t.definitionErrors)&&(t.recoveryEnabled&&t.TRACE_INIT("computeAllProdsFollows",(function(){var e,r,n=(e=(0,s.VO)(t.gastProductionsCache),r={},(0,s.Ed)(e,(function(e){var t=new Be(e).startWalking();(0,s.f0)(r,t)})),r);t.resyncFollows=n})),t.TRACE_INIT("ComputeLookaheadFunctions",(function(){t.preComputeLookaheadFunctions((0,s.VO)(t.gastProductionsCache))}))),t.TRACE_INIT("expandAllNestedRuleNames",(function(){var e,r,n,o=(e=(0,s.VO)(t.gastProductionsCache),r=t.fullRuleNameToShort,n={allRuleNames:[]},(0,s.Ed)(e,(function(e){var t=r[e.name];n.allRuleNames.push(e.name);var o=new et(t);e.accept(o),(0,s.Ed)(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,s.xb)(t.definitionErrors))throw r=(0,s.UI)(t.definitionErrors,(function(e){return e.message})),new Error("Parser Definition Errors detected:\n "+r.join("\n-------------------------------\n"))}))},e.DEFER_DEFINITION_ERRORS_HANDLING=!1,e}();(0,s.ef)(Dr,[tr,nr,dr,fr,gr,pr,mr,Er,Sr,_r]);var kr=function(e){function t(t,r){void 0===r&&(r=xr);var n=(0,s.Cl)(r);return n.outputCst=!0,e.call(this,t,n)||this}return Ar(t,e),t}(Dr),Hr=function(e){function t(t,r){void 0===r&&(r=xr);var n=(0,s.Cl)(r);return n.outputCst=!1,e.call(this,t,n)||this}return Ar(t,e),t}(Dr);function Fr(e,t){var r=void 0===t?{}:t,s=r.resourceBase,o=void 0===s?"https://unpkg.com/chevrotain@"+n+"/diagrams/":s,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@"+n+"/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'}var Ur="\n";function Vr(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,s.UI)(t,(function(e){return function(e,t){var r=zr(t,'$.RULE("'+e.name+'", function() {')+Ur;return r+=jr(e.definition,t+1),r+=zr(t+1,"})")+Ur}(e,1)})).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 Br(e,t){var r=zr(t,"$.OR"+e.idx+"([")+Ur,n=(0,s.UI)(e.definition,(function(e){return function(e,t){var r=zr(t,"{")+Ur;e.name&&(r+=zr(t+1,'NAME: "'+e.name+'",')+Ur);return r+=zr(t+1,"ALT: function() {")+Ur,r+=jr(e.definition,t+1),r+=zr(t+1,"}")+Ur,r+=zr(t,"}"),r}(e,t+1)}));return r+=n.join(","+Ur),r+=Ur+zr(t,"])"+Ur)}function Wr(e,t){if(e instanceof ye)return function(e,t){return zr(t,"$.SUBRULE"+e.idx+"($."+e.nonTerminalName+")"+Ur)}(e,t);if(e instanceof ve)return Yr("OPTION",e,t);if(e instanceof Re)return Yr("AT_LEAST_ONE",e,t);if(e instanceof Se)return Yr("AT_LEAST_ONE_SEP",e,t);if(e instanceof Ne)return Yr("MANY_SEP",e,t);if(e instanceof Te)return Yr("MANY",e,t);if(e instanceof Oe)return Br(e,t);if(e instanceof Me)return function(e,t){var r=e.terminalType.name;return zr(t,"$.CONSUME"+e.idx+"(this.tokensMap."+r+")"+Ur)}(e,t);if(e instanceof Ce)return jr(e.definition,t);throw Error("non exhaustive match")}function Yr(e,t,r){var n=zr(r,"$."+(e+t.idx)+"(");return t.name||t.separator?(n+="{"+Ur,t.name&&(n+=zr(r+1,'NAME: "'+t.name+'"')+","+Ur),t.separator&&(n+=zr(r+1,"SEP: this.tokensMap."+t.separator.name)+","+Ur),n+="DEF: "+Gr(t.definition,r+2)+Ur,n+=zr(r,"}")+Ur):n+=Gr(t.definition,r+1),n+=zr(r,")")+Ur}function Gr(e,t){var r="function() {"+Ur;return r+=jr(e,t),r+=zr(t,"}")+Ur}function jr(e,t){var r="";return(0,s.Ed)(e,(function(e){r+=Wr(e,t+1)})),r}function zr(e,t){return Array(4*e+1).join(" ")+t}function $r(e){var t=function(e){return" \n"+Vr(e)+"\nreturn new "+e.name+"(tokenVocabulary, config) \n"}({name:e.name,rules:e.rules}),n=new Function("tokenVocabulary","config","chevrotain",t);return function(t){return n(e.tokenVocabulary,t,r(8524))}}function Kr(e){return function(e){return"\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['chevrotain'], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(require('chevrotain'));\n } else {\n // Browser globals (root is window)\n root.returnExports = factory(root.b);\n }\n}(typeof self !== 'undefined' ? self : this, function (chevrotain) {\n\n"+Vr(e)+"\n \nreturn {\n "+e.name+": "+e.name+" \n}\n}));\n"}({name:e.name,rules:e.rules})}function Xr(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API.\n\t It performs no action other than printing this message.\n\t Please avoid using it as it will be completely removed in the future")}},46248:(e,t,r)=>{"use strict";function n(e){return e&&0===e.length}function s(e){return null==e?[]:Object.keys(e)}function o(e){for(var t=[],r=Object.keys(e),n=0;n<r.length;n++)t.push(e[r[n]]);return t}function i(e,t){for(var r=[],n=s(e),o=0;o<n.length;o++){var i=n[o];r.push(t.call(null,e[i],i))}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){for(var t=[],r=0;r<e.length;r++){var n=e[r];Array.isArray(n)?t=t.concat(l(n)):t.push(n)}return t}function u(e){return n(e)?void 0:e[0]}function h(e){var t=e&&e.length;return t?e[t-1]:void 0}function c(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++)t.call(null,e[r],r);else{if(!x(e))throw Error("non exhaustive match");var n=s(e);for(r=0;r<n.length;r++){var o=n[r],i=e[o];t.call(null,i,o)}}}function d(e){return"string"==typeof e}function f(e){return void 0===e}function p(e){return e instanceof Function}function g(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 E(e,t){var r=[];if(Array.isArray(e))for(var n=0;n<e.length;n++){var s=e[n];t.call(null,s)&&r.push(s)}return r}function y(e,t){return E(e,(function(e){return!t(e)}))}function w(e,t){for(var r=Object.keys(e),n={},s=0;s<r.length;s++){var o=r[s],i=e[o];t(i)&&(n[o]=i)}return n}function C(e,t){return!!x(e)&&e.hasOwnProperty(t)}function v(e,t){return void 0!==T(e,(function(e){return e===t}))}function R(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r]);return t}function S(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}function T(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(t.call(null,n))return n}}function N(e,t){for(var r=[],n=0;n<e.length;n++){var s=e[n];t.call(null,s)&&r.push(s)}return r}function O(e,t,r){for(var n=Array.isArray(e),i=n?e:o(e),a=n?[]:s(e),l=r,u=0;u<i.length;u++)l=t.call(null,l,i[u],n?u:a[u]);return l}function M(e){return y(e,(function(e){return null==e}))}function _(e,t){void 0===t&&(t=function(e){return e});var r=[];return O(e,(function(e,n){var s=t(n);return v(r,s)?e:(r.push(s),e.concat(n))}),[])}function A(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=[null].concat(t);return Function.bind.apply(e,n)}function b(e){return Array.isArray(e)}function I(e){return e instanceof RegExp}function x(e){return e instanceof Object}function L(e,t){for(var r=0;r<e.length;r++)if(!t(e[r],r))return!1;return!0}function P(e,t){return y(e,(function(e){return v(t,e)}))}function D(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return!0;return!1}function k(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1}function H(e,t){var r=R(e);return r.sort((function(e,r){return t(e)-t(r)})),r}function F(e,t){if(e.length!==t.length)throw Error("can't zipObject with different number of keys and values!");for(var r={},n=0;n<e.length;n++)r[e[n]]=t[n];return r}function U(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 o=t[n],i=s(o),a=0;a<i.length;a++){var l=i[a];e[l]=o[l]}return e}function V(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++){var o=t[n];if(!f(o))for(var i=s(o),a=0;a<i.length;a++){var l=i[a];C(e,l)||(e[l]=o[l])}}return e}function B(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return V.apply(null,[{}].concat(e))}function W(e,t){var r={};return c(e,(function(e){var n=t(e),s=r[n];s?s.push(e):r[n]=[e]})),r}function Y(e,t){for(var r=S(e),n=s(t),o=0;o<n.length;o++){var i=n[o],a=t[i];r[i]=a}return r}function G(){}function j(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 $(e){console&&console.error&&console.error("Error: "+e)}function K(e){console&&console.warn&&console.warn("Warning: "+e)}function X(){return"function"==typeof Map}function q(e,t){t.forEach((function(t){var r=t.prototype;Object.getOwnPropertyNames(r).forEach((function(n){if("constructor"!==n){var s=Object.getOwnPropertyDescriptor(r,n);s&&(s.get||s.set)?Object.defineProperty(e.prototype,n,s):e.prototype[n]=t.prototype[n]}}))}))}function Q(e){function t(){}t.prototype=e;var r=new t;function n(){return typeof r.bar}return n(),n(),e}function Z(e){return e[e.length-1]}function J(e){var t=(new Date).getTime(),r=e();return{time:(new Date).getTime()-t,value:r}}r.d(t,{Cl:()=>S,Cw:()=>g,Ed:()=>c,G:()=>D,HD:()=>d,HT:()=>J,Kj:()=>I,Kn:()=>x,Oq:()=>N,Ps:()=>u,Q8:()=>i,Qw:()=>R,SV:()=>Q,TS:()=>Y,UI:()=>a,VO:()=>o,WB:()=>$,Wd:()=>j,X0:()=>z,XP:()=>s,Z$:()=>h,ce:()=>B,cq:()=>k,d1:()=>y,dG:()=>G,dU:()=>X,e$:()=>C,e5:()=>P,ef:()=>q,ei:()=>w,f0:()=>U,fj:()=>Z,hX:()=>E,j7:()=>m,jj:()=>_,kJ:()=>b,mf:()=>p,o8:()=>f,oA:()=>M,r3:()=>v,rr:()=>K,sE:()=>T,u4:()=>O,vM:()=>W,xH:()=>l,xb:()=>n,yW:()=>L})},45089:(e,t,r)=>{"use strict";var n=r(90930),s=r(9268),o=TypeError;e.exports=function(e){if(n(e))return e;throw o(s(e)+" is not a function")}},81378:(e,t,r)=>{"use strict";var n=r(90930),s=String,o=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw o("Can't set "+s(e)+" as a prototype")}},78669:(e,t,r)=>{"use strict";var n=r(50211),s=r(43699),o=r(77826).f,i=n("unscopables"),a=Array.prototype;void 0===a[i]&&o(a,i,{configurable:!0,value:s(null)}),e.exports=function(e){a[i][e]=!0}},56112:(e,t,r)=>{"use strict";var n=r(28759),s=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw o(s(e)+" is not an object")}},56198:(e,t,r)=>{"use strict";var n=r(64088),s=r(7740),o=r(82871),i=function(e){return function(t,r,i){var a,l=n(t),u=o(l),h=s(i,u);if(e&&r!=r){for(;u>h;)if((a=l[h++])!=a)return!0}else for(;u>h;h++)if((e||h in l)&&l[h]===r)return e||h||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},44710:(e,t,r)=>{"use strict";var n=r(25283),s=r(46526),o=TypeError,i=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(s(e)&&!i(e,"length").writable)throw o("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},70745:(e,t,r)=>{"use strict";var n=r(78240);e.exports=n([].slice)},52306:(e,t,r)=>{"use strict";var n=r(78240),s=n({}.toString),o=n("".slice);e.exports=function(e){return o(s(e),8,-1)}},90375:(e,t,r)=>{"use strict";var n=r(12371),s=r(90930),o=r(52306),i=r(50211)("toStringTag"),a=Object,l="Arguments"===o(function(){return arguments}());e.exports=n?o:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=a(e),i))?r:l?o(t):"Object"===(n=o(t))&&s(t.callee)?"Arguments":n}},48474:(e,t,r)=>{"use strict";var n=r(49606),s=r(46095),o=r(94399),i=r(77826);e.exports=function(e,t,r){for(var a=s(t),l=i.f,u=o.f,h=0;h<a.length;h++){var c=a[h];n(e,c)||r&&n(r,c)||l(e,c,u(t,c))}}},72585:(e,t,r)=>{"use strict";var n=r(25283),s=r(77826),o=r(55736);e.exports=n?function(e,t,r){return s.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},55736:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},1343:(e,t,r)=>{"use strict";var n=r(90930),s=r(77826),o=r(83712),i=r(79444);e.exports=function(e,t,r,a){a||(a={});var l=a.enumerable,u=void 0!==a.name?a.name:t;if(n(r)&&o(r,u,a),a.global)l?e[t]=r:i(t,r);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=r:s.f(e,t,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},79444:(e,t,r)=>{"use strict";var n=r(22086),s=Object.defineProperty;e.exports=function(e,t){try{s(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},58685:(e,t,r)=>{"use strict";var n=r(9268),s=TypeError;e.exports=function(e,t){if(!delete e[t])throw s("Cannot delete property "+n(t)+" of "+n(e))}},25283:(e,t,r)=>{"use strict";var n=r(63677);e.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},27886:e=>{"use strict";var t="object"==typeof document&&document.all,r=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:r}},20821:(e,t,r)=>{"use strict";var n=r(22086),s=r(28759),o=n.document,i=s(o)&&s(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},17620:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},92690:e=>{"use strict";e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},84344:(e,t,r)=>{"use strict";var n=r(4999);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},81801:(e,t,r)=>{"use strict";var n=r(22086),s=r(52306);e.exports="process"===s(n.process)},4999:e=>{"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},21448:(e,t,r)=>{"use strict";var n,s,o=r(22086),i=r(4999),a=o.process,l=o.Deno,u=a&&a.versions||l&&l.version,h=u&&u.v8;h&&(s=(n=h.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!s&&i&&(!(n=i.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=i.match(/Chrome\/(\d+)/))&&(s=+n[1]),e.exports=s},58684:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},10079:(e,t,r)=>{"use strict";var n=r(78240),s=Error,o=n("".replace),i=String(s("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(i);e.exports=function(e,t){if(l&&"string"==typeof e&&!s.prepareStackTrace)for(;t--;)e=o(e,a,"");return e}},58395:(e,t,r)=>{"use strict";var n=r(72585),s=r(10079),o=r(52114),i=Error.captureStackTrace;e.exports=function(e,t,r,a){o&&(i?i(e,t):n(e,"stack",s(r,a)))}},52114:(e,t,r)=>{"use strict";var n=r(63677),s=r(55736);e.exports=!n((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",s(1,7)),7!==e.stack)}))},51695:(e,t,r)=>{"use strict";var n=r(22086),s=r(94399).f,o=r(72585),i=r(1343),a=r(79444),l=r(48474),u=r(67189);e.exports=function(e,t){var r,h,c,d,f,p=e.target,g=e.global,m=e.stat;if(r=g?n:m?n[p]||a(p,{}):(n[p]||{}).prototype)for(h in t){if(d=t[h],c=e.dontCallGetSet?(f=s(r,h))&&f.value:r[h],!u(g?h:p+(m?".":"#")+h,e.forced)&&void 0!==c){if(typeof d==typeof c)continue;l(d,c)}(e.sham||c&&c.sham)&&o(d,"sham",!0),i(r,h,d,e)}}},63677:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},67258:(e,t,r)=>{"use strict";var n=r(86059),s=Function.prototype,o=s.apply,i=s.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?i.bind(o):function(){return i.apply(o,arguments)})},18516:(e,t,r)=>{"use strict";var n=r(91175),s=r(45089),o=r(86059),i=n(n.bind);e.exports=function(e,t){return s(e),void 0===t?e:o?i(e,t):function(){return e.apply(t,arguments)}}},86059:(e,t,r)=>{"use strict";var n=r(63677);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},59413:(e,t,r)=>{"use strict";var n=r(86059),s=Function.prototype.call;e.exports=n?s.bind(s):function(){return s.apply(s,arguments)}},94398:(e,t,r)=>{"use strict";var n=r(25283),s=r(49606),o=Function.prototype,i=n&&Object.getOwnPropertyDescriptor,a=s(o,"name"),l=a&&"something"===function(){}.name,u=a&&(!n||n&&i(o,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:u}},71518:(e,t,r)=>{"use strict";var n=r(78240),s=r(45089);e.exports=function(e,t,r){try{return n(s(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},91175:(e,t,r)=>{"use strict";var n=r(52306),s=r(78240);e.exports=function(e){if("Function"===n(e))return s(e)}},78240:(e,t,r)=>{"use strict";var n=r(86059),s=Function.prototype,o=s.call,i=n&&s.bind.bind(o,o);e.exports=n?i:function(e){return function(){return o.apply(e,arguments)}}},10563:(e,t,r)=>{"use strict";var n=r(22086),s=r(90930);e.exports=function(e,t){return arguments.length<2?(r=n[e],s(r)?r:void 0):n[e]&&n[e][t];var r}},15636:(e,t,r)=>{"use strict";var n=r(78240),s=r(46526),o=r(90930),i=r(52306),a=r(64059),l=n([].push);e.exports=function(e){if(o(e))return e;if(s(e)){for(var t=e.length,r=[],n=0;n<t;n++){var u=e[n];"string"==typeof u?l(r,u):"number"!=typeof u&&"Number"!==i(u)&&"String"!==i(u)||l(r,a(u))}var h=r.length,c=!0;return function(e,t){if(c)return c=!1,t;if(s(this))return t;for(var n=0;n<h;n++)if(r[n]===e)return t}}}},2964:(e,t,r)=>{"use strict";var n=r(45089),s=r(71858);e.exports=function(e,t){var r=e[t];return s(r)?void 0:n(r)}},22086:function(e){"use strict";var t=function(e){return e&&e.Math===Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||function(){return this}()||this||Function("return this")()},49606:(e,t,r)=>{"use strict";var n=r(78240),s=r(3060),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(s(e),t)}},7153:e=>{"use strict";e.exports={}},25963:(e,t,r)=>{"use strict";var n=r(10563);e.exports=n("document","documentElement")},26761:(e,t,r)=>{"use strict";var n=r(25283),s=r(63677),o=r(20821);e.exports=!n&&!s((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},95974:(e,t,r)=>{"use strict";var n=r(78240),s=r(63677),o=r(52306),i=Object,a=n("".split);e.exports=s((function(){return!i("z").propertyIsEnumerable(0)}))?function(e){return"String"===o(e)?a(e,""):i(e)}:i},15070:(e,t,r)=>{"use strict";var n=r(90930),s=r(28759),o=r(77530);e.exports=function(e,t,r){var i,a;return o&&n(i=t.constructor)&&i!==r&&s(a=i.prototype)&&a!==r.prototype&&o(e,a),e}},39277:(e,t,r)=>{"use strict";var n=r(78240),s=r(90930),o=r(74489),i=n(Function.toString);s(o.inspectSource)||(o.inspectSource=function(e){return i(e)}),e.exports=o.inspectSource},8945:(e,t,r)=>{"use strict";var n=r(28759),s=r(72585);e.exports=function(e,t){n(t)&&"cause"in t&&s(e,"cause",t.cause)}},83278:(e,t,r)=>{"use strict";var n,s,o,i=r(40640),a=r(22086),l=r(28759),u=r(72585),h=r(49606),c=r(74489),d=r(88944),f=r(7153),p="Object already initialized",g=a.TypeError,m=a.WeakMap;if(i||c.state){var E=c.state||(c.state=new m);E.get=E.get,E.has=E.has,E.set=E.set,n=function(e,t){if(E.has(e))throw g(p);return t.facade=e,E.set(e,t),t},s=function(e){return E.get(e)||{}},o=function(e){return E.has(e)}}else{var y=d("state");f[y]=!0,n=function(e,t){if(h(e,y))throw g(p);return t.facade=e,u(e,y,t),t},s=function(e){return h(e,y)?e[y]:{}},o=function(e){return h(e,y)}}e.exports={set:n,get:s,has:o,enforce:function(e){return o(e)?s(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!l(t)||(r=s(t)).type!==e)throw g("Incompatible receiver, "+e+" required");return r}}}},46526:(e,t,r)=>{"use strict";var n=r(52306);e.exports=Array.isArray||function(e){return"Array"===n(e)}},90930:(e,t,r)=>{"use strict";var n=r(27886),s=n.all;e.exports=n.IS_HTMLDDA?function(e){return"function"==typeof e||e===s}:function(e){return"function"==typeof e}},67189:(e,t,r)=>{"use strict";var n=r(63677),s=r(90930),o=/#|\.prototype\./,i=function(e,t){var r=l[a(e)];return r===h||r!==u&&(s(t)?n(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=i.data={},u=i.NATIVE="N",h=i.POLYFILL="P";e.exports=i},71858:e=>{"use strict";e.exports=function(e){return null==e}},28759:(e,t,r)=>{"use strict";var n=r(90930),s=r(27886),o=s.all;e.exports=s.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:n(e)||e===o}:function(e){return"object"==typeof e?null!==e:n(e)}},43296:e=>{"use strict";e.exports=!1},92071:(e,t,r)=>{"use strict";var n=r(10563),s=r(90930),o=r(95516),i=r(91876),a=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return s(t)&&o(t.prototype,a(e))}},82871:(e,t,r)=>{"use strict";var n=r(24005);e.exports=function(e){return n(e.length)}},83712:(e,t,r)=>{"use strict";var n=r(78240),s=r(63677),o=r(90930),i=r(49606),a=r(25283),l=r(94398).CONFIGURABLE,u=r(39277),h=r(83278),c=h.enforce,d=h.get,f=String,p=Object.defineProperty,g=n("".slice),m=n("".replace),E=n([].join),y=a&&!s((function(){return 8!==p((function(){}),"length",{value:8}).length})),w=String(String).split("String"),C=e.exports=function(e,t,r){"Symbol("===g(f(t),0,7)&&(t="["+m(f(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!i(e,"name")||l&&e.name!==t)&&(a?p(e,"name",{value:t,configurable:!0}):e.name=t),y&&r&&i(r,"arity")&&e.length!==r.arity&&p(e,"length",{value:r.arity});try{r&&i(r,"constructor")&&r.constructor?a&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=c(e);return i(n,"source")||(n.source=E(w,"string"==typeof t?t:"")),e};Function.prototype.toString=C((function(){return o(this)&&d(this).source||u(this)}),"toString")},55681:e=>{"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}},81879:(e,t,r)=>{"use strict";var n=r(64059);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},43699:(e,t,r)=>{"use strict";var n,s=r(56112),o=r(77711),i=r(58684),a=r(7153),l=r(25963),u=r(20821),h=r(88944),c="prototype",d="script",f=h("IE_PROTO"),p=function(){},g=function(e){return"<"+d+">"+e+"</"+d+">"},m=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},E=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;E="undefined"!=typeof document?document.domain&&n?m(n):(t=u("iframe"),r="java"+d+":",t.style.display="none",l.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F):m(n);for(var s=i.length;s--;)delete E[c][i[s]];return E()};a[f]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(p[c]=s(e),r=new p,p[c]=null,r[f]=e):r=E(),void 0===t?r:o.f(r,t)}},77711:(e,t,r)=>{"use strict";var n=r(25283),s=r(98202),o=r(77826),i=r(56112),a=r(64088),l=r(68779);t.f=n&&!s?Object.defineProperties:function(e,t){i(e);for(var r,n=a(t),s=l(t),u=s.length,h=0;u>h;)o.f(e,r=s[h++],n[r]);return e}},77826:(e,t,r)=>{"use strict";var n=r(25283),s=r(26761),o=r(98202),i=r(56112),a=r(2258),l=TypeError,u=Object.defineProperty,h=Object.getOwnPropertyDescriptor,c="enumerable",d="configurable",f="writable";t.f=n?o?function(e,t,r){if(i(e),t=a(t),i(r),"function"==typeof e&&"prototype"===t&&"value"in r&&f in r&&!r[f]){var n=h(e,t);n&&n[f]&&(e[t]=r.value,r={configurable:d in r?r[d]:n[d],enumerable:c in r?r[c]:n[c],writable:!1})}return u(e,t,r)}:u:function(e,t,r){if(i(e),t=a(t),i(r),s)try{return u(e,t,r)}catch(e){}if("get"in r||"set"in r)throw l("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},94399:(e,t,r)=>{"use strict";var n=r(25283),s=r(59413),o=r(7446),i=r(55736),a=r(64088),l=r(2258),u=r(49606),h=r(26761),c=Object.getOwnPropertyDescriptor;t.f=n?c:function(e,t){if(e=a(e),t=l(t),h)try{return c(e,t)}catch(e){}if(u(e,t))return i(!s(o.f,e,t),e[t])}},20062:(e,t,r)=>{"use strict";var n=r(91352),s=r(58684).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,s)}},66952:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},95516:(e,t,r)=>{"use strict";var n=r(78240);e.exports=n({}.isPrototypeOf)},91352:(e,t,r)=>{"use strict";var n=r(78240),s=r(49606),o=r(64088),i=r(56198).indexOf,a=r(7153),l=n([].push);e.exports=function(e,t){var r,n=o(e),u=0,h=[];for(r in n)!s(a,r)&&s(n,r)&&l(h,r);for(;t.length>u;)s(n,r=t[u++])&&(~i(h,r)||l(h,r));return h}},68779:(e,t,r)=>{"use strict";var n=r(91352),s=r(58684);e.exports=Object.keys||function(e){return n(e,s)}},7446:(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,s=n&&!r.call({1:2},1);t.f=s?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},77530:(e,t,r)=>{"use strict";var n=r(71518),s=r(56112),o=r(81378);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return s(r),o(n),t?e(r,n):r.__proto__=n,r}}():void 0)},97999:(e,t,r)=>{"use strict";var n=r(59413),s=r(90930),o=r(28759),i=TypeError;e.exports=function(e,t){var r,a;if("string"===t&&s(r=e.toString)&&!o(a=n(r,e)))return a;if(s(r=e.valueOf)&&!o(a=n(r,e)))return a;if("string"!==t&&s(r=e.toString)&&!o(a=n(r,e)))return a;throw i("Can't convert object to primitive value")}},46095:(e,t,r)=>{"use strict";var n=r(10563),s=r(78240),o=r(20062),i=r(66952),a=r(56112),l=s([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(a(e)),r=i.f;return r?l(t,r(e)):t}},71632:(e,t,r)=>{"use strict";var n=r(77826).f;e.exports=function(e,t,r){r in e||n(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})}},69586:(e,t,r)=>{"use strict";var n=r(71858),s=TypeError;e.exports=function(e){if(n(e))throw s("Can't call method on "+e);return e}},357:(e,t,r)=>{"use strict";var n,s=r(22086),o=r(67258),i=r(90930),a=r(92690),l=r(4999),u=r(70745),h=r(71635),c=s.Function,d=/MSIE .\./.test(l)||a&&((n=s.Bun.version.split(".")).length<3||"0"===n[0]&&(n[1]<3||"3"===n[1]&&"0"===n[2]));e.exports=function(e,t){var r=t?2:1;return d?function(n,s){var a=h(arguments.length,1)>r,l=i(n)?n:c(n),d=a?u(arguments,r):[],f=a?function(){o(l,this,d)}:l;return t?e(f,s):e(f)}:e}},88944:(e,t,r)=>{"use strict";var n=r(49197),s=r(65422),o=n("keys");e.exports=function(e){return o[e]||(o[e]=s(e))}},74489:(e,t,r)=>{"use strict";var n=r(22086),s=r(79444),o="__core-js_shared__",i=n[o]||s(o,{});e.exports=i},49197:(e,t,r)=>{"use strict";var n=r(43296),s=r(74489);(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.32.1",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"})},25558:(e,t,r)=>{"use strict";var n=r(21448),s=r(63677),o=r(22086).String;e.exports=!!Object.getOwnPropertySymbols&&!s((function(){var e=Symbol("symbol detection");return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},84953:(e,t,r)=>{"use strict";var n,s,o,i,a=r(22086),l=r(67258),u=r(18516),h=r(90930),c=r(49606),d=r(63677),f=r(25963),p=r(70745),g=r(20821),m=r(71635),E=r(84344),y=r(81801),w=a.setImmediate,C=a.clearImmediate,v=a.process,R=a.Dispatch,S=a.Function,T=a.MessageChannel,N=a.String,O=0,M={},_="onreadystatechange";d((function(){n=a.location}));var A=function(e){if(c(M,e)){var t=M[e];delete M[e],t()}},b=function(e){return function(){A(e)}},I=function(e){A(e.data)},x=function(e){a.postMessage(N(e),n.protocol+"//"+n.host)};w&&C||(w=function(e){m(arguments.length,1);var t=h(e)?e:S(e),r=p(arguments,1);return M[++O]=function(){l(t,void 0,r)},s(O),O},C=function(e){delete M[e]},y?s=function(e){v.nextTick(b(e))}:R&&R.now?s=function(e){R.now(b(e))}:T&&!E?(i=(o=new T).port2,o.port1.onmessage=I,s=u(i.postMessage,i)):a.addEventListener&&h(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!d(x)?(s=x,a.addEventListener("message",I,!1)):s=_ in g("script")?function(e){f.appendChild(g("script"))[_]=function(){f.removeChild(this),A(e)}}:function(e){setTimeout(b(e),0)}),e.exports={set:w,clear:C}},7740:(e,t,r)=>{"use strict";var n=r(69502),s=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?s(r+t,0):o(r,t)}},64088:(e,t,r)=>{"use strict";var n=r(95974),s=r(69586);e.exports=function(e){return n(s(e))}},69502:(e,t,r)=>{"use strict";var n=r(55681);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},24005:(e,t,r)=>{"use strict";var n=r(69502),s=Math.min;e.exports=function(e){return e>0?s(n(e),9007199254740991):0}},3060:(e,t,r)=>{"use strict";var n=r(69586),s=Object;e.exports=function(e){return s(n(e))}},1288:(e,t,r)=>{"use strict";var n=r(59413),s=r(28759),o=r(92071),i=r(2964),a=r(97999),l=r(50211),u=TypeError,h=l("toPrimitive");e.exports=function(e,t){if(!s(e)||o(e))return e;var r,l=i(e,h);if(l){if(void 0===t&&(t="default"),r=n(l,e,t),!s(r)||o(r))return r;throw u("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},2258:(e,t,r)=>{"use strict";var n=r(1288),s=r(92071);e.exports=function(e){var t=n(e,"string");return s(t)?t:t+""}},12371:(e,t,r)=>{"use strict";var n={};n[r(50211)("toStringTag")]="z",e.exports="[object z]"===String(n)},64059:(e,t,r)=>{"use strict";var n=r(90375),s=String;e.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return s(e)}},9268:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},65422:(e,t,r)=>{"use strict";var n=r(78240),s=0,o=Math.random(),i=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++s+o,36)}},91876:(e,t,r)=>{"use strict";var n=r(25558);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},98202:(e,t,r)=>{"use strict";var n=r(25283),s=r(63677);e.exports=n&&s((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},71635:e=>{"use strict";var t=TypeError;e.exports=function(e,r){if(e<r)throw t("Not enough arguments");return e}},40640:(e,t,r)=>{"use strict";var n=r(22086),s=r(90930),o=n.WeakMap;e.exports=s(o)&&/native code/.test(String(o))},50211:(e,t,r)=>{"use strict";var n=r(22086),s=r(49197),o=r(49606),i=r(65422),a=r(25558),l=r(91876),u=n.Symbol,h=s("wks"),c=l?u.for||u:u&&u.withoutSetter||i;e.exports=function(e){return o(h,e)||(h[e]=a&&o(u,e)?u[e]:c("Symbol."+e)),h[e]}},91557:(e,t,r)=>{"use strict";var n=r(10563),s=r(49606),o=r(72585),i=r(95516),a=r(77530),l=r(48474),u=r(71632),h=r(15070),c=r(81879),d=r(8945),f=r(58395),p=r(25283),g=r(43296);e.exports=function(e,t,r,m){var E="stackTraceLimit",y=m?2:1,w=e.split("."),C=w[w.length-1],v=n.apply(null,w);if(v){var R=v.prototype;if(!g&&s(R,"cause")&&delete R.cause,!r)return v;var S=n("Error"),T=t((function(e,t){var r=c(m?t:e,void 0),n=m?new v(e):new v;return void 0!==r&&o(n,"message",r),f(n,T,n.stack,2),this&&i(R,this)&&h(n,this,T),arguments.length>y&&d(n,arguments[y]),n}));if(T.prototype=R,"Error"!==C?a?a(T,S):l(T,S,{name:!0}):p&&E in v&&(u(T,v,E),u(T,v,"prepareStackTrace")),l(T,v),!g)try{R.name!==C&&o(R,"name",C),R.constructor=T}catch(e){}return T}}},58259:(e,t,r)=>{"use strict";var n=r(51695),s=r(3060),o=r(82871),i=r(69502),a=r(78669);n({target:"Array",proto:!0},{at:function(e){var t=s(this),r=o(t),n=i(e),a=n>=0?n:r+n;return a<0||a>=r?void 0:t[a]}}),a("at")},95988:(e,t,r)=>{"use strict";var n=r(51695),s=r(3060),o=r(82871),i=r(44710),a=r(17620);n({target:"Array",proto:!0,arity:1,forced:r(63677)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=s(this),r=o(t),n=arguments.length;a(r+n);for(var l=0;l<n;l++)t[r]=arguments[l],r++;return i(t,r),r}})},44062:(e,t,r)=>{"use strict";r(78669)("flat")},26438:(e,t,r)=>{"use strict";var n=r(51695),s=r(3060),o=r(82871),i=r(44710),a=r(58685),l=r(17620);n({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}()},{unshift:function(e){var t=s(this),r=o(t),n=arguments.length;if(n){l(r+n);for(var u=r;u--;){var h=u+n;u in t?t[h]=t[u]:a(t,h)}for(var c=0;c<n;c++)t[c]=arguments[c]}return i(t,r+n)}})},60740:(e,t,r)=>{"use strict";var n=r(51695),s=r(22086),o=r(67258),i=r(91557),a="WebAssembly",l=s[a],u=7!==Error("e",{cause:7}).cause,h=function(e,t){var r={};r[e]=i(e,t,u),n({global:!0,constructor:!0,arity:1,forced:u},r)},c=function(e,t){if(l&&l[e]){var r={};r[e]=i(a+"."+e,t,u),n({target:a,stat:!0,constructor:!0,arity:1,forced:u},r)}};h("Error",(function(e){return function(t){return o(e,this,arguments)}})),h("EvalError",(function(e){return function(t){return o(e,this,arguments)}})),h("RangeError",(function(e){return function(t){return o(e,this,arguments)}})),h("ReferenceError",(function(e){return function(t){return o(e,this,arguments)}})),h("SyntaxError",(function(e){return function(t){return o(e,this,arguments)}})),h("TypeError",(function(e){return function(t){return o(e,this,arguments)}})),h("URIError",(function(e){return function(t){return o(e,this,arguments)}})),c("CompileError",(function(e){return function(t){return o(e,this,arguments)}})),c("LinkError",(function(e){return function(t){return o(e,this,arguments)}})),c("RuntimeError",(function(e){return function(t){return o(e,this,arguments)}}))},95735:(e,t,r)=>{"use strict";var n=r(51695),s=r(10563),o=r(67258),i=r(59413),a=r(78240),l=r(63677),u=r(90930),h=r(92071),c=r(70745),d=r(15636),f=r(25558),p=String,g=s("JSON","stringify"),m=a(/./.exec),E=a("".charAt),y=a("".charCodeAt),w=a("".replace),C=a(1..toString),v=/[\uD800-\uDFFF]/g,R=/^[\uD800-\uDBFF]$/,S=/^[\uDC00-\uDFFF]$/,T=!f||l((function(){var e=s("Symbol")("stringify detection");return"[null]"!==g([e])||"{}"!==g({a:e})||"{}"!==g(Object(e))})),N=l((function(){return'"\\udf06\\ud834"'!==g("\udf06\ud834")||'"\\udead"'!==g("\udead")})),O=function(e,t){var r=c(arguments),n=d(t);if(u(n)||void 0!==e&&!h(e))return r[1]=function(e,t){if(u(n)&&(t=i(n,this,p(e),t)),!h(t))return t},o(g,null,r)},M=function(e,t,r){var n=E(r,t-1),s=E(r,t+1);return m(R,e)&&!m(S,s)||m(S,e)&&!m(R,n)?"\\u"+C(y(e,0),16):e};g&&n({target:"JSON",stat:!0,arity:3,forced:T||N},{stringify:function(e,t,r){var n=c(arguments),s=o(T?O:g,null,n);return N&&"string"==typeof s?w(s,v,M):s}})},91570:(e,t,r)=>{"use strict";var n=r(51695),s=r(22086),o=r(84953).clear;n({global:!0,bind:!0,enumerable:!0,forced:s.clearImmediate!==o},{clearImmediate:o})},6282:(e,t,r)=>{"use strict";r(91570),r(1427)},1427:(e,t,r)=>{"use strict";var n=r(51695),s=r(22086),o=r(84953).set,i=r(357),a=s.setImmediate?i(o,!1):o;n({global:!0,bind:!0,enumerable:!0,forced:s.setImmediate!==a},{setImmediate:a})},25671:(e,t,r)=>{"use strict";r.r(t)},16247:(e,t,r)=>{"use strict";r.r(t)},97796:(e,t,r)=>{"use strict";r.r(t)},36662:(e,t,r)=>{"use strict";r.r(t)},68581:(e,t,r)=>{"use strict";r.r(t)},79498:(e,t,r)=>{"use strict";r.r(t)},63824:(e,t,r)=>{"use strict";r.r(t)},59456:(e,t,r)=>{"use strict";r.r(t)},30352:(e,t,r)=>{"use strict";r.r(t)},52097:(e,t,r)=>{"use strict";r.r(t)},25972:(e,t,r)=>{"use strict";r.r(t)},18633:(e,t,r)=>{"use strict";r.r(t)},36881:(e,t,r)=>{"use strict";r.r(t)},83988:(e,t,r)=>{"use strict";r.r(t)},51309:(e,t,r)=>{"use strict";r.r(t)},2049:(e,t,r)=>{"use strict";r.r(t)},10596:(e,t,r)=>{"use strict";r.r(t)},23118:(e,t,r)=>{"use strict";r.r(t)},67004:(e,t,r)=>{"use strict";r.r(t)},51768:(e,t,r)=>{"use strict";r.r(t)},22442:(e,t,r)=>{"use strict";r.r(t)},95126:(e,t,r)=>{var n={"./af":55015,"./af.js":55015,"./ar":51782,"./ar-dz":10200,"./ar-dz.js":10200,"./ar-kw":68595,"./ar-kw.js":68595,"./ar-ly":87441,"./ar-ly.js":87441,"./ar-ma":42438,"./ar-ma.js":42438,"./ar-sa":56056,"./ar-sa.js":56056,"./ar-tn":77690,"./ar-tn.js":77690,"./ar.js":51782,"./az":57682,"./az.js":57682,"./be":5970,"./be.js":5970,"./bg":11024,"./bg.js":11024,"./bm":97163,"./bm.js":97163,"./bn":76,"./bn-bd":87303,"./bn-bd.js":87303,"./bn.js":76,"./bo":25315,"./bo.js":25315,"./br":63270,"./br.js":63270,"./bs":150,"./bs.js":150,"./ca":91181,"./ca.js":91181,"./cs":24984,"./cs.js":24984,"./cv":38788,"./cv.js":38788,"./cy":92282,"./cy.js":92282,"./da":55838,"./da.js":55838,"./de":68609,"./de-at":55664,"./de-at.js":55664,"./de-ch":15459,"./de-ch.js":15459,"./de.js":68609,"./dv":49138,"./dv.js":49138,"./el":25748,"./el.js":25748,"./en-au":11109,"./en-au.js":11109,"./en-ca":59217,"./en-ca.js":59217,"./en-gb":52378,"./en-gb.js":52378,"./en-ie":31080,"./en-ie.js":31080,"./en-il":12580,"./en-il.js":12580,"./en-in":63987,"./en-in.js":63987,"./en-nz":98238,"./en-nz.js":98238,"./en-sg":53726,"./en-sg.js":53726,"./eo":906,"./eo.js":906,"./es":1859,"./es-do":28095,"./es-do.js":28095,"./es-mx":64023,"./es-mx.js":64023,"./es-us":14092,"./es-us.js":14092,"./es.js":1859,"./et":78e3,"./et.js":78e3,"./eu":42193,"./eu.js":42193,"./fa":61651,"./fa.js":61651,"./fi":69649,"./fi.js":69649,"./fil":98258,"./fil.js":98258,"./fo":4662,"./fo.js":4662,"./fr":70217,"./fr-ca":84221,"./fr-ca.js":84221,"./fr-ch":57633,"./fr-ch.js":57633,"./fr.js":70217,"./fy":71067,"./fy.js":71067,"./ga":67289,"./ga.js":67289,"./gd":81993,"./gd.js":81993,"./gl":83927,"./gl.js":83927,"./gom-deva":49733,"./gom-deva.js":49733,"./gom-latn":6210,"./gom-latn.js":6210,"./gu":92719,"./gu.js":92719,"./he":57466,"./he.js":57466,"./hi":84091,"./hi.js":84091,"./hr":27e3,"./hr.js":27e3,"./hu":13049,"./hu.js":13049,"./hy-am":67891,"./hy-am.js":67891,"./id":37349,"./id.js":37349,"./is":89883,"./is.js":89883,"./it":23721,"./it-ch":33265,"./it-ch.js":33265,"./it.js":23721,"./ja":11819,"./ja.js":11819,"./jv":61811,"./jv.js":61811,"./ka":12263,"./ka.js":12263,"./kk":47353,"./kk.js":47353,"./km":80505,"./km.js":80505,"./kn":71100,"./kn.js":71100,"./ko":15707,"./ko.js":15707,"./ku":20514,"./ku.js":20514,"./ky":43359,"./ky.js":43359,"./lb":74084,"./lb.js":74084,"./lo":47470,"./lo.js":47470,"./lt":52973,"./lt.js":52973,"./lv":59087,"./lv.js":59087,"./me":17902,"./me.js":17902,"./mi":95034,"./mi.js":95034,"./mk":94982,"./mk.js":94982,"./ml":50705,"./ml.js":50705,"./mn":44290,"./mn.js":44290,"./mr":74352,"./mr.js":74352,"./ms":98149,"./ms-my":91717,"./ms-my.js":91717,"./ms.js":98149,"./mt":54008,"./mt.js":54008,"./my":66628,"./my.js":66628,"./nb":81890,"./nb.js":81890,"./ne":49498,"./ne.js":49498,"./nl":60233,"./nl-be":14138,"./nl-be.js":14138,"./nl.js":60233,"./nn":24848,"./nn.js":24848,"./oc-lnc":72914,"./oc-lnc.js":72914,"./pa-in":79269,"./pa-in.js":79269,"./pl":98956,"./pl.js":98956,"./pt":33569,"./pt-br":59574,"./pt-br.js":59574,"./pt.js":33569,"./ro":74664,"./ro.js":74664,"./ru":9490,"./ru.js":9490,"./sd":1931,"./sd.js":1931,"./se":24665,"./se.js":24665,"./si":19710,"./si.js":19710,"./sk":40334,"./sk.js":40334,"./sl":59835,"./sl.js":59835,"./sq":27768,"./sq.js":27768,"./sr":55190,"./sr-cyrl":61196,"./sr-cyrl.js":61196,"./sr.js":55190,"./ss":26847,"./ss.js":26847,"./sv":28280,"./sv.js":28280,"./sw":65119,"./sw.js":65119,"./ta":90408,"./ta.js":90408,"./te":20318,"./te.js":20318,"./tet":52582,"./tet.js":52582,"./tg":40649,"./tg.js":40649,"./th":18235,"./th.js":18235,"./tk":80325,"./tk.js":80325,"./tl-ph":56099,"./tl-ph.js":56099,"./tlh":24446,"./tlh.js":24446,"./tr":72401,"./tr.js":72401,"./tzl":82114,"./tzl.js":82114,"./tzm":8956,"./tzm-latn":46105,"./tzm-latn.js":46105,"./tzm.js":8956,"./ug-cn":70460,"./ug-cn.js":70460,"./uk":42242,"./uk.js":42242,"./ur":55371,"./ur.js":55371,"./uz":11910,"./uz-latn":95985,"./uz-latn.js":95985,"./uz.js":11910,"./vi":84250,"./vi.js":84250,"./x-pseudo":69651,"./x-pseudo.js":69651,"./yo":69813,"./yo.js":69813,"./zh-cn":26844,"./zh-cn.js":26844,"./zh-hk":72416,"./zh-hk.js":72416,"./zh-mo":76598,"./zh-mo.js":76598,"./zh-tw":88292,"./zh-tw.js":88292};function s(e){var t=o(e);return r(t)}function o(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}s.keys=function(){return Object.keys(n)},s.resolve=o,e.exports=s,s.id=95126},91705:function(e,t,r){
978
978
  /*!
979
979
  * Pikaday