file-viewer-demo/public/file-viewer3/assets/XlsxTable-23e08fb8.js

219 lines
1.3 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{c as UC,d as G0,m as Uz,a as ec,b as tc,e as zz,r as Ml,f as Yz,w as Gz,o as Kz,h as Xz,i as qz,j as Zz,k as Cp,l as Qz,u as Jz,F as eY,n as tY,p as rY,q as nY,s as oY,t as iY,v as aY,_ as lY}from"./index-0fd2d185.js";import{r as sY}from"./worker-ref-fadf3283.js";import{c as Pv}from"./_commonjs-dynamic-modules-302442b1.js";const uY=""+new URL("xlsx-08add3c8.png",import.meta.url).href,fY=""+new URL("loading-43b144a3.gif",import.meta.url).href;var kv=function(e){return e&&e.Math==Math&&e},St=kv(typeof globalThis=="object"&&globalThis)||kv(typeof window=="object"&&window)||kv(typeof self=="object"&&self)||kv(typeof UC=="object"&&UC)||function(){return this}()||Function("return this")(),Hn={},Fe=function(e){try{return!!e()}catch{return!0}},cY=Fe,Ut=!cY(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),hY=Fe,Md=!hY(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),dY=Md,$v=Function.prototype.call,Xt=dY?$v.bind($v):function(){return $v.apply($v,arguments)},xd={},$L={}.propertyIsEnumerable,AL=Object.getOwnPropertyDescriptor,vY=AL&&!$L.call({1:2},1);xd.f=vY?function(t){var r=AL(this,t);return!!r&&r.enumerable}:$L;var Dd=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},IL=Md,ML=Function.prototype,zC=ML.call,yY=IL&&ML.bind.bind(zC,zC),Ye=IL?yY:function(e){return function(){return zC.apply(e,arguments)}},xL=Ye,pY=xL({}.toString),gY=xL("".slice),Ln=function(e){return gY(pY(e),8,-1)},mY=Ye,bY=Fe,wY=Ln,pw=Object,SY=mY("".split),Nd=bY(function(){return!pw("z").propertyIsEnumerable(0)})?function(e){return wY(e)=="String"?SY(e,""):pw(e)}:pw,mn=function(e){return e==null},CY=mn,_Y=TypeError,Tr=function(e){if(CY(e))throw _Y("Can't call method on "+e);return e},OY=Nd,RY=Tr,Fr=function(e){return OY(RY(e))},YC=typeof document=="object"&&document.all,EY=typeof YC>"u"&&YC!==void 0,DL={all:YC,IS_HTMLDDA:EY},NL=DL,TY=NL.all,Ot=NL.IS_HTMLDDA?function(e){return typeof e=="function"||e===TY}:function(e){return typeof e=="function"},jP=Ot,HL=DL,PY=HL.all,zt=HL.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:jP(e)||e===PY}:function(e){return typeof e=="object"?e!==null:jP(e)},gw=St,kY=Ot,$Y=function(e){return kY(e)?e:void 0},Do=function(e,t){return arguments.length<2?$Y(gw[e]):gw[e]&&gw[e][t]},AY=Ye,Oi=AY({}.isPrototypeOf),ja=typeof navigator<"u"&&String(navigator.userAgent)||"",LL=St,mw=ja,BP=LL.process,FP=LL.Deno,VP=BP&&BP.versions||FP&&FP.version,WP=VP&&VP.v8,sn,_p;WP&&(sn=WP.split("."),_p=sn[0]>0&&sn[0]<4?1:+(sn[0]+sn[1]));!_p&&mw&&(sn=mw.match(/Edge\/(\d+)/),(!sn||sn[1]>=74)&&(sn=mw.match(/Chrome\/(\d+)/),sn&&(_p=+sn[1])));var Hd=_p,UP=Hd,IY=Fe,uf=!!Object.getOwnPropertySymbols&&!IY(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&UP&&UP<41}),MY=uf,jL=MY&&!Symbol.sham&&typeof Symbol.iterator=="symbol",xY=Do,DY=Ot,NY=Oi,HY=jL,LY=Object,Ld=HY?function(e){return typeof e=="symbol"}:function(e){var t=xY("Symbol");return DY(t)&&NY(t.prototype,LY(e))},jY=String,ff=function(e){try{return jY(e)}catch{return"Object"}},BY=Ot,FY=ff,VY=TypeError,Ba=function(e){if(BY(e))return e;throw VY(FY(e)+" is not a function")},WY=Ba,UY=mn,Fa=function(e,t){var r=e[t];return UY(r)?void 0:WY(r)},bw=Xt,ww=Ot,Sw=zt,zY=TypeError,BL=function(e,t){var r,n;if(t==="string"&&ww(r=e.toString)&&!Sw(n=bw(r,e))||ww(r=e.valueOf)&&!Sw(n=bw(r,e))||t!=="string"&&ww(r=e.toString)&&!Sw(n=bw(r,e)))return n;throw zY("Can't convert object to primitive value")},mi={},YY={get exports(){return mi},set exports(e){mi=e}},GY=!1,zP=St,KY=Object.defineProperty,K0=function(e,t){try{KY(zP,e,{value:t,configurable:!0,writable:!0})}catch{zP[e]=t}return t},XY=St,qY=K0,YP="__core-js_shared__",ZY=XY[YP]||qY(YP,{}),X0=ZY,GP=X0;(YY.exports=function(e,t){return GP[e]||(GP[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.29.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE",source:"https://github.com/zloirock/core-js"});var QY=Tr,JY=Object,Pr=function(e){return JY(QY(e))},eG=Ye,tG=Pr,rG=eG({}.hasOwnProperty),xt=Object.hasOwn||function(t,r){return rG(tG(t),r)},nG=Ye,oG=0,iG=Math.random(),aG=nG(1 .toString),Bg=function(e){return"Symbol("+(e===void 0?"":e)+")_"+aG(++oG+iG,36)},lG=St,sG=mi,KP=xt,uG=Bg,fG=uf,cG=jL,xl=lG.Symbol,Cw=sG("wks"),hG=cG?xl.for||xl:xl&&xl.withoutSetter||uG,Ct=function(e){return KP(Cw,e)||(Cw[e]=fG&&KP(xl,e)?xl[e]:hG("Symbol."+e)),Cw[e]},dG=Xt,XP=zt,qP=Ld,vG=Fa,yG=BL,pG=Ct,gG=TypeError,mG=pG("toPrimitive"),FL=function(e,t){if(!XP(e)||qP(e))return e;var r=vG(e,mG),n;if(r){if(t===void 0&&(t="default"),n=dG(r,e,t),!XP(n)||qP(n))return n;throw gG("Can't convert object to primitive value")}return t===void 0&&(t="number"),yG(e,t)},bG=FL,wG=Ld,Fg=function(e){var t=bG(e,"string");return wG(t)?t:t+""},SG=St,ZP=zt,GC=SG.document,CG=ZP(GC)&&ZP(GC.createElement),Vg=function(e){return CG?GC.createElement(e):{}},_G=Ut,OG=Fe,RG=Vg,VL=!_G&&!OG(function(){return Object.defineProperty(RG("div"),"a",{get:function(){return 7}}).a!=7}),EG=Ut,TG=Xt,PG=xd,kG=Dd,$G=Fr,AG=Fg,IG=xt,MG=VL,QP=Object.getOwnPropertyDescriptor;Hn.f=EG?QP:function(t,r){if(t=$G(t),r=AG(r),MG)try{return QP(t,r)}catch{}if(IG(t,r))return kG(!TG(PG.f,t,r),t[r])};var mr={},xG=Ut,DG=Fe,WL=xG&&DG(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),NG=zt,HG=String,LG=TypeError,Ht=function(e){if(NG(e))return e;throw LG(HG(e)+" is not an object")},jG=Ut,BG=VL,FG=WL,Av=Ht,JP=Fg,VG=TypeError,_w=Object.defineProperty,WG=Object.getOwnPropertyDescriptor,Ow="enumerable",Rw="configurable",Ew="writable";mr.f=jG?FG?function(t,r,n){if(Av(t),r=JP(r),Av(n),typeof t=="function"&&r==="prototype"&&"value"in n&&Ew in n&&!n[Ew]){var o=WG(t,r);o&&o[Ew]&&(t[r]=n.value,n={configurable:Rw in n?n[Rw]:o[Rw],enumerable:Ow in n?n[Ow]:o[Ow],writable:!1})}return _w(t,r,n)}:_w:function(t,r,n){if(Av(t),r=JP(r),Av(n),BG)try{return _w(t,r,n)}catch{}if("get"in n||"set"in n)throw VG("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var UG=Ut,zG=mr,YG=Dd,Va=UG?function(e,t,r){return zG.f(e,t,YG(1,r))}:function(e,t,r){return e[t]=r,e},Op={},GG={get exports(){return Op},set exports(e){Op=e}},KC=Ut,KG=xt,UL=Function.prototype,XG=KC&&Object.getOwnPropertyDescriptor,q0=KG(UL,"name"),qG=q0&&function(){}.name==="something",ZG=q0&&(!KC||KC&&XG(UL,"name").configurable),jd={EXISTS:q0,PROPER:qG,CONFIGURABLE:ZG},QG=Ye,JG=Ot,XC=X0,e3=QG(Function.toString);JG(XC.inspectSource)||(XC.inspectSource=function(e){return e3(e)});var zL=XC.inspectSource,t3=St,r3=Ot,ek=t3.WeakMap,YL=r3(ek)&&/native code/.test(String(ek)),n3=mi,o3=Bg,tk=n3("keys"),Wg=function(e){return tk[e]||(tk[e]=o3(e))},Bd={},i3=YL,GL=St,a3=zt,l3=Va,Tw=xt,Pw=X0,s3=Wg,u3=Bd,rk="Object already initialized",qC=GL.TypeError,f3=GL.WeakMap,Rp,Ec,Ep,c3=function(e){return Ep(e)?Ec(e):Rp(e,{})},h3=function(e){return function(t){var r;if(!a3(t)||(r=Ec(t)).type!==e)throw qC("Incompatible receiver, "+e+" required");return r}};if(i3||Pw.state){var wn=Pw.state||(Pw.state=new f3);wn.get=wn.get,wn.has=wn.has,wn.set=wn.set,Rp=function(e,t){if(wn.has(e))throw qC(rk);return t.facade=e,wn.set(e,t),t},Ec=function(e){return wn.get(e)||{}},Ep=function(e){return wn.has(e)}}else{var Ja=s3("state");u3[Ja]=!0,Rp=function(e,t){if(Tw(e,Ja))throw qC(rk);return t.facade=e,l3(e,Ja,t),t},Ec=function(e){return Tw(e,Ja)?e[Ja]:{}},Ep=function(e){return Tw(e,Ja)}}var No={set:Rp,get:Ec,has:Ep,enforce:c3,getterFor:h3},Z0=Ye,d3=Fe,v3=Ot,Iv=xt,ZC=Ut,y3=jd.CONFIGURABLE,p3=zL,KL=No,g3=KL.enforce,m3=KL.get,nk=String,My=Object.defineProperty,b3=Z0("".slice),w3=Z0("".replace),S3=Z0([].join),C3=ZC&&!d3(function(){return My(function(){},"length",{value:8}).length!==8}),_3=String(String).split("String"),O3=GG.exports=function(e,t,r){b3(nk(t),0,7)==="Symbol("&&(t="["+w3(nk(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Iv(e,"name")||y3&&e.name!==t)&&(ZC?My(e,"name",{value:t,configurable:!0}):e.name=t),C3&&r&&Iv(r,"arity")&&e.length!==r.arity&&My(e,"length",{value:r.arity});try{r&&Iv(r,"constructor")&&r.constructor?ZC&&My(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var n=g3(e);return Iv(n,"source")||(n.source=S3(_3,typeof t=="string"?t:"")),e};Function.prototype.toString=O3(function(){return v3(this)&&m3(this).source||p3(this)},"toString");var R3=Ot,E3=mr,T3=Op,P3=K0,qr=function(e,t,r,n){n||(n={});var o=n.enumerable,i=n.name!==void 0?n.name:t;if(R3(r)&&T3(r,i,n),n.global)o?e[t]=r:P3(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch{}o?e[t]=r:E3.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Wa={},k3=Math.ceil,$3=Math.floor,A3=Math.trunc||function(t){var r=+t;return(r>0?$3:k3)(r)},I3=A3,Ri=function(e){var t=+e;return t!==t||t===0?0:I3(t)},M3=Ri,x3=Math.max,D3=Math.min,Fd=function(e,t){var r=M3(e);return r<0?x3(r+t,0):D3(r,t)},N3=Ri,H3=Math.min,Ua=function(e){return e>0?H3(N3(e),9007199254740991):0},L3=Ua,Zr=function(e){return L3(e.length)},j3=Fr,B3=Fd,F3=Zr,ok=function(e){return function(t,r,n){var o=j3(t),i=F3(o),a=B3(n,i),l;if(e&&r!=r){for(;i>a;)if(l=o[a++],l!=l)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===r)return e||a||0;return!e&&-1}},Q0={includes:ok(!0),indexOf:ok(!1)},V3=Ye,kw=xt,W3=Fr,U3=Q0.indexOf,z3=Bd,ik=V3([].push),XL=function(e,t){var r=W3(e),n=0,o=[],i;for(i in r)!kw(z3,i)&&kw(r,i)&&ik(o,i);for(;t.length>n;)kw(r,i=t[n++])&&(~U3(o,i)||ik(o,i));return o},J0=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Y3=XL,G3=J0,K3=G3.concat("length","prototype");Wa.f=Object.getOwnPropertyNames||function(t){return Y3(t,K3)};var Vd={};Vd.f=Object.getOwnPropertySymbols;var X3=Do,q3=Ye,Z3=Wa,Q3=Vd,J3=Ht,eK=q3([].concat),qL=X3("Reflect","ownKeys")||function(t){var r=Z3.f(J3(t)),n=Q3.f;return n?eK(r,n(t)):r},ak=xt,tK=qL,rK=Hn,nK=mr,ZL=function(e,t,r){for(var n=tK(t),o=nK.f,i=rK.f,a=0;a<n.length;a++){var l=n[a];!ak(e,l)&&!(r&&ak(r,l))&&o(e,l,i(t,l))}},oK=Fe,iK=Ot,aK=/#|\.prototype\./,Wd=function(e,t){var r=sK[lK(e)];return r==fK?!0:r==uK?!1:iK(t)?oK(t):!!t},lK=Wd.normalize=function(e){return String(e).replace(aK,".").toLowerCase()},sK=Wd.data={},uK=Wd.NATIVE="N",fK=Wd.POLYFILL="P",Ug=Wd,$w=St,cK=Hn.f,hK=Va,dK=qr,vK=K0,yK=ZL,pK=Ug,xe=function(e,t){var r=e.target,n=e.global,o=e.stat,i,a,l,s,u,f;if(n?a=$w:o?a=$w[r]||vK(r,{}):a=($w[r]||{}).prototype,a)for(l in t){if(u=t[l],e.dontCallGetSet?(f=cK(a,l),s=f&&f.value):s=a[l],i=pK(n?l:r+(o?".":"#")+l,e.forced),!i&&s!==void 0){if(typeof u==typeof s)continue;yK(u,s)}(e.sham||s&&s.sham)&&hK(u,"sham",!0),dK(a,l,u,e)}},gK=Ct,mK=gK("toStringTag"),QL={};QL[mK]="z";var eE=String(QL)==="[object z]",bK=eE,wK=Ot,xy=Ln,SK=Ct,CK=SK("toStringTag"),_K=Object,OK=xy(function(){return arguments}())=="Arguments",RK=function(e,t){try{return e[t]}catch{}},zg=bK?xy:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=RK(t=_K(e),CK))=="string"?r:OK?xy(t):(n=xy(t))=="Object"&&wK(t.callee)?"Arguments":n},EK=zg,TK=String,Yt=function(e){if(EK(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return TK(e)},tE={},PK=XL,kK=J0,Ud=Object.keys||function(t){return PK(t,kK)},$K=Ut,AK=WL,IK=mr,MK=Ht,xK=Fr,DK=Ud;tE.f=$K&&!AK?Object.defineProperties:function(t,r){MK(t);for(var n=xK(r),o=DK(r),i=o.length,a=0,l;i>a;)IK.f(t,l=o[a++],n[l]);return t};var NK=Do,JL=NK("document","documentElement"),HK=Ht,LK=tE,lk=J0,jK=Bd,BK=JL,FK=Vg,VK=Wg,sk=">",uk="<",QC="prototype",JC="script",ej=VK("IE_PROTO"),Aw=function(){},tj=function(e){return uk+JC+sk+e+uk+"/"+JC+sk},fk=function(e){e.write(tj("")),e.close();var t=e.parentWindow.Object;return e=null,t},WK=function(){var e=FK("iframe"),t="java"+JC+":",r;return e.style.display="none",BK.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(tj("document.F=Object")),r.close(),r.F},Mv,Dy=function(){try{Mv=new ActiveXObject("htmlfile")}catch{}Dy=typeof document<"u"?document.domain&&Mv?fk(Mv):WK():fk(Mv);for(var e=lk.length;e--;)delete Dy[QC][lk[e]];return Dy()};jK[ej]=!0;var cf=Object.create||function(t,r){var n;return t!==null?(Aw[QC]=HK(t),n=new Aw,Aw[QC]=null,n[ej]=t):n=Dy(),r===void 0?n:LK.f(n,r)},Yg={},UK=Fg,zK=mr,YK=Dd,hf=function(e,t,r){var n=UK(t);n in e?zK.f(e,n,YK(0,r)):e[n]=r},ck=Fd,GK=Zr,KK=hf,XK=Array,qK=Math.max,rE=function(e,t,r){for(var n=GK(e),o=ck(t,n),i=ck(r===void 0?n:r,n),a=XK(qK(i-o,0)),l=0;o<i;o++,l++)KK(a,l,e[o]);return a.length=l,a},ZK=Ln,QK=Fr,rj=Wa.f,JK=rE,nj=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],e4=function(e){try{return rj(e)}catch{return JK(nj)}};Yg.f=function(t){return nj&&ZK(t)=="Window"?e4(t):rj(QK(t))};var hk=Op,t4=mr,zd=function(e,t,r){return r.get&&hk(r.get,t,{getter:!0}),r.set&&hk(r.set,t,{setter:!0}),t4.f(e,t,r)},nE={},r4=Ct;nE.f=r4;var n4=St,oj=n4,dk=oj,o4=xt,i4=nE,a4=mr.f,oE=function(e){var t=dk.Symbol||(dk.Symbol={});o4(t,e)||a4(t,e,{value:i4.f(e)})},l4=Xt,s4=Do,u4=Ct,f4=qr,ij=function(){var e=s4("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=u4("toPrimitive");t&&!t[n]&&f4(t,n,function(o){return l4(r,this)},{arity:1})},c4=mr.f,h4=xt,d4=Ct,vk=d4("toStringTag"),Gg=function(e,t,r){e&&!r&&(e=e.prototype),e&&!h4(e,vk)&&c4(e,vk,{configurable:!0,value:t})},v4=Ln,y4=Ye,Yd=function(e){if(v4(e)==="Function")return y4(e)},yk=Yd,p4=Ba,g4=Md,m4=yk(yk.bind),Gd=function(e,t){return p4(e),t===void 0?e:g4?m4(e,t):function(){return e.apply(t,arguments)}},b4=Ln,df=Array.isArray||function(t){return b4(t)=="Array"},w4=Ye,S4=Fe,aj=Ot,C4=zg,_4=Do,O4=zL,lj=function(){},R4=[],sj=_4("Reflect","construct"),iE=/^\s*(?:class|function)\b/,E4=w4(iE.exec),T4=!iE.exec(lj),Of=function(t){if(!aj(t))return!1;try{return sj(lj,R4,t),!0}catch{return!1}},uj=function(t){if(!aj(t))return!1;switch(C4(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return T4||!!E4(iE,O4(t))}catch{return!0}};uj.sham=!0;var Kg=!sj||S4(function(){var e;return Of(Of.call)||!Of(Object)||!Of(function(){e=!0})||e})?uj:Of,pk=df,P4=Kg,k4=zt,$4=Ct,A4=$4("species"),gk=Array,I4=function(e){var t;return pk(e)&&(t=e.constructor,P4(t)&&(t===gk||pk(t.prototype))?t=void 0:k4(t)&&(t=t[A4],t===null&&(t=void 0))),t===void 0?gk:t},M4=I4,aE=function(e,t){return new(M4(e))(t===0?0:t)},x4=Gd,D4=Ye,N4=Nd,H4=Pr,L4=Zr,j4=aE,mk=D4([].push),Fo=function(e){var t=e==1,r=e==2,n=e==3,o=e==4,i=e==6,a=e==7,l=e==5||i;return function(s,u,f,c){for(var h=H4(s),d=N4(h),v=x4(u,f),p=L4(d),m=0,w=c||j4,S=t?w(s,p):r||a?w(s,0):void 0,C,P;p>m;m++)if((l||m in d)&&(C=d[m],P=v(C,m,h),e))if(t)S[m]=P;else if(P)switch(e){case 3:return!0;case 5:return C;case 6:return m;case 2:mk(S,C)}else switch(e){case 4:return!1;case 7:mk(S,C)}return i?-1:n||o?o:S}},za={forEach:Fo(0),map:Fo(1),filter:Fo(2),some:Fo(3),every:Fo(4),find:Fo(5),findIndex:Fo(6),filterReject:Fo(7)},Xg=xe,lE=St,sE=Xt,B4=Ye,es=Ut,ts=uf,F4=Fe,tr=xt,V4=Oi,e_=Ht,qg=Fr,uE=Fg,W4=Yt,t_=Dd,Tc=cf,fj=Ud,U4=Wa,cj=Yg,z4=Vd,hj=Hn,dj=mr,Y4=tE,vj=xd,Iw=qr,G4=zd,fE=mi,K4=Wg,yj=Bd,bk=Bg,X4=Ct,q4=nE,Z4=oE,Q4=ij,J4=Gg,pj=No,Zg=za.forEach,Rr=K4("hidden"),Qg="Symbol",Pc="prototype",e6=pj.set,wk=pj.getterFor(Qg),Kr=Object[Pc],Ca=lE.Symbol,rc=Ca&&Ca[Pc],t6=lE.TypeError,Mw=lE.QObject,gj=hj.f,Yi=dj.f,mj=cj.f,r6=vj.f,bj=B4([].push),$o=fE("symbols"),Kd=fE("op-symbols"),n6=fE("wks"),r_=!Mw||!Mw[Pc]||!Mw[Pc].findChild,n_=es&&F4(function(){return Tc(Yi({},"a",{get:function(){return Yi(this,"a",{value:7}).a}})).a!=7})?function(e,t,r){var n=gj(Kr,t);n&&delete Kr[t],Yi(e,t,r),n&&e!==Kr&&Yi(Kr,t,n)}:Yi,xw=function(e,t){var r=$o[e]=Tc(rc);return e6(r,{type:Qg,tag:e,description:t}),es||(r.description=t),r},Jg=function(t,r,n){t===Kr&&Jg(Kd,r,n),e_(t);var o=uE(r);return e_(n),tr($o,o)?(n.enumerable?(tr(t,Rr)&&t[Rr][o]&&(t[Rr][o]=!1),n=Tc(n,{enumerable:t_(0,!1)})):(tr(t,Rr)||Yi(t,Rr,t_(1,{})),t[Rr][o]=!0),n_(t,o,n)):Yi(t,o,n)},cE=function(t,r){e_(t);var n=qg(r),o=fj(n).concat(Cj(n));return Zg(o,function(i){(!es||sE(o_,n,i))&&Jg(t,i,n[i])}),t},o6=function(t,r){return r===void 0?Tc(t):cE(Tc(t),r)},o_=function(t){var r=uE(t),n=sE(r6,this,r);return this===Kr&&tr($o,r)&&!tr(Kd,r)?!1:n||!tr(this,r)||!tr($o,r)||tr(this,Rr)&&this[Rr][r]?n:!0},wj=function(t,r){var n=qg(t),o=uE(r);if(!(n===Kr&&tr($o,o)&&!tr(Kd,o))){var i=gj(n,o);return i&&tr($o,o)&&!(tr(n,Rr)&&n[Rr][o])&&(i.enumerable=!0),i}},Sj=function(t){var r=mj(qg(t)),n=[];return Zg(r,function(o){!tr($o,o)&&!tr(yj,o)&&bj(n,o)}),n},Cj=function(e){var t=e===Kr,r=mj(t?Kd:qg(e)),n=[];return Zg(r,function(o){tr($o,o)&&(!t||tr(Kr,o))&&bj(n,$o[o])}),n};ts||(Ca=function(){if(V4(rc,this))throw t6("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:W4(arguments[0]),r=bk(t),n=function(o){this===Kr&&sE(n,Kd,o),tr(this,Rr)&&tr(this[Rr],r)&&(this[Rr][r]=!1),n_(this,r,t_(1,o))};return es&&r_&&n_(Kr,r,{configurable:!0,set:n}),xw(r,t)},rc=Ca[Pc],Iw(rc,"toString",function(){return wk(this).tag}),Iw(Ca,"withoutSetter",function(e){return xw(bk(e),e)}),vj.f=o_,dj.f=Jg,Y4.f=cE,hj.f=wj,U4.f=cj.f=Sj,z4.f=Cj,q4.f=function(e){return xw(X4(e),e)},es&&(G4(rc,"description",{configurable:!0,get:function(){return wk(this).description}}),Iw(Kr,"propertyIsEnumerable",o_,{unsafe:!0})));Xg({global:!0,constructor:!0,wrap:!0,forced:!ts,sham:!ts},{Symbol:Ca});Zg(fj(n6),function(e){Z4(e)});Xg({target:Qg,stat:!0,forced:!ts},{useSetter:function(){r_=!0},useSimple:function(){r_=!1}});Xg({target:"Object",stat:!0,forced:!ts,sham:!es},{create:o6,defineProperty:Jg,defineProperties:cE,getOwnPropertyDescriptor:wj});Xg({target:"Object",stat:!0,forced:!ts},{getOwnPropertyNames:Sj});Q4();J4(Ca,Qg);yj[Rr]=!0;var i6=uf,_j=i6&&!!Symbol.for&&!!Symbol.keyFor,a6=xe,l6=Do,s6=xt,u6=Yt,Oj=mi,f6=_j,Dw=Oj("string-to-symbol-registry"),c6=Oj("symbol-to-string-registry");a6({target:"Symbol",stat:!0,forced:!f6},{for:function(e){var t=u6(e);if(s6(Dw,t))return Dw[t];var r=l6("Symbol")(t);return Dw[t]=r,c6[r]=t,r}});var h6=xe,d6=xt,v6=Ld,y6=ff,p6=mi,g6=_j,Sk=p6("symbol-to-string-registry");h6({target:"Symbol",stat:!0,forced:!g6},{keyFor:function(t){if(!v6(t))throw TypeError(y6(t)+" is not a symbol");if(d6(Sk,t))return Sk[t]}});var m6=Md,Rj=Function.prototype,Ck=Rj.apply,_k=Rj.call,Ya=typeof Reflect=="object"&&Reflect.apply||(m6?_k.bind(Ck):function(){return _k.apply(Ck,arguments)}),b6=Ye,Xd=b6([].slice),w6=Ye,Ok=df,S6=Ot,Rk=Ln,C6=Yt,Ek=w6([].push),_6=function(e){if(S6(e))return e;if(Ok(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];typeof o=="string"?Ek(r,o):(typeof o=="number"||Rk(o)=="Number"||Rk(o)=="String")&&Ek(r,C6(o))}var i=r.length,a=!0;return function(l,s){if(a)return a=!1,s;if(Ok(this))return s;for(var u=0;u<i;u++)if(r[u]===l)return s}}},O6=xe,Ej=Do,Tj=Ya,R6=Xt,qd=Ye,Pj=Fe,Tk=Ot,Pk=Ld,kj=Xd,E6=_6,T6=uf,P6=String,ri=Ej("JSON","stringify"),xv=qd(/./.exec),kk=qd("".charAt),k6=qd("".charCodeAt),$6=qd("".replace),A6=qd(1 .toString),I6=/[\uD800-\uDFFF]/g,$k=/^[\uD800-\uDBFF]$/,Ak=/^[\uDC00-\uDFFF]$/,Ik=!T6||Pj(function(){var e=Ej("Symbol")();return ri([e])!="[null]"||ri({a:e})!="{}"||ri(Object(e))!="{}"}),Mk=Pj(function(){return ri("\uDF06\uD834")!=='"\\udf06\\ud834"'||ri("\uDEAD")!=='"\\udead"'}),M6=function(e,t){var r=kj(arguments),n=E6(t);if(!(!Tk(n)&&(e===void 0||Pk(e))))return r[1]=function(o,i){if(Tk(n)&&(i=R6(n,this,P6(o),i)),!Pk(i))return i},Tj(ri,null,r)},x6=function(e,t,r){var n=kk(r,t-1),o=kk(r,t+1);return xv($k,e)&&!xv(Ak,o)||xv(Ak,e)&&!xv($k,n)?"\\u"+A6(k6(e,0),16):e};ri&&O6({target:"JSON",stat:!0,arity:3,forced:Ik||Mk},{stringify:function(t,r,n){var o=kj(arguments),i=Tj(Ik?M6:ri,null,o);return Mk&&typeof i=="string"?$6(i,I6,x6):i}});var D6=xe,N6=uf,H6=Fe,$j=Vd,L6=Pr,j6=!N6||H6(function(){$j.f(1)});D6({target:"Object",stat:!0,forced:j6},{getOwnPropertySymbols:function(t){var r=$j.f;return r?r(L6(t)):[]}});var B6=xe,F6=Ut,V6=St,Dv=Ye,W6=xt,U6=Ot,z6=Oi,Y6=Yt,G6=zd,K6=ZL,qn=V6.Symbol,ki=qn&&qn.prototype;if(F6&&U6(qn)&&(!("description"in ki)||qn().description!==void 0)){var xk={},Nv=function(){var t=arguments.length<1||arguments[0]===void 0?void 0:Y6(arguments[0]),r=z6(ki,this)?new qn(t):t===void 0?qn():qn(t);return t===""&&(xk[r]=!0),r};K6(Nv,qn),Nv.prototype=ki,ki.constructor=Nv;var X6=String(qn("test"))=="Symbol(test)",q6=Dv(ki.valueOf),Z6=Dv(ki.toString),Q6=/^Symbol\((.*)\)[^)]+$/,J6=Dv("".replace),e8=Dv("".slice);G6(ki,"description",{configurable:!0,get:function(){var t=q6(this);if(W6(xk,t))return"";var r=Z6(t),n=X6?e8(r,7,-1):J6(r,Q6,"$1");return n===""?void 0:n}}),B6({global:!0,constructor:!0,forced:!0},{Symbol:Nv})}var t8=oE;t8("iterator");var r8=Ut,n8=jd.EXISTS,Aj=Ye,o8=zd,Ij=Function.prototype,i8=Aj(Ij.toString),Mj=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,a8=Aj(Mj.exec),l8="name";r8&&!n8&&o8(Ij,l8,{configurable:!0,get:function(){try{return a8(Mj,i8(this))[1]}catch{return""}}});var s8=Fe,hE=!s8(function(){return Object.isExtensible(Object.preventExtensions({}))}),Ra={},u8={get exports(){return Ra},set exports(e){Ra=e}},f8=Fe,c8=f8(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),h8=Fe,d8=zt,v8=Ln,Dk=c8,Ny=Object.isExtensible,y8=h8(function(){Ny(1)}),p8=y8||Dk?function(t){return!d8(t)||Dk&&v8(t)=="ArrayBuffer"?!1:Ny?Ny(t):!0}:Ny,g8=xe,m8=Ye,b8=Bd,w8=zt,dE=xt,S8=mr.f,Nk=Wa,C8=Yg,vE=p8,_8=Bg,O8=hE,xj=!1,Ao=_8("meta"),R8=0,yE=function(e){S8(e,Ao,{value:{objectID:"O"+R8++,weakData:{}}})},E8=function(e,t){if(!w8(e))return typeof e=="symbol"?e:(typeof e=="string"?"S":"P")+e;if(!dE(e,Ao)){if(!vE(e))return"F";if(!t)return"E";yE(e)}return e[Ao].objectID},T8=function(e,t){if(!dE(e,Ao)){if(!vE(e))return!0;if(!t)return!1;yE(e)}return e[Ao].weakData},P8=function(e){return O8&&xj&&vE(e)&&!dE(e,Ao)&&yE(e),e},k8=function(){$8.enable=function(){},xj=!0;var e=Nk.f,t=m8([].splice),r={};r[Ao]=1,e(r).length&&(Nk.f=function(n){for(var o=e(n),i=0,a=o.length;i<a;i++)if(o[i]===Ao){t(o,i,1);break}return o},g8({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:C8.f}))},$8=u8.exports={enable:k8,fastKey:E8,getWeakData:T8,onFreeze:P8};b8[Ao]=!0;var A8=xe,I8=hE,M8=Fe,x8=zt,D8=Ra.onFreeze,i_=Object.freeze,N8=M8(function(){i_(1)});A8({target:"Object",stat:!0,forced:N8,sham:!I8},{freeze:function(t){return i_&&x8(t)?i_(D8(t)):t}});var H8=Ct,L8=cf,j8=mr.f,a_=H8("unscopables"),l_=Array.prototype;l_[a_]==null&&j8(l_,a_,{configurable:!0,value:L8(null)});var Zd=function(e){l_[a_][e]=!0},Qd={},B8=Fe,Dj=!B8(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),F8=xt,V8=Ot,W8=Pr,U8=Wg,z8=Dj,Hk=U8("IE_PROTO"),s_=Object,Y8=s_.prototype,em=z8?s_.getPrototypeOf:function(e){var t=W8(e);if(F8(t,Hk))return t[Hk];var r=t.constructor;return V8(r)&&t instanceof r?r.prototype:t instanceof s_?Y8:null},G8=Fe,K8=Ot,X8=zt,Lk=em,q8=qr,Z8=Ct,u_=Z8("iterator"),Nj=!1,Ea,Nw,Hw;[].keys&&(Hw=[].keys(),"next"in Hw?(Nw=Lk(Lk(Hw)),Nw!==Object.prototype&&(Ea=Nw)):Nj=!0);var Q8=!X8(Ea)||G8(function(){var e={};return Ea[u_].call(e)!==e});Q8&&(Ea={});K8(Ea[u_])||q8(Ea,u_,function(){return this});var Hj={IteratorPrototype:Ea,BUGGY_SAFARI_ITERATORS:Nj},J8=Hj.IteratorPrototype,e5=cf,t5=Dd,r5=Gg,n5=Qd,o5=function(){return this},i5=function(e,t,r,n){var o=t+" Iterator";return e.prototype=e5(J8,{next:t5(+!n,r)}),r5(e,o,!1),n5[o]=o5,e},a5=Ye,l5=Ba,s5=function(e,t,r){try{return a5(l5(Object.getOwnPropertyDescriptor(e,t)[r]))}catch{}},u5=Ot,f5=String,c5=TypeError,h5=function(e){if(typeof e=="object"||u5(e))return e;throw c5("Can't set "+f5(e)+" as a prototype")},d5=s5,v5=Ht,y5=h5,pE=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,t={},r;try{r=d5(Object.prototype,"__proto__","set"),r(t,[]),e=t instanceof Array}catch{}return function(o,i){return v5(o),y5(i),e?r(o,i):o.__proto__=i,o}}():void 0),p5=xe,g5=Xt,Lj=jd,m5=Ot,b5=i5,jk=em,Bk=pE,w5=Gg,S5=Va,Lw=qr,C5=Ct,_5=Qd,jj=Hj,O5=Lj.PROPER,R5=Lj.CONFIGURABLE,Fk=jj.IteratorPrototype,Hv=jj.BUGGY_SAFARI_ITERATORS,Rf=C5("iterator"),Vk="keys",Ef="values",Wk="entries",E5=function(){return this},gE=function(e,t,r,n,o,i,a){b5(r,t,n);var l=function(w){if(w===o&&h)return h;if(!Hv&&w in f)return f[w];switch(w){case Vk:return function(){return new r(this,w)};case Ef:return function(){return new r(this,w)};case Wk:return function(){return new r(this,w)}}return function(){return new r(this)}},s=t+" Iterator",u=!1,f=e.prototype,c=f[Rf]||f["@@iterator"]||o&&f[o],h=!Hv&&c||l(o),d=t=="Array"&&f.entries||c,v,p,m;if(d&&(v=jk(d.call(new e)),v!==Object.prototype&&v.next&&(jk(v)!==Fk&&(Bk?Bk(v,Fk):m5(v[Rf])||Lw(v,Rf,E5)),w5(v,s,!0))),O5&&o==Ef&&c&&c.name!==Ef&&(R5?S5(f,"name",Ef):(u=!0,h=function(){return g5(c,this)})),o)if(p={values:l(Ef),keys:i?h:l(Vk),entries:l(Wk)},a)for(m in p)(Hv||u||!(m in f))&&Lw(f,m,p[m]);else p5({target:t,proto:!0,forced:Hv||u},p);return f[Rf]!==h&&Lw(f,Rf,h,{name:o}),_5[t]=h,p},mE=function(e,t){return{value:e,done:t}},T5=Fr,bE=Zd,Uk=Qd,Bj=No,P5=mr.f,k5=gE,Lv=mE,$5=Ut,Fj="Array Iterator",A5=Bj.set,I5=Bj.getterFor(Fj),M5=k5(Array,"Array",function(e,t){A5(this,{type:Fj,target:T5(e),index:0,kind:t})},function(){var e=I5(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,Lv(void 0,!0)):r=="keys"?Lv(n,!1):r=="values"?Lv(t[n],!1):Lv([n,t[n]],!1)},"values"),zk=Uk.Arguments=Uk.Array;bE("keys");bE("values");bE("entries");if($5&&zk.name!=="values")try{P5(zk,"name",{value:"values"})}catch{}var x5=eE,D5=zg,N5=x5?{}.toString:function(){return"[object "+D5(this)+"]"},H5=eE,L5=qr,j5=N5;H5||L5(Object.prototype,"toString",j5,{unsafe:!0});var B5=Ct,F5=Qd,V5=B5("iterator"),W5=Array.prototype,Vj=function(e){return e!==void 0&&(F5.Array===e||W5[V5]===e)},U5=zg,Yk=Fa,z5=mn,Y5=Qd,G5=Ct,K5=G5("iterator"),wE=function(e){if(!z5(e))return Yk(e,K5)||Yk(e,"@@iterator")||Y5[U5(e)]},X5=Xt,q5=Ba,Z5=Ht,Q5=ff,J5=wE,e7=TypeError,Wj=function(e,t){var r=arguments.length<2?J5(e):t;if(q5(r))return Z5(X5(r,e));throw e7(Q5(e)+" is not iterable")},t7=Xt,Gk=Ht,r7=Fa,Uj=function(e,t,r){var n,o;Gk(e);try{if(n=r7(e,"return"),!n){if(t==="throw")throw r;return r}n=t7(n,e)}catch(i){o=!0,n=i}if(t==="throw")throw r;if(o)throw n;return Gk(n),r},n7=Gd,o7=Xt,i7=Ht,a7=ff,l7=Vj,s7=Zr,Kk=Oi,u7=Wj,f7=wE,Xk=Uj,c7=TypeError,Hy=function(e,t){this.stopped=e,this.result=t},qk=Hy.prototype,SE=function(e,t,r){var n=r&&r.that,o=!!(r&&r.AS_ENTRIES),i=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),l=!!(r&&r.INTERRUPTED),s=n7(t,n),u,f,c,h,d,v,p,m=function(S){return u&&Xk(u,"normal",S),new Hy(!0,S)},w=function(S){return o?(i7(S),l?s(S[0],S[1],m):s(S[0],S[1])):l?s(S,m):s(S)};if(i)u=e.iterator;else if(a)u=e;else{if(f=f7(e),!f)throw c7(a7(e)+" is not iterable");if(l7(f)){for(c=0,h=s7(e);h>c;c++)if(d=w(e[c]),d&&Kk(qk,d))return d;return new Hy(!1)}u=u7(e,f)}for(v=i?e.next:u.next;!(p=o7(v,u)).done;){try{d=w(p.value)}catch(S){Xk(u,"throw",S)}if(typeof d=="object"&&d&&Kk(qk,d))return d}return new Hy(!1)},h7=Oi,d7=TypeError,CE=function(e,t){if(h7(t,e))return e;throw d7("Incorrect invocation")},v7=Ct,zj=v7("iterator"),Yj=!1;try{var y7=0,Zk={next:function(){return{done:!!y7++}},return:function(){Yj=!0}};Zk[zj]=function(){return this},Array.from(Zk,function(){throw 2})}catch{}var Gj=function(e,t){if(!t&&!Yj)return!1;var r=!1;try{var n={};n[zj]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},p7=Ot,g7=zt,Qk=pE,_E=function(e,t,r){var n,o;return Qk&&p7(n=t.constructor)&&n!==r&&g7(o=n.prototype)&&o!==r.prototype&&Qk(e,o),e},m7=xe,b7=St,w7=Ye,Jk=Ug,S7=qr,C7=Ra,_7=SE,O7=CE,R7=Ot,E7=mn,jw=zt,Bw=Fe,T7=Gj,P7=Gg,k7=_E,tm=function(e,t,r){var n=e.indexOf("Map")!==-1,o=e.indexOf("Weak")!==-1,i=n?"set":"add",a=b7[e],l=a&&a.prototype,s=a,u={},f=function(w){var S=w7(l[w]);S7(l,w,w=="add"?function(P){return S(this,P===0?0:P),this}:w=="delete"?function(C){return o&&!jw(C)?!1:S(this,C===0?0:C)}:w=="get"?function(P){return o&&!jw(P)?void 0:S(this,P===0?0:P)}:w=="has"?function(P){return o&&!jw(P)?!1:S(this,P===0?0:P)}:function(P,R){return S(this,P===0?0:P,R),this})},c=Jk(e,!R7(a)||!(o||l.forEach&&!Bw(function(){new a().entries().next()})));if(c)s=r.getConstructor(t,e,n,i),C7.enable();else if(Jk(e,!0)){var h=new s,d=h[i](o?{}:-0,1)!=h,v=Bw(function(){h.has(1)}),p=T7(function(w){new a(w)}),m=!o&&Bw(function(){for(var w=new a,S=5;S--;)w[i](S,S);return!w.has(-0)});p||(s=t(function(w,S){O7(w,l);var C=k7(new a,w,s);return E7(S)||_7(S,C[i],{that:C,AS_ENTRIES:n}),C}),s.prototype=l,l.constructor=s),(v||m)&&(f("delete"),f("has"),n&&f("get")),(m||d)&&f(i),o&&l.clear&&delete l.clear}return u[e]=s,m7({global:!0,constructor:!0,forced:s!=a},u),P7(s,e),o||r.setStrong(s,e,n),s},$7=qr,OE=function(e,t,r){for(var n in t)$7(e,n,t[n],r);return e},A7=Do,I7=zd,M7=Ct,x7=Ut,e$=M7("species"),Kj=function(e){var t=A7(e);x7&&t&&!t[e$]&&I7(t,e$,{configurable:!0,get:function(){return this}})},D7=cf,N7=zd,t$=OE,H7=Gd,L7=CE,j7=mn,B7=SE,F7=gE,jv=mE,V7=Kj,Tf=Ut,r$=Ra.fastKey,Xj=No,n$=Xj.set,Fw=Xj.getterFor,qj={getConstructor:function(e,t,r,n){var o=e(function(u,f){L7(u,i),n$(u,{type:t,index:D7(null),first:void 0,last:void 0,size:0}),Tf||(u.size=0),j7(f)||B7(f,u[n],{that:u,AS_ENTRIES:r})}),i=o.prototype,a=Fw(t),l=function(u,f,c){var h=a(u),d=s(u,f),v,p;return d?d.value=c:(h.last=d={index:p=r$(f,!0),key:f,value:c,previous:v=h.last,next:void 0,removed:!1},h.first||(h.first=d),v&&(v.next=d),Tf?h.size++:u.size++,p!=="F"&&(h.index[p]=d)),u},s=function(u,f){var c=a(u),h=r$(f),d;if(h!=="F")return c.index[h];for(d=c.first;d;d=d.next)if(d.key==f)return d};return t$(i,{clear:function(){for(var f=this,c=a(f),h=c.index,d=c.first;d;)d.removed=!0,d.previous&&(d.previous=d.previous.next=void 0),delete h[d.index],d=d.next;c.first=c.last=void 0,Tf?c.size=0:f.size=0},delete:function(u){var f=this,c=a(f),h=s(f,u);if(h){var d=h.next,v=h.previous;delete c.index[h.index],h.removed=!0,v&&(v.next=d),d&&(d.previous=v),c.first==h&&(c.first=d),c.last==h&&(c.last=v),Tf?c.size--:f.size--}return!!h},forEach:function(f){for(var c=a(this),h=H7(f,arguments.length>1?arguments[1]:void 0),d;d=d?d.next:c.first;)for(h(d.value,d.key,this);d&&d.removed;)d=d.previous},has:function(f){return!!s(this,f)}}),t$(i,r?{get:function(f){var c=s(this,f);return c&&c.value},set:function(f,c){return l(this,f===0?0:f,c)}}:{add:function(f){return l(this,f=f===0?0:f,f)}}),Tf&&N7(i,"size",{configurable:!0,get:function(){return a(this).size}}),o},setStrong:function(e,t,r){var n=t+" Iterator",o=Fw(t),i=Fw(n);F7(e,t,function(a,l){n$(this,{type:n,target:a,state:o(a),kind:l,last:void 0})},function(){for(var a=i(this),l=a.kind,s=a.last;s&&s.removed;)s=s.previous;return!a.target||!(a.last=s=s?s.next:a.state.first)?(a.target=void 0,jv(void 0,!0)):l=="keys"?jv(s.key,!1):l=="values"?jv(s.value,!1):jv([s.key,s.value],!1)},r?"entries":"values",!r,!0),V7(t)}},W7=tm,U7=qj;W7("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},U7);var RE=Ye,z7=Ri,Y7=Yt,G7=Tr,K7=RE("".charAt),o$=RE("".charCodeAt),X7=RE("".slice),i$=function(e){return function(t,r){var n=Y7(G7(t)),o=z7(r),i=n.length,a,l;return o<0||o>=i?e?"":void 0:(a=o$(n,o),a<55296||a>56319||o+1===i||(l=o$(n,o+1))<56320||l>57343?e?K7(n,o):a:e?X7(n,o,o+2):(a-55296<<10)+(l-56320)+65536)}},EE={codeAt:i$(!1),charAt:i$(!0)},q7=EE.charAt,Z7=Yt,Zj=No,Q7=gE,a$=mE,Qj="String Iterator",J7=Zj.set,e9=Zj.getterFor(Qj);Q7(String,"String",function(e){J7(this,{type:Qj,string:Z7(e),index:0})},function(){var t=e9(this),r=t.string,n=t.index,o;return n>=r.length?a$(void 0,!0):(o=q7(r,n),t.index+=o.length,a$(o,!1))});var Jj={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},t9=Vg,Vw=t9("span").classList,l$=Vw&&Vw.constructor&&Vw.constructor.prototype,eB=l$===Object.prototype?void 0:l$,s$=St,tB=Jj,r9=eB,nc=M5,Ww=Va,rB=Ct,Uw=rB("iterator"),u$=rB("toStringTag"),zw=nc.values,nB=function(e,t){if(e){if(e[Uw]!==zw)try{Ww(e,Uw,zw)}catch{e[Uw]=zw}if(e[u$]||Ww(e,u$,t),tB[t]){for(var r in nc)if(e[r]!==nc[r])try{Ww(e,r,nc[r])}catch{e[r]=nc[r]}}}};for(var Yw in tB)nB(s$[Yw]&&s$[Yw].prototype,Yw);nB(r9,"DOMTokenList");var n9=xe,o9=Q0.includes,i9=Fe,a9=Zd,l9=i9(function(){return!Array(1).includes()});n9({target:"Array",proto:!0,forced:l9},{includes:function(t){return o9(this,t,arguments.length>1?arguments[1]:void 0)}});a9("includes");var f$=ff,s9=TypeError,oB=function(e,t){if(!delete e[t])throw s9("Cannot delete property "+f$(t)+" of "+f$(e))},c$=rE,u9=Math.floor,f_=function(e,t){var r=e.length,n=u9(r/2);return r<8?f9(e,t):c9(e,f_(c$(e,0,n),t),f_(c$(e,n),t),t)},f9=function(e,t){for(var r=e.length,n=1,o,i;n<r;){for(i=n,o=e[n];i&&t(e[i-1],o)>0;)e[i]=e[--i];i!==n++&&(e[i]=o)}return e},c9=function(e,t,r,n){for(var o=t.length,i=r.length,a=0,l=0;a<o||l<i;)e[a+l]=a<o&&l<i?n(t[a],r[l])<=0?t[a++]:r[l++]:a<o?t[a++]:r[l++];return e},h9=f_,d9=Fe,vf=function(e,t){var r=[][e];return!!r&&d9(function(){r.call(null,t||function(){return 1},1)})},v9=ja,h$=v9.match(/firefox\/(\d+)/i),y9=!!h$&&+h$[1],p9=ja,g9=/MSIE|Trident/.test(p9),m9=ja,d$=m9.match(/AppleWebKit\/(\d+)\./),b9=!!d$&&+d$[1],w9=xe,iB=Ye,S9=Ba,C9=Pr,v$=Zr,_9=oB,y$=Yt,TE=Fe,O9=h9,R9=vf,p$=y9,E9=g9,g$=Hd,m$=b9,Jo=[],b$=iB(Jo.sort),T9=iB(Jo.push),P9=TE(function(){Jo.sort(void 0)}),k9=TE(function(){Jo.sort(null)}),$9=R9("sort"),aB=!TE(function(){if(g$)return g$<70;if(!(p$&&p$>3)){if(E9)return!0;if(m$)return m$<603;var e="",t,r,n,o;for(t=65;t<76;t++){switch(r=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(o=0;o<47;o++)Jo.push({k:r+o,v:n})}for(Jo.sort(function(i,a){return a.v-i.v}),o=0;o<Jo.length;o++)r=Jo[o].k.charAt(0),e.charAt(e.length-1)!==r&&(e+=r);return e!=="DGBEFHACIJK"}}),A9=P9||!k9||!$9||!aB,I9=function(e){return function(t,r){return r===void 0?-1:t===void 0?1:e!==void 0?+e(t,r)||0:y$(t)>y$(r)?1:-1}};w9({target:"Array",proto:!0,forced:A9},{sort:function(t){t!==void 0&&S9(t);var r=C9(this);if(aB)return t===void 0?b$(r):b$(r,t);var n=[],o=v$(r),i,a;for(a=0;a<o;a++)a in r&&T9(n,r[a]);for(O9(n,I9(t)),i=v$(n),a=0;a<i;)r[a]=n[a++];for(;a<o;)_9(r,a++);return r}});var M9=Ut,x9=df,D9=TypeError,N9=Object.getOwnPropertyDescriptor,H9=M9&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),L9=H9?function(e,t){if(x9(e)&&!N9(e,"length").writable)throw D9("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},j9=TypeError,B9=9007199254740991,lB=function(e){if(e>B9)throw j9("Maximum allowed index exceeded");return e},F9=Fe,V9=Ct,W9=Hd,U9=V9("species"),Jd=function(e){return W9>=51||!F9(function(){var t=[],r=t.constructor={};return r[U9]=function(){return{foo:1}},t[e](Boolean).foo!==1})},z9=xe,Y9=Pr,G9=Fd,K9=Ri,X9=Zr,q9=L9,Z9=lB,Q9=aE,J9=hf,Gw=oB,eX=Jd,tX=eX("splice"),rX=Math.max,nX=Math.min;z9({target:"Array",proto:!0,forced:!tX},{splice:function(t,r){var n=Y9(this),o=X9(n),i=G9(t,o),a=arguments.length,l,s,u,f,c,h;for(a===0?l=s=0:a===1?(l=0,s=o-i):(l=a-2,s=nX(rX(K9(r),0),o-i)),Z9(o+l-s),u=Q9(n,s),f=0;f<s;f++)c=i+f,c in n&&J9(u,f,n[c]);if(u.length=s,l<s){for(f=i;f<o-s;f++)c=f+s,h=f+l,c in n?n[h]=n[c]:Gw(n,h);for(f=o;f>o-s+l;f--)Gw(n,f-1)}else if(l>s)for(f=o-s;f>i;f--)c=f+s-1,h=f+l-1,c in n?n[h]=n[c]:Gw(n,h);for(f=0;f<l;f++)n[f+i]=arguments[f+2];return q9(n,o-s+l),u}});var oX=zt,iX=Math.floor,aX=Number.isInteger||function(t){return!oX(t)&&isFinite(t)&&iX(t)===t},lX=xe,sX=aX;lX({target:"Number",stat:!0},{isInteger:sX});var uX=Ye,sB=uX(1 .valueOf),uB=`
\v\f\r    \u2028\u2029\uFEFF`,fX=Ye,cX=Tr,hX=Yt,c_=uB,w$=fX("".replace),dX=RegExp("^["+c_+"]+"),vX=RegExp("(^|[^"+c_+"])["+c_+"]+$"),Kw=function(e){return function(t){var r=hX(cX(t));return e&1&&(r=w$(r,dX,"")),e&2&&(r=w$(r,vX,"$1")),r}},fB={start:Kw(1),end:Kw(2),trim:Kw(3)},yX=xe,cB=GY,pX=Ut,hB=St,dB=oj,vB=Ye,gX=Ug,S$=xt,mX=_E,bX=Oi,wX=Ld,yB=FL,SX=Fe,CX=Wa.f,_X=Hn.f,OX=mr.f,RX=sB,EX=fB.trim,rm="Number",jl=hB[rm];dB[rm];var PE=jl.prototype,TX=hB.TypeError,PX=vB("".slice),Bv=vB("".charCodeAt),kX=function(e){var t=yB(e,"number");return typeof t=="bigint"?t:$X(t)},$X=function(e){var t=yB(e,"number"),r,n,o,i,a,l,s,u;if(wX(t))throw TX("Cannot convert a Symbol value to a number");if(typeof t=="string"&&t.length>2){if(t=EX(t),r=Bv(t,0),r===43||r===45){if(n=Bv(t,2),n===88||n===120)return NaN}else if(r===48){switch(Bv(t,1)){case 66:case 98:o=2,i=49;break;case 79:case 111:o=8,i=55;break;default:return+t}for(a=PX(t,2),l=a.length,s=0;s<l;s++)if(u=Bv(a,s),u<48||u>i)return NaN;return parseInt(a,o)}}return+t},kE=gX(rm,!jl(" 0o1")||!jl("0b1")||jl("+0x1")),AX=function(e){return bX(PE,e)&&SX(function(){RX(e)})},nm=function(t){var r=arguments.length<1?0:jl(kX(t));return AX(this)?mX(Object(r),this,nm):r};nm.prototype=PE;kE&&!cB&&(PE.constructor=nm);yX({global:!0,constructor:!0,wrap:!0,forced:kE},{Number:nm});var IX=function(e,t){for(var r=pX?CX(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),n=0,o;r.length>n;n++)S$(t,o=r[n])&&!S$(e,o)&&OX(e,o,_X(t,o))};(kE||cB)&&IX(dB[rm],jl);var MX=xe,C$=df,xX=Kg,DX=zt,_$=Fd,NX=Zr,HX=Fr,LX=hf,jX=Ct,BX=Jd,FX=Xd,VX=BX("slice"),WX=jX("species"),Xw=Array,UX=Math.max;MX({target:"Array",proto:!0,forced:!VX},{slice:function(t,r){var n=HX(this),o=NX(n),i=_$(t,o),a=_$(r===void 0?o:r,o),l,s,u;if(C$(n)&&(l=n.constructor,xX(l)&&(l===Xw||C$(l.prototype))?l=void 0:DX(l)&&(l=l[WX],l===null&&(l=void 0)),l===Xw||l===void 0))return FX(n,i,a);for(s=new(l===void 0?Xw:l)(UX(a-i,0)),u=0;i<a;i++,u++)i in n&&LX(s,u,n[i]);return s.length=u,s}});var zX=xe,YX=Fe,GX=df,KX=zt,XX=Pr,qX=Zr,O$=lB,R$=hf,ZX=aE,QX=Jd,JX=Ct,eq=Hd,pB=JX("isConcatSpreadable"),tq=eq>=51||!YX(function(){var e=[];return e[pB]=!1,e.concat()[0]!==e}),rq=function(e){if(!KX(e))return!1;var t=e[pB];return t!==void 0?!!t:GX(e)},nq=!tq||!QX("concat");zX({target:"Array",proto:!0,arity:1,forced:nq},{concat:function(t){var r=XX(this),n=ZX(r,0),o=0,i,a,l,s,u;for(i=-1,l=arguments.length;i<l;i++)if(u=i===-1?r:arguments[i],rq(u))for(s=qX(u),O$(o+s),a=0;a<s;a++,o++)a in u&&R$(n,o,u[a]);else O$(o+1),R$(n,o++,u);return n.length=o,n}});var oq=Pr,E$=Fd,iq=Zr,aq=function(t){for(var r=oq(this),n=iq(r),o=arguments.length,i=E$(o>1?arguments[1]:void 0,n),a=o>2?arguments[2]:void 0,l=a===void 0?n:E$(a,n);l>i;)r[i++]=t;return r},lq=xe,sq=aq,uq=Zd;lq({target:"Array",proto:!0},{fill:sq});uq("fill");var fq=xe,cq=za.map,hq=Jd,dq=hq("map");fq({target:"Array",proto:!0,forced:!dq},{map:function(t){return cq(this,t,arguments.length>1?arguments[1]:void 0)}});var vq=Ht,gB=function(){var e=vq(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},$E=Fe,yq=St,AE=yq.RegExp,IE=$E(function(){var e=AE("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),pq=IE||$E(function(){return!AE("a","y").sticky}),gq=IE||$E(function(){var e=AE("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),ME={BROKEN_CARET:gq,MISSED_STICKY:pq,UNSUPPORTED_Y:IE},mq=Fe,bq=St,wq=bq.RegExp,mB=mq(function(){var e=wq(".","s");return!(e.dotAll&&e.exec(`
`)&&e.flags==="s")}),Sq=Fe,Cq=St,_q=Cq.RegExp,bB=Sq(function(){var e=_q("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Dl=Xt,om=Ye,Oq=Yt,Rq=gB,Eq=ME,Tq=mi,Pq=cf,kq=No.get,$q=mB,Aq=bB,Iq=Tq("native-string-replace",String.prototype.replace),Tp=RegExp.prototype.exec,h_=Tp,Mq=om("".charAt),xq=om("".indexOf),Dq=om("".replace),qw=om("".slice),d_=function(){var e=/a/,t=/b*/g;return Dl(Tp,e,"a"),Dl(Tp,t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),wB=Eq.BROKEN_CARET,v_=/()??/.exec("")[1]!==void 0,Nq=d_||v_||wB||$q||Aq;Nq&&(h_=function(t){var r=this,n=kq(r),o=Oq(t),i=n.raw,a,l,s,u,f,c,h;if(i)return i.lastIndex=r.lastIndex,a=Dl(h_,i,o),r.lastIndex=i.lastIndex,a;var d=n.groups,v=wB&&r.sticky,p=Dl(Rq,r),m=r.source,w=0,S=o;if(v&&(p=Dq(p,"y",""),xq(p,"g")===-1&&(p+="g"),S=qw(o,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&Mq(o,r.lastIndex-1)!==`
`)&&(m="(?: "+m+")",S=" "+S,w++),l=new RegExp("^(?:"+m+")",p)),v_&&(l=new RegExp("^"+m+"$(?!\\s)",p)),d_&&(s=r.lastIndex),u=Dl(Tp,v?l:r,S),v?u?(u.input=qw(u.input,w),u[0]=qw(u[0],w),u.index=r.lastIndex,r.lastIndex+=u[0].length):r.lastIndex=0:d_&&u&&(r.lastIndex=r.global?u.index+u[0].length:s),v_&&u&&u.length>1&&Dl(Iq,u[0],l,function(){for(f=1;f<arguments.length-2;f++)arguments[f]===void 0&&(u[f]=void 0)}),u&&d)for(u.groups=c=Pq(null),f=0;f<d.length;f++)h=d[f],c[h[0]]=u[h[1]];return u});var im=h_,Hq=xe,T$=im;Hq({target:"RegExp",proto:!0,forced:/./.exec!==T$},{exec:T$});var P$=Yd,k$=qr,Lq=im,$$=Fe,SB=Ct,jq=Va,Bq=SB("species"),Zw=RegExp.prototype,am=function(e,t,r,n){var o=SB(e),i=!$$(function(){var u={};return u[o]=function(){return 7},""[e](u)!=7}),a=i&&!$$(function(){var u=!1,f=/a/;return e==="split"&&(f={},f.constructor={},f.constructor[Bq]=function(){return f},f.flags="",f[o]=/./[o]),f.exec=function(){return u=!0,null},f[o](""),!u});if(!i||!a||r){var l=P$(/./[o]),s=t(o,""[e],function(u,f,c,h,d){var v=P$(u),p=f.exec;return p===Lq||p===Zw.exec?i&&!d?{done:!0,value:l(f,c,h)}:{done:!0,value:v(c,f,h)}:{done:!1}});k$(String.prototype,e,s[0]),k$(Zw,o,s[1])}n&&jq(Zw[o],"sham",!0)},Fq=EE.charAt,xE=function(e,t,r){return t+(r?Fq(e,t).length:1)},DE=Ye,Vq=Pr,Wq=Math.floor,Qw=DE("".charAt),Uq=DE("".replace),Jw=DE("".slice),zq=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Yq=/\$([$&'`]|\d{1,2})/g,Gq=function(e,t,r,n,o,i){var a=r+e.length,l=n.length,s=Yq;return o!==void 0&&(o=Vq(o),s=zq),Uq(i,s,function(u,f){var c;switch(Qw(f,0)){case"$":return"$";case"&":return e;case"`":return Jw(t,0,r);case"'":return Jw(t,a);case"<":c=o[Jw(f,1,-1)];break;default:var h=+f;if(h===0)return u;if(h>l){var d=Wq(h/10);return d===0?u:d<=l?n[d-1]===void 0?Qw(f,1):n[d-1]+Qw(f,1):u}c=n[h-1]}return c===void 0?"":c})},A$=Xt,Kq=Ht,Xq=Ot,qq=Ln,Zq=im,Qq=TypeError,lm=function(e,t){var r=e.exec;if(Xq(r)){var n=A$(r,e,t);return n!==null&&Kq(n),n}if(qq(e)==="RegExp")return A$(Zq,e,t);throw Qq("RegExp#exec called on incompatible receiver")},Jq=Ya,I$=Xt,sm=Ye,eZ=am,tZ=Fe,rZ=Ht,nZ=Ot,oZ=mn,iZ=Ri,aZ=Ua,el=Yt,lZ=Tr,sZ=xE,uZ=Fa,fZ=Gq,cZ=lm,hZ=Ct,y_=hZ("replace"),dZ=Math.max,vZ=Math.min,yZ=sm([].concat),eS=sm([].push),M$=sm("".indexOf),x$=sm("".slice),pZ=function(e){return e===void 0?e:String(e)},gZ=function(){return"a".replace(/./,"$0")==="$0"}(),D$=function(){return/./[y_]?/./[y_]("a","$0")==="":!1}(),mZ=!tZ(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});eZ("replace",function(e,t,r){var n=D$?"$":"$0";return[function(i,a){var l=lZ(this),s=oZ(i)?void 0:uZ(i,y_);return s?I$(s,i,l,a):I$(t,el(l),i,a)},function(o,i){var a=rZ(this),l=el(o);if(typeof i=="string"&&M$(i,n)===-1&&M$(i,"$<")===-1){var s=r(t,a,l,i);if(s.done)return s.value}var u=nZ(i);u||(i=el(i));var f=a.global;if(f){var c=a.unicode;a.lastIndex=0}for(var h=[];;){var d=cZ(a,l);if(d===null||(eS(h,d),!f))break;var v=el(d[0]);v===""&&(a.lastIndex=sZ(l,aZ(a.lastIndex),c))}for(var p="",m=0,w=0;w<h.length;w++){d=h[w];for(var S=el(d[0]),C=dZ(vZ(iZ(d.index),l.length),0),P=[],R=1;R<d.length;R++)eS(P,pZ(d[R]));var W=d.groups;if(u){var z=yZ([S],P,C,l);W!==void 0&&eS(z,W);var q=el(Jq(i,void 0,z))}else q=fZ(S,l,C,P,W,i);C>=m&&(p+=x$(l,m,C)+q,m=C+S.length)}return p+x$(l,m)}]},!mZ||!gZ||D$);var bZ=Ht,wZ=Uj,SZ=function(e,t,r,n){try{return n?t(bZ(r)[0],r[1]):t(r)}catch(o){wZ(e,"throw",o)}},CZ=Gd,_Z=Xt,OZ=Pr,RZ=SZ,EZ=Vj,TZ=Kg,PZ=Zr,N$=hf,kZ=Wj,$Z=wE,H$=Array,AZ=function(t){var r=OZ(t),n=TZ(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=CZ(i,o>2?arguments[2]:void 0));var l=$Z(r),s=0,u,f,c,h,d,v;if(l&&!(this===H$&&EZ(l)))for(h=kZ(r,l),d=h.next,f=n?new this:[];!(c=_Z(d,h)).done;s++)v=a?RZ(h,i,[c.value,s],!0):c.value,N$(f,s,v);else for(u=PZ(r),f=n?new this(u):H$(u);u>s;s++)v=a?i(r[s],s):r[s],N$(f,s,v);return f.length=s,f},IZ=xe,MZ=AZ,xZ=Gj,DZ=!xZ(function(e){Array.from(e)});IZ({target:"Array",stat:!0,forced:DZ},{from:MZ});var NZ=xe,HZ=Yd,LZ=Q0.indexOf,jZ=vf,p_=HZ([].indexOf),CB=!!p_&&1/p_([1],1,-0)<0,BZ=CB||!jZ("indexOf");NZ({target:"Array",proto:!0,forced:BZ},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return CB?p_(this,t,r)||0:LZ(this,t,r)}});var FZ=xe,VZ=Ye,WZ=df,UZ=VZ([].reverse),L$=[1,2];FZ({target:"Array",proto:!0,forced:String(L$)===String(L$.reverse())},{reverse:function(){return WZ(this)&&(this.length=this.length),UZ(this)}});var zZ=za.forEach,YZ=vf,GZ=YZ("forEach"),KZ=GZ?[].forEach:function(t){return zZ(this,t,arguments.length>1?arguments[1]:void 0)},j$=St,B$=Jj,XZ=eB,tS=KZ,qZ=Va,_B=function(e){if(e&&e.forEach!==tS)try{qZ(e,"forEach",tS)}catch{e.forEach=tS}};for(var rS in B$)B$[rS]&&_B(j$[rS]&&j$[rS].prototype);_B(XZ);var ZZ=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",QZ=TypeError,OB=function(e,t){if(e<t)throw QZ("Not enough arguments");return e},RB=St,JZ=Ya,eQ=Ot,tQ=ZZ,rQ=ja,nQ=Xd,oQ=OB,iQ=RB.Function,aQ=/MSIE .\./.test(rQ)||tQ&&function(){var e=RB.Bun.version.split(".");return e.length<3||e[0]==0&&(e[1]<3||e[1]==3&&e[2]==0)}(),NE=function(e,t){var r=t?2:1;return aQ?function(n,o){var i=oQ(arguments.length,1)>r,a=eQ(n)?n:iQ(n),l=i?nQ(arguments,r):[],s=i?function(){JZ(a,this,l)}:a;return t?e(s,o):e(s)}:e},lQ=xe,EB=St,sQ=NE,F$=sQ(EB.setInterval,!0);lQ({global:!0,bind:!0,forced:EB.setInterval!==F$},{setInterval:F$});var uQ=xe,TB=St,fQ=NE,V$=fQ(TB.setTimeout,!0);uQ({global:!0,bind:!0,forced:TB.setTimeout!==V$},{setTimeout:V$});var cQ=ja,hQ=/(?:ipad|iphone|ipod).*applewebkit/i.test(cQ),dQ=Ln,PB=typeof process<"u"&&dQ(process)=="process",Lr=St,vQ=Ya,yQ=Gd,W$=Ot,pQ=xt,kB=Fe,U$=JL,gQ=Xd,z$=Vg,mQ=OB,bQ=hQ,wQ=PB,g_=Lr.setImmediate,m_=Lr.clearImmediate,SQ=Lr.process,nS=Lr.Dispatch,CQ=Lr.Function,Y$=Lr.MessageChannel,_Q=Lr.String,oS=0,uc={},G$="onreadystatechange",kc,$i,iS,aS;kB(function(){kc=Lr.location});var HE=function(e){if(pQ(uc,e)){var t=uc[e];delete uc[e],t()}},lS=function(e){return function(){HE(e)}},K$=function(e){HE(e.data)},X$=function(e){Lr.postMessage(_Q(e),kc.protocol+"//"+kc.host)};(!g_||!m_)&&(g_=function(t){mQ(arguments.length,1);var r=W$(t)?t:CQ(t),n=gQ(arguments,1);return uc[++oS]=function(){vQ(r,void 0,n)},$i(oS),oS},m_=function(t){delete uc[t]},wQ?$i=function(e){SQ.nextTick(lS(e))}:nS&&nS.now?$i=function(e){nS.now(lS(e))}:Y$&&!bQ?(iS=new Y$,aS=iS.port2,iS.port1.onmessage=K$,$i=yQ(aS.postMessage,aS)):Lr.addEventListener&&W$(Lr.postMessage)&&!Lr.importScripts&&kc&&kc.protocol!=="file:"&&!kB(X$)?($i=X$,Lr.addEventListener("message",K$,!1)):G$ in z$("script")?$i=function(e){U$.appendChild(z$("script"))[G$]=function(){U$.removeChild(this),HE(e)}}:$i=function(e){setTimeout(lS(e),0)});var $B={set:g_,clear:m_},OQ=xe,RQ=St,q$=$B.clear;OQ({global:!0,bind:!0,enumerable:!0,forced:RQ.clearImmediate!==q$},{clearImmediate:q$});var EQ=xe,AB=St,Z$=$B.set,TQ=NE,Q$=AB.setImmediate?TQ(Z$,!1):Z$;EQ({global:!0,bind:!0,enumerable:!0,forced:AB.setImmediate!==Q$},{setImmediate:Q$});var PQ=tm,kQ=qj;PQ("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},kQ);var $Q=xe,AQ=Fe,IQ=Pr,IB=em,MQ=Dj,xQ=AQ(function(){IB(1)});$Q({target:"Object",stat:!0,forced:xQ,sham:!MQ},{getPrototypeOf:function(t){return IB(IQ(t))}});var DQ=zt,NQ=Ln,HQ=Ct,LQ=HQ("match"),LE=function(e){var t;return DQ(e)&&((t=e[LQ])!==void 0?!!t:NQ(e)=="RegExp")},jQ=LE,BQ=TypeError,jE=function(e){if(jQ(e))throw BQ("The method doesn't accept regular expressions");return e},FQ=Ct,VQ=FQ("match"),BE=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[VQ]=!1,"/./"[e](t)}catch{}}return!1},WQ=xe,UQ=Ye,zQ=jE,YQ=Tr,J$=Yt,GQ=BE,KQ=UQ("".indexOf);WQ({target:"String",proto:!0,forced:!GQ("includes")},{includes:function(t){return!!~KQ(J$(YQ(this)),J$(zQ(t)),arguments.length>1?arguments[1]:void 0)}});var XQ=xe,qQ=za.filter,ZQ=Jd,QQ=ZQ("filter");XQ({target:"Array",proto:!0,forced:!QQ},{filter:function(t){return qQ(this,t,arguments.length>1?arguments[1]:void 0)}});var JQ=Xt,eJ=xt,tJ=Oi,rJ=gB,e1=RegExp.prototype,MB=function(e){var t=e.flags;return t===void 0&&!("flags"in e1)&&!eJ(e,"flags")&&tJ(e1,e)?JQ(rJ,e):t},nJ=mr.f,oJ=function(e,t,r){r in e||nJ(e,r,{configurable:!0,get:function(){return t[r]},set:function(n){t[r]=n}})},iJ=Ut,FE=St,ev=Ye,aJ=Ug,lJ=_E,sJ=Va,uJ=Wa.f,t1=Oi,fJ=LE,r1=Yt,cJ=MB,xB=ME,hJ=oJ,dJ=qr,vJ=Fe,yJ=xt,pJ=No.enforce,gJ=Kj,mJ=Ct,DB=mB,NB=bB,bJ=mJ("match"),ni=FE.RegExp,kl=ni.prototype,wJ=FE.SyntaxError,SJ=ev(kl.exec),Pp=ev("".charAt),n1=ev("".replace),o1=ev("".indexOf),CJ=ev("".slice),_J=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,_a=/a/g,sS=/a/g,OJ=new ni(_a)!==_a,HB=xB.MISSED_STICKY,RJ=xB.UNSUPPORTED_Y,EJ=iJ&&(!OJ||HB||DB||NB||vJ(function(){return sS[bJ]=!1,ni(_a)!=_a||ni(sS)==sS||ni(_a,"i")!="/a/i"})),TJ=function(e){for(var t=e.length,r=0,n="",o=!1,i;r<=t;r++){if(i=Pp(e,r),i==="\\"){n+=i+Pp(e,++r);continue}!o&&i==="."?n+="[\\s\\S]":(i==="["?o=!0:i==="]"&&(o=!1),n+=i)}return n},PJ=function(e){for(var t=e.length,r=0,n="",o=[],i={},a=!1,l=!1,s=0,u="",f;r<=t;r++){if(f=Pp(e,r),f==="\\")f=f+Pp(e,++r);else if(f==="]")a=!1;else if(!a)switch(!0){case f==="[":a=!0;break;case f==="(":SJ(_J,CJ(e,r+1))&&(r+=2,l=!0),n+=f,s++;continue;case(f===">"&&l):if(u===""||yJ(i,u))throw new wJ("Invalid capture group name");i[u]=!0,o[o.length]=[u,s],l=!1,u="";continue}l?u+=f:n+=f}return[n,o]};if(aJ("RegExp",EJ)){for(var Ai=function(t,r){var n=t1(kl,this),o=fJ(t),i=r===void 0,a=[],l=t,s,u,f,c,h,d;if(!n&&o&&i&&t.constructor===Ai)return t;if((o||t1(kl,t))&&(t=t.source,i&&(r=cJ(l))),t=t===void 0?"":r1(t),r=r===void 0?"":r1(r),l=t,DB&&"dotAll"in _a&&(u=!!r&&o1(r,"s")>-1,u&&(r=n1(r,/s/g,""))),s=r,HB&&"sticky"in _a&&(f=!!r&&o1(r,"y")>-1,f&&RJ&&(r=n1(r,/y/g,""))),NB&&(c=PJ(t),t=c[0],a=c[1]),h=lJ(ni(t,r),n?this:kl,Ai),(u||f||a.length)&&(d=pJ(h),u&&(d.dotAll=!0,d.raw=Ai(TJ(t),s)),f&&(d.sticky=!0),a.length&&(d.groups=a)),t!==l)try{sJ(h,"source",l===""?"(?:)":l)}catch{}return h},i1=uJ(ni),a1=0;i1.length>a1;)hJ(Ai,ni,i1[a1++]);kl.constructor=Ai,Ai.prototype=kl,dJ(FE,"RegExp",Ai,{constructor:!0})}gJ("RegExp");var kJ=jd.PROPER,$J=qr,AJ=Ht,l1=Yt,IJ=Fe,MJ=MB,VE="toString",xJ=RegExp.prototype,LB=xJ[VE],DJ=IJ(function(){return LB.call({source:"a",flags:"b"})!="/a/b"}),NJ=kJ&&LB.name!=VE;(DJ||NJ)&&$J(RegExp.prototype,VE,function(){var t=AJ(this),r=l1(t.source),n=l1(MJ(t));return"/"+r+"/"+n},{unsafe:!0});var HJ=xe,LJ=Ye,jJ=Nd,BJ=Fr,FJ=vf,VJ=LJ([].join),WJ=jJ!=Object,UJ=WJ||!FJ("join",",");HJ({target:"Array",proto:!0,forced:UJ},{join:function(t){return VJ(BJ(this),t===void 0?",":t)}});var zJ=jd.PROPER,YJ=Fe,s1=uB,u1="…",GJ=function(e){return YJ(function(){return!!s1[e]()||u1[e]()!==u1||zJ&&s1[e].name!==e})},KJ=xe,XJ=fB.trim,qJ=GJ;KJ({target:"String",proto:!0,forced:qJ("trim")},{trim:function(){return XJ(this)}});function b_(e){return b_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b_(e)}function um(e){return window.requestAnimationFrame(e)}function jB(){return!!document.documentElement.classList}function BB(){return!!document.createTextNode("test").textContent}function FB(){return!!window.getComputedStyle}function $c(e){window.cancelAnimationFrame(e)}function WE(){return"ontouchstart"in window}var w_;function ZJ(){var e=document.createElement("TABLE");e.style.borderSpacing="0",e.style.borderWidth="0",e.style.padding="0";var t=document.createElement("TBODY");e.appendChild(t),t.appendChild(document.createElement("TR")),t.firstChild.appendChild(document.createElement("TD")),t.firstChild.firstChild.innerHTML="<tr><td>t<br>t</td></tr>";var r=document.createElement("CAPTION");r.innerHTML="c<br>c<br>c<br>c",r.style.padding="0",r.style.margin="0",e.insertBefore(r,t),document.body.appendChild(e),w_=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}function UE(){return w_===void 0&&ZJ(),w_}var tl;function VB(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return tl||((typeof Intl>"u"?"undefined":b_(Intl))==="object"?tl=new Intl.Collator(e,t).compare:typeof String.prototype.localeCompare=="function"?tl=function(n,o){return"".concat(n).localeCompare(o)}:tl=function(n,o){return n===o?0:n>o?-1:1},tl)}var Pf;function WB(){if(Pf!==void 0)return Pf;try{var e={get passive(){Pf=!0}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{Pf=!1}return Pf}const QJ=Object.freeze(Object.defineProperty({__proto__:null,cancelAnimationFrame:$c,getComparisonFunction:VB,hasCaptionProblem:UE,isClassListSupported:jB,isGetComputedStyleSupported:FB,isPassiveEventSupported:WB,isTextContentSupported:BB,isTouchSupported:WE,requestAnimationFrame:um},Symbol.toStringTag,{value:"Module"}));var JJ=oE,eee=ij;JJ("toPrimitive");eee();var tee=Ht,ree=BL,nee=TypeError,oee=function(e){if(tee(this),e==="string"||e==="default")e="string";else if(e!=="number")throw nee("Incorrect hint");return ree(this,e)},iee=xt,aee=qr,lee=oee,see=Ct,f1=see("toPrimitive"),c1=Date.prototype;iee(c1,f1)||aee(c1,f1,lee);var uee=Kg,fee=ff,cee=TypeError,UB=function(e){if(uee(e))return e;throw cee(fee(e)+" is not a constructor")},h1=Ht,hee=UB,dee=mn,vee=Ct,yee=vee("species"),pee=function(e,t){var r=h1(e).constructor,n;return r===void 0||dee(n=h1(r)[yee])?t:hee(n)},gee=Ya,kf=Xt,zE=Ye,mee=am,bee=Ht,wee=mn,See=LE,d1=Tr,Cee=pee,_ee=xE,Oee=Ua,uS=Yt,Ree=Fa,v1=rE,y1=lm,Eee=im,Tee=ME,Pee=Fe,rl=Tee.UNSUPPORTED_Y,p1=4294967295,kee=Math.min,zB=[].push,$ee=zE(/./.exec),nl=zE(zB),$f=zE("".slice),Aee=!Pee(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return r.length!==2||r[0]!=="a"||r[1]!=="b"});mee("split",function(e,t,r){var n;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?n=function(o,i){var a=uS(d1(this)),l=i===void 0?p1:i>>>0;if(l===0)return[];if(o===void 0)return[a];if(!See(o))return kf(t,a,o,l);for(var s=[],u=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(o.sticky?"y":""),f=0,c=new RegExp(o.source,u+"g"),h,d,v;(h=kf(Eee,c,a))&&(d=c.lastIndex,!(d>f&&(nl(s,$f(a,f,h.index)),h.length>1&&h.index<a.length&&gee(zB,s,v1(h,1)),v=h[0].length,f=d,s.length>=l)));)c.lastIndex===h.index&&c.lastIndex++;return f===a.length?(v||!$ee(c,""))&&nl(s,""):nl(s,$f(a,f)),s.length>l?v1(s,0,l):s}:"0".split(void 0,0).length?n=function(o,i){return o===void 0&&i===0?[]:kf(t,this,o,i)}:n=t,[function(i,a){var l=d1(this),s=wee(i)?void 0:Ree(i,e);return s?kf(s,i,l,a):kf(n,uS(l),i,a)},function(o,i){var a=bee(this),l=uS(o),s=r(n,a,l,i,n!==t);if(s.done)return s.value;var u=Cee(a,RegExp),f=a.unicode,c=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(rl?"g":"y"),h=new u(rl?"^(?:"+a.source+")":a,c),d=i===void 0?p1:i>>>0;if(d===0)return[];if(l.length===0)return y1(h,l)===null?[l]:[];for(var v=0,p=0,m=[];p<l.length;){h.lastIndex=rl?0:p;var w=y1(h,rl?$f(l,p):l),S;if(w===null||(S=kee(Oee(h.lastIndex+(rl?p:0)),l.length))===v)p=_ee(l,p,f);else{if(nl(m,$f(l,v,p)),m.length===d)return m;for(var C=1;C<=w.length-1;C++)if(nl(m,w[C]),m.length===d)return m;p=v=S}}return nl(m,$f(l,v)),m}]},!Aee,rl);function YB(e){for(var t=e.length,r=0;r<t;)e[r]=[e[r]],r+=1}function S_(e,t){for(var r=t.length,n=0;n<r;)e.push(t[n]),n+=1}function fc(e){var t=[];if(!e||e.length===0||!e[0]||e[0].length===0)return t;for(var r=e.length,n=e[0].length,o=0;o<r;o++)for(var i=0;i<n;i++)t[i]||(t[i]=[]),t[i][o]=e[o][i];return t}function Lt(e,t,r,n){var o=-1,i=e,a=r;Array.isArray(e)||(i=Array.from(e));var l=i.length;for(n&&l&&(o+=1,a=i[o]),o+=1;o<l;)a=t(a,i[o],o,i),o+=1;return a}function jr(e,t){var r=0,n=e;Array.isArray(e)||(n=Array.from(e));for(var o=n.length,i=[],a=-1;r<o;){var l=n[r];t(l,r,n)&&(a+=1,i[a]=l),r+=1}return i}function We(e,t){var r=0,n=e;Array.isArray(e)||(n=Array.from(e));for(var o=n.length,i=[],a=-1;r<o;){var l=n[r];a+=1,i[a]=t(l,r,n),r+=1}return i}function $(e,t){var r=0,n=e;Array.isArray(e)||(n=Array.from(e));for(var o=n.length;r<o&&t(n[r],r,n)!==!1;)r+=1;return e}function GB(e){return Lt(e,function(t,r){return t+r},0)}function Iee(e){return Lt(e,function(t,r){return t>r?t:r},Array.isArray(e)?e[0]:void 0)}function Mee(e){return Lt(e,function(t,r){return t<r?t:r},Array.isArray(e)?e[0]:void 0)}function xee(e){return e.length?GB(e)/e.length:0}function KB(e){return Lt(e,function(t,r){return t.concat(Array.isArray(r)?KB(r):r)},[])}function YE(e){var t=[];return $(e,function(r){t.indexOf(r)===-1&&t.push(r)}),t}function C_(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=[].concat(t),o=n[0],i=n.slice(1),a=o;return $(i,function(l){a=a.filter(function(s){return!l.includes(s)})}),a}function Dee(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=[].concat(t),o=n[0],i=n.slice(1),a=o;return $(i,function(l){a=a.filter(function(s){return l.includes(s)})}),a}function Nee(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=[].concat(t),o=n[0],i=n.slice(1),a=new Set(o);return $(i,function(l){$(l,function(s){a.has(s)||a.add(s)})}),Array.from(a)}function __(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:" ";return e.split(t)}const Hee=Object.freeze(Object.defineProperty({__proto__:null,arrayAvg:xee,arrayEach:$,arrayFilter:jr,arrayFlatten:KB,arrayMap:We,arrayMax:Iee,arrayMin:Mee,arrayReduce:Lt,arraySum:GB,arrayUnique:YE,extendArray:S_,getDifferenceOfArrays:C_,getIntersectionOfArrays:Dee,getUnionOfArrays:Nee,pivot:fc,stringToArray:__,to2dArray:YB},Symbol.toStringTag,{value:"Module"}));function g1(e,t,r){return t=Lee(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lee(e){var t=jee(e,"string");return Io(t)==="symbol"?t:String(t)}function jee(e,t){if(Io(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Io(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Io(e){return Io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Io(e)}function rs(e){var t;return Array.isArray(e)?t=e.length?new Array(e.length).fill(null):[]:(t={},ze(e,function(r,n){n!=="__children"&&(r&&Io(r)==="object"&&!Array.isArray(r)?t[n]=rs(r):Array.isArray(r)?r.length&&Io(r[0])==="object"&&!Array.isArray(r[0])?t[n]=[rs(r[0])]:t[n]=[]:t[n]=null)})),t}function Ho(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function Wt(e,t,r){var n=Array.isArray(r);return ze(t,function(o,i){(n===!1||r.includes(i))&&(e[i]=o)}),e}function tv(e,t){ze(t,function(r,n){t[n]&&Io(t[n])==="object"?(e[n]||(Array.isArray(t[n])?e[n]=[]:Object.prototype.toString.call(t[n])==="[object Date]"?e[n]=t[n]:e[n]={}),tv(e[n],t[n])):e[n]=t[n]})}function ar(e){return Io(e)==="object"?JSON.parse(JSON.stringify(e)):e}function pr(e){var t={};return ze(e,function(r,n){t[n]=r}),t}function mt(e){e.MIXINS||(e.MIXINS=[]);for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return $(r,function(o){e.MIXINS.push(o.MIXIN_NAME),ze(o,function(i,a){if(e.prototype[a]!==void 0)throw new Error("Mixin conflict. Property '".concat(a,"' already exist and cannot be overwritten."));if(typeof i=="function")e.prototype[a]=i;else{var l=function(f,c){var h="_".concat(f),d=function(p){var m=p;return(Array.isArray(m)||Ue(m))&&(m=ar(m)),m};return function(){return this[h]===void 0&&(this[h]=d(c)),this[h]}},s=function(f){var c="_".concat(f);return function(h){this[c]=h}};Object.defineProperty(e.prototype,a,{get:l(a,i),set:s(a),configurable:!0})}})}),e}function GE(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Ue(e){return Object.prototype.toString.call(e)==="[object Object]"}function jn(e,t,r,n){n.value=r,n.writable=n.writable!==!1,n.enumerable=n.enumerable!==!1,n.configurable=n.configurable!==!1,Object.defineProperty(e,t,n)}function ze(e,t){for(var r in e)if((!e.hasOwnProperty||e.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e,r))&&t(e[r],r,e)===!1)break;return e}function XB(e,t){var r=t.split("."),n=e;return ze(r,function(o){if(n=n[o],n===void 0)return n=void 0,!1}),n}function Ly(e,t,r){var n=t.split("."),o=e;n.forEach(function(i,a){a!==n.length-1?(It(o,i)||(o[i]={}),o=o[i]):o[i]=r})}function fm(e){if(!Ue(e))return 0;var t=function r(n){var o=0;return Ue(n)?ze(n,function(i,a){a!=="__children"&&(o+=r(i))}):o+=1,o};return t(e)}function Ta(e){var t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"value",n="_".concat(r),o=(t={_touched:!1},g1(t,n,e),g1(t,"isTouched",function(){return this._touched}),t);return Object.defineProperty(o,r,{get:function(){return this[n]},set:function(a){this._touched=!0,this[n]=a},enumerable:!0,configurable:!0}),o}function It(e,t){return Object.prototype.hasOwnProperty.call(e,t)}const Bee=Object.freeze(Object.defineProperty({__proto__:null,clone:pr,createObjectPropListener:Ta,deepClone:ar,deepExtend:tv,deepObjectSize:fm,defineGetter:jn,duckSchema:rs,extend:Wt,getProperty:XB,hasOwnProperty:It,inherit:Ho,isObject:Ue,isObjectEqual:GE,mixin:mt,objectEach:ze,setProperty:Ly},Symbol.toStringTag,{value:"Module"}));var Or=function(t){var r={value:!1};return r.test=function(n,o){r.value=t(n,o)},r},Br={chrome:Or(function(e,t){return/Chrome/.test(e)&&/Google/.test(t)}),chromeWebKit:Or(function(e){return/CriOS/.test(e)}),edge:Or(function(e){return/Edge/.test(e)}),edgeWebKit:Or(function(e){return/EdgiOS/.test(e)}),firefox:Or(function(e){return/Firefox/.test(e)}),firefoxWebKit:Or(function(e){return/FxiOS/.test(e)}),ie:Or(function(e){return/Trident/.test(e)}),ie9:Or(function(){return!!document.documentMode}),mobile:Or(function(e){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)}),safari:Or(function(e,t){return/Safari/.test(e)&&/Apple Computer/.test(t)})},yf={mac:Or(function(e){return/^Mac/.test(e)}),win:Or(function(e){return/^Win/.test(e)}),linux:Or(function(e){return/^Linux/.test(e)}),ios:Or(function(e){return/iPhone|iPad|iPod/i.test(e)})};function qB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.userAgent,r=t===void 0?navigator.userAgent:t,n=e.vendor,o=n===void 0?navigator.vendor:n;ze(Br,function(i){var a=i.test;return void a(r,o)})}function ZB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.platform,r=t===void 0?navigator.platform:t;ze(yf,function(n){var o=n.test;return void o(r)})}qB();ZB();function KE(){return Br.chrome.value}function QB(){return Br.chromeWebKit.value}function jy(){return Br.firefox.value}function JB(){return Br.firefoxWebKit.value}function eF(){return Br.safari.value}function tF(){return Br.edge.value}function Fee(){return Br.edgeWebKit.value}function rF(){return Br.ie.value}function nF(){return Br.ie9.value}function Vee(){return Br.ie.value||Br.edge.value}function cn(){return Br.mobile.value}function XE(){return yf.ios.value}function qE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:navigator,t=e.maxTouchPoints;return t>2&&yf.mac.value}function O_(){return yf.win.value}function kp(){return yf.mac.value}function Wee(){return yf.linux.value}const Uee=Object.freeze(Object.defineProperty({__proto__:null,isChrome:KE,isChromeWebKit:QB,isEdge:tF,isEdgeWebKit:Fee,isFirefox:jy,isFirefoxWebKit:JB,isIE:rF,isIE9:nF,isIOS:XE,isIpadOS:qE,isLinuxOS:Wee,isMSBrowser:Vee,isMacOS:kp,isMobileBrowser:cn,isSafari:eF,isWindowsOS:O_,setBrowserMeta:qB,setPlatformMeta:ZB},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 2.4.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.5/LICENSE */function Zo(e){return Zo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zo(e)}function R_(e,t){return R_=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},R_(e,t)}function zee(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function By(e,t,r){return zee()?By=Reflect.construct:By=function(o,i,a){var l=[null];l.push.apply(l,i);var s=Function.bind.apply(o,l),u=new s;return a&&R_(u,a.prototype),u},By.apply(null,arguments)}function on(e){return Yee(e)||Gee(e)||Kee(e)||Xee()}function Yee(e){if(Array.isArray(e))return E_(e)}function Gee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kee(e,t){if(e){if(typeof e=="string")return E_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return E_(e,t)}}function E_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var qee=Object.hasOwnProperty,m1=Object.setPrototypeOf,Zee=Object.isFrozen,Qee=Object.getPrototypeOf,Jee=Object.getOwnPropertyDescriptor,gr=Object.freeze,dn=Object.seal,ete=Object.create,oF=typeof Reflect<"u"&&Reflect,$p=oF.apply,T_=oF.construct;$p||($p=function(t,r,n){return t.apply(r,n)});gr||(gr=function(t){return t});dn||(dn=function(t){return t});T_||(T_=function(t,r){return By(t,on(r))});var tte=Xr(Array.prototype.forEach),b1=Xr(Array.prototype.pop),Af=Xr(Array.prototype.push),Fy=Xr(String.prototype.toLowerCase),fS=Xr(String.prototype.toString),rte=Xr(String.prototype.match),tn=Xr(String.prototype.replace),nte=Xr(String.prototype.indexOf),ote=Xr(String.prototype.trim),ur=Xr(RegExp.prototype.test),cS=ite(TypeError);function Xr(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return $p(e,t,n)}}function ite(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return T_(e,r)}}function qe(e,t,r){r=r||Fy,m1&&m1(e,null);for(var n=t.length;n--;){var o=t[n];if(typeof o=="string"){var i=r(o);i!==o&&(Zee(t)||(t[n]=i),o=i)}e[o]=!0}return e}function Ii(e){var t=ete(null),r;for(r in e)$p(qee,e,[r])===!0&&(t[r]=e[r]);return t}function Fv(e,t){for(;e!==null;){var r=Jee(e,t);if(r){if(r.get)return Xr(r.get);if(typeof r.value=="function")return Xr(r.value)}e=Qee(e)}function n(o){return console.warn("fallback value for",o),null}return n}var w1=gr(["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"]),hS=gr(["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"]),dS=gr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ate=gr(["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"]),vS=gr(["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"]),lte=gr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),S1=gr(["#text"]),C1=gr(["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"]),yS=gr(["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"]),_1=gr(["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"]),Vv=gr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ste=dn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ute=dn(/<%[\w\W]*|[\w\W]*%>/gm),fte=dn(/\${[\w\W]*}/gm),cte=dn(/^data-[\-\w.\u00B7-\uFFFF]/),hte=dn(/^aria-[\-\w]+$/),dte=dn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vte=dn(/^(?:\w+script|data):/i),yte=dn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),pte=dn(/^html$/i),gte=function(){return typeof window>"u"?null:window},mte=function(t,r){if(Zo(t)!=="object"||typeof t.createPolicy!="function")return null;var n=null,o="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(o)&&(n=r.currentScript.getAttribute(o));var i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:function(l){return l},createScriptURL:function(l){return l}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function iF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gte(),t=function(N){return iF(N)};if(t.version="2.4.5",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;var r=e.document,n=e.document,o=e.DocumentFragment,i=e.HTMLTemplateElement,a=e.Node,l=e.Element,s=e.NodeFilter,u=e.NamedNodeMap,f=u===void 0?e.NamedNodeMap||e.MozNamedAttrMap:u,c=e.HTMLFormElement,h=e.DOMParser,d=e.trustedTypes,v=l.prototype,p=Fv(v,"cloneNode"),m=Fv(v,"nextSibling"),w=Fv(v,"childNodes"),S=Fv(v,"parentNode");if(typeof i=="function"){var C=n.createElement("template");C.content&&C.content.ownerDocument&&(n=C.content.ownerDocument)}var P=mte(d,r),R=P?P.createHTML(""):"",W=n,z=W.implementation,q=W.createNodeIterator,K=W.createDocumentFragment,X=W.getElementsByTagName,Q=r.importNode,ae={};try{ae=Ii(n).documentMode?n.documentMode:{}}catch{}var Z={};t.isSupported=typeof S=="function"&&z&&typeof z.createHTMLDocument<"u"&&ae!==9;var he=ste,Ee=ute,_e=fte,Oe=cte,k=hte,y=vte,g=yte,b=dte,_=null,T=qe({},[].concat(on(w1),on(hS),on(dS),on(vS),on(S1))),I=null,B=qe({},[].concat(on(C1),on(yS),on(_1),on(Vv))),V=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}})),Y=null,J=null,ee=!0,le=!0,Te=!1,de=!0,ve=!1,G=!1,De=!1,Xe=!1,$e=!1,Ie=!1,Ae=!1,O=!0,E=!1,A="user-content-",H=!0,M=!1,j={},x=null,D=qe({},["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"]),F=null,L=qe({},["audio","video","img","source","image","track"]),U=null,ie=qe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",Re="http://www.w3.org/2000/svg",He="http://www.w3.org/1999/xhtml",Ze=He,ht=!1,Le=null,je=qe({},[me,Re,He],fS),ot,lt=["application/xhtml+xml","text/html"],tt="text/html",Qe,et=null,jt=n.createElement("form"),yt=function(N){return N instanceof RegExp||N instanceof Function},ft=function(N){et&&et===N||((!N||Zo(N)!=="object")&&(N={}),N=Ii(N),ot=lt.indexOf(N.PARSER_MEDIA_TYPE)===-1?ot=tt:ot=N.PARSER_MEDIA_TYPE,Qe=ot==="application/xhtml+xml"?fS:Fy,_="ALLOWED_TAGS"in N?qe({},N.ALLOWED_TAGS,Qe):T,I="ALLOWED_ATTR"in N?qe({},N.ALLOWED_ATTR,Qe):B,Le="ALLOWED_NAMESPACES"in N?qe({},N.ALLOWED_NAMESPACES,fS):je,U="ADD_URI_SAFE_ATTR"in N?qe(Ii(ie),N.ADD_URI_SAFE_ATTR,Qe):ie,F="ADD_DATA_URI_TAGS"in N?qe(Ii(L),N.ADD_DATA_URI_TAGS,Qe):L,x="FORBID_CONTENTS"in N?qe({},N.FORBID_CONTENTS,Qe):D,Y="FORBID_TAGS"in N?qe({},N.FORBID_TAGS,Qe):{},J="FORBID_ATTR"in N?qe({},N.FORBID_ATTR,Qe):{},j="USE_PROFILES"in N?N.USE_PROFILES:!1,ee=N.ALLOW_ARIA_ATTR!==!1,le=N.ALLOW_DATA_ATTR!==!1,Te=N.ALLOW_UNKNOWN_PROTOCOLS||!1,de=N.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ve=N.SAFE_FOR_TEMPLATES||!1,G=N.WHOLE_DOCUMENT||!1,$e=N.RETURN_DOM||!1,Ie=N.RETURN_DOM_FRAGMENT||!1,Ae=N.RETURN_TRUSTED_TYPE||!1,Xe=N.FORCE_BODY||!1,O=N.SANITIZE_DOM!==!1,E=N.SANITIZE_NAMED_PROPS||!1,H=N.KEEP_CONTENT!==!1,M=N.IN_PLACE||!1,b=N.ALLOWED_URI_REGEXP||b,Ze=N.NAMESPACE||He,V=N.CUSTOM_ELEMENT_HANDLING||{},N.CUSTOM_ELEMENT_HANDLING&&yt(N.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=N.CUSTOM_ELEMENT_HANDLING.tagNameCheck),N.CUSTOM_ELEMENT_HANDLING&&yt(N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),N.CUSTOM_ELEMENT_HANDLING&&typeof N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(V.allowCustomizedBuiltInElements=N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ve&&(le=!1),Ie&&($e=!0),j&&(_=qe({},on(S1)),I=[],j.html===!0&&(qe(_,w1),qe(I,C1)),j.svg===!0&&(qe(_,hS),qe(I,yS),qe(I,Vv)),j.svgFilters===!0&&(qe(_,dS),qe(I,yS),qe(I,Vv)),j.mathMl===!0&&(qe(_,vS),qe(I,_1),qe(I,Vv))),N.ADD_TAGS&&(_===T&&(_=Ii(_)),qe(_,N.ADD_TAGS,Qe)),N.ADD_ATTR&&(I===B&&(I=Ii(I)),qe(I,N.ADD_ATTR,Qe)),N.ADD_URI_SAFE_ATTR&&qe(U,N.ADD_URI_SAFE_ATTR,Qe),N.FORBID_CONTENTS&&(x===D&&(x=Ii(x)),qe(x,N.FORBID_CONTENTS,Qe)),H&&(_["#text"]=!0),G&&qe(_,["html","head","body"]),_.table&&(qe(_,["tbody"]),delete Y.tbody),gr&&gr(N),et=N)},it=qe({},["mi","mo","mn","ms","mtext"]),Pi=qe({},["foreignobject","desc","title","annotation-xml"]),Bo=qe({},["title","style","font","a","script"]),Qa=qe({},hS);qe(Qa,dS),qe(Qa,ate);var dw=qe({},vS);qe(dw,lte);var Fz=function(N){var oe=S(N);(!oe||!oe.tagName)&&(oe={namespaceURI:Ze,tagName:"template"});var ye=Fy(N.tagName),ct=Fy(oe.tagName);return Le[N.namespaceURI]?N.namespaceURI===Re?oe.namespaceURI===He?ye==="svg":oe.namespaceURI===me?ye==="svg"&&(ct==="annotation-xml"||it[ct]):!!Qa[ye]:N.namespaceURI===me?oe.namespaceURI===He?ye==="math":oe.namespaceURI===Re?ye==="math"&&Pi[ct]:!!dw[ye]:N.namespaceURI===He?oe.namespaceURI===Re&&!Pi[ct]||oe.namespaceURI===me&&!it[ct]?!1:!dw[ye]&&(Bo[ye]||!Qa[ye]):!!(ot==="application/xhtml+xml"&&Le[N.namespaceURI]):!1},Vn=function(N){Af(t.removed,{element:N});try{N.parentNode.removeChild(N)}catch{try{N.outerHTML=R}catch{N.remove()}}},vw=function(N,oe){try{Af(t.removed,{attribute:oe.getAttributeNode(N),from:oe})}catch{Af(t.removed,{attribute:null,from:oe})}if(oe.removeAttribute(N),N==="is"&&!I[N])if($e||Ie)try{Vn(oe)}catch{}else try{oe.setAttribute(N,"")}catch{}},IP=function(N){var oe,ye;if(Xe)N="<remove></remove>"+N;else{var ct=rte(N,/^[\r\n\t ]+/);ye=ct&&ct[0]}ot==="application/xhtml+xml"&&Ze===He&&(N='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+N+"</body></html>");var wr=P?P.createHTML(N):N;if(Ze===He)try{oe=new h().parseFromString(wr,ot)}catch{}if(!oe||!oe.documentElement){oe=z.createDocument(Ze,"template",null);try{oe.documentElement.innerHTML=ht?R:wr}catch{}}var nr=oe.body||oe.documentElement;return N&&ye&&nr.insertBefore(n.createTextNode(ye),nr.childNodes[0]||null),Ze===He?X.call(oe,G?"html":"body")[0]:G?oe.documentElement:nr},MP=function(N){return q.call(N.ownerDocument||N,N,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT,null,!1)},Vz=function(N){return N instanceof c&&(typeof N.nodeName!="string"||typeof N.textContent!="string"||typeof N.removeChild!="function"||!(N.attributes instanceof f)||typeof N.removeAttribute!="function"||typeof N.setAttribute!="function"||typeof N.namespaceURI!="string"||typeof N.insertBefore!="function"||typeof N.hasChildNodes!="function")},_f=function(N){return Zo(a)==="object"?N instanceof a:N&&Zo(N)==="object"&&typeof N.nodeType=="number"&&typeof N.nodeName=="string"},Wn=function(N,oe,ye){Z[N]&&tte(Z[N],function(ct){ct.call(t,oe,ye,et)})},xP=function(N){var oe;if(Wn("beforeSanitizeElements",N,null),Vz(N)||ur(/[\u0080-\uFFFF]/,N.nodeName))return Vn(N),!0;var ye=Qe(N.nodeName);if(Wn("uponSanitizeElement",N,{tagName:ye,allowedTags:_}),N.hasChildNodes()&&!_f(N.firstElementChild)&&(!_f(N.content)||!_f(N.content.firstElementChild))&&ur(/<[/\w]/g,N.innerHTML)&&ur(/<[/\w]/g,N.textContent)||ye==="select"&&ur(/<template/i,N.innerHTML))return Vn(N),!0;if(!_[ye]||Y[ye]){if(!Y[ye]&&NP(ye)&&(V.tagNameCheck instanceof RegExp&&ur(V.tagNameCheck,ye)||V.tagNameCheck instanceof Function&&V.tagNameCheck(ye)))return!1;if(H&&!x[ye]){var ct=S(N)||N.parentNode,wr=w(N)||N.childNodes;if(wr&&ct)for(var nr=wr.length,rr=nr-1;rr>=0;--rr)ct.insertBefore(p(wr[rr],!0),m(N))}return Vn(N),!0}return N instanceof l&&!Fz(N)||(ye==="noscript"||ye==="noembed")&&ur(/<\/no(script|embed)/i,N.innerHTML)?(Vn(N),!0):(ve&&N.nodeType===3&&(oe=N.textContent,oe=tn(oe,he," "),oe=tn(oe,Ee," "),oe=tn(oe,_e," "),N.textContent!==oe&&(Af(t.removed,{element:N.cloneNode()}),N.textContent=oe)),Wn("afterSanitizeElements",N,null),!1)},DP=function(N,oe,ye){if(O&&(oe==="id"||oe==="name")&&(ye in n||ye in jt))return!1;if(!(le&&!J[oe]&&ur(Oe,oe))){if(!(ee&&ur(k,oe))){if(!I[oe]||J[oe]){if(!(NP(N)&&(V.tagNameCheck instanceof RegExp&&ur(V.tagNameCheck,N)||V.tagNameCheck instanceof Function&&V.tagNameCheck(N))&&(V.attributeNameCheck instanceof RegExp&&ur(V.attributeNameCheck,oe)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(oe))||oe==="is"&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&ur(V.tagNameCheck,ye)||V.tagNameCheck instanceof Function&&V.tagNameCheck(ye))))return!1}else if(!U[oe]){if(!ur(b,tn(ye,g,""))){if(!((oe==="src"||oe==="xlink:href"||oe==="href")&&N!=="script"&&nte(ye,"data:")===0&&F[N])){if(!(Te&&!ur(y,tn(ye,g,"")))){if(ye)return!1}}}}}}return!0},NP=function(N){return N.indexOf("-")>0},HP=function(N){var oe,ye,ct,wr;Wn("beforeSanitizeAttributes",N,null);var nr=N.attributes;if(nr){var rr={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:I};for(wr=nr.length;wr--;){oe=nr[wr];var Tv=oe,Qt=Tv.name,yw=Tv.namespaceURI;if(ye=Qt==="value"?oe.value:ote(oe.value),ct=Qe(Qt),rr.attrName=ct,rr.attrValue=ye,rr.keepAttr=!0,rr.forceKeepAttr=void 0,Wn("uponSanitizeAttribute",N,rr),ye=rr.attrValue,!rr.forceKeepAttr&&(vw(Qt,N),!!rr.keepAttr)){if(!de&&ur(/\/>/i,ye)){vw(Qt,N);continue}ve&&(ye=tn(ye,he," "),ye=tn(ye,Ee," "),ye=tn(ye,_e," "));var LP=Qe(N.nodeName);if(DP(LP,ct,ye)){if(E&&(ct==="id"||ct==="name")&&(vw(Qt,N),ye=A+ye),P&&Zo(d)==="object"&&typeof d.getAttributeType=="function"&&!yw)switch(d.getAttributeType(LP,ct)){case"TrustedHTML":ye=P.createHTML(ye);break;case"TrustedScriptURL":ye=P.createScriptURL(ye);break}try{yw?N.setAttributeNS(yw,Qt,ye):N.setAttribute(Qt,ye),b1(t.removed)}catch{}}}}Wn("afterSanitizeAttributes",N,null)}},Wz=function Pe(N){var oe,ye=MP(N);for(Wn("beforeSanitizeShadowDOM",N,null);oe=ye.nextNode();)Wn("uponSanitizeShadowNode",oe,null),!xP(oe)&&(oe.content instanceof o&&Pe(oe.content),HP(oe));Wn("afterSanitizeShadowDOM",N,null)};return t.sanitize=function(Pe){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},oe,ye,ct,wr,nr;if(ht=!Pe,ht&&(Pe="<!-->"),typeof Pe!="string"&&!_f(Pe)){if(typeof Pe.toString!="function")throw cS("toString is not a function");if(Pe=Pe.toString(),typeof Pe!="string")throw cS("dirty is not a string, aborting")}if(!t.isSupported){if(Zo(e.toStaticHTML)==="object"||typeof e.toStaticHTML=="function"){if(typeof Pe=="string")return e.toStaticHTML(Pe);if(_f(Pe))return e.toStaticHTML(Pe.outerHTML)}return Pe}if(De||ft(N),t.removed=[],typeof Pe=="string"&&(M=!1),M){if(Pe.nodeName){var rr=Qe(Pe.nodeName);if(!_[rr]||Y[rr])throw cS("root node is forbidden and cannot be sanitized in-place")}}else if(Pe instanceof a)oe=IP("<!---->"),ye=oe.ownerDocument.importNode(Pe,!0),ye.nodeType===1&&ye.nodeName==="BODY"||ye.nodeName==="HTML"?oe=ye:oe.appendChild(ye);else{if(!$e&&!ve&&!G&&Pe.indexOf("<")===-1)return P&&Ae?P.createHTML(Pe):Pe;if(oe=IP(Pe),!oe)return $e?null:Ae?R:""}oe&&Xe&&Vn(oe.firstChild);for(var Tv=MP(M?Pe:oe);ct=Tv.nextNode();)ct.nodeType===3&&ct===wr||xP(ct)||(ct.content instanceof o&&Wz(ct.content),HP(ct),wr=ct);if(wr=null,M)return Pe;if($e){if(Ie)for(nr=K.call(oe.ownerDocument);oe.firstChild;)nr.appendChild(oe.firstChild);else nr=oe;return(I.shadowroot||I.shadowrootmod)&&(nr=Q.call(r,nr,!0)),nr}var Qt=G?oe.outerHTML:oe.innerHTML;return G&&_["!doctype"]&&oe.ownerDocument&&oe.ownerDocument.doctype&&oe.ownerDocument.doctype.name&&ur(pte,oe.ownerDocument.doctype.name)&&(Qt="<!DOCTYPE "+oe.ownerDocument.doctype.name+`>
`+Qt),ve&&(Qt=tn(Qt,he," "),Qt=tn(Qt,Ee," "),Qt=tn(Qt,_e," ")),P&&Ae?P.createHTML(Qt):Qt},t.setConfig=function(Pe){ft(Pe),De=!0},t.clearConfig=function(){et=null,De=!1},t.isValidAttribute=function(Pe,N,oe){et||ft({});var ye=Qe(Pe),ct=Qe(N);return DP(ye,ct,oe)},t.addHook=function(Pe,N){typeof N=="function"&&(Z[Pe]=Z[Pe]||[],Af(Z[Pe],N))},t.removeHook=function(Pe){if(Z[Pe])return b1(Z[Pe])},t.removeHooks=function(Pe){Z[Pe]&&(Z[Pe]=[])},t.removeAllHooks=function(){Z={}},t}var bte=iF(),wte=xe,Ste=EE.codeAt;wte({target:"String",proto:!0},{codePointAt:function(t){return Ste(this,t)}});var Cte=Ri,_te=Yt,Ote=Tr,Rte=RangeError,aF=function(t){var r=_te(Ote(this)),n="",o=Cte(t);if(o<0||o==1/0)throw Rte("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(r+=r))o&1&&(n+=r);return n},lF=Ye,Ete=Ua,O1=Yt,Tte=aF,Pte=Tr,kte=lF(Tte),$te=lF("".slice),Ate=Math.ceil,R1=function(e){return function(t,r,n){var o=O1(Pte(t)),i=Ete(r),a=o.length,l=n===void 0?" ":O1(n),s,u;return i<=a||l==""?o:(s=i-a,u=kte(l,Ate(s/l.length)),u.length>s&&(u=$te(u,0,s)),e?o+u:u+o)}},Ite={start:R1(!1),end:R1(!0)},Mte=ja,xte=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(Mte),Dte=xe,Nte=Ite.start,Hte=xte;Dte({target:"String",proto:!0,forced:Hte},{padStart:function(t){return Nte(this,t,arguments.length>1?arguments[1]:void 0)}});//! moment.js
//! version : 2.29.4
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var sF;function re(){return sF.apply(null,arguments)}function Lte(e){sF=e}function vn(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Oa(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function st(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ZE(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(st(e,t))return!1;return!0}function Cr(e){return e===void 0}function Mo(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function rv(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function uF(e,t){var r=[],n,o=e.length;for(n=0;n<o;++n)r.push(t(e[n],n));return r}function ei(e,t){for(var r in t)st(t,r)&&(e[r]=t[r]);return st(t,"toString")&&(e.toString=t.toString),st(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Bn(e,t,r,n){return MF(e,t,r,n,!0).utc()}function jte(){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 Ge(e){return e._pf==null&&(e._pf=jte()),e._pf}var P_;Array.prototype.some?P_=Array.prototype.some:P_=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function QE(e){if(e._isValid==null){var t=Ge(e),r=P_.call(t.parsedDateParts,function(o){return o!=null}),n=!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&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n}return e._isValid}function cm(e){var t=Bn(NaN);return e!=null?ei(Ge(t),e):Ge(t).userInvalidated=!0,t}var E1=re.momentProperties=[],pS=!1;function JE(e,t){var r,n,o,i=E1.length;if(Cr(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Cr(t._i)||(e._i=t._i),Cr(t._f)||(e._f=t._f),Cr(t._l)||(e._l=t._l),Cr(t._strict)||(e._strict=t._strict),Cr(t._tzm)||(e._tzm=t._tzm),Cr(t._isUTC)||(e._isUTC=t._isUTC),Cr(t._offset)||(e._offset=t._offset),Cr(t._pf)||(e._pf=Ge(t)),Cr(t._locale)||(e._locale=t._locale),i>0)for(r=0;r<i;r++)n=E1[r],o=t[n],Cr(o)||(e[n]=o);return e}function nv(e){JE(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),pS===!1&&(pS=!0,re.updateOffset(this),pS=!1)}function yn(e){return e instanceof nv||e!=null&&e._isAMomentObject!=null}function fF(e){re.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Qr(e,t){var r=!0;return ei(function(){if(re.deprecationHandler!=null&&re.deprecationHandler(null,e),r){var n=[],o,i,a,l=arguments.length;for(i=0;i<l;i++){if(o="",typeof arguments[i]=="object"){o+=`
[`+i+"] ";for(a in arguments[0])st(arguments[0],a)&&(o+=a+": "+arguments[0][a]+", ");o=o.slice(0,-2)}else o=arguments[i];n.push(o)}fF(e+`
Arguments: `+Array.prototype.slice.call(n).join("")+`
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var T1={};function cF(e,t){re.deprecationHandler!=null&&re.deprecationHandler(e,t),T1[e]||(fF(t),T1[e]=!0)}re.suppressDeprecationWarnings=!1;re.deprecationHandler=null;function Fn(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function Bte(e){var t,r;for(r in e)st(e,r)&&(t=e[r],Fn(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function k_(e,t){var r=ei({},e),n;for(n in t)st(t,n)&&(Oa(e[n])&&Oa(t[n])?(r[n]={},ei(r[n],e[n]),ei(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)st(e,n)&&!st(t,n)&&Oa(e[n])&&(r[n]=ei({},r[n]));return r}function eT(e){e!=null&&this.set(e)}var $_;Object.keys?$_=Object.keys:$_=function(e){var t,r=[];for(t in e)st(e,t)&&r.push(t);return r};var Fte={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Vte(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return Fn(n)?n.call(t,r):n}function Nn(e,t,r){var n=""+Math.abs(e),o=t-n.length,i=e>=0;return(i?r?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}var tT=/(\[[^\[]*\])|(\\)?([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,Wv=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,gS={},Bl={};function ke(e,t,r,n){var o=n;typeof n=="string"&&(o=function(){return this[n]()}),e&&(Bl[e]=o),t&&(Bl[t[0]]=function(){return Nn(o.apply(this,arguments),t[1],t[2])}),r&&(Bl[r]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function Wte(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Ute(e){var t=e.match(tT),r,n;for(r=0,n=t.length;r<n;r++)Bl[t[r]]?t[r]=Bl[t[r]]:t[r]=Wte(t[r]);return function(o){var i="",a;for(a=0;a<n;a++)i+=Fn(t[a])?t[a].call(o,e):t[a];return i}}function Vy(e,t){return e.isValid()?(t=hF(t,e.localeData()),gS[t]=gS[t]||Ute(t),gS[t](e)):e.localeData().invalidDate()}function hF(e,t){var r=5;function n(o){return t.longDateFormat(o)||o}for(Wv.lastIndex=0;r>=0&&Wv.test(e);)e=e.replace(Wv,n),Wv.lastIndex=0,r-=1;return e}var zte={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 Yte(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(tT).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var Gte="Invalid date";function Kte(){return this._invalidDate}var Xte="%d",qte=/\d{1,2}/;function Zte(e){return this._ordinal.replace("%d",e)}var Qte={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 Jte(e,t,r,n){var o=this._relativeTime[r];return Fn(o)?o(e,t,r,n):o.replace(/%d/i,e)}function ere(e,t){var r=this._relativeTime[e>0?"future":"past"];return Fn(r)?r(t):r.replace(/%s/i,t)}var cc={};function lr(e,t){var r=e.toLowerCase();cc[r]=cc[r+"s"]=cc[t]=e}function Jr(e){return typeof e=="string"?cc[e]||cc[e.toLowerCase()]:void 0}function rT(e){var t={},r,n;for(n in e)st(e,n)&&(r=Jr(n),r&&(t[r]=e[n]));return t}var dF={};function sr(e,t){dF[e]=t}function tre(e){var t=[],r;for(r in e)st(e,r)&&t.push({unit:r,priority:dF[r]});return t.sort(function(n,o){return n.priority-o.priority}),t}function hm(e){return e%4===0&&e%100!==0||e%400===0}function Gr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Je(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=Gr(t)),r}function pf(e,t){return function(r){return r!=null?(vF(this,e,r),re.updateOffset(this,t),this):Ap(this,e)}}function Ap(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function vF(e,t,r){e.isValid()&&!isNaN(r)&&(t==="FullYear"&&hm(e.year())&&e.month()===1&&e.date()===29?(r=Je(r),e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),mm(r,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](r))}function rre(e){return e=Jr(e),Fn(this[e])?this[e]():this}function nre(e,t){if(typeof e=="object"){e=rT(e);var r=tre(e),n,o=r.length;for(n=0;n<o;n++)this[r[n].unit](e[r[n].unit])}else if(e=Jr(e),Fn(this[e]))return this[e](t);return this}var yF=/\d/,Vr=/\d\d/,pF=/\d{3}/,nT=/\d{4}/,dm=/[+-]?\d{6}/,Rt=/\d\d?/,gF=/\d\d\d\d?/,mF=/\d\d\d\d\d\d?/,vm=/\d{1,3}/,oT=/\d{1,4}/,ym=/[+-]?\d{1,6}/,gf=/\d+/,pm=/[+-]?\d+/,ore=/Z|[+-]\d\d:?\d\d/gi,gm=/Z|[+-]\d\d(?::?\d\d)?/gi,ire=/[+-]?\d+(\.\d{1,3})?/,ov=/[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,Ip;Ip={};function Se(e,t,r){Ip[e]=Fn(t)?t:function(n,o){return n&&r?r:t}}function are(e,t){return st(Ip,e)?Ip[e](t._strict,t._locale):new RegExp(lre(e))}function lre(e){return Nr(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,o,i){return r||n||o||i}))}function Nr(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var A_={};function bt(e,t){var r,n=t,o;for(typeof e=="string"&&(e=[e]),Mo(t)&&(n=function(i,a){a[t]=Je(i)}),o=e.length,r=0;r<o;r++)A_[e[r]]=n}function iv(e,t){bt(e,function(r,n,o,i){o._w=o._w||{},t(r,o._w,o,i)})}function sre(e,t,r){t!=null&&st(A_,e)&&A_[e](t,r._a,r,e)}var ir=0,to=1,Mn=2,qt=3,hn=4,ro=5,Xi=6,ure=7,fre=8;function cre(e,t){return(e%t+t)%t}var Ft;Array.prototype.indexOf?Ft=Array.prototype.indexOf:Ft=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function mm(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=cre(t,12);return e+=(t-r)/12,r===1?hm(e)?29:28:31-r%7%2}ke("M",["MM",2],"Mo",function(){return this.month()+1});ke("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});ke("MMMM",0,0,function(e){return this.localeData().months(this,e)});lr("month","M");sr("month",8);Se("M",Rt);Se("MM",Rt,Vr);Se("MMM",function(e,t){return t.monthsShortRegex(e)});Se("MMMM",function(e,t){return t.monthsRegex(e)});bt(["M","MM"],function(e,t){t[to]=Je(e)-1});bt(["MMM","MMMM"],function(e,t,r,n){var o=r._locale.monthsParse(e,n,r._strict);o!=null?t[to]=o:Ge(r).invalidMonth=e});var hre="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),bF="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),wF=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,dre=ov,vre=ov;function yre(e,t){return e?vn(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||wF).test(t)?"format":"standalone"][e.month()]:vn(this._months)?this._months:this._months.standalone}function pre(e,t){return e?vn(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[wF.test(t)?"format":"standalone"][e.month()]:vn(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function gre(e,t,r){var n,o,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)i=Bn([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(i,"").toLocaleLowerCase();return r?t==="MMM"?(o=Ft.call(this._shortMonthsParse,a),o!==-1?o:null):(o=Ft.call(this._longMonthsParse,a),o!==-1?o:null):t==="MMM"?(o=Ft.call(this._shortMonthsParse,a),o!==-1?o:(o=Ft.call(this._longMonthsParse,a),o!==-1?o:null)):(o=Ft.call(this._longMonthsParse,a),o!==-1?o:(o=Ft.call(this._shortMonthsParse,a),o!==-1?o:null))}function mre(e,t,r){var n,o,i;if(this._monthsParseExact)return gre.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(o=Bn([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function SF(e,t){var r;if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Je(t);else if(t=e.localeData().monthsParse(t),!Mo(t))return e}return r=Math.min(e.date(),mm(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,r),e}function CF(e){return e!=null?(SF(this,e),re.updateOffset(this,!0),this):Ap(this,"Month")}function bre(){return mm(this.year(),this.month())}function wre(e){return this._monthsParseExact?(st(this,"_monthsRegex")||_F.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(st(this,"_monthsShortRegex")||(this._monthsShortRegex=dre),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Sre(e){return this._monthsParseExact?(st(this,"_monthsRegex")||_F.call(this),e?this._monthsStrictRegex:this._monthsRegex):(st(this,"_monthsRegex")||(this._monthsRegex=vre),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function _F(){function e(a,l){return l.length-a.length}var t=[],r=[],n=[],o,i;for(o=0;o<12;o++)i=Bn([2e3,o]),t.push(this.monthsShort(i,"")),r.push(this.months(i,"")),n.push(this.months(i,"")),n.push(this.monthsShort(i,""));for(t.sort(e),r.sort(e),n.sort(e),o=0;o<12;o++)t[o]=Nr(t[o]),r[o]=Nr(r[o]);for(o=0;o<24;o++)n[o]=Nr(n[o]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}ke("Y",0,0,function(){var e=this.year();return e<=9999?Nn(e,4):"+"+e});ke(0,["YY",2],0,function(){return this.year()%100});ke(0,["YYYY",4],0,"year");ke(0,["YYYYY",5],0,"year");ke(0,["YYYYYY",6,!0],0,"year");lr("year","y");sr("year",1);Se("Y",pm);Se("YY",Rt,Vr);Se("YYYY",oT,nT);Se("YYYYY",ym,dm);Se("YYYYYY",ym,dm);bt(["YYYYY","YYYYYY"],ir);bt("YYYY",function(e,t){t[ir]=e.length===2?re.parseTwoDigitYear(e):Je(e)});bt("YY",function(e,t){t[ir]=re.parseTwoDigitYear(e)});bt("Y",function(e,t){t[ir]=parseInt(e,10)});function hc(e){return hm(e)?366:365}re.parseTwoDigitYear=function(e){return Je(e)+(Je(e)>68?1900:2e3)};var OF=pf("FullYear",!0);function Cre(){return hm(this.year())}function _re(e,t,r,n,o,i,a){var l;return e<100&&e>=0?(l=new Date(e+400,t,r,n,o,i,a),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,r,n,o,i,a),l}function Ac(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[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 Mp(e,t,r){var n=7+t-r,o=(7+Ac(e,0,n).getUTCDay()-t)%7;return-o+n-1}function RF(e,t,r,n,o){var i=(7+r-n)%7,a=Mp(e,n,o),l=1+7*(t-1)+i+a,s,u;return l<=0?(s=e-1,u=hc(s)+l):l>hc(e)?(s=e+1,u=l-hc(e)):(s=e,u=l),{year:s,dayOfYear:u}}function Ic(e,t,r){var n=Mp(e.year(),t,r),o=Math.floor((e.dayOfYear()-n-1)/7)+1,i,a;return o<1?(a=e.year()-1,i=o+ko(a,t,r)):o>ko(e.year(),t,r)?(i=o-ko(e.year(),t,r),a=e.year()+1):(a=e.year(),i=o),{week:i,year:a}}function ko(e,t,r){var n=Mp(e,t,r),o=Mp(e+1,t,r);return(hc(e)-n+o)/7}ke("w",["ww",2],"wo","week");ke("W",["WW",2],"Wo","isoWeek");lr("week","w");lr("isoWeek","W");sr("week",5);sr("isoWeek",5);Se("w",Rt);Se("ww",Rt,Vr);Se("W",Rt);Se("WW",Rt,Vr);iv(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=Je(e)});function Ore(e){return Ic(e,this._week.dow,this._week.doy).week}var Rre={dow:0,doy:6};function Ere(){return this._week.dow}function Tre(){return this._week.doy}function Pre(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function kre(e){var t=Ic(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}ke("d",0,"do","day");ke("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});ke("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});ke("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});ke("e",0,0,"weekday");ke("E",0,0,"isoWeekday");lr("day","d");lr("weekday","e");lr("isoWeekday","E");sr("day",11);sr("weekday",11);sr("isoWeekday",11);Se("d",Rt);Se("e",Rt);Se("E",Rt);Se("dd",function(e,t){return t.weekdaysMinRegex(e)});Se("ddd",function(e,t){return t.weekdaysShortRegex(e)});Se("dddd",function(e,t){return t.weekdaysRegex(e)});iv(["dd","ddd","dddd"],function(e,t,r,n){var o=r._locale.weekdaysParse(e,n,r._strict);o!=null?t.d=o:Ge(r).invalidWeekday=e});iv(["d","e","E"],function(e,t,r,n){t[n]=Je(e)});function $re(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Are(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function iT(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Ire="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),EF="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Mre="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),xre=ov,Dre=ov,Nre=ov;function Hre(e,t){var r=vn(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?iT(r,this._week.dow):e?r[e.day()]:r}function Lre(e){return e===!0?iT(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function jre(e){return e===!0?iT(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Bre(e,t,r){var n,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=Bn([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?t==="dddd"?(o=Ft.call(this._weekdaysParse,a),o!==-1?o:null):t==="ddd"?(o=Ft.call(this._shortWeekdaysParse,a),o!==-1?o:null):(o=Ft.call(this._minWeekdaysParse,a),o!==-1?o:null):t==="dddd"?(o=Ft.call(this._weekdaysParse,a),o!==-1||(o=Ft.call(this._shortWeekdaysParse,a),o!==-1)?o:(o=Ft.call(this._minWeekdaysParse,a),o!==-1?o:null)):t==="ddd"?(o=Ft.call(this._shortWeekdaysParse,a),o!==-1||(o=Ft.call(this._weekdaysParse,a),o!==-1)?o:(o=Ft.call(this._minWeekdaysParse,a),o!==-1?o:null)):(o=Ft.call(this._minWeekdaysParse,a),o!==-1||(o=Ft.call(this._weekdaysParse,a),o!==-1)?o:(o=Ft.call(this._shortWeekdaysParse,a),o!==-1?o:null))}function Fre(e,t,r){var n,o,i;if(this._weekdaysParseExact)return Bre.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=Bn([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function Vre(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=$re(e,this.localeData()),this.add(e-t,"d")):t}function Wre(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function Ure(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Are(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function zre(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||aT.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(st(this,"_weekdaysRegex")||(this._weekdaysRegex=xre),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Yre(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||aT.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(st(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Dre),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Gre(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||aT.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(st(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Nre),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function aT(){function e(f,c){return c.length-f.length}var t=[],r=[],n=[],o=[],i,a,l,s,u;for(i=0;i<7;i++)a=Bn([2e3,1]).day(i),l=Nr(this.weekdaysMin(a,"")),s=Nr(this.weekdaysShort(a,"")),u=Nr(this.weekdays(a,"")),t.push(l),r.push(s),n.push(u),o.push(l),o.push(s),o.push(u);t.sort(e),r.sort(e),n.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function lT(){return this.hours()%12||12}function Kre(){return this.hours()||24}ke("H",["HH",2],0,"hour");ke("h",["hh",2],0,lT);ke("k",["kk",2],0,Kre);ke("hmm",0,0,function(){return""+lT.apply(this)+Nn(this.minutes(),2)});ke("hmmss",0,0,function(){return""+lT.apply(this)+Nn(this.minutes(),2)+Nn(this.seconds(),2)});ke("Hmm",0,0,function(){return""+this.hours()+Nn(this.minutes(),2)});ke("Hmmss",0,0,function(){return""+this.hours()+Nn(this.minutes(),2)+Nn(this.seconds(),2)});function TF(e,t){ke(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}TF("a",!0);TF("A",!1);lr("hour","h");sr("hour",13);function PF(e,t){return t._meridiemParse}Se("a",PF);Se("A",PF);Se("H",Rt);Se("h",Rt);Se("k",Rt);Se("HH",Rt,Vr);Se("hh",Rt,Vr);Se("kk",Rt,Vr);Se("hmm",gF);Se("hmmss",mF);Se("Hmm",gF);Se("Hmmss",mF);bt(["H","HH"],qt);bt(["k","kk"],function(e,t,r){var n=Je(e);t[qt]=n===24?0:n});bt(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});bt(["h","hh"],function(e,t,r){t[qt]=Je(e),Ge(r).bigHour=!0});bt("hmm",function(e,t,r){var n=e.length-2;t[qt]=Je(e.substr(0,n)),t[hn]=Je(e.substr(n)),Ge(r).bigHour=!0});bt("hmmss",function(e,t,r){var n=e.length-4,o=e.length-2;t[qt]=Je(e.substr(0,n)),t[hn]=Je(e.substr(n,2)),t[ro]=Je(e.substr(o)),Ge(r).bigHour=!0});bt("Hmm",function(e,t,r){var n=e.length-2;t[qt]=Je(e.substr(0,n)),t[hn]=Je(e.substr(n))});bt("Hmmss",function(e,t,r){var n=e.length-4,o=e.length-2;t[qt]=Je(e.substr(0,n)),t[hn]=Je(e.substr(n,2)),t[ro]=Je(e.substr(o))});function Xre(e){return(e+"").toLowerCase().charAt(0)==="p"}var qre=/[ap]\.?m?\.?/i,Zre=pf("Hours",!0);function Qre(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var kF={calendar:Fte,longDateFormat:zte,invalidDate:Gte,ordinal:Xte,dayOfMonthOrdinalParse:qte,relativeTime:Qte,months:hre,monthsShort:bF,week:Rre,weekdays:Ire,weekdaysMin:Mre,weekdaysShort:EF,meridiemParse:qre},Et={},If={},Mc;function Jre(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 P1(e){return e&&e.toLowerCase().replace("_","-")}function ene(e){for(var t=0,r,n,o,i;t<e.length;){for(i=P1(e[t]).split("-"),r=i.length,n=P1(e[t+1]),n=n?n.split("-"):null;r>0;){if(o=bm(i.slice(0,r).join("-")),o)return o;if(n&&n.length>=r&&Jre(i,n)>=r-1)break;r--}t++}return Mc}function tne(e){return e.match("^[^/\\\\]*$")!=null}function bm(e){var t=null,r;if(Et[e]===void 0&&typeof module<"u"&&module&&module.exports&&tne(e))try{t=Mc._abbr,r=require,r("./locale/"+e),oi(t)}catch{Et[e]=null}return Et[e]}function oi(e,t){var r;return e&&(Cr(t)?r=Lo(e):r=sT(e,t),r?Mc=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Mc._abbr}function sT(e,t){if(t!==null){var r,n=kF;if(t.abbr=e,Et[e]!=null)cF("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=Et[e]._config;else if(t.parentLocale!=null)if(Et[t.parentLocale]!=null)n=Et[t.parentLocale]._config;else if(r=bm(t.parentLocale),r!=null)n=r._config;else return If[t.parentLocale]||(If[t.parentLocale]=[]),If[t.parentLocale].push({name:e,config:t}),null;return Et[e]=new eT(k_(n,t)),If[e]&&If[e].forEach(function(o){sT(o.name,o.config)}),oi(e),Et[e]}else return delete Et[e],null}function rne(e,t){if(t!=null){var r,n,o=kF;Et[e]!=null&&Et[e].parentLocale!=null?Et[e].set(k_(Et[e]._config,t)):(n=bm(e),n!=null&&(o=n._config),t=k_(o,t),n==null&&(t.abbr=e),r=new eT(t),r.parentLocale=Et[e],Et[e]=r),oi(e)}else Et[e]!=null&&(Et[e].parentLocale!=null?(Et[e]=Et[e].parentLocale,e===oi()&&oi(e)):Et[e]!=null&&delete Et[e]);return Et[e]}function Lo(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Mc;if(!vn(e)){if(t=bm(e),t)return t;e=[e]}return ene(e)}function nne(){return $_(Et)}function uT(e){var t,r=e._a;return r&&Ge(e).overflow===-2&&(t=r[to]<0||r[to]>11?to:r[Mn]<1||r[Mn]>mm(r[ir],r[to])?Mn:r[qt]<0||r[qt]>24||r[qt]===24&&(r[hn]!==0||r[ro]!==0||r[Xi]!==0)?qt:r[hn]<0||r[hn]>59?hn:r[ro]<0||r[ro]>59?ro:r[Xi]<0||r[Xi]>999?Xi:-1,Ge(e)._overflowDayOfYear&&(t<ir||t>Mn)&&(t=Mn),Ge(e)._overflowWeeks&&t===-1&&(t=ure),Ge(e)._overflowWeekday&&t===-1&&(t=fre),Ge(e).overflow=t),e}var one=/^\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)?)?$/,ine=/^\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)?)?$/,ane=/Z|[+-]\d\d(?::?\d\d)?/,Uv=[["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]],mS=[["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/]],lne=/^\/?Date\((-?\d+)/i,sne=/^(?:(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}))$/,une={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function $F(e){var t,r,n=e._i,o=one.exec(n)||ine.exec(n),i,a,l,s,u=Uv.length,f=mS.length;if(o){for(Ge(e).iso=!0,t=0,r=u;t<r;t++)if(Uv[t][1].exec(o[1])){a=Uv[t][0],i=Uv[t][2]!==!1;break}if(a==null){e._isValid=!1;return}if(o[3]){for(t=0,r=f;t<r;t++)if(mS[t][1].exec(o[3])){l=(o[2]||" ")+mS[t][0];break}if(l==null){e._isValid=!1;return}}if(!i&&l!=null){e._isValid=!1;return}if(o[4])if(ane.exec(o[4]))s="Z";else{e._isValid=!1;return}e._f=a+(l||"")+(s||""),cT(e)}else e._isValid=!1}function fne(e,t,r,n,o,i){var a=[cne(e),bF.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(o,10)];return i&&a.push(parseInt(i,10)),a}function cne(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function hne(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function dne(e,t,r){if(e){var n=EF.indexOf(e),o=new Date(t[0],t[1],t[2]).getDay();if(n!==o)return Ge(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function vne(e,t,r){if(e)return une[e];if(t)return 0;var n=parseInt(r,10),o=n%100,i=(n-o)/100;return i*60+o}function AF(e){var t=sne.exec(hne(e._i)),r;if(t){if(r=fne(t[4],t[3],t[2],t[5],t[6],t[7]),!dne(t[1],r,e))return;e._a=r,e._tzm=vne(t[8],t[9],t[10]),e._d=Ac.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Ge(e).rfc2822=!0}else e._isValid=!1}function yne(e){var t=lne.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if($F(e),e._isValid===!1)delete e._isValid;else return;if(AF(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:re.createFromInputFallback(e)}re.createFromInputFallback=Qr("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":""))});function $l(e,t,r){return e??t??r}function pne(e){var t=new Date(re.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function fT(e){var t,r,n=[],o,i,a;if(!e._d){for(o=pne(e),e._w&&e._a[Mn]==null&&e._a[to]==null&&gne(e),e._dayOfYear!=null&&(a=$l(e._a[ir],o[ir]),(e._dayOfYear>hc(a)||e._dayOfYear===0)&&(Ge(e)._overflowDayOfYear=!0),r=Ac(a,0,e._dayOfYear),e._a[to]=r.getUTCMonth(),e._a[Mn]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=o[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[qt]===24&&e._a[hn]===0&&e._a[ro]===0&&e._a[Xi]===0&&(e._nextDay=!0,e._a[qt]=0),e._d=(e._useUTC?Ac:_re).apply(null,n),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[qt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(Ge(e).weekdayMismatch=!0)}}function gne(e){var t,r,n,o,i,a,l,s,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,a=4,r=$l(t.GG,e._a[ir],Ic(_t(),1,4).year),n=$l(t.W,1),o=$l(t.E,1),(o<1||o>7)&&(s=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,u=Ic(_t(),i,a),r=$l(t.gg,e._a[ir],u.year),n=$l(t.w,u.week),t.d!=null?(o=t.d,(o<0||o>6)&&(s=!0)):t.e!=null?(o=t.e+i,(t.e<0||t.e>6)&&(s=!0)):o=i),n<1||n>ko(r,i,a)?Ge(e)._overflowWeeks=!0:s!=null?Ge(e)._overflowWeekday=!0:(l=RF(r,n,o,i,a),e._a[ir]=l.year,e._dayOfYear=l.dayOfYear)}re.ISO_8601=function(){};re.RFC_2822=function(){};function cT(e){if(e._f===re.ISO_8601){$F(e);return}if(e._f===re.RFC_2822){AF(e);return}e._a=[],Ge(e).empty=!0;var t=""+e._i,r,n,o,i,a,l=t.length,s=0,u,f;for(o=hF(e._f,e._locale).match(tT)||[],f=o.length,r=0;r<f;r++)i=o[r],n=(t.match(are(i,e))||[])[0],n&&(a=t.substr(0,t.indexOf(n)),a.length>0&&Ge(e).unusedInput.push(a),t=t.slice(t.indexOf(n)+n.length),s+=n.length),Bl[i]?(n?Ge(e).empty=!1:Ge(e).unusedTokens.push(i),sre(i,n,e)):e._strict&&!n&&Ge(e).unusedTokens.push(i);Ge(e).charsLeftOver=l-s,t.length>0&&Ge(e).unusedInput.push(t),e._a[qt]<=12&&Ge(e).bigHour===!0&&e._a[qt]>0&&(Ge(e).bigHour=void 0),Ge(e).parsedDateParts=e._a.slice(0),Ge(e).meridiem=e._meridiem,e._a[qt]=mne(e._locale,e._a[qt],e._meridiem),u=Ge(e).era,u!==null&&(e._a[ir]=e._locale.erasConvertYear(u,e._a[ir])),fT(e),uT(e)}function mne(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function bne(e){var t,r,n,o,i,a,l=!1,s=e._f.length;if(s===0){Ge(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;o<s;o++)i=0,a=!1,t=JE({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[o],cT(t),QE(t)&&(a=!0),i+=Ge(t).charsLeftOver,i+=Ge(t).unusedTokens.length*10,Ge(t).score=i,l?i<n&&(n=i,r=t):(n==null||i<n||a)&&(n=i,r=t,a&&(l=!0));ei(e,r||t)}function wne(e){if(!e._d){var t=rT(e._i),r=t.day===void 0?t.date:t.day;e._a=uF([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),fT(e)}}function Sne(e){var t=new nv(uT(IF(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function IF(e){var t=e._i,r=e._f;return e._locale=e._locale||Lo(e._l),t===null||r===void 0&&t===""?cm({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),yn(t)?new nv(uT(t)):(rv(t)?e._d=t:vn(r)?bne(e):r?cT(e):Cne(e),QE(e)||(e._d=null),e))}function Cne(e){var t=e._i;Cr(t)?e._d=new Date(re.now()):rv(t)?e._d=new Date(t.valueOf()):typeof t=="string"?yne(e):vn(t)?(e._a=uF(t.slice(0),function(r){return parseInt(r,10)}),fT(e)):Oa(t)?wne(e):Mo(t)?e._d=new Date(t):re.createFromInputFallback(e)}function MF(e,t,r,n,o){var i={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Oa(e)&&ZE(e)||vn(e)&&e.length===0)&&(e=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=o,i._l=r,i._i=e,i._f=t,i._strict=n,Sne(i)}function _t(e,t,r,n){return MF(e,t,r,n,!1)}var _ne=Qr("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=_t.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:cm()}),One=Qr("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=_t.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:cm()});function xF(e,t){var r,n;if(t.length===1&&vn(t[0])&&(t=t[0]),!t.length)return _t();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function Rne(){var e=[].slice.call(arguments,0);return xF("isBefore",e)}function Ene(){var e=[].slice.call(arguments,0);return xF("isAfter",e)}var Tne=function(){return Date.now?Date.now():+new Date},Mf=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Pne(e){var t,r=!1,n,o=Mf.length;for(t in e)if(st(e,t)&&!(Ft.call(Mf,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<o;++n)if(e[Mf[n]]){if(r)return!1;parseFloat(e[Mf[n]])!==Je(e[Mf[n]])&&(r=!0)}return!0}function kne(){return this._isValid}function $ne(){return bn(NaN)}function wm(e){var t=rT(e),r=t.year||0,n=t.quarter||0,o=t.month||0,i=t.week||t.isoWeek||0,a=t.day||0,l=t.hour||0,s=t.minute||0,u=t.second||0,f=t.millisecond||0;this._isValid=Pne(t),this._milliseconds=+f+u*1e3+s*6e4+l*1e3*60*60,this._days=+a+i*7,this._months=+o+n*3+r*12,this._data={},this._locale=Lo(),this._bubble()}function Wy(e){return e instanceof wm}function I_(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Ane(e,t,r){var n=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),i=0,a;for(a=0;a<n;a++)(r&&e[a]!==t[a]||!r&&Je(e[a])!==Je(t[a]))&&i++;return i+o}function DF(e,t){ke(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Nn(~~(r/60),2)+t+Nn(~~r%60,2)})}DF("Z",":");DF("ZZ","");Se("Z",gm);Se("ZZ",gm);bt(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=hT(gm,e)});var Ine=/([\+\-]|\d\d)/gi;function hT(e,t){var r=(t||"").match(e),n,o,i;return r===null?null:(n=r[r.length-1]||[],o=(n+"").match(Ine)||["-",0,0],i=+(o[1]*60)+Je(o[2]),i===0?0:o[0]==="+"?i:-i)}function dT(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(yn(e)||rv(e)?e.valueOf():_t(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),re.updateOffset(r,!1),r):_t(e).local()}function M_(e){return-Math.round(e._d.getTimezoneOffset())}re.updateOffset=function(){};function Mne(e,t,r){var n=this._offset||0,o;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=hT(gm,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(o=M_(this)),this._offset=e,this._isUTC=!0,o!=null&&this.add(o,"m"),n!==e&&(!t||this._changeInProgress?LF(this,bn(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,re.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:M_(this)}function xne(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Dne(e){return this.utcOffset(0,e)}function Nne(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(M_(this),"m")),this}function Hne(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=hT(ore,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Lne(e){return this.isValid()?(e=e?_t(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function jne(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Bne(){if(!Cr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return JE(e,this),e=IF(e),e._a?(t=e._isUTC?Bn(e._a):_t(e._a),this._isDSTShifted=this.isValid()&&Ane(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Fne(){return this.isValid()?!this._isUTC:!1}function Vne(){return this.isValid()?this._isUTC:!1}function NF(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Wne=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Une=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function bn(e,t){var r=e,n=null,o,i,a;return Wy(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:Mo(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=Wne.exec(e))?(o=n[1]==="-"?-1:1,r={y:0,d:Je(n[Mn])*o,h:Je(n[qt])*o,m:Je(n[hn])*o,s:Je(n[ro])*o,ms:Je(I_(n[Xi]*1e3))*o}):(n=Une.exec(e))?(o=n[1]==="-"?-1:1,r={y:Mi(n[2],o),M:Mi(n[3],o),w:Mi(n[4],o),d:Mi(n[5],o),h:Mi(n[6],o),m:Mi(n[7],o),s:Mi(n[8],o)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(a=zne(_t(r.from),_t(r.to)),r={},r.ms=a.milliseconds,r.M=a.months),i=new wm(r),Wy(e)&&st(e,"_locale")&&(i._locale=e._locale),Wy(e)&&st(e,"_isValid")&&(i._isValid=e._isValid),i}bn.fn=wm.prototype;bn.invalid=$ne;function Mi(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function k1(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function zne(e,t){var r;return e.isValid()&&t.isValid()?(t=dT(t,e),e.isBefore(t)?r=k1(e,t):(r=k1(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function HF(e,t){return function(r,n){var o,i;return n!==null&&!isNaN(+n)&&(cF(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."),i=r,r=n,n=i),o=bn(r,n),LF(this,o,e),this}}function LF(e,t,r,n){var o=t._milliseconds,i=I_(t._days),a=I_(t._months);e.isValid()&&(n=n??!0,a&&SF(e,Ap(e,"Month")+a*r),i&&vF(e,"Date",Ap(e,"Date")+i*r),o&&e._d.setTime(e._d.valueOf()+o*r),n&&re.updateOffset(e,i||a))}var Yne=HF(1,"add"),Gne=HF(-1,"subtract");function jF(e){return typeof e=="string"||e instanceof String}function Kne(e){return yn(e)||rv(e)||jF(e)||Mo(e)||qne(e)||Xne(e)||e===null||e===void 0}function Xne(e){var t=Oa(e)&&!ZE(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o,i,a=n.length;for(o=0;o<a;o+=1)i=n[o],r=r||st(e,i);return t&&r}function qne(e){var t=vn(e),r=!1;return t&&(r=e.filter(function(n){return!Mo(n)&&jF(e)}).length===0),t&&r}function Zne(e){var t=Oa(e)&&!ZE(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],o,i;for(o=0;o<n.length;o+=1)i=n[o],r=r||st(e,i);return t&&r}function Qne(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 Jne(e,t){arguments.length===1&&(arguments[0]?Kne(arguments[0])?(e=arguments[0],t=void 0):Zne(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||_t(),n=dT(r,this).startOf("day"),o=re.calendarFormat(this,n)||"sameElse",i=t&&(Fn(t[o])?t[o].call(this,r):t[o]);return this.format(i||this.localeData().calendar(o,this,_t(r)))}function eoe(){return new nv(this)}function toe(e,t){var r=yn(e)?e:_t(e);return this.isValid()&&r.isValid()?(t=Jr(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function roe(e,t){var r=yn(e)?e:_t(e);return this.isValid()&&r.isValid()?(t=Jr(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function noe(e,t,r,n){var o=yn(e)?e:_t(e),i=yn(t)?t:_t(t);return this.isValid()&&o.isValid()&&i.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(o,r):!this.isBefore(o,r))&&(n[1]===")"?this.isBefore(i,r):!this.isAfter(i,r))):!1}function ooe(e,t){var r=yn(e)?e:_t(e),n;return this.isValid()&&r.isValid()?(t=Jr(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function ioe(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function aoe(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function loe(e,t,r){var n,o,i;if(!this.isValid())return NaN;if(n=dT(e,this),!n.isValid())return NaN;switch(o=(n.utcOffset()-this.utcOffset())*6e4,t=Jr(t),t){case"year":i=Uy(this,n)/12;break;case"month":i=Uy(this,n);break;case"quarter":i=Uy(this,n)/3;break;case"second":i=(this-n)/1e3;break;case"minute":i=(this-n)/6e4;break;case"hour":i=(this-n)/36e5;break;case"day":i=(this-n-o)/864e5;break;case"week":i=(this-n-o)/6048e5;break;default:i=this-n}return r?i:Gr(i)}function Uy(e,t){if(e.date()<t.date())return-Uy(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),o,i;return t-n<0?(o=e.clone().add(r-1,"months"),i=(t-n)/(n-o)):(o=e.clone().add(r+1,"months"),i=(t-n)/(o-n)),-(r+i)||0}re.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";re.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function soe(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function uoe(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?Vy(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Fn(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Vy(r,"Z")):Vy(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function foe(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,o,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(r+n+o+i)}function coe(e){e||(e=this.isUtc()?re.defaultFormatUtc:re.defaultFormat);var t=Vy(this,e);return this.localeData().postformat(t)}function hoe(e,t){return this.isValid()&&(yn(e)&&e.isValid()||_t(e).isValid())?bn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function doe(e){return this.from(_t(),e)}function voe(e,t){return this.isValid()&&(yn(e)&&e.isValid()||_t(e).isValid())?bn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function yoe(e){return this.to(_t(),e)}function BF(e){var t;return e===void 0?this._locale._abbr:(t=Lo(e),t!=null&&(this._locale=t),this)}var FF=Qr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function VF(){return this._locale}var xp=1e3,Fl=60*xp,Dp=60*Fl,WF=(365*400+97)*24*Dp;function Vl(e,t){return(e%t+t)%t}function UF(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-WF:new Date(e,t,r).valueOf()}function zF(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-WF:Date.UTC(e,t,r)}function poe(e){var t,r;if(e=Jr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?zF:UF,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-=Vl(t+(this._isUTC?0:this.utcOffset()*Fl),Dp);break;case"minute":t=this._d.valueOf(),t-=Vl(t,Fl);break;case"second":t=this._d.valueOf(),t-=Vl(t,xp);break}return this._d.setTime(t),re.updateOffset(this,!0),this}function goe(e){var t,r;if(e=Jr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?zF:UF,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+=Dp-Vl(t+(this._isUTC?0:this.utcOffset()*Fl),Dp)-1;break;case"minute":t=this._d.valueOf(),t+=Fl-Vl(t,Fl)-1;break;case"second":t=this._d.valueOf(),t+=xp-Vl(t,xp)-1;break}return this._d.setTime(t),re.updateOffset(this,!0),this}function moe(){return this._d.valueOf()-(this._offset||0)*6e4}function boe(){return Math.floor(this.valueOf()/1e3)}function woe(){return new Date(this.valueOf())}function Soe(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Coe(){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 _oe(){return this.isValid()?this.toISOString():null}function Ooe(){return QE(this)}function Roe(){return ei({},Ge(this))}function Eoe(){return Ge(this).overflow}function Toe(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}ke("N",0,0,"eraAbbr");ke("NN",0,0,"eraAbbr");ke("NNN",0,0,"eraAbbr");ke("NNNN",0,0,"eraName");ke("NNNNN",0,0,"eraNarrow");ke("y",["y",1],"yo","eraYear");ke("y",["yy",2],0,"eraYear");ke("y",["yyy",3],0,"eraYear");ke("y",["yyyy",4],0,"eraYear");Se("N",vT);Se("NN",vT);Se("NNN",vT);Se("NNNN",Loe);Se("NNNNN",joe);bt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var o=r._locale.erasParse(e,n,r._strict);o?Ge(r).era=o:Ge(r).invalidEra=e});Se("y",gf);Se("yy",gf);Se("yyy",gf);Se("yyyy",gf);Se("yo",Boe);bt(["y","yy","yyy","yyyy"],ir);bt(["yo"],function(e,t,r,n){var o;r._locale._eraYearOrdinalRegex&&(o=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[ir]=r._locale.eraYearOrdinalParse(e,o):t[ir]=parseInt(e,10)});function Poe(e,t){var r,n,o,i=this._eras||Lo("en")._eras;for(r=0,n=i.length;r<n;++r){switch(typeof i[r].since){case"string":o=re(i[r].since).startOf("day"),i[r].since=o.valueOf();break}switch(typeof i[r].until){case"undefined":i[r].until=1/0;break;case"string":o=re(i[r].until).startOf("day").valueOf(),i[r].until=o.valueOf();break}}return i}function koe(e,t,r){var n,o,i=this.eras(),a,l,s;for(e=e.toUpperCase(),n=0,o=i.length;n<o;++n)if(a=i[n].name.toUpperCase(),l=i[n].abbr.toUpperCase(),s=i[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(l===e)return i[n];break;case"NNNN":if(a===e)return i[n];break;case"NNNNN":if(s===e)return i[n];break}else if([a,l,s].indexOf(e)>=0)return i[n]}function $oe(e,t){var r=e.since<=e.until?1:-1;return t===void 0?re(e.since).year():re(e.since).year()+(t-e.offset)*r}function Aoe(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function Ioe(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function Moe(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function xoe(){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()-re(o[e].since).year())*r+o[e].offset;return this.year()}function Doe(e){return st(this,"_erasNameRegex")||yT.call(this),e?this._erasNameRegex:this._erasRegex}function Noe(e){return st(this,"_erasAbbrRegex")||yT.call(this),e?this._erasAbbrRegex:this._erasRegex}function Hoe(e){return st(this,"_erasNarrowRegex")||yT.call(this),e?this._erasNarrowRegex:this._erasRegex}function vT(e,t){return t.erasAbbrRegex(e)}function Loe(e,t){return t.erasNameRegex(e)}function joe(e,t){return t.erasNarrowRegex(e)}function Boe(e,t){return t._eraYearOrdinalRegex||gf}function yT(){var e=[],t=[],r=[],n=[],o,i,a=this.eras();for(o=0,i=a.length;o<i;++o)t.push(Nr(a[o].name)),e.push(Nr(a[o].abbr)),r.push(Nr(a[o].narrow)),n.push(Nr(a[o].name)),n.push(Nr(a[o].abbr)),n.push(Nr(a[o].narrow));this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}ke(0,["gg",2],0,function(){return this.weekYear()%100});ke(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Sm(e,t){ke(0,[e,e.length],0,t)}Sm("gggg","weekYear");Sm("ggggg","weekYear");Sm("GGGG","isoWeekYear");Sm("GGGGG","isoWeekYear");lr("weekYear","gg");lr("isoWeekYear","GG");sr("weekYear",1);sr("isoWeekYear",1);Se("G",pm);Se("g",pm);Se("GG",Rt,Vr);Se("gg",Rt,Vr);Se("GGGG",oT,nT);Se("gggg",oT,nT);Se("GGGGG",ym,dm);Se("ggggg",ym,dm);iv(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=Je(e)});iv(["gg","GG"],function(e,t,r,n){t[n]=re.parseTwoDigitYear(e)});function Foe(e){return YF.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Voe(e){return YF.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Woe(){return ko(this.year(),1,4)}function Uoe(){return ko(this.isoWeekYear(),1,4)}function zoe(){var e=this.localeData()._week;return ko(this.year(),e.dow,e.doy)}function Yoe(){var e=this.localeData()._week;return ko(this.weekYear(),e.dow,e.doy)}function YF(e,t,r,n,o){var i;return e==null?Ic(this,n,o).year:(i=ko(e,n,o),t>i&&(t=i),Goe.call(this,e,t,r,n,o))}function Goe(e,t,r,n,o){var i=RF(e,t,r,n,o),a=Ac(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}ke("Q",0,"Qo","quarter");lr("quarter","Q");sr("quarter",7);Se("Q",yF);bt("Q",function(e,t){t[to]=(Je(e)-1)*3});function Koe(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}ke("D",["DD",2],"Do","date");lr("date","D");sr("date",9);Se("D",Rt);Se("DD",Rt,Vr);Se("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});bt(["D","DD"],Mn);bt("Do",function(e,t){t[Mn]=Je(e.match(Rt)[0])});var GF=pf("Date",!0);ke("DDD",["DDDD",3],"DDDo","dayOfYear");lr("dayOfYear","DDD");sr("dayOfYear",4);Se("DDD",vm);Se("DDDD",pF);bt(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Je(e)});function Xoe(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}ke("m",["mm",2],0,"minute");lr("minute","m");sr("minute",14);Se("m",Rt);Se("mm",Rt,Vr);bt(["m","mm"],hn);var qoe=pf("Minutes",!1);ke("s",["ss",2],0,"second");lr("second","s");sr("second",15);Se("s",Rt);Se("ss",Rt,Vr);bt(["s","ss"],ro);var Zoe=pf("Seconds",!1);ke("S",0,0,function(){return~~(this.millisecond()/100)});ke(0,["SS",2],0,function(){return~~(this.millisecond()/10)});ke(0,["SSS",3],0,"millisecond");ke(0,["SSSS",4],0,function(){return this.millisecond()*10});ke(0,["SSSSS",5],0,function(){return this.millisecond()*100});ke(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});ke(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});ke(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});ke(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});lr("millisecond","ms");sr("millisecond",16);Se("S",vm,yF);Se("SS",vm,Vr);Se("SSS",vm,pF);var ti,KF;for(ti="SSSS";ti.length<=9;ti+="S")Se(ti,gf);function Qoe(e,t){t[Xi]=Je(("0."+e)*1e3)}for(ti="S";ti.length<=9;ti+="S")bt(ti,Qoe);KF=pf("Milliseconds",!1);ke("z",0,0,"zoneAbbr");ke("zz",0,0,"zoneName");function Joe(){return this._isUTC?"UTC":""}function eie(){return this._isUTC?"Coordinated Universal Time":""}var ne=nv.prototype;ne.add=Yne;ne.calendar=Jne;ne.clone=eoe;ne.diff=loe;ne.endOf=goe;ne.format=coe;ne.from=hoe;ne.fromNow=doe;ne.to=voe;ne.toNow=yoe;ne.get=rre;ne.invalidAt=Eoe;ne.isAfter=toe;ne.isBefore=roe;ne.isBetween=noe;ne.isSame=ooe;ne.isSameOrAfter=ioe;ne.isSameOrBefore=aoe;ne.isValid=Ooe;ne.lang=FF;ne.locale=BF;ne.localeData=VF;ne.max=One;ne.min=_ne;ne.parsingFlags=Roe;ne.set=nre;ne.startOf=poe;ne.subtract=Gne;ne.toArray=Soe;ne.toObject=Coe;ne.toDate=woe;ne.toISOString=uoe;ne.inspect=foe;typeof Symbol<"u"&&Symbol.for!=null&&(ne[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ne.toJSON=_oe;ne.toString=soe;ne.unix=boe;ne.valueOf=moe;ne.creationData=Toe;ne.eraName=Aoe;ne.eraNarrow=Ioe;ne.eraAbbr=Moe;ne.eraYear=xoe;ne.year=OF;ne.isLeapYear=Cre;ne.weekYear=Foe;ne.isoWeekYear=Voe;ne.quarter=ne.quarters=Koe;ne.month=CF;ne.daysInMonth=bre;ne.week=ne.weeks=Pre;ne.isoWeek=ne.isoWeeks=kre;ne.weeksInYear=zoe;ne.weeksInWeekYear=Yoe;ne.isoWeeksInYear=Woe;ne.isoWeeksInISOWeekYear=Uoe;ne.date=GF;ne.day=ne.days=Vre;ne.weekday=Wre;ne.isoWeekday=Ure;ne.dayOfYear=Xoe;ne.hour=ne.hours=Zre;ne.minute=ne.minutes=qoe;ne.second=ne.seconds=Zoe;ne.millisecond=ne.milliseconds=KF;ne.utcOffset=Mne;ne.utc=Dne;ne.local=Nne;ne.parseZone=Hne;ne.hasAlignedHourOffset=Lne;ne.isDST=jne;ne.isLocal=Fne;ne.isUtcOffset=Vne;ne.isUtc=NF;ne.isUTC=NF;ne.zoneAbbr=Joe;ne.zoneName=eie;ne.dates=Qr("dates accessor is deprecated. Use date instead.",GF);ne.months=Qr("months accessor is deprecated. Use month instead",CF);ne.years=Qr("years accessor is deprecated. Use year instead",OF);ne.zone=Qr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",xne);ne.isDSTShifted=Qr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Bne);function tie(e){return _t(e*1e3)}function rie(){return _t.apply(null,arguments).parseZone()}function XF(e){return e}var ut=eT.prototype;ut.calendar=Vte;ut.longDateFormat=Yte;ut.invalidDate=Kte;ut.ordinal=Zte;ut.preparse=XF;ut.postformat=XF;ut.relativeTime=Jte;ut.pastFuture=ere;ut.set=Bte;ut.eras=Poe;ut.erasParse=koe;ut.erasConvertYear=$oe;ut.erasAbbrRegex=Noe;ut.erasNameRegex=Doe;ut.erasNarrowRegex=Hoe;ut.months=yre;ut.monthsShort=pre;ut.monthsParse=mre;ut.monthsRegex=Sre;ut.monthsShortRegex=wre;ut.week=Ore;ut.firstDayOfYear=Tre;ut.firstDayOfWeek=Ere;ut.weekdays=Hre;ut.weekdaysMin=jre;ut.weekdaysShort=Lre;ut.weekdaysParse=Fre;ut.weekdaysRegex=zre;ut.weekdaysShortRegex=Yre;ut.weekdaysMinRegex=Gre;ut.isPM=Xre;ut.meridiem=Qre;function Np(e,t,r,n){var o=Lo(),i=Bn().set(n,t);return o[r](i,e)}function qF(e,t,r){if(Mo(e)&&(t=e,e=void 0),e=e||"",t!=null)return Np(e,t,r,"month");var n,o=[];for(n=0;n<12;n++)o[n]=Np(e,n,r,"month");return o}function pT(e,t,r,n){typeof e=="boolean"?(Mo(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,Mo(t)&&(r=t,t=void 0),t=t||"");var o=Lo(),i=e?o._week.dow:0,a,l=[];if(r!=null)return Np(t,(r+i)%7,n,"day");for(a=0;a<7;a++)l[a]=Np(t,(a+i)%7,n,"day");return l}function nie(e,t){return qF(e,t,"months")}function oie(e,t){return qF(e,t,"monthsShort")}function iie(e,t,r){return pT(e,t,r,"weekdays")}function aie(e,t,r){return pT(e,t,r,"weekdaysShort")}function lie(e,t,r){return pT(e,t,r,"weekdaysMin")}oi("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,r=Je(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});re.lang=Qr("moment.lang is deprecated. Use moment.locale instead.",oi);re.langData=Qr("moment.langData is deprecated. Use moment.localeData instead.",Lo);var Un=Math.abs;function sie(){var e=this._data;return this._milliseconds=Un(this._milliseconds),this._days=Un(this._days),this._months=Un(this._months),e.milliseconds=Un(e.milliseconds),e.seconds=Un(e.seconds),e.minutes=Un(e.minutes),e.hours=Un(e.hours),e.months=Un(e.months),e.years=Un(e.years),this}function ZF(e,t,r,n){var o=bn(t,r);return e._milliseconds+=n*o._milliseconds,e._days+=n*o._days,e._months+=n*o._months,e._bubble()}function uie(e,t){return ZF(this,e,t,1)}function fie(e,t){return ZF(this,e,t,-1)}function $1(e){return e<0?Math.floor(e):Math.ceil(e)}function cie(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,o,i,a,l,s;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=$1(x_(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,o=Gr(e/1e3),n.seconds=o%60,i=Gr(o/60),n.minutes=i%60,a=Gr(i/60),n.hours=a%24,t+=Gr(a/24),s=Gr(QF(t)),r+=s,t-=$1(x_(s)),l=Gr(r/12),r%=12,n.days=t,n.months=r,n.years=l,this}function QF(e){return e*4800/146097}function x_(e){return e*146097/4800}function hie(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=Jr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+QF(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(x_(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function die(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Je(this._months/12)*31536e6:NaN}function jo(e){return function(){return this.as(e)}}var vie=jo("ms"),yie=jo("s"),pie=jo("m"),gie=jo("h"),mie=jo("d"),bie=jo("w"),wie=jo("M"),Sie=jo("Q"),Cie=jo("y");function _ie(){return bn(this)}function Oie(e){return e=Jr(e),this.isValid()?this[e+"s"]():NaN}function Ga(e){return function(){return this.isValid()?this._data[e]:NaN}}var Rie=Ga("milliseconds"),Eie=Ga("seconds"),Tie=Ga("minutes"),Pie=Ga("hours"),kie=Ga("days"),$ie=Ga("months"),Aie=Ga("years");function Iie(){return Gr(this.days()/7)}var Zn=Math.round,Nl={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Mie(e,t,r,n,o){return o.relativeTime(t||1,!!r,e,n)}function xie(e,t,r,n){var o=bn(e).abs(),i=Zn(o.as("s")),a=Zn(o.as("m")),l=Zn(o.as("h")),s=Zn(o.as("d")),u=Zn(o.as("M")),f=Zn(o.as("w")),c=Zn(o.as("y")),h=i<=r.ss&&["s",i]||i<r.s&&["ss",i]||a<=1&&["m"]||a<r.m&&["mm",a]||l<=1&&["h"]||l<r.h&&["hh",l]||s<=1&&["d"]||s<r.d&&["dd",s];return r.w!=null&&(h=h||f<=1&&["w"]||f<r.w&&["ww",f]),h=h||u<=1&&["M"]||u<r.M&&["MM",u]||c<=1&&["y"]||["yy",c],h[2]=t,h[3]=+e>0,h[4]=n,Mie.apply(null,h)}function Die(e){return e===void 0?Zn:typeof e=="function"?(Zn=e,!0):!1}function Nie(e,t){return Nl[e]===void 0?!1:t===void 0?Nl[e]:(Nl[e]=t,e==="s"&&(Nl.ss=t-1),!0)}function Hie(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Nl,o,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Nl,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),o=this.localeData(),i=xie(this,!r,n,o),r&&(i=o.pastFuture(+this,i)),o.postformat(i)}var bS=Math.abs;function ol(e){return(e>0)-(e<0)||+e}function Cm(){if(!this.isValid())return this.localeData().invalidDate();var e=bS(this._milliseconds)/1e3,t=bS(this._days),r=bS(this._months),n,o,i,a,l=this.asSeconds(),s,u,f,c;return l?(n=Gr(e/60),o=Gr(n/60),e%=60,n%=60,i=Gr(r/12),r%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",s=l<0?"-":"",u=ol(this._months)!==ol(l)?"-":"",f=ol(this._days)!==ol(l)?"-":"",c=ol(this._milliseconds)!==ol(l)?"-":"",s+"P"+(i?u+i+"Y":"")+(r?u+r+"M":"")+(t?f+t+"D":"")+(o||n||e?"T":"")+(o?c+o+"H":"")+(n?c+n+"M":"")+(e?c+a+"S":"")):"P0D"}var nt=wm.prototype;nt.isValid=kne;nt.abs=sie;nt.add=uie;nt.subtract=fie;nt.as=hie;nt.asMilliseconds=vie;nt.asSeconds=yie;nt.asMinutes=pie;nt.asHours=gie;nt.asDays=mie;nt.asWeeks=bie;nt.asMonths=wie;nt.asQuarters=Sie;nt.asYears=Cie;nt.valueOf=die;nt._bubble=cie;nt.clone=_ie;nt.get=Oie;nt.milliseconds=Rie;nt.seconds=Eie;nt.minutes=Tie;nt.hours=Pie;nt.days=kie;nt.weeks=Iie;nt.months=$ie;nt.years=Aie;nt.humanize=Hie;nt.toISOString=Cm;nt.toString=Cm;nt.toJSON=Cm;nt.locale=BF;nt.localeData=VF;nt.toIsoString=Qr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Cm);nt.lang=FF;ke("X",0,0,"unix");ke("x",0,0,"valueOf");Se("x",pm);Se("X",ire);bt("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});bt("x",function(e,t,r){r._d=new Date(Je(e))});//! moment.js
re.version="2.29.4";Lte(_t);re.fn=ne;re.min=Rne;re.max=Ene;re.now=Tne;re.utc=Bn;re.unix=tie;re.months=nie;re.isDate=rv;re.locale=oi;re.invalid=cm;re.duration=bn;re.isMoment=yn;re.weekdays=iie;re.parseZone=rie;re.localeData=Lo;re.isDuration=Wy;re.monthsShort=oie;re.weekdaysMin=lie;re.defineLocale=sT;re.updateLocale=rne;re.locales=nne;re.weekdaysShort=aie;re.normalizeUnits=Jr;re.relativeTimeRounding=Die;re.relativeTimeThreshold=Nie;re.calendarFormat=Qne;re.prototype=ne;re.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"};const Lie=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"}));function dt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=Lt(e,function(i,a,l){var s=a.replace(/\r?\n\s*/g,""),u=r[l]?r[l]:"";return i+s+u},"");return o.trim()}var A1,I1,M1,x1,D1,N1;function Wl(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function D_(e){return D_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D_(e)}function Mt(e){var t;switch(D_(e)){case"string":case"number":t="".concat(e);break;case"object":t=e===null?"":e.toString();break;case"undefined":t="";break;default:t=e.toString();break}return t}function pe(e){return typeof e<"u"}function pt(e){return typeof e>"u"}function Kt(e){return e===null||e===""||pt(e)}function JF(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var oc="length",dc=function(t){return parseInt(t,16)},H1=function(t){return parseInt(t,10)},Hp=function(t,r,n){return t.substr(r,n)},vc=function(t){return t.codePointAt(0)-65},N_=function(t){return"".concat(t).replace(/\-/g,"")},jie=function(t){return dc(Hp(N_(t),dc("12"),vc("F")))/(dc(Hp(N_(t),vc("B"),~~![][oc]))||9)},Bie=function(){return typeof location<"u"&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host)},L1=!1,j1={invalid:function(){return dt(A1||(A1=Wl([`
The license key for Handsontable is invalid.
If you need any help, contact us at support@handsontable.com.`],[`
The license key for Handsontable is invalid.\\x20
If you need any help, contact us at support@handsontable.com.`])))},expired:function(t){var r=t.keyValidityDate,n=t.hotVersion;return dt(I1||(I1=Wl([`
The license key for Handsontable expired on `,`, and is not valid for the installed
version `,`. Renew your license key at handsontable.com or downgrade to a version released prior
to `,". If you need any help, contact us at sales@handsontable.com."],[`
The license key for Handsontable expired on `,`, and is not valid for the installed\\x20
version `,`. Renew your license key at handsontable.com or downgrade to a version released prior\\x20
to `,". If you need any help, contact us at sales@handsontable.com."])),r,n,r)},missing:function(){return dt(M1||(M1=Wl([`
The license key for Handsontable is missing. Use your purchased key to activate the product.
Alternatively, you can activate Handsontable to use for non-commercial purposes by
passing the key: 'non-commercial-and-evaluation'. If you need any help, contact
us at support@handsontable.com.`],[`
The license key for Handsontable is missing. Use your purchased key to activate the product.\\x20
Alternatively, you can activate Handsontable to use for non-commercial purposes by\\x20
passing the key: 'non-commercial-and-evaluation'. If you need any help, contact\\x20
us at support@handsontable.com.`])))},non_commercial:function(){return""}},B1={invalid:function(){return dt(x1||(x1=Wl([`
The license key for Handsontable is invalid.
<a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to
install it properly or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`],[`
The license key for Handsontable is invalid.\\x20
<a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to\\x20
install it properly or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`])))},expired:function(t){var r=t.keyValidityDate,n=t.hotVersion;return dt(D1||(D1=Wl([`
The license key for Handsontable expired on `,`, and is not valid for the installed
version `,`. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your
license key or downgrade to a version released prior to `,`. If you need any
help, contact us at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.`],[`
The license key for Handsontable expired on `,`, and is not valid for the installed\\x20
version `,`. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your\\x20
license key or downgrade to a version released prior to `,`. If you need any\\x20
help, contact us at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.`])),r,n,r)},missing:function(){return dt(N1||(N1=Wl([`
The license key for Handsontable is missing. Use your purchased key to activate the product.
Alternatively, you can activate Handsontable to use for non-commercial purposes by
passing the key: 'non-commercial-and-evaluation'.
<a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in
the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`],[`
The license key for Handsontable is missing. Use your purchased key to activate the product.\\x20
Alternatively, you can activate Handsontable to use for non-commercial purposes by\\x20
passing the key: 'non-commercial-and-evaluation'.\\x20
<a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in\\x20
the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`])))},non_commercial:function(){return""}};function eV(e,t){var r=!Kt(e),n=typeof e=="string"&&e.toLowerCase()==="non-commercial-and-evaluation",o="12.3.2",i,a="invalid",l="invalid";e=N_(e||"");var s=Fie(e);if(r||n||s)if(s){var u=re("23/03/2023","DD/MM/YYYY"),f=Math.floor(u.toDate().getTime()/864e5),c=jie(e);i=re((c+1)*864e5,"x").format("MMMM DD, YYYY"),f>c?(a="expired",l="expired"):(a="valid",l="valid")}else n?(a="non_commercial",l="valid"):(a="invalid",l="invalid");else a="missing",l="missing";if(Bie()&&(a="valid",l="valid"),!L1&&a!=="valid"){var h=j1[a]({keyValidityDate:i,hotVersion:o});h&&console[a==="non_commercial"?"info":"warn"](j1[a]({keyValidityDate:i,hotVersion:o})),L1=!0}if(l!=="valid"&&t.parentNode){var d=B1[l]({keyValidityDate:i,hotVersion:o});if(d){var v=document.createElement("div");v.className="hot-display-license-info",v.innerHTML=B1[l]({keyValidityDate:i,hotVersion:o}),t.parentNode.insertBefore(v,t.nextSibling)}}}function Fie(e){var t=[][oc],r=t;if(e[oc]!==vc("Z"))return!1;for(var n="",o="B<H4P+".split(""),i=vc(o.shift());i;i=vc(o.shift()||"A"))--i<""[oc]?r=r|(H1("".concat(H1(dc(n)+(dc(Hp(e,Math.abs(i),2))+[]).padStart(2,"0"))))%97||2)>>1:n=Hp(e,i,i?o[oc]===1?9:8:6);return r===t}const Vie=Object.freeze(Object.defineProperty({__proto__:null,_injectProductInfo:eV,isDefined:pe,isEmpty:Kt,isRegExp:JF,isUndefined:pt,stringify:Mt},Symbol.toStringTag,{value:"Module"}));function Er(e){return e[0].toUpperCase()+e.substr(1)}function Wie(){for(var e=[],t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var o=r.length;o;){o-=1;var i=Mt(r[o]).toLowerCase();e.indexOf(i)===-1&&e.push(i)}return e.length===1}function gT(){function e(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return e()+e()+e()+e()}function mT(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)}function bT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return"".concat(e).replace(/(?:\\)?\[([^[\]]+)]/g,function(r,n){return r.charAt(0)==="\\"?r.substr(1,r.length-1):t[n]===void 0?"":t[n]})}function H_(e){return _m("".concat(e),{ALLOWED_TAGS:[]})}function _m(e,t){return bte.sanitize(e,t)}const Uie=Object.freeze(Object.defineProperty({__proto__:null,equalsIgnoreCase:Wie,isPercentValue:mT,randomString:gT,sanitize:_m,stripTags:H_,substitute:bT,toUpperCaseFirst:Er},Symbol.toStringTag,{value:"Module"}));function F1(e){return Kie(e)||Gie(e)||Yie(e)||zie()}function zie(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yie(e,t){if(e){if(typeof e=="string")return L_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return L_(e,t)}}function Gie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kie(e){if(Array.isArray(e))return L_(e)}function L_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function tV(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=null,o=e;o!==null;){if(r===t){n=o;break}o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o=o.host:(r+=1,o=o.parentNode)}return n}function rV(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function xc(e){return rV(e)&&e.parent}function Xie(e){return!!Object.getPrototypeOf(e.parent)}function ii(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,n=Node,o=n.ELEMENT_NODE,i=n.DOCUMENT_FRAGMENT_NODE,a=e;a!=null&&a!==r;){var l=a,s=l.nodeType,u=l.nodeName;if(s===o&&(t.includes(u)||t.includes(a)))return a;var f=a,c=f.host;c&&s===i?a=c:a=a.parentNode}return null}function ic(e,t,r){for(var n=[],o=e;o&&(o=ii(o,t,r),!(!o||r&&!r.contains(o)));)n.push(o),o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o=o.host:o=o.parentNode;var i=n.length;return i?n[i-1]:null}function ai(e,t){var r=e.parentNode,n=[];for(typeof t=="string"?e.defaultView?n=Array.prototype.slice.call(e.querySelectorAll(t),0):n=Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):n.push(t);r!==null;){if(n.indexOf(r)>-1)return!0;r=r.parentNode}return!1}function nV(e){var t=0,r=e;if(r.previousSibling)for(;r=r.previousSibling;)t+=1;return t}function Xo(e,t,r){var n=r.parentElement.querySelector(".ht_clone_".concat(e));return n?n.contains(t):null}var j_,B_,F_;function zv(e){return!e||!e.length?[]:e.filter(function(t){return!!t})}if(jB()){var V1=function(t){var r=t.createElement("div");return r.classList.add("test","test2"),r.classList.contains("test2")};j_=function(t,r){return t.classList===void 0||typeof r!="string"||r===""?!1:t.classList.contains(r)},B_=function(t,r){var n=t.ownerDocument,o=r;if(typeof o=="string"&&(o=o.split(" ")),o=zv(o),o.length>0)if(V1(n)){var i;(i=t.classList).add.apply(i,F1(o))}else for(var a=0;o[a];)t.classList.add(o[a]),a+=1},F_=function(t,r){var n=t.ownerDocument,o=r;if(typeof o=="string"&&(o=o.split(" ")),o=zv(o),o.length>0)if(V1(n)){var i;(i=t.classList).remove.apply(i,F1(o))}else for(var a=0;o[a];)t.classList.remove(o[a]),a+=1}}else{var wS=function(t){return new RegExp("(\\s|^)".concat(t,"(\\s|$)"))};j_=function(t,r){return t.className!==void 0&&wS(r).test(t.className)},B_=function(t,r){var n=t.className,o=r;if(typeof o=="string"&&(o=o.split(" ")),o=zv(o),n==="")n=o.join(" ");else for(var i=0;i<o.length;i++)o[i]&&!wS(o[i]).test(n)&&(n+=" ".concat(o[i]));t.className=n},F_=function(t,r){var n=0,o=t.className,i=r;for(typeof i=="string"&&(i=i.split(" ")),i=zv(i);i[n];)o=o.replace(wS(i[n])," ").trim(),n+=1;t.className!==o&&(t.className=o)}}function Ne(e,t){return j_(e,t)}function te(e,t){B_(e,t)}function Be(e,t){F_(e,t)}function wT(e){if(e.nodeType===3)e.parentNode.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1)for(var t=e.childNodes,r=t.length-1;r>=0;r--)wT(t[r])}function pn(e){for(var t;t=e.lastChild;)e.removeChild(t)}var oV=/(<(.*)>|&(.*);)/;function Ka(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;oV.test(t)?e.innerHTML=r?_m(t):t:bi(e,t)}function bi(e,t){var r=e.firstChild;r&&r.nodeType===3&&r.nextSibling===null?BB?r.textContent=t:r.data=t:(pn(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function ns(e){for(var t=e.ownerDocument.documentElement,r=e;r!==t;){if(r===null)return!1;if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE)if(r.host){if(r.host.impl)return ns(r.host.impl);if(r.host)return ns(r.host);throw new Error("Lost in Web Components world")}else return!1;else if(r.style&&r.style.display==="none")return!1;r=r.parentNode}return!0}function Vt(e){var t=e.ownerDocument,r=t.defaultView,n=t.documentElement,o=e,i,a,l,s;if(UE()&&o.firstChild&&o.firstChild.nodeName==="CAPTION")return s=o.getBoundingClientRect(),{top:s.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:s.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)};for(i=o.offsetLeft,a=o.offsetTop,l=o;(o=o.offsetParent)&&o!==t.body;)i+=o.offsetLeft,a+=o.offsetTop,l=o;return l&&l.style.position==="fixed"&&(i+=r.pageXOffset||n.scrollLeft,a+=r.pageYOffset||n.scrollTop),{left:i,top:a}}function os(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window,t=e.scrollY;return t===void 0&&(t=e.document.documentElement.scrollTop),t}function Pa(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window,t=e.scrollX;return t===void 0&&(t=e.document.documentElement.scrollLeft),t}function Dc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:window;return e===t?os(t):e.scrollTop}function Lp(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:window;return e===t?Pa(t):e.scrollLeft}function Nc(e){var t=e.ownerDocument,r=t?t.defaultView:void 0;t||(t=e.document?e.document:e,r=t.defaultView);for(var n=["auto","scroll"],o=FB(),i=e.parentNode;i&&i.style&&t.body!==i;){var a=i.style,l=a.overflow,s=a.overflowX,u=a.overflowY;if([l,s,u].includes("scroll"))return i;if(o){var f=r.getComputedStyle(i);if(l=f.overflow,s=f.overflowX,u=f.overflowY,n.includes(l)||n.includes(s)||n.includes(u))return i}if(i.clientHeight<=i.scrollHeight+1&&(n.includes(u)||n.includes(l))||i.clientWidth<=i.scrollWidth+1&&(n.includes(s)||n.includes(l)))return i;i=i.parentNode}return r}function is(e){for(var t=e.ownerDocument,r=t.defaultView,n=e.parentNode;n&&n.style&&t.body!==n;){if(n.style.overflow!=="visible"&&n.style.overflow!=="")return n;var o=wi(n,r),i=["scroll","hidden","auto"],a=o.getPropertyValue("overflow"),l=o.getPropertyValue("overflow-y"),s=o.getPropertyValue("overflow-x");if(i.includes(a)||i.includes(l)||i.includes(s))return n;n=n.parentNode}return r}function as(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window;if(e){if(e===r)return t==="width"?"".concat(r.innerWidth,"px"):t==="height"?"".concat(r.innerHeight,"px"):void 0}else return;var n=e.style[t];if(n!==""&&n!==void 0)return n;var o=wi(e,r);if(o[t]!==""&&o[t]!==void 0)return o[t]}function qie(e,t){var r=t.selectorText,n=!1;return t.type===CSSRule.STYLE_RULE&&r&&(e.msMatchesSelector?n=e.msMatchesSelector(r):e.matches&&(n=e.matches(r))),n}function wi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}function vt(e){return e.offsetWidth}function Tt(e){return UE()&&e.firstChild&&e.firstChild.nodeName==="CAPTION"?e.offsetHeight+e.firstChild.offsetHeight:e.offsetHeight}function no(e){return e.clientHeight||e.innerHeight}function yc(e){return e.clientWidth||e.innerWidth}function Zie(e,t,r){e.addEventListener(t,r,!1)}function Qie(e,t,r){e.removeEventListener(t,r,!1)}function ST(e){var t=e.ownerDocument;if(e.selectionStart)return e.selectionStart;if(t.selection){e.focus();var r=t.selection.createRange();if(r===null)return 0;var n=e.createTextRange(),o=n.duplicate();return n.moveToBookmark(r.getBookmark()),o.setEndPoint("EndToStart",n),o.text.length}return 0}function iV(e){var t=e.ownerDocument;if(e.selectionEnd)return e.selectionEnd;if(t.selection){var r=t.selection.createRange();if(r===null)return 0;var n=e.createTextRange();return n.text.indexOf(r.text)+r.text.length}return 0}function aV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window,t=e.document,r="";return e.getSelection?r=e.getSelection().toString():t.selection&&t.selection.type!=="Control"&&(r=t.selection.createRange().text),r}function V_(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window,t=e.document;e.getSelection?e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges():t.selection&&t.selection.empty()}function av(e,t,r){if(r===void 0&&(r=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,r)}catch{var n=e.parentNode,o=n.style.display;n.style.display="block",e.setSelectionRange(t,r),n.style.display=o}}}var SS;function Jie(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document,t=e.createElement("div");t.style.height="200px",t.style.width="100%";var 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);var n=t.offsetWidth;r.style.overflow="scroll";var o=t.offsetWidth;return n===o&&(o=r.clientWidth),(e.body||e.documentElement).removeChild(r),n-o}function Zt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;return SS===void 0&&(SS=Jie(e)),SS}function lV(e){return e.offsetWidth!==e.clientWidth}function sV(e){return e.offsetHeight!==e.clientHeight}function Om(e,t,r){nF()?(e.style.top=r,e.style.left=t):eF()?e.style["-webkit-transform"]="translate3d(".concat(t,",").concat(r,",0)"):e.style.transform="translate3d(".concat(t,",").concat(r,",0)")}function eae(e){var t;return e.style.transform&&(t=e.style.transform)!==""?["transform",t]:e.style["-webkit-transform"]&&(t=e.style["-webkit-transform"])!==""?["-webkit-transform",t]:-1}function lv(e){e.style.transform&&e.style.transform!==""?e.style.transform="":e.style["-webkit-transform"]&&e.style["-webkit-transform"]!==""&&(e.style["-webkit-transform"]="")}function Hc(e){var t=["INPUT","SELECT","TEXTAREA"];return e&&(t.indexOf(e.nodeName)>-1||e.contentEditable==="true")}function Rm(e){return Hc(e)&&e.hasAttribute("data-hot-input")===!1}function uV(e){var t=e.ownerDocument.activeElement;Rm(t)||e.select()}function CT(e){return!e.parentNode}function fV(e,t){var r=new IntersectionObserver(function(n,o){n.forEach(function(i){i.isIntersecting&&e.offsetParent!==null&&(t(),o.unobserve(e))})},{root:e.ownerDocument.body});r.observe(e)}const tae=Object.freeze(Object.defineProperty({__proto__:null,HTML_CHARACTERS:oV,addClass:te,addEvent:Zie,clearTextSelection:V_,closest:ii,closestDown:ic,empty:pn,fastInnerHTML:Ka,fastInnerText:bi,getCaretPosition:ST,getComputedStyle:wi,getCssTransform:eae,getFrameElement:rV,getParent:tV,getParentWindow:xc,getScrollLeft:Lp,getScrollTop:Dc,getScrollableElement:Nc,getScrollbarWidth:Zt,getSelectionEndPosition:iV,getSelectionText:aV,getStyle:as,getTrimmingContainer:is,getWindowScrollLeft:Pa,getWindowScrollTop:os,hasAccessToParentWindow:Xie,hasClass:Ne,hasHorizontalScrollbar:sV,hasVerticalScrollbar:lV,index:nV,innerHeight:no,innerWidth:yc,isChildOf:ai,isDetached:CT,isInput:Hc,isOutsideInput:Rm,isVisible:ns,matchesCSSRules:qie,observeVisibilityChangeOnce:fV,offset:Vt,outerHeight:Tt,outerWidth:vt,overlayContainsElement:Xo,removeClass:Be,removeEvent:Qie,removeTextNodes:wT,resetCssTransform:lv,selectElementIfAllowed:uV,setCaretPosition:av,setOverlayPosition:Om},Symbol.toStringTag,{value:"Module"}));function wt(e){return typeof e=="function"}function cV(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:200,r=0,n={lastCallThrottled:!0},o=null;function i(){for(var a=this,l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];var f=Date.now(),c=!1;n.lastCallThrottled=!0,r||(r=f,c=!0);var h=t-(f-r);return c?(n.lastCallThrottled=!1,e.apply(this,s)):(o&&clearTimeout(o),o=setTimeout(function(){n.lastCallThrottled=!1,e.apply(a,s),r=0,o=void 0},h)),n}return i}function rae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:200,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,n=cV(e,t),o=r;function i(){o=r}function a(){for(var l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];return o?(o-=1,e.apply(this,s)):n.apply(this,s)}return a.clearHits=i,a}function _T(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:200,r=null,n;function o(){for(var i=this,a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return r&&clearTimeout(r),r=setTimeout(function(){n=e.apply(i,l)},t),n}return o}function nae(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],o=t.slice(1);return function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return Lt(o,function(u,f){return f(u)},n.apply(this,l))}}function OT(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 i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return e.apply(this,r.concat(a))}}function hV(e){var t=e.length;function r(n){return function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];var s=n.concat(a),u;return s.length>=t?u=e.apply(this,s):u=r(s),u}}return r([])}function oae(e){var t=e.length;function r(n){return function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];var s=n.concat(a.reverse()),u;return s.length>=t?u=e.apply(this,s):u=r(s),u}}return r([])}function jp(e,t,r,n,o,i,a,l){return pe(l)?e.call(t,r,n,o,i,a,l):pe(a)?e.call(t,r,n,o,i,a):pe(i)?e.call(t,r,n,o,i):pe(o)?e.call(t,r,n,o):pe(n)?e.call(t,r,n):pe(r)?e.call(t,r):e.call(t)}const iae=Object.freeze(Object.defineProperty({__proto__:null,curry:hV,curryRight:oae,debounce:_T,fastCall:jp,isFunction:wt,partial:OT,pipe:nae,throttle:cV,throttleAfterHits:rae},Symbol.toStringTag,{value:"Module"}));function gt(){if(pe(console)){var e;(e=console).warn.apply(e,arguments)}}function RT(){if(pe(console)){var e;(e=console).error.apply(e,arguments)}}var aae=Ye,W1=OE,Yv=Ra.getWeakData,lae=CE,sae=Ht,uae=mn,CS=zt,fae=SE,dV=za,U1=xt,vV=No,cae=vV.set,hae=vV.getterFor,dae=dV.find,vae=dV.findIndex,yae=aae([].splice),pae=0,Gv=function(e){return e.frozen||(e.frozen=new yV)},yV=function(){this.entries=[]},_S=function(e,t){return dae(e.entries,function(r){return r[0]===t})};yV.prototype={get:function(e){var t=_S(this,e);if(t)return t[1]},has:function(e){return!!_S(this,e)},set:function(e,t){var r=_S(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=vae(this.entries,function(r){return r[0]===e});return~t&&yae(this.entries,t,1),!!~t}};var pV={getConstructor:function(e,t,r,n){var o=e(function(s,u){lae(s,i),cae(s,{type:t,id:pae++,frozen:void 0}),uae(u)||fae(u,s[n],{that:s,AS_ENTRIES:r})}),i=o.prototype,a=hae(t),l=function(s,u,f){var c=a(s),h=Yv(sae(u),!0);return h===!0?Gv(c).set(u,f):h[c.id]=f,s};return W1(i,{delete:function(s){var u=a(this);if(!CS(s))return!1;var f=Yv(s);return f===!0?Gv(u).delete(s):f&&U1(f,u.id)&&delete f[u.id]},has:function(u){var f=a(this);if(!CS(u))return!1;var c=Yv(u);return c===!0?Gv(f).has(u):c&&U1(c,f.id)}}),W1(i,r?{get:function(u){var f=a(this);if(CS(u)){var c=Yv(u);return c===!0?Gv(f).get(u):c?c[f.id]:void 0}},set:function(u,f){return l(this,u,f)}}:{add:function(u){return l(this,u,!0)}}),o}},gae=hE,z1=St,zy=Ye,Y1=OE,mae=Ra,bae=tm,gV=pV,Kv=zt,Xv=No.enforce,wae=Fe,Sae=YL,sv=Object,Cae=Array.isArray,qv=sv.isExtensible,mV=sv.isFrozen,_ae=sv.isSealed,bV=sv.freeze,Oae=sv.seal,G1={},K1={},Rae=!z1.ActiveXObject&&"ActiveXObject"in z1,xf,wV=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},SV=bae("WeakMap",wV,gV),Al=SV.prototype,Yy=zy(Al.set),Eae=function(){return gae&&wae(function(){var e=bV([]);return Yy(new SV,e,1),!mV(e)})};if(Sae)if(Rae){xf=gV.getConstructor(wV,"WeakMap",!0),mae.enable();var X1=zy(Al.delete),Zv=zy(Al.has),q1=zy(Al.get);Y1(Al,{delete:function(e){if(Kv(e)&&!qv(e)){var t=Xv(this);return t.frozen||(t.frozen=new xf),X1(this,e)||t.frozen.delete(e)}return X1(this,e)},has:function(t){if(Kv(t)&&!qv(t)){var r=Xv(this);return r.frozen||(r.frozen=new xf),Zv(this,t)||r.frozen.has(t)}return Zv(this,t)},get:function(t){if(Kv(t)&&!qv(t)){var r=Xv(this);return r.frozen||(r.frozen=new xf),Zv(this,t)?q1(this,t):r.frozen.get(t)}return q1(this,t)},set:function(t,r){if(Kv(t)&&!qv(t)){var n=Xv(this);n.frozen||(n.frozen=new xf),Zv(this,t)?Yy(this,t,r):n.frozen.set(t,r)}else Yy(this,t,r);return this}})}else Eae()&&Y1(Al,{set:function(t,r){var n;return Cae(t)&&(mV(t)?n=G1:_ae(t)&&(n=K1)),Yy(this,t,r),n==G1&&bV(t),n==K1&&Oae(t),this}});var we={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:jy()?182:174,AUDIO_MUTE:jy()?181:173,AUDIO_UP:jy()?183:175,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,CONTROL:17,DELETE:46,END:35,ENTER:13,ESCAPE:27,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,HOME:36,INSERT:45,MEDIA_NEXT:176,MEDIA_PLAY_PAUSE:179,MEDIA_PREV:177,MEDIA_STOP:178,NULL:0,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PERIOD:190,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,A:65,C:67,D:68,F:70,L:76,O:79,P:80,S:83,V:86,X:88,Y:89,Z:90},Tae=[we.ALT,we.ARROW_DOWN,we.ARROW_LEFT,we.ARROW_RIGHT,we.ARROW_UP,we.AUDIO_DOWN,we.AUDIO_MUTE,we.AUDIO_UP,we.BACKSPACE,we.CAPS_LOCK,we.DELETE,we.END,we.ENTER,we.ESCAPE,we.F1,we.F2,we.F3,we.F4,we.F5,we.F6,we.F7,we.F8,we.F9,we.F10,we.F11,we.F12,we.F13,we.F14,we.F15,we.F16,we.F17,we.F18,we.F19,we.HOME,we.INSERT,we.MEDIA_NEXT,we.MEDIA_PLAY_PAUSE,we.MEDIA_PREV,we.MEDIA_STOP,we.NULL,we.NUM_LOCK,we.PAGE_DOWN,we.PAGE_UP,we.PAUSE,we.SCROLL_LOCK,we.SHIFT,we.TAB];function CV(e){return e===32||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90}function ET(e){return Tae.includes(e)}function Pae(e){var t=[];return kp()?t.push(we.COMMAND_LEFT,we.COMMAND_RIGHT,we.COMMAND_FIREFOX):t.push(we.CONTROL),t.includes(e)}function _V(e){return[we.CONTROL,we.COMMAND_LEFT,we.COMMAND_RIGHT,we.COMMAND_FIREFOX].includes(e)}function ls(e,t){var r=t.split("|"),n=!1;return $(r,function(o){if(e===we[o])return n=!0,!1}),n}const kae=Object.freeze(Object.defineProperty({__proto__:null,KEY_CODES:we,isCtrlKey:Pae,isCtrlMetaKey:_V,isFunctionKey:ET,isKey:ls,isPrintableChar:CV},Symbol.toStringTag,{value:"Module"}));function gn(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function Gi(e){return e.isImmediatePropagationEnabled===!1}function Si(e){return e.button===2}function Em(e){return e.button===0}const $ae=Object.freeze(Object.defineProperty({__proto__:null,isImmediatePropagationStopped:Gi,isLeftClick:Em,isRightClick:Si,stopImmediatePropagation:gn},Symbol.toStringTag,{value:"Module"}));function Lc(e){return Lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lc(e)}var Z1;function Aae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q1(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,Mae(n.key),n)}}function Iae(e,t,r){return t&&Q1(e.prototype,t),r&&Q1(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mae(e){var t=xae(e,"string");return Lc(t)==="symbol"?t:String(t)}function xae(e,t){if(Lc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Lc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dae(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var il=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","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","afterScrollHorizontally","afterScrollVertically","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","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","beforeSetCellMeta","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyRowHeader","modifyRowHeight","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","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","beforeAutofillInsidePopulate","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"],Nae=dt(Z1||(Z1=Dae([`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].
Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to
learn about the migration path.`],[`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\\x20
Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\\x20
learn about the migration path.`]))),OS=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"]]),RS=new Map([["beforeAutofillInsidePopulate",'The plugin hook "beforeAutofillInsidePopulate" is deprecated and will be removed in the next major release.']]),OV=function(){function e(){Aae(this,e),this.globalBucket=this.createEmptyBucket()}return Iae(e,[{key:"createEmptyBucket",value:function(){var r=Object.create(null);return $(il,function(n){return r[n]=[]}),r}},{key:"getBucket",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return r?(r.pluginHookBucket||(r.pluginHookBucket=this.createEmptyBucket()),r.pluginHookBucket):this.globalBucket}},{key:"add",value:function(r,n){var o=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(Array.isArray(n))$(n,function(s){return o.add(r,s,i)});else{OS.has(r)&&gt(bT(Nae,{hookName:r,removedInVersion:OS.get(r)})),RS.has(r)&&gt(RS.get(r));var a=this.getBucket(i);if(typeof a[r]>"u"&&(this.register(r),a[r]=[]),n.skip=!1,a[r].indexOf(n)===-1){var l=!1;n.initialHook&&$(a[r],function(s,u){if(s.initialHook)return a[r][u]=n,l=!0,!1}),l||a[r].push(n)}}return this}},{key:"once",value:function(r,n){var o=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;Array.isArray(n)?$(n,function(a){return o.once(r,a,i)}):(n.runOnce=!0,this.add(r,n,i))}},{key:"remove",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=this.getBucket(o);return typeof i[r]<"u"&&i[r].indexOf(n)>=0?(n.skip=!0,!0):!1}},{key:"has",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,o=this.getBucket(n);return!!(o[r]!==void 0&&o[r].length)}},{key:"run",value:function(r,n,o,i,a,l,s,u){{var f=this.globalBucket[n],c=f?f.length:0,h=0;if(c)for(;h<c;){if(!f[h]||f[h].skip){h+=1;continue}var d=jp(f[h],r,o,i,a,l,s,u);d!==void 0&&(o=d),f[h]&&f[h].runOnce&&this.remove(n,f[h]),h+=1}}{var v=this.getBucket(r)[n],p=v?v.length:0,m=0;if(p)for(;m<p;){if(!v[m]||v[m].skip){m+=1;continue}var w=jp(v[m],r,o,i,a,l,s,u);w!==void 0&&(o=w),v[m]&&v[m].runOnce&&this.remove(n,v[m],r),m+=1}}return o}},{key:"destroy",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;ze(this.getBucket(r),function(n,o,i){return i[o].length=0})}},{key:"register",value:function(r){this.isRegistered(r)||il.push(r)}},{key:"deregister",value:function(r){this.isRegistered(r)&&il.splice(il.indexOf(r),1)}},{key:"isDeprecated",value:function(r){return RS.has(r)||OS.has(r)}},{key:"isRegistered",value:function(r){return il.indexOf(r)>=0}},{key:"getRegistered",value:function(){return il}}],[{key:"getSingleton",value:function(){return Lae()}}]),e}(),Hae=new OV;function Lae(){return Hae}const be=OV;function J1(e){return Vae(e)||Fae(e)||Bae(e)||jae()}function jae(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bae(e,t){if(e){if(typeof e=="string")return W_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return W_(e,t)}}function Fae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vae(e){if(Array.isArray(e))return W_(e)}function W_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ES=new Map;function en(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"common";ES.has(e)||ES.set(e,new Map);var t=ES.get(e);function r(l,s){t.set(l,s)}function n(l){return t.get(l)}function o(l){return t.has(l)}function i(){return J1(t.keys())}function a(){return J1(t.values())}return{register:r,getItem:n,hasItem:o,getNames:i,getValues:a}}var U_=new WeakMap,uv=en("editors"),Wae=uv.register,RV=uv.getItem,EV=uv.hasItem,Uae=uv.getNames;uv.getValues;function zae(e){var t={},r=e;this.getConstructor=function(){return e},this.getInstance=function(n){return n.guid in t||(t[n.guid]=new r(n)),t[n.guid]},be.getSingleton().add("afterDestroy",function(){t[this.guid]=null})}function TV(e,t){var r;if(typeof e=="function")U_.get(e)||_r(null,e),r=U_.get(e);else if(typeof e=="string")r=RV(e);else throw Error('Only strings and functions can be passed as "editor" parameter');if(!r)throw Error('No editor registered under name "'.concat(e,'"'));return r.getInstance(t)}function Bp(e){if(typeof e=="function")return e;if(!EV(e))throw Error('No registered editor found under "'.concat(e,'" name'));return RV(e).getConstructor()}function _r(e,t){e&&typeof e!="string"&&(t=e,e=t.EDITOR_TYPE);var r=new zae(t);typeof e=="string"&&Wae(e,r),U_.set(t,r)}function jc(e){return jc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jc(e)}function Yae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eA(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,Kae(n.key),n)}}function Gae(e,t,r){return t&&eA(e.prototype,t),r&&eA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kae(e){var t=Xae(e,"string");return jc(t)==="symbol"?t:String(t)}function Xae(e,t){if(jc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(jc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gy=0,qae=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;Yae(this,e),this.context=t||this,this.context.eventListeners||(this.context.eventListeners=[])}return Gae(e,[{key:"addEventListener",value:function(r,n,o){var i=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;function l(s){o.call(this,Zae(s))}return typeof a!="boolean"&&!WB()&&(a=!1),this.context.eventListeners.push({element:r,event:n,callback:o,callbackProxy:l,options:a,eventManager:this}),r.addEventListener(n,l,a),Gy+=1,function(){i.removeEventListener(r,n,o)}}},{key:"removeEventListener",value:function(r,n,o){for(var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=this.context.eventListeners.length,l;a;)if(a-=1,l=this.context.eventListeners[a],l.event===n&&l.element===r){if(o&&o!==l.callback||i&&l.eventManager!==this)continue;this.context.eventListeners.splice(a,1),l.element.removeEventListener(l.event,l.callbackProxy,l.options),Gy-=1}}},{key:"clearEvents",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.context)for(var n=this.context.eventListeners.length;n;){n-=1;var o=this.context.eventListeners[n];r&&o.eventManager!==this||(this.context.eventListeners.splice(n,1),o.element.removeEventListener(o.event,o.callbackProxy,o.options),Gy-=1)}}},{key:"clear",value:function(){this.clearEvents()}},{key:"destroy",value:function(){this.clearEvents(),this.context=null}},{key:"destroyWithOwnEventsOnly",value:function(){this.clearEvents(!0),this.context=null}},{key:"fireEvent",value:function(r,n){var o=r.document,i=r;o||(o=r.ownerDocument?r.ownerDocument:r,i=o.defaultView);var a={bubbles:!0,cancelable:n!=="mousemove",view:i,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0},l;o.createEvent?(l=o.createEvent("MouseEvents"),l.initMouseEvent(n,a.bubbles,a.cancelable,a.view,a.detail,a.screenX,a.screenY,a.clientX,a.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,a.button,o.body.parentNode)):l=o.createEventObject(),r.dispatchEvent?r.dispatchEvent(l):r.fireEvent("on".concat(n),l)}}]),e}();function Zae(e){var t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),gn(this)},e}const Pt=qae;function Qae(){return Gy}function Bc(e){return Bc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bc(e)}function Jae(e,t){return nle(e)||rle(e,t)||tle(e,t)||ele()}function ele(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tle(e,t){if(e){if(typeof e=="string")return tA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tA(e,t)}}function tA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rle(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function nle(e){if(Array.isArray(e))return e}function ole(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rA(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,ale(n.key),n)}}function ile(e,t,r){return t&&rA(e.prototype,t),r&&rA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ale(e){var t=lle(e,"string");return Bc(t)==="symbol"?t:String(t)}function lle(e,t){if(Bc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Bc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tm="editorManager.navigation",pc="editorManager.handlingEditor",z_=function(){function e(t,r,n){var o=this;ole(this,e),this.instance=t,this.tableMeta=r,this.selection=n,this.eventManager=new Pt(t),this.destroyed=!1,this.lock=!1,this.activeEditor=void 0,this.cellProperties=void 0;var i=this.instance.getShortcutManager();i.addContext("editor"),this.registerShortcuts(),this.instance.addHook("afterDocumentKeyDown",function(a){return o.onAfterDocumentKeyDown(a)}),this.eventManager.addEventListener(this.instance.rootDocument.documentElement,"compositionstart",function(a){!o.destroyed&&o.instance.isListening()&&o.openEditor("",a)}),this.instance.view._wt.update("onCellDblClick",function(a,l,s){return o.onCellDblClick(a,l,s)})}return ile(e,[{key:"registerShortcuts",value:function(){var r=this,n=this.instance.getShortcutManager(),o=n.getContext("grid"),i=n.getContext("editor"),a={group:pc};i.addShortcuts([{keys:[["Enter"],["Enter","Shift"],["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],callback:function(s,u){r.closeEditorAndSaveChanges(n.isCtrlPressed()),r.moveSelectionAfterEnter(u.includes("shift"))}},{keys:[["Escape"],["Escape","Control/Meta"]],callback:function(){r.closeEditorAndRestoreOriginalValue(n.isCtrlPressed()),r.activeEditor.focus()}}],a),o.addShortcuts([{keys:[["F2"]],callback:function(s){r.openEditor(null,s,!0)}},{keys:[["Backspace"],["Delete"]],callback:function(){r.instance.emptySelectedCells(),r.prepareEditor()}},{keys:[["Enter"],["Enter","Shift"]],callback:function(s,u){r.instance.getSettings().enterBeginsEditing?r.cellProperties.readOnly?r.moveSelectionAfterEnter():r.openEditor(null,s,!0):r.moveSelectionAfterEnter(u.includes("shift")),gn(s)}}],a)}},{key:"lockEditor",value:function(){this.lock=!0}},{key:"unlockEditor",value:function(){this.lock=!1}},{key:"destroyEditor",value:function(r){this.lock||this.closeEditor(r)}},{key:"getActiveEditor",value:function(){return this.activeEditor}},{key:"prepareEditor",value:function(){var r=this;if(!this.lock){if(this.activeEditor&&this.activeEditor.isWaiting()){this.closeEditor(!1,!1,function(p){p&&r.prepareEditor()});return}var n=this.instance.getSelectedRangeLast().highlight,o=n.row,i=n.col,a=this.instance.runHooks("modifyGetCellCoords",o,i),l=o,s=i;if(Array.isArray(a)){var u=Jae(a,2);l=u[0],s=u[1]}this.cellProperties=this.instance.getCellMeta(l,s);var f=this.instance.rootDocument.activeElement;if(f&&Rm(f)&&f.blur(),!this.isCellEditable()){this.clearActiveEditor();return}var c=this.instance.getCell(o,i,!0);if(c){var h=this.instance.getCellEditor(this.cellProperties),d=this.instance.colToProp(s),v=this.instance.getSourceDataAtCell(this.instance.toPhysicalRow(l),s);this.activeEditor=TV(h,this.instance),this.activeEditor.prepare(o,i,d,c,v,this.cellProperties)}}}},{key:"isEditorOpened",value:function(){return this.activeEditor&&this.activeEditor.isOpened()}},{key:"openEditor",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(!this.isCellEditable()){this.clearActiveEditor();return}if(!this.activeEditor){var i=this.instance.getSelectedRangeLast().highlight,a=i.row,l=i.col,s=this.instance.rowIndexMapper.getRenderableFromVisualIndex(a),u=this.instance.columnIndexMapper.getRenderableFromVisualIndex(l);this.instance.view.scrollViewport(this.instance._createCellCoords(s,u)),this.instance.view.render(),this.prepareEditor()}this.activeEditor&&(o&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(r,n))}},{key:"closeEditor",value:function(r,n,o){this.activeEditor?this.activeEditor.finishEditing(r,n,o):o&&o(!1)}},{key:"closeEditorAndSaveChanges",value:function(r){this.closeEditor(!1,r)}},{key:"closeEditorAndRestoreOriginalValue",value:function(r){this.closeEditor(!0,r)}},{key:"clearActiveEditor",value:function(){this.activeEditor=void 0}},{key:"isCellEditable",value:function(){var r=this.instance.getCellEditor(this.cellProperties),n=this.instance.getSelectedRangeLast().highlight,o=n.row,i=n.col,a=this.instance,l=a.rowIndexMapper,s=a.columnIndexMapper,u=l.isHidden(this.instance.toPhysicalRow(o))||s.isHidden(this.instance.toPhysicalColumn(i));return!(this.cellProperties.readOnly||!r||u)}},{key:"moveSelectionAfterEnter",value:function(r){var n=typeof this.tableMeta.enterMoves=="function"?this.tableMeta.enterMoves(event):this.tableMeta.enterMoves;r?this.selection.transformStart(-n.row,-n.col):this.selection.transformStart(n.row,n.col,!0)}},{key:"onAfterDocumentKeyDown",value:function(r){var n=this;if(this.instance.isListening()){var o=r.keyCode;if(this.selection.isSelected()){var i=(r.ctrlKey||r.metaKey)&&!r.altKey;if((!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&!ET(o)&&!_V(o)&&!i&&!this.isEditorOpened()){var a=this.instance.getShortcutManager(),l=a.getContext("editor"),s={runOnlyIf:function(){return pe(n.instance.getSelected())},group:Tm};l.addShortcuts([{keys:[["ArrowUp"]],callback:function(){n.instance.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:function(){n.instance.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:function(){n.instance.selection.transformStart(0,-1*n.instance.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:function(){n.instance.selection.transformStart(0,n.instance.getDirectionFactor())}}],s),this.openEditor("",r)}}}}},{key:"onCellDblClick",value:function(r,n,o){o.nodeName==="TD"&&this.openEditor(null,r,!0)}},{key:"destroy",value:function(){this.destroyed=!0,this.eventManager.destroy()}}]),e}(),nA=new WeakMap;z_.getInstance=function(e,t,r){var n=nA.get(e);return n||(n=new z_(e,t,r),nA.set(e,n)),n};const sle=z_;var ule=xe,fle=Pr,PV=Ud,cle=Fe,hle=cle(function(){PV(1)});ule({target:"Object",stat:!0,forced:hle},{keys:function(t){return PV(fle(t))}});var dle=Xt,vle=am,yle=Ht,ple=mn,gle=Ua,TS=Yt,mle=Tr,ble=Fa,wle=xE,oA=lm;vle("match",function(e,t,r){return[function(o){var i=mle(this),a=ple(o)?void 0:ble(o,e);return a?dle(a,o,i):new RegExp(o)[e](TS(i))},function(n){var o=yle(this),i=TS(n),a=r(t,o,i);if(a.done)return a.value;if(!o.global)return oA(o,i);var l=o.unicode;o.lastIndex=0;for(var s=[],u=0,f;(f=oA(o,i))!==null;){var c=TS(f[0]);s[u]=c,c===""&&(o.lastIndex=wle(i,gle(o.lastIndex),l)),u++}return u===0?null:s}]});var Sle=Ya,Cle=Fr,_le=Ri,Ole=Zr,Rle=vf,Ele=Math.min,Y_=[].lastIndexOf,kV=!!Y_&&1/[1].lastIndexOf(1,-0)<0,Tle=Rle("lastIndexOf"),Ple=kV||!Tle,kle=Ple?function(t){if(kV)return Sle(Y_,this,arguments)||0;var r=Cle(this),n=Ole(r),o=n-1;for(arguments.length>1&&(o=Ele(o,_le(arguments[1]))),o<0&&(o=n+o);o>=0;o--)if(o in r&&r[o]===t)return o||0;return-1}:Y_,$le=xe,iA=kle;$le({target:"Array",proto:!0,forced:iA!==[].lastIndexOf},{lastIndexOf:iA});var Ale=Ba,Ile=Pr,Mle=Nd,xle=Zr,Dle=TypeError,aA=function(e){return function(t,r,n,o){Ale(r);var i=Ile(t),a=Mle(i),l=xle(i),s=e?l-1:0,u=e?-1:1;if(n<2)for(;;){if(s in a){o=a[s],s+=u;break}if(s+=u,e?s<0:l<=s)throw Dle("Reduce of empty array with no initial value")}for(;e?s>=0:l>s;s+=u)s in a&&(o=r(o,a[s],s,i));return o}},Nle={left:aA(!1),right:aA(!0)},Hle=xe,Lle=Nle.left,jle=vf,lA=Hd,Ble=PB,Fle=!Ble&&lA>79&&lA<83,Vle=Fle||!jle("reduce");Hle({target:"Array",proto:!0,forced:Vle},{reduce:function(t){var r=arguments.length;return Lle(this,t,r,r>1?arguments[1]:void 0)}});var Wle=xe,Ule=za.findIndex,zle=Zd,G_="findIndex",$V=!0;G_ in[]&&Array(1)[G_](function(){$V=!1});Wle({target:"Array",proto:!0,forced:$V},{findIndex:function(t){return Ule(this,t,arguments.length>1?arguments[1]:void 0)}});zle(G_);function PS(e){return Xle(e)||Kle(e)||Gle(e)||Yle()}function Yle(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gle(e,t){if(e){if(typeof e=="string")return K_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return K_(e,t)}}function Kle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xle(e){if(Array.isArray(e))return K_(e)}function K_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var AV={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},qle=new RegExp(Object.keys(AV).map(function(e){return"(".concat(e,")")}).join("|"),"gi");function Zle(e){return(e&&e.nodeName||"")==="TABLE"}function X_(e){for(var t=e.hasColHeaders(),r=e.hasRowHeaders(),n=[t?-1:0,r?-1:0,e.countRows()-1,e.countCols()-1],o=e.getData.apply(e,n),i=o.length,a=i>0?o[0].length:0,l=["<table>","</table>"],s=t?["<thead>","</thead>"]:[],u=["<tbody>","</tbody>"],f=r?1:0,c=t?1:0,h=0;h<i;h+=1){for(var d=t&&h===0,v=[],p=0;p<a;p+=1){var m=!d&&r&&p===0,w="";if(d)w="<th>".concat(e.getColHeader(p-f),"</th>");else if(m)w="<th>".concat(e.getRowHeader(h-c),"</th>");else{var S=o[h][p],C=e.getCellMeta(h-c,p-f),P=C.hidden,R=C.rowspan,W=C.colspan;if(!P){var z=[];if(R&&z.push('rowspan="'.concat(R,'"')),W&&z.push('colspan="'.concat(W,'"')),Kt(S))w="<td ".concat(z.join(" "),"></td>");else{var q=S.toString().replace("<","&lt;").replace(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,`<br>\r
`).replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");w="<td ".concat(z.join(" "),">").concat(q,"</td>")}}}v.push(w)}var K=["<tr>"].concat(v,["</tr>"]).join("");d?s.splice(1,0,K):u.splice(-1,0,K)}return l.splice(1,0,s.join(""),u.join("")),l.join("")}function q_(e){for(var t=e.length,r=["<table>"],n=0;n<t;n+=1){var o=e[n],i=o.length,a=[];n===0&&r.push("<tbody>");for(var l=0;l<i;l+=1){var s=o[l],u=Kt(s)?"":s.toString().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,`<br>\r
`).replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");a.push("<td>".concat(u,"</td>"))}r.push.apply(r,["<tr>"].concat(a,["</tr>"])),n+1===t&&r.push("</tbody>")}return r.push("</table>"),r.join("")}function IV(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document,r={},n=t.createDocumentFragment(),o=t.createElement("div");n.appendChild(o);var i=e;if(typeof i=="string"){var a=i.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,function(_){var T=_.match(/<td\b[^>]*?>/g)[0],I=_.substring(T.length,_.lastIndexOf("<")).replace(/(<(?!br)([^>]+)>)/gi,""),B="</td>";return"".concat(T).concat(I).concat(B)});o.insertAdjacentHTML("afterbegin","".concat(a)),i=o.querySelector("table")}if(!(!i||!Zle(i))){var l=o.querySelector('meta[name$="enerator"]'),s=i.querySelector("tbody th")!==null,u=i.querySelector("tr"),f=u?Array.from(u.cells).reduce(function(_,T){return _+T.colSpan},0)-(s?1:0):0,c=i.tFoot&&Array.from(i.tFoot.rows)||[],h=[],d=!1,v=0,p=0;if(i.tHead){var m=Array.from(i.tHead.rows).filter(function(_){var T=_.querySelector("td")!==null;return T&&h.push(_),!T});v=m.length,d=v>0,v>1?r.nestedHeaders=Array.from(m).reduce(function(_,T){var I=Array.from(T.cells).reduce(function(B,V,Y){if(s&&Y===0)return B;var J=V.colSpan,ee=V.innerHTML,le=J>1?{label:ee,colspan:J}:ee;return B.push(le),B},[]);return _.push(I),_},[]):d&&(r.colHeaders=Array.from(m[0].children).reduce(function(_,T,I){return s&&I===0||_.push(T.innerHTML),_},[]))}h.length&&(r.fixedRowsTop=h.length),c.length&&(r.fixedRowsBottom=c.length);var w=[].concat(h,PS(Array.from(i.tBodies).reduce(function(_,T){return _.push.apply(_,PS(Array.from(T.rows))),_},[])),PS(c));p=w.length;for(var S=new Array(p),C=0;C<p;C++)S[C]=new Array(f);for(var P=[],R=[],W=0;W<p;W++)for(var z=w[W],q=Array.from(z.cells),K=q.length,X=0;X<K;X++){var Q=q[X],ae=Q.nodeName,Z=Q.innerHTML,he=Q.rowSpan,Ee=Q.colSpan,_e=S[W].findIndex(function(_){return _===void 0});if(ae==="TD"){if(he>1||Ee>1){for(var Oe=W;Oe<W+he;Oe++)if(Oe<p)for(var k=_e;k<_e+Ee;k++)S[Oe][k]=null;var y=Q.getAttribute("style"),g=y&&y.includes("mso-ignore:colspan");g||P.push({col:_e,row:W,rowspan:he,colspan:Ee})}var b="";l&&/excel/gi.test(l.content)?b=Z.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,`\r
`):b=Z.replace(/<br(\s*|\/)>[\r\n]?/gim,`\r
`),S[W][_e]=b.replace(qle,function(_){return AV[_]})}else R.push(Z)}return P.length&&(r.mergeCells=P),R.length&&(r.rowHeaders=R),S.length&&(r.data=S),r}}const Qle=Object.freeze(Object.defineProperty({__proto__:null,_dataToHTML:q_,htmlToGridSettings:IV,instanceToHTML:X_},Symbol.toStringTag,{value:"Module"}));function Jle(e){return nse(e)||rse(e)||tse(e)||ese()}function ese(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tse(e,t){if(e){if(typeof e=="string")return Z_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Z_(e,t)}}function rse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nse(e){if(Array.isArray(e))return Z_(e)}function Z_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Q_(e){return Q_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q_(e)}function Hr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=Q_(e);if(r==="number")return!isNaN(e)&&isFinite(e);if(r==="string"){if(e.length===0)return!1;if(e.length===1)return/\d/.test(e);var n=Array.from(new Set(["."].concat(Jle(t)))).map(function(o){return"\\".concat(o)}).join("|");return new RegExp("^[+-]?\\s*(((".concat(n,")?\\d+((").concat(n,")\\d+)?(e[+-]?\\d+)?)|(0x[a-f\\d]+))$"),"i").test(e.trim())}else if(r==="object")return!!e&&typeof e.valueOf()=="number"&&!(e instanceof Date);return!1}function MV(e){return Hr(e,[","])}function Ce(e,t,r){var n=-1;for(typeof t=="function"?(r=t,t=e):n=e-1;++n<=t&&r(n)!==!1;);}function Fp(e,t,r){var n=e+1;for(typeof t=="function"&&(r=t,t=0);--n>=t&&r(n)!==!1;);}function TT(e,t){return t=parseInt(t.toString().replace("%",""),10),t=isNaN(t)?0:t,parseInt(e*t/100,10)}const ose=Object.freeze(Object.defineProperty({__proto__:null,isNumeric:Hr,isNumericLike:MV,rangeEach:Ce,rangeEachReverse:Fp,valueAccordingPercent:TT},Symbol.toStringTag,{value:"Module"}));function ise(e){return sse(e)||lse(e)||xV(e)||ase()}function ase(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sse(e){if(Array.isArray(e))return J_(e)}function use(e,t){return hse(e)||cse(e,t)||xV(e,t)||fse()}function fse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xV(e,t){if(e){if(typeof e=="string")return J_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J_(e,t)}}function J_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function cse(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function hse(e){if(Array.isArray(e))return e}var eO="asc",dse="desc",sA=new Map([[eO,[-1,1]],[dse,[1,-1]]]),vse=function(t){return"The priority '".concat(t,"' is already declared in a map.")},yse=function(t){return"The priority '".concat(t,"' is not a number.")};function pse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.errorPriorityExists,r=e.errorPriorityNaN,n=new Map;t=wt(t)?t:vse,r=wt(r)?r:yse;function o(a,l){if(!Hr(a))throw new Error(r(a));if(n.has(a))throw new Error(t(a));n.set(a,l)}function i(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:eO,l=sA.get(a)||sA.get(eO),s=use(l,2),u=s[0],f=s[1];return ise(n).sort(function(c,h){return c[0]<h[0]?u:f}).map(function(c){return c[1]})}return{addItem:o,getItems:i}}var gse=xe,mse=za.find,bse=Zd,tO="find",DV=!0;tO in[]&&Array(1)[tO](function(){DV=!1});gse({target:"Array",proto:!0,forced:DV},{find:function(t){return mse(this,t,arguments.length>1?arguments[1]:void 0)}});bse(tO);function wse(e){return _se(e)||Cse(e)||NV(e)||Sse()}function Sse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _se(e){if(Array.isArray(e))return rO(e)}function uA(e,t){return Ese(e)||Rse(e,t)||NV(e,t)||Ose()}function Ose(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NV(e,t){if(e){if(typeof e=="string")return rO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rO(e,t)}}function rO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Rse(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function Ese(e){if(Array.isArray(e))return e}var Tse=function(t){return"The id '".concat(t,"' is already declared in a map.")};function Pm(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.errorIdExists,r=new Map;t=wt(t)?t:Tse;function n(f,c){if(u(f))throw new Error(t(f));r.set(f,c)}function o(f){return r.delete(f)}function i(){r.clear()}function a(f){var c=s().find(function(v){var p=uA(v,2),m=p[0],w=p[1];return f===w?m:!1})||[null],h=uA(c,1),d=h[0];return d}function l(f){return r.get(f)}function s(){return wse(r)}function u(f){return r.has(f)}return{addItem:n,clear:i,getId:a,getItem:l,getItems:s,hasItem:u,removeItem:o}}function Pse(e){return Ise(e)||Ase(e)||$se(e)||kse()}function kse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $se(e,t){if(e){if(typeof e=="string")return nO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nO(e,t)}}function Ase(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ise(e){if(Array.isArray(e))return nO(e)}function nO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Mse=function(t){return"'".concat(t,"' value is already declared in a unique set.")};function xse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.errorItemExists,r=new Set;t=wt(t)?t:Mse;function n(a){if(r.has(a))throw new Error(t(a));r.add(a)}function o(){return Pse(r)}function i(){r.clear()}return{addItem:n,clear:i,getItems:o}}function Dse(e,t){return Lse(e)||Hse(e,t)||HV(e,t)||Nse()}function Nse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hse(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function Lse(e){if(Array.isArray(e))return e}function fA(e){return Fse(e)||Bse(e)||HV(e)||jse()}function jse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HV(e,t){if(e){if(typeof e=="string")return oO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oO(e,t)}}function Bse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fse(e){if(Array.isArray(e))return oO(e)}function oO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var PT=function(t){return'There is already registered "'.concat(t,'" plugin.')},Vse=function(t){return'There is already registered plugin on priority "'.concat(t,'".')},Wse=function(t){return'The priority "'.concat(t,'" is not a number.')},LV=pse({errorPriorityExists:Vse,errorPriorityNaN:Wse}),jV=xse({errorItemExists:PT}),iO=Pm({errorIdExists:PT});function kT(){return[].concat(fA(LV.getItems()),fA(jV.getItems()))}function fv(e){var t=Er(e);return iO.getItem(t)}function Use(e){return!!fv(e)}function rt(e,t,r){var n=Yse(e,t,r),o=Dse(n,3);e=o[0],t=o[1],r=o[2],fv(e)===void 0&&zse(e,t,r)}function zse(e,t,r){var n=Er(e);if(iO.hasItem(n))throw new Error(PT(n));r===void 0?jV.addItem(n):LV.addItem(r,n),iO.addItem(n,t)}function Yse(e,t,r){return typeof e=="function"&&(t=e,e=t.PLUGIN_KEY,r=t.PLUGIN_PRIORITY),[e,t,r]}var cv=en("renderers"),Gse=cv.register,Kse=cv.getItem,BV=cv.hasItem,Xse=cv.getNames;cv.getValues;function Vp(e){if(typeof e=="function")return e;if(!BV(e))throw Error('No registered renderer found under "'.concat(e,'" name'));return Kse(e)}function $n(e,t){typeof e!="string"&&(t=e,e=t.RENDERER_TYPE),Gse(e,t)}var hv=en("validators"),qse=hv.register,Zse=hv.getItem,FV=hv.hasItem,Qse=hv.getNames;hv.getValues;function $T(e){if(typeof e=="function")return e;if(!FV(e))throw Error('No registered validator found under "'.concat(e,'" name'));return Zse(e)}function Hl(e,t){typeof e!="string"&&(t=e,e=t.VALIDATOR_TYPE),qse(e,t)}var Ki=1,or=2;function Fc(e){return Fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fc(e)}function Jse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cA(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,tue(n.key),n)}}function eue(e,t,r){return t&&cA(e.prototype,t),r&&cA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tue(e){var t=rue(e,"string");return Fc(t)==="symbol"?t:String(t)}function rue(e,t){if(Fc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Fc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var al=new WeakMap,nue=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.viewportSize,n=t.scrollOffset,o=t.totalItems,i=t.itemSizeFn,a=t.overrideFn,l=t.calculationType,s=t.stretchMode,u=t.stretchingItemWidthFn,f=u===void 0?function(h){return h}:u,c=t.inlineStartOffset;Jse(this,e),al.set(this,{viewportWidth:r,scrollOffset:n,totalColumns:o,columnWidthFn:i,overrideFn:a,calculationType:l,stretchingColumnWidthFn:f,inlineStartOffset:c}),this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1,this.stretchAllRatio=0,this.stretchLastWidth=0,this.stretch=s,this.totalTargetWidth=0,this.needVerifyLastColumnWidth=!0,this.stretchAllColumnsWidth=[],this.calculate()}return eue(e,[{key:"calculate",value:function(){for(var r=0,n=!0,o=[],i,a=0,l=0,s=al.get(this),u=s.calculationType,f=s.overrideFn,c=s.scrollOffset,h=Math.max(s.scrollOffset,0),d=s.totalColumns,v=s.viewportWidth,p=h>0?v+1:v,m=0;m<d;m++)if(i=this._getColumnWidth(m),r<=h&&u!==or&&(this.startColumn=m,a=i),r>=h&&r+(u===or?i:0)<=h+p&&((this.startColumn===null||this.startColumn===void 0)&&(this.startColumn=m,a=i),this.endColumn=m),o.push(r),r+=i,l=i,u!==or&&(this.endColumn=m),r>=h+v){n=!1;break}var w=c+v-p,S=u===or?0:l,C=u===or?a:0;if(w<-1*s.inlineStartOffset||c>o.at(-1)+S||-1*s.scrollOffset-s.viewportWidth>-1*C?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,this.endColumn===d-1&&n)for(this.startColumn=this.endColumn;this.startColumn>0;){var P=o[this.endColumn]+i-o[this.startColumn-1];if((P<=v||u!==or)&&(this.startColumn-=1),P>v)break}u===Ki&&this.startColumn!==null&&f&&f(this),this.startPosition=o[this.startColumn],this.startPosition===void 0&&(this.startPosition=null),d<this.endColumn&&(this.endColumn=d-1),this.startColumn!==null&&(this.count=this.endColumn-this.startColumn+1)}},{key:"refreshStretching",value:function(r){if(this.stretch!=="none"){var n=r;this.totalTargetWidth=n;for(var o=al.get(this),i=o.totalColumns,a=0,l=0;l<i;l++){var s=this._getColumnWidth(l),u=o.stretchingColumnWidthFn(void 0,l);typeof u=="number"?n-=u:a+=s}var f=n-a;if(this.stretch==="all"&&f>0)this.stretchAllRatio=n/a,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if(this.stretch==="last"&&n!==1/0){var c=this._getColumnWidth(i-1),h=f+c;this.stretchLastWidth=h>=0?h:c}}}},{key:"getStretchedColumnWidth",value:function(r,n){var o=null;return this.stretch==="all"&&this.stretchAllRatio!==0?o=this._getStretchedAllColumnWidth(r,n):this.stretch==="last"&&this.stretchLastWidth!==0&&(o=this._getStretchedLastColumnWidth(r)),o}},{key:"_getStretchedAllColumnWidth",value:function(r,n){var o=0,i=al.get(this),a=i.totalColumns;if(!this.stretchAllColumnsWidth[r]){var l=Math.round(n*this.stretchAllRatio),s=i.stretchingColumnWidthFn(l,r);s===void 0?this.stretchAllColumnsWidth[r]=l:this.stretchAllColumnsWidth[r]=isNaN(s)?this._getColumnWidth(r):s}if(this.stretchAllColumnsWidth.length===a&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(var u=0;u<this.stretchAllColumnsWidth.length;u++)o+=this.stretchAllColumnsWidth[u];o!==this.totalTargetWidth&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=this.totalTargetWidth-o)}return this.stretchAllColumnsWidth[r]}},{key:"_getStretchedLastColumnWidth",value:function(r){var n=al.get(this),o=n.totalColumns;return r===o-1?this.stretchLastWidth:null}},{key:"_getColumnWidth",value:function(r){var n=al.get(this).columnWidthFn(r);return isNaN(n)&&(n=e.DEFAULT_WIDTH),n}}],[{key:"DEFAULT_WIDTH",get:function(){return 50}}]),e}();const AT=nue;function Vc(e){return Vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vc(e)}function oue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hA(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,aue(n.key),n)}}function iue(e,t,r){return t&&hA(e.prototype,t),r&&hA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function aue(e){var t=lue(e,"string");return Vc(t)==="symbol"?t:String(t)}function lue(e,t){if(Vc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Vc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dA=new WeakMap,sue=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.viewportSize,n=t.scrollOffset,o=t.totalItems,i=t.itemSizeFn,a=t.overrideFn,l=t.calculationType,s=t.scrollbarHeight;oue(this,e),dA.set(this,{viewportHeight:r,scrollOffset:n,totalRows:o,rowHeightFn:i,overrideFn:a,calculationType:l,horizontalScrollbarHeight:s}),this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1,this.calculate()}return iue(e,[{key:"calculate",value:function(){for(var r=dA.get(this),n=r.calculationType,o=r.overrideFn,i=r.rowHeightFn,a=r.scrollOffset,l=Math.max(r.scrollOffset,0),s=r.totalRows,u=r.viewportHeight,f=r.horizontalScrollbarHeight||0,c=0,h=!0,d=[],v,p=0,m=0,w=0;w<s;w++)if(v=i(w),isNaN(v)&&(v=e.DEFAULT_HEIGHT),c<=l&&n!==or&&(this.startRow=w,p=v),c>=l&&c+(n===or?v:0)<=l+u-f&&(this.startRow===null&&(this.startRow=w,p=v),this.endRow=w),d.push(c),c+=v,m=v,n!==or&&(this.endRow=w),c>=l+u-f){h=!1;break}var S=a+u-f,C=n===or?p:0,P=n===or?0:m;if(S<C||a>d.at(-1)+P?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,this.endRow===s-1&&h)for(this.startRow=this.endRow;this.startRow>0;){var R=d[this.endRow]+v-d[this.startRow-1];if((R<=u-f||n!==or)&&(this.startRow-=1),R>=u-f)break}n===Ki&&this.startRow!==null&&o&&o(this),this.startPosition=d[this.startRow],this.startPosition===void 0&&(this.startPosition=null),s<this.endRow&&(this.endRow=s-1),this.startRow!==null&&(this.count=this.endRow-this.startRow+1)}}],[{key:"DEFAULT_HEIGHT",get:function(){return 23}}]),e}();const VV=sue;function Wc(e){return Wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wc(e)}function uue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vA(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,WV(n.key),n)}}function fue(e,t,r){return t&&vA(e.prototype,t),r&&vA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function cue(e,t,r){hue(e,t),t.set(e,r)}function hue(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function yA(e,t,r){return t=WV(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WV(e){var t=due(e,"string");return Wc(t)==="symbol"?t:String(t)}function due(e,t){if(Wc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Df(e,t){var r=UV(e,t,"get");return vue(e,r)}function vue(e,t){return t.get?t.get.call(e):t.value}function yue(e,t,r){var n=UV(e,t,"set");return pue(e,n,r),r}function UV(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function pue(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}var xi=new WeakMap,gue=function(){function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;uue(this,e),yA(this,"row",null),yA(this,"col",null),cue(this,xi,{writable:!0,value:!1}),yue(this,xi,n),typeof t<"u"&&typeof r<"u"&&(this.row=t,this.col=r)}return fue(e,[{key:"isValid",value:function(r){return!(this.row<0||this.col<0||this.row>=r.getSetting("totalRows")||this.col>=r.getSetting("totalColumns"))}},{key:"isEqual",value:function(r){return r===this?!0:this.row===r.row&&this.col===r.col}},{key:"isSouthEastOf",value:function(r){return this.row>=r.row&&(Df(this,xi)?this.col<=r.col:this.col>=r.col)}},{key:"isNorthWestOf",value:function(r){return this.row<=r.row&&(Df(this,xi)?this.col>=r.col:this.col<=r.col)}},{key:"isSouthWestOf",value:function(r){return this.row>=r.row&&(Df(this,xi)?this.col>=r.col:this.col<=r.col)}},{key:"isNorthEastOf",value:function(r){return this.row<=r.row&&(Df(this,xi)?this.col<=r.col:this.col>=r.col)}},{key:"normalize",value:function(){return this.row=this.row===null?this.row:Math.max(this.row,0),this.col=this.col===null?this.col:Math.max(this.col,0),this}},{key:"clone",value:function(){return new e(this.row,this.col,Df(this,xi))}},{key:"toObject",value:function(){return{row:this.row,col:this.col}}}]),e}();const Wp=gue;function Uc(e){return Uc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uc(e)}function mue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pA(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,zV(n.key),n)}}function bue(e,t,r){return t&&pA(e.prototype,t),r&&pA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function wue(e,t,r){Sue(e,t),t.set(e,r)}function Sue(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kS(e,t,r){return t=zV(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zV(e){var t=Cue(e,"string");return Uc(t)==="symbol"?t:String(t)}function Cue(e,t){if(Uc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Uc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sn(e,t){var r=YV(e,t,"get");return _ue(e,r)}function _ue(e,t){return t.get?t.get.call(e):t.value}function Oue(e,t,r){var n=YV(e,t,"set");return Rue(e,n,r),r}function YV(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function Rue(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}var Wr=new WeakMap,Eue=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;mue(this,e),kS(this,"highlight",null),kS(this,"from",null),kS(this,"to",null),wue(this,Wr,{writable:!0,value:!1}),this.highlight=t.clone().normalize(),this.from=r.clone(),this.to=n.clone(),Oue(this,Wr,o)}return bue(e,[{key:"setHighlight",value:function(r){return this.highlight=r.clone().normalize(),this}},{key:"setFrom",value:function(r){return this.from=r.clone(),this}},{key:"setTo",value:function(r){return this.to=r.clone(),this}},{key:"isValid",value:function(r){return this.from.isValid(r)&&this.to.isValid(r)}},{key:"isSingle",value:function(){return this.from.row>=0&&this.from.row===this.to.row&&this.from.col>=0&&this.from.col===this.to.col}},{key:"getOuterHeight",value:function(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}},{key:"getOuterWidth",value:function(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}},{key:"getHeight",value:function(){if(this.from.row<0&&this.to.row<0)return 0;var r=Math.max(this.from.row,0),n=Math.max(this.to.row,0);return Math.max(r,n)-Math.min(r,n)+1}},{key:"getWidth",value:function(){if(this.from.col<0&&this.to.col<0)return 0;var r=Math.max(this.from.col,0),n=Math.max(this.to.col,0);return Math.max(r,n)-Math.min(r,n)+1}},{key:"getCellsCount",value:function(){return this.getWidth()*this.getHeight()}},{key:"includes",value:function(r){var n=r.row,o=r.col,i=this.getOuterTopStartCorner(),a=this.getOuterBottomEndCorner();return i.row<=n&&a.row>=n&&i.col<=o&&a.col>=o}},{key:"includesRange",value:function(r){return this.includes(r.getOuterTopStartCorner())&&this.includes(r.getOuterBottomEndCorner())}},{key:"isEqual",value:function(r){return Math.min(this.from.row,this.to.row)===Math.min(r.from.row,r.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(r.from.row,r.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(r.from.col,r.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(r.from.col,r.to.col)}},{key:"overlaps",value:function(r){return r.isSouthEastOf(this.getOuterTopLeftCorner())&&r.isNorthWestOf(this.getOuterBottomRightCorner())}},{key:"isSouthEastOf",value:function(r){return this.getOuterTopLeftCorner().isSouthEastOf(r)||this.getOuterBottomRightCorner().isSouthEastOf(r)}},{key:"isNorthWestOf",value:function(r){return this.getOuterTopLeftCorner().isNorthWestOf(r)||this.getOuterBottomRightCorner().isNorthWestOf(r)}},{key:"isOverlappingHorizontally",value:function(r){return this.getOuterTopRightCorner().col>=r.getOuterTopLeftCorner().col&&this.getOuterTopRightCorner().col<=r.getOuterTopRightCorner().col||this.getOuterTopLeftCorner().col<=r.getOuterTopRightCorner().col&&this.getOuterTopLeftCorner().col>=r.getOuterTopLeftCorner().col}},{key:"isOverlappingVertically",value:function(r){return this.getOuterBottomRightCorner().row>=r.getOuterTopRightCorner().row&&this.getOuterBottomRightCorner().row<=r.getOuterBottomRightCorner().row||this.getOuterTopRightCorner().row<=r.getOuterBottomRightCorner().row&&this.getOuterTopRightCorner().row>=r.getOuterTopRightCorner().row}},{key:"expand",value:function(r){var n=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();return r.row<n.row||r.col<n.col||r.row>o.row||r.col>o.col?(this.from=this._createCellCoords(Math.min(n.row,r.row),Math.min(n.col,r.col)),this.to=this._createCellCoords(Math.max(o.row,r.row),Math.max(o.col,r.col)),!0):!1}},{key:"expandByRange",value:function(r){if(this.includesRange(r)||!this.overlaps(r))return!1;var n=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner(),i=this.getDirection(),a=r.getOuterTopStartCorner(),l=r.getOuterBottomEndCorner(),s=Math.min(n.row,a.row),u=Math.min(n.col,a.col),f=Math.max(o.row,l.row),c=Math.max(o.col,l.col),h=this._createCellCoords(s,u),d=this._createCellCoords(f,c);return this.from=h,this.to=d,this.setDirection(i),this.highlight.row===this.getOuterBottomRightCorner().row&&this.getVerticalDirection()==="N-S"&&this.flipDirectionVertically(),this.highlight.col===this.getOuterTopRightCorner().col&&this.getHorizontalDirection()==="W-E"&&this.flipDirectionHorizontally(),!0}},{key:"getDirection",value:function(){if(this.from.isNorthWestOf(this.to))return"NW-SE";if(this.from.isNorthEastOf(this.to))return"NE-SW";if(this.from.isSouthEastOf(this.to))return"SE-NW";if(this.from.isSouthWestOf(this.to))return"SW-NE"}},{key:"setDirection",value:function(r){switch(r){case"NW-SE":var n=[this.getOuterTopLeftCorner(),this.getOuterBottomRightCorner()];this.from=n[0],this.to=n[1];break;case"NE-SW":var o=[this.getOuterTopRightCorner(),this.getOuterBottomLeftCorner()];this.from=o[0],this.to=o[1];break;case"SE-NW":var i=[this.getOuterBottomRightCorner(),this.getOuterTopLeftCorner()];this.from=i[0],this.to=i[1];break;case"SW-NE":var a=[this.getOuterBottomLeftCorner(),this.getOuterTopRightCorner()];this.from=a[0],this.to=a[1];break}}},{key:"getVerticalDirection",value:function(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}},{key:"getHorizontalDirection",value:function(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}},{key:"flipDirectionVertically",value:function(){var r=this.getDirection();switch(r){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE");break}}},{key:"flipDirectionHorizontally",value:function(){var r=this.getDirection();switch(r){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW");break}}},{key:"getTopStartCorner",value:function(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}},{key:"getTopLeftCorner",value:function(){return Sn(this,Wr)?this.getTopEndCorner():this.getTopStartCorner()}},{key:"getBottomEndCorner",value:function(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}},{key:"getBottomRightCorner",value:function(){return Sn(this,Wr)?this.getBottomStartCorner():this.getBottomEndCorner()}},{key:"getTopEndCorner",value:function(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}},{key:"getTopRightCorner",value:function(){return Sn(this,Wr)?this.getTopStartCorner():this.getTopEndCorner()}},{key:"getBottomStartCorner",value:function(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}},{key:"getBottomLeftCorner",value:function(){return Sn(this,Wr)?this.getBottomEndCorner():this.getBottomStartCorner()}},{key:"getOuterTopStartCorner",value:function(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"getOuterTopLeftCorner",value:function(){return Sn(this,Wr)?this.getOuterTopEndCorner():this.getOuterTopStartCorner()}},{key:"getOuterBottomEndCorner",value:function(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getOuterBottomRightCorner",value:function(){return Sn(this,Wr)?this.getOuterBottomStartCorner():this.getOuterBottomEndCorner()}},{key:"getOuterTopEndCorner",value:function(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getOuterTopRightCorner",value:function(){return Sn(this,Wr)?this.getOuterTopStartCorner():this.getOuterTopEndCorner()}},{key:"getOuterBottomStartCorner",value:function(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"getOuterBottomLeftCorner",value:function(){return Sn(this,Wr)?this.getOuterBottomEndCorner():this.getOuterBottomStartCorner()}},{key:"isCorner",value:function(r,n){return n&&n.includes(r)&&(this.getOuterTopLeftCorner().isEqual(this._createCellCoords(n.from.row,n.from.col))||this.getOuterTopRightCorner().isEqual(this._createCellCoords(n.from.row,n.to.col))||this.getOuterBottomLeftCorner().isEqual(this._createCellCoords(n.to.row,n.from.col))||this.getOuterBottomRightCorner().isEqual(this._createCellCoords(n.to.row,n.to.col)))?!0:r.isEqual(this.getOuterTopLeftCorner())||r.isEqual(this.getOuterTopRightCorner())||r.isEqual(this.getOuterBottomLeftCorner())||r.isEqual(this.getOuterBottomRightCorner())}},{key:"getOppositeCorner",value:function(r,n){if(!(r instanceof Wp))return!1;if(n){var o=n.from,i=n.to;if(n.includes(r)){if(this.getOuterTopStartCorner().isEqual(this._createCellCoords(o.row,o.col)))return this.getOuterBottomEndCorner();if(this.getOuterTopEndCorner().isEqual(this._createCellCoords(o.row,i.col)))return this.getOuterBottomStartCorner();if(this.getOuterBottomStartCorner().isEqual(this._createCellCoords(i.row,o.col)))return this.getOuterTopEndCorner();if(this.getOuterBottomEndCorner().isEqual(this._createCellCoords(i.row,i.col)))return this.getOuterTopStartCorner()}}if(r.isEqual(this.getOuterBottomEndCorner()))return this.getOuterTopStartCorner();if(r.isEqual(this.getOuterTopStartCorner()))return this.getOuterBottomEndCorner();if(r.isEqual(this.getOuterTopEndCorner()))return this.getOuterBottomStartCorner();if(r.isEqual(this.getOuterBottomStartCorner()))return this.getOuterTopEndCorner()}},{key:"getBordersSharedWith",value:function(r){if(!this.includesRange(r))return[];var n={top:Math.min(this.from.row,this.to.row),bottom:Math.max(this.from.row,this.to.row),left:Math.min(this.from.col,this.to.col),right:Math.max(this.from.col,this.to.col)},o={top:Math.min(r.from.row,r.to.row),bottom:Math.max(r.from.row,r.to.row),left:Math.min(r.from.col,r.to.col),right:Math.max(r.from.col,r.to.col)},i=[];return n.top===o.top&&i.push("top"),n.right===o.right&&i.push("right"),n.bottom===o.bottom&&i.push("bottom"),n.left===o.left&&i.push("left"),i}},{key:"getInner",value:function(){for(var r=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner(),o=[],i=r.row;i<=n.row;i++)for(var a=r.col;a<=n.col;a++)!(this.from.row===i&&this.from.col===a)&&!(this.to.row===i&&this.to.col===a)&&o.push(this._createCellCoords(i,a));return o}},{key:"getAll",value:function(){for(var r=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner(),o=[],i=r.row;i<=n.row;i++)for(var a=r.col;a<=n.col;a++)r.row===i&&r.col===a?o.push(r):n.row===i&&n.col===a?o.push(n):o.push(this._createCellCoords(i,a));return o}},{key:"forAll",value:function(r){for(var n=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner(),i=n.row;i<=o.row;i++)for(var a=n.col;a<=o.col;a++){var l=r(i,a);if(l===!1)return}}},{key:"clone",value:function(){return new e(this.highlight,this.from,this.to,Sn(this,Wr))}},{key:"toObject",value:function(){return{from:this.from.toObject(),to:this.to.toObject()}}},{key:"_createCellCoords",value:function(r,n){return new Wp(r,n,Sn(this,Wr))}}]),e}();const IT=Eue;var Tue=xe,Pue=pE;Tue({target:"Object",stat:!0},{setPrototypeOf:Pue});var GV=Ye,kue=Ba,$ue=zt,Aue=xt,gA=Xd,Iue=Md,KV=Function,Mue=GV([].concat),xue=GV([].join),$S={},Due=function(e,t,r){if(!Aue($S,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";$S[t]=KV("C,a","return new C("+xue(n,",")+")")}return $S[t](e,r)},Nue=Iue?KV.bind:function(t){var r=kue(this),n=r.prototype,o=gA(arguments,1),i=function(){var l=Mue(o,gA(arguments));return this instanceof i?Due(r,l.length,l):r.apply(t,l)};return $ue(n)&&(i.prototype=n),i},Hue=xe,Lue=Do,AS=Ya,jue=Nue,mA=UB,Bue=Ht,bA=zt,Fue=cf,XV=Fe,MT=Lue("Reflect","construct"),Vue=Object.prototype,Wue=[].push,qV=XV(function(){function e(){}return!(MT(function(){},[],e)instanceof e)}),ZV=!XV(function(){MT(function(){})}),wA=qV||ZV;Hue({target:"Reflect",stat:!0,forced:wA,sham:wA},{construct:function(t,r){mA(t),Bue(r);var n=arguments.length<3?t:mA(arguments[2]);if(ZV&&!qV)return MT(t,r,n);if(t==n){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var o=[null];return AS(Wue,o,r),new(AS(jue,t,o))}var i=n.prototype,a=Fue(bA(i)?i:Vue),l=AS(t,a,r);return bA(l)?l:a}});function zc(e){return zc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zc(e)}function Uue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SA(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,Yue(n.key),n)}}function zue(e,t,r){return t&&SA(e.prototype,t),r&&SA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yue(e){var t=Gue(e,"string");return zc(t)==="symbol"?t:String(t)}function Gue(e,t){if(zc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(zc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ll=new WeakMap,Kue=function(){function e(t,r,n,o,i,a){var l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null;Uue(this,e),this.wtSettings=n,this.domBindings=r,this.wtTable=i,this.selections=a,this.parent=l,this.eventManager=o,this.facadeGetter=t,ll.set(this,{selectedCellBeforeTouchEnd:void 0,dblClickTimeout:[null,null],dblClickOrigin:[null,null]}),this.registerEvents()}return zue(e,[{key:"registerEvents",value:function(){var r=this;this.eventManager.addEventListener(this.wtTable.holder,"contextmenu",function(i){return r.onContextMenu(i)}),this.eventManager.addEventListener(this.wtTable.TABLE,"mouseover",function(i){return r.onMouseOver(i)}),this.eventManager.addEventListener(this.wtTable.TABLE,"mouseout",function(i){return r.onMouseOut(i)});var n=function(){r.eventManager.addEventListener(r.wtTable.holder,"touchstart",function(a){return r.onTouchStart(a)}),r.eventManager.addEventListener(r.wtTable.holder,"touchend",function(a){return r.onTouchEnd(a)}),r.momentumScrolling||(r.momentumScrolling={}),r.eventManager.addEventListener(r.wtTable.holder,"scroll",function(){clearTimeout(r.momentumScrolling._timeout),r.momentumScrolling.ongoing||r.wtSettings.getSetting("onBeforeTouchScroll"),r.momentumScrolling.ongoing=!0,r.momentumScrolling._timeout=setTimeout(function(){r.touchApplied||(r.momentumScrolling.ongoing=!1,r.wtSettings.getSetting("onAfterMomentumScroll"))},200)})},o=function(){r.eventManager.addEventListener(r.wtTable.holder,"mouseup",function(a){return r.onMouseUp(a)}),r.eventManager.addEventListener(r.wtTable.holder,"mousedown",function(a){return r.onMouseDown(a)})};cn()?n():(WE()&&n(),o())}},{key:"selectedCellWasTouched",value:function(r){var n=ll.get(this),o=this.parentCell(r),i=o.coords;if(n.selectedCellBeforeTouchEnd&&i){var a=[i.row,n.selectedCellBeforeTouchEnd.from.row],l=a[0],s=a[1],u=[i.col,n.selectedCellBeforeTouchEnd.from.col],f=u[0],c=u[1];return l===s&&f===c}return!1}},{key:"parentCell",value:function(r){var n={},o=this.wtTable.TABLE,i=ic(r,["TD","TH"],o);return i?(n.coords=this.wtTable.getCoords(i),n.TD=i):Ne(r,"wtBorder")&&Ne(r,"current")?(n.coords=this.selections.getCell().cellRange.highlight,n.TD=this.wtTable.getCell(n.coords)):Ne(r,"wtBorder")&&Ne(r,"area")&&this.selections.createOrGetArea().cellRange&&(n.coords=this.selections.createOrGetArea().cellRange.to,n.TD=this.wtTable.getCell(n.coords)),n}},{key:"onMouseDown",value:function(r){var n=ll.get(this),o=this.domBindings.rootDocument.activeElement,i=OT(tV,r.target),a=r.target;if(!(a===o||i(0)===o||i(1)===o)){var l=this.parentCell(a);Ne(a,"corner")?this.wtSettings.getSetting("onCellCornerMouseDown",r,a):l.TD&&this.wtSettings.has("onCellMouseDown")&&this.callListener("onCellMouseDown",r,l.coords,l.TD),(r.button===0||this.touchApplied)&&l.TD&&(n.dblClickOrigin[0]=l.TD,clearTimeout(n.dblClickTimeout[0]),n.dblClickTimeout[0]=setTimeout(function(){n.dblClickOrigin[0]=null},1e3))}}},{key:"onContextMenu",value:function(r){if(this.wtSettings.has("onCellContextMenu")){var n=this.parentCell(r.target);n.TD&&this.callListener("onCellContextMenu",r,n.coords,n.TD)}}},{key:"onMouseOver",value:function(r){if(this.wtSettings.has("onCellMouseOver")){var n=this.wtTable.TABLE,o=ic(r.target,["TD","TH"],n),i=this.parent||this;o&&o!==i.lastMouseOver&&ai(o,n)&&(i.lastMouseOver=o,this.callListener("onCellMouseOver",r,this.wtTable.getCoords(o),o))}}},{key:"onMouseOut",value:function(r){if(this.wtSettings.has("onCellMouseOut")){var n=this.wtTable.TABLE,o=ic(r.target,["TD","TH"],n),i=ic(r.relatedTarget,["TD","TH"],n);o&&o!==i&&ai(o,n)&&this.callListener("onCellMouseOut",r,this.wtTable.getCoords(o),o)}}},{key:"onMouseUp",value:function(r){var n=ll.get(this),o=this.parentCell(r.target);o.TD&&this.wtSettings.has("onCellMouseUp")&&this.callListener("onCellMouseUp",r,o.coords,o.TD),!(r.button!==0&&!this.touchApplied)&&(o.TD===n.dblClickOrigin[0]&&o.TD===n.dblClickOrigin[1]?(Ne(r.target,"corner")?this.callListener("onCellCornerDblClick",r,o.coords,o.TD):this.callListener("onCellDblClick",r,o.coords,o.TD),n.dblClickOrigin[0]=null,n.dblClickOrigin[1]=null):o.TD===n.dblClickOrigin[0]&&(n.dblClickOrigin[1]=o.TD,clearTimeout(n.dblClickTimeout[1]),n.dblClickTimeout[1]=setTimeout(function(){n.dblClickOrigin[1]=null},500)))}},{key:"onTouchStart",value:function(r){var n=ll.get(this);n.selectedCellBeforeTouchEnd=this.selections.getCell().cellRange,this.touchApplied=!0,this.onMouseDown(r)}},{key:"onTouchEnd",value:function(r){var n,o=r.target,i=(n=this.parentCell(o))===null||n===void 0?void 0:n.coords,a=pe(i)&&i.row>=0&&i.col>=0,l=r.cancelable&&a&&this.wtSettings.getSetting("isDataViewInstance");if(l){var s=["A","BUTTON","INPUT"];XE()&&(QB()||JB())&&this.selectedCellWasTouched(o)&&!s.includes(o.tagName)?r.preventDefault():this.selectedCellWasTouched(o)||r.preventDefault()}this.onMouseUp(r),this.touchApplied=!1}},{key:"callListener",value:function(r,n,o,i){var a=this.wtSettings.getSettingPure(r);a&&a(n,o,i,this.facadeGetter())}},{key:"destroy",value:function(){var r=ll.get(this);clearTimeout(r.dblClickTimeout[0]),clearTimeout(r.dblClickTimeout[1]),this.eventManager.destroy()}}]),e}();const QV=Kue;function Yc(e){return Yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yc(e)}function Xue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CA(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,Zue(n.key),n)}}function que(e,t,r){return t&&CA(e.prototype,t),r&&CA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zue(e){var t=Que(e,"string");return Yc(t)==="symbol"?t:String(t)}function Que(e,t){if(Yc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Yc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jue=function(){function e(t,r,n){Xue(this,e),this.offset=t,this.total=r,this.countTH=n}return que(e,[{key:"offsetted",value:function(r){return r+this.offset}},{key:"unOffsetted",value:function(r){return r-this.offset}},{key:"renderedToSource",value:function(r){return this.offsetted(r)}},{key:"sourceToRendered",value:function(r){return this.unOffsetted(r)}},{key:"offsettedTH",value:function(r){return r-this.countTH}},{key:"unOffsettedTH",value:function(r){return r+this.countTH}},{key:"visibleRowHeadedColumnToSourceColumn",value:function(r){return this.renderedToSource(this.offsettedTH(r))}},{key:"sourceColumnToVisibleRowHeadedColumn",value:function(r){return this.unOffsettedTH(this.sourceToRendered(r))}}]),e}();const efe=Jue;function Gc(e){return Gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gc(e)}function tfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _A(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,nfe(n.key),n)}}function rfe(e,t,r){return t&&_A(e.prototype,t),r&&_A(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function nfe(e){var t=ofe(e,"string");return Gc(t)==="symbol"?t:String(t)}function ofe(e,t){if(Gc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Gc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ife=function(){function e(t,r,n){tfe(this,e),this.offset=t,this.total=r,this.countTH=n}return rfe(e,[{key:"offsetted",value:function(r){return r+this.offset}},{key:"unOffsetted",value:function(r){return r-this.offset}},{key:"renderedToSource",value:function(r){return this.offsetted(r)}},{key:"sourceToRendered",value:function(r){return this.unOffsetted(r)}},{key:"offsettedTH",value:function(r){return r-this.countTH}},{key:"unOffsettedTH",value:function(r){return r+this.countTH}},{key:"visibleColHeadedRowToSourceRow",value:function(r){return this.renderedToSource(this.offsettedTH(r))}},{key:"sourceRowToVisibleColHeadedRow",value:function(r){return this.unOffsettedTH(this.sourceToRendered(r))}}]),e}();const afe=ife;var lfe=0,Up=1,zp=2;function Kc(e){return Kc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kc(e)}function sfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OA(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,ffe(n.key),n)}}function ufe(e,t,r){return t&&OA(e.prototype,t),r&&OA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ffe(e){var t=cfe(e,"string");return Kc(t)==="symbol"?t:String(t)}function cfe(e,t){if(Kc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var RA=function(){function e(){sfe(this,e),this.currentSize=0,this.nextSize=0,this.currentOffset=0,this.nextOffset=0}return ufe(e,[{key:"setSize",value:function(r){this.currentSize=this.nextSize,this.nextSize=r}},{key:"setOffset",value:function(r){this.currentOffset=this.nextOffset,this.nextOffset=r}}]),e}();function Xc(e){return Xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xc(e)}function hfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EA(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,vfe(n.key),n)}}function dfe(e,t,r){return t&&EA(e.prototype,t),r&&EA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function vfe(e){var t=yfe(e,"string");return Xc(t)==="symbol"?t:String(t)}function yfe(e,t){if(Xc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pfe=function(){function e(){hfe(this,e),this.size=new RA,this.workingSpace=lfe,this.sharedSize=null}return dfe(e,[{key:"setSize",value:function(r){this.size.setSize(r)}},{key:"setOffset",value:function(r){this.size.setOffset(r)}},{key:"getViewSize",value:function(){return this.size}},{key:"isShared",value:function(){return this.sharedSize instanceof RA}},{key:"isPlaceOn",value:function(r){return this.workingSpace===r}},{key:"append",value:function(r){this.workingSpace=Up,r.workingSpace=zp,this.sharedSize=r.getViewSize()}},{key:"prepend",value:function(r){this.workingSpace=zp,r.workingSpace=Up,this.sharedSize=r.getViewSize()}}]),e}();function qc(e){return qc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qc(e)}function gfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TA(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,bfe(n.key),n)}}function mfe(e,t,r){return t&&TA(e.prototype,t),r&&TA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function bfe(e){var t=wfe(e,"string");return qc(t)==="symbol"?t:String(t)}function wfe(e,t){if(qc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var JV=function(){function e(t,r,n){gfe(this,e),this.rootNode=t,this.nodesPool=r,this.sizeSet=new pfe,this.childNodeType=n.toUpperCase(),this.visualIndex=0,this.collectedNodes=[]}return mfe(e,[{key:"setSize",value:function(r){return this.sizeSet.setSize(r),this}},{key:"setOffset",value:function(r){return this.sizeSet.setOffset(r),this}},{key:"isSharedViewSet",value:function(){return this.sizeSet.isShared()}},{key:"getNode",value:function(r){return r<this.collectedNodes.length?this.collectedNodes[r]:null}},{key:"getCurrentNode",value:function(){var r=this.collectedNodes.length;return r>0?this.collectedNodes[r-1]:null}},{key:"getRenderedChildCount",value:function(){var r=this.rootNode,n=this.sizeSet,o=0;if(this.isSharedViewSet())for(var i=r.firstElementChild;i;){if(i.tagName===this.childNodeType)o+=1;else if(n.isPlaceOn(Up))break;i=i.nextElementSibling}else o=r.childElementCount;return o}},{key:"start",value:function(){this.collectedNodes.length=0,this.visualIndex=0;for(var r=this.rootNode,n=this.sizeSet,o=this.isSharedViewSet(),i=n.getViewSize(),a=i.nextSize,l=this.getRenderedChildCount();l<a;){var s=this.nodesPool();!o||o&&n.isPlaceOn(zp)?r.appendChild(s):r.insertBefore(s,r.firstChild),l+=1}for(var u=o&&n.isPlaceOn(Up);l>a;)r.removeChild(u?r.firstChild:r.lastChild),l-=1}},{key:"render",value:function(){var r=this.rootNode,n=this.sizeSet,o=this.visualIndex;this.isSharedViewSet()&&n.isPlaceOn(zp)&&(o+=n.sharedSize.nextSize);var i=r.childNodes[o];if(i.tagName!==this.childNodeType){var a=this.nodesPool();r.replaceChild(a,i),i=a}this.collectedNodes.push(i),this.visualIndex+=1}},{key:"end",value:function(){}}]),e}();function ss(e){return ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ss(e)}function Sfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PA(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,_fe(n.key),n)}}function Cfe(e,t,r){return t&&PA(e.prototype,t),r&&PA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _fe(e){var t=Ofe(e,"string");return ss(t)==="symbol"?t:String(t)}function Ofe(e,t){if(ss(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ss(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rfe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&aO(e,t)}function aO(e,t){return aO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},aO(e,t)}function Efe(e){var t=kfe();return function(){var n=Yp(e),o;if(t){var i=Yp(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Tfe(this,o)}}function Tfe(e,t){if(t&&(ss(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pfe(e)}function Pfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kfe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yp(e){return Yp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Yp(e)}var eW=function(e){Rfe(r,e);var t=Efe(r);function r(){return Sfe(this,r),t.apply(this,arguments)}return Cfe(r,[{key:"prependView",value:function(o){return this.sizeSet.prepend(o.sizeSet),o.sizeSet.append(this.sizeSet),this}},{key:"appendView",value:function(o){return this.sizeSet.append(o.sizeSet),o.sizeSet.prepend(this.sizeSet),this}}]),r}(JV);function Zc(e){return Zc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zc(e)}function $fe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kA(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,Ife(n.key),n)}}function Afe(e,t,r){return t&&kA(e.prototype,t),r&&kA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ife(e){var t=Mfe(e,"string");return Zc(t)==="symbol"?t:String(t)}function Mfe(e,t){if(Zc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xfe=function(){function e(t){$fe(this,e),this.nodeType=t.toUpperCase()}return Afe(e,[{key:"setRootDocument",value:function(r){this.rootDocument=r}},{key:"obtain",value:function(){return this.rootDocument.createElement(this.nodeType)}}]),e}();function Qc(e){return Qc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qc(e)}function Dfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $A(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,Hfe(n.key),n)}}function Nfe(e,t,r){return t&&$A(e.prototype,t),r&&$A(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hfe(e){var t=Lfe(e,"string");return Qc(t)==="symbol"?t:String(t)}function Lfe(e,t){if(Qc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dv=function(){function e(t,r){Dfe(this,e),this.nodesPool=typeof t=="string"?new xfe(t):null,this.nodeType=t,this.rootNode=r,this.table=null,this.renderedNodes=0}return Nfe(e,[{key:"setTable",value:function(r){this.nodesPool&&this.nodesPool.setRootDocument(r.rootDocument),this.table=r}},{key:"adjust",value:function(){}},{key:"render",value:function(){}}]),e}();function us(e){return us=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},us(e)}function jfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AA(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,Ffe(n.key),n)}}function Bfe(e,t,r){return t&&AA(e.prototype,t),r&&AA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ffe(e){var t=Vfe(e,"string");return us(t)==="symbol"?t:String(t)}function Vfe(e,t){if(us(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(us(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wfe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lO(e,t)}function lO(e,t){return lO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},lO(e,t)}function Ufe(e){var t=Gfe();return function(){var n=Gp(e),o;if(t){var i=Gp(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return zfe(this,o)}}function zfe(e,t){if(t&&(us(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yfe(e)}function Yfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gfe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gp(e){return Gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gp(e)}var Kfe=function(e){Wfe(r,e);var t=Ufe(r);function r(){var n;return jfe(this,r),n=t.call(this,"TH"),n.orderViews=new WeakMap,n.sourceRowIndex=0,n}return Bfe(r,[{key:"obtainOrderView",value:function(o){var i=this,a;return this.orderViews.has(o)?a=this.orderViews.get(o):(a=new eW(o,function(l){return i.nodesPool.obtain(i.sourceRowIndex,l)},this.nodeType),this.orderViews.set(o,a)),a}},{key:"render",value:function(){for(var o=this.table,i=o.rowsToRender,a=o.rowHeaderFunctions,l=o.rowHeadersCount,s=o.rows,u=o.cells,f=0;f<i;f++){var c=this.table.renderedRowToSource(f),h=s.getRenderedNode(f);this.sourceRowIndex=c;var d=this.obtainOrderView(h),v=u.obtainOrderView(h);d.appendView(v).setSize(l).setOffset(this.table.renderedColumnToSource(0)).start();for(var p=0;p<l;p++){d.render();var m=d.getCurrentNode();m.className="",m.removeAttribute("style"),a[p](c,m,p)}d.end()}}}]),r}(dv);function fs(e){return fs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fs(e)}function Xfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IA(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,Zfe(n.key),n)}}function qfe(e,t,r){return t&&IA(e.prototype,t),r&&IA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zfe(e){var t=Qfe(e,"string");return fs(t)==="symbol"?t:String(t)}function Qfe(e,t){if(fs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(fs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jfe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sO(e,t)}function sO(e,t){return sO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},sO(e,t)}function ece(e){var t=nce();return function(){var n=Kp(e),o;if(t){var i=Kp(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return tce(this,o)}}function tce(e,t){if(t&&(fs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rce(e)}function rce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kp(e){return Kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Kp(e)}var oce=function(e){Jfe(r,e);var t=ece(r);function r(n){return Xfe(this,r),t.call(this,null,n)}return qfe(r,[{key:"adjust",value:function(){var o=this.table,i=o.columnHeadersCount,a=o.rowHeadersCount,l=this.rootNode.firstChild;if(i){for(var s=this.table.columnsToRender,u=s+a,f=0,c=i;f<c;f++){for(l=this.rootNode.childNodes[f],l||(l=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(l)),this.renderedNodes=l.childNodes.length;this.renderedNodes<u;)l.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;for(;this.renderedNodes>u;)l.removeChild(l.lastChild),this.renderedNodes-=1}var h=this.rootNode.childNodes.length;if(h>i)for(var d=i;d<h;d++)this.rootNode.removeChild(this.rootNode.lastChild)}else l&&pn(l)}},{key:"render",value:function(){for(var o=this.table.columnHeadersCount,i=0;i<o;i+=1)for(var a=this.table,l=a.columnHeaderFunctions,s=a.columnsToRender,u=a.rowHeadersCount,f=this.rootNode.childNodes[i],c=-1*u;c<s;c+=1){var h=this.table.renderedColumnToSource(c),d=f.childNodes[c+u];d.className="",d.removeAttribute("style"),l[i](h,d,i)}}}]),r}(dv);function cs(e){return cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cs(e)}function ice(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MA(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,lce(n.key),n)}}function ace(e,t,r){return t&&MA(e.prototype,t),r&&MA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function lce(e){var t=sce(e,"string");return cs(t)==="symbol"?t:String(t)}function sce(e,t){if(cs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(cs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uO(e,t)}function uO(e,t){return uO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},uO(e,t)}function fce(e){var t=dce();return function(){var n=Xp(e),o;if(t){var i=Xp(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return cce(this,o)}}function cce(e,t){if(t&&(cs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hce(e)}function hce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xp(e){return Xp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xp(e)}var vce=function(e){uce(r,e);var t=fce(r);function r(n){return ice(this,r),t.call(this,null,n)}return ace(r,[{key:"adjust",value:function(){for(var o=this.table,i=o.columnsToRender,a=o.rowHeadersCount,l=i+a;this.renderedNodes<l;)this.rootNode.appendChild(this.table.rootDocument.createElement("col")),this.renderedNodes+=1;for(;this.renderedNodes>l;)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}},{key:"render",value:function(){this.adjust();for(var o=this.table,i=o.columnsToRender,a=o.rowHeadersCount,l=0;l<a;l++){var s=this.table.renderedColumnToSource(l),u=this.table.columnUtils.getHeaderWidth(s);this.rootNode.childNodes[l].style.width="".concat(u,"px")}for(var f=0;f<i;f++){var c=this.table.renderedColumnToSource(f),h=this.table.columnUtils.getStretchedColumnWidth(c);this.rootNode.childNodes[f+a].style.width="".concat(h,"px")}var d=this.rootNode.firstChild;d&&te(d,"rowHeader")}}]),r}(dv);function hs(e){return hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hs(e)}var xA;function yce(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function pce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DA(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,mce(n.key),n)}}function gce(e,t,r){return t&&DA(e.prototype,t),r&&DA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function mce(e){var t=bce(e,"string");return hs(t)==="symbol"?t:String(t)}function bce(e,t){if(hs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fO(e,t)}function fO(e,t){return fO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},fO(e,t)}function Sce(e){var t=Oce();return function(){var n=qp(e),o;if(t){var i=qp(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Cce(this,o)}}function Cce(e,t){if(t&&(hs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _ce(e)}function _ce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qp(e){return qp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qp(e)}var NA=!1,Rce=function(e){wce(r,e);var t=Sce(r);function r(n){var o;return pce(this,r),o=t.call(this,"TR",n),o.orderView=new JV(n,function(i){return o.nodesPool.obtain(i)},o.nodeType),o}return gce(r,[{key:"getRenderedNode",value:function(o){return this.orderView.getNode(o)}},{key:"render",value:function(){var o=this.table.rowsToRender;!NA&&o>1e3&&(NA=!0,gt(dt(xA||(xA=yce([`Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting
the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.`],[`Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting\\x20
the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.`]))))),this.orderView.setSize(o).setOffset(this.table.renderedRowToSource(0)).start();for(var i=0;i<o;i++)this.orderView.render();this.orderView.end()}}]),r}(dv);function ds(e){return ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ds(e)}function Ece(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HA(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,Pce(n.key),n)}}function Tce(e,t,r){return t&&HA(e.prototype,t),r&&HA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pce(e){var t=kce(e,"string");return ds(t)==="symbol"?t:String(t)}function kce(e,t){if(ds(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ds(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $ce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cO(e,t)}function cO(e,t){return cO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},cO(e,t)}function Ace(e){var t=xce();return function(){var n=Zp(e),o;if(t){var i=Zp(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Ice(this,o)}}function Ice(e,t){if(t&&(ds(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mce(e)}function Mce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zp(e){return Zp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zp(e)}var Dce=function(e){$ce(r,e);var t=Ace(r);function r(){var n;return Ece(this,r),n=t.call(this,"TD"),n.orderViews=new WeakMap,n.sourceRowIndex=0,n}return Tce(r,[{key:"obtainOrderView",value:function(o){var i=this,a;return this.orderViews.has(o)?a=this.orderViews.get(o):(a=new eW(o,function(l){return i.nodesPool.obtain(i.sourceRowIndex,l)},this.nodeType),this.orderViews.set(o,a)),a}},{key:"render",value:function(){for(var o=this.table,i=o.rowsToRender,a=o.columnsToRender,l=o.rows,s=o.rowHeaders,u=0;u<i;u++){var f=this.table.renderedRowToSource(u),c=l.getRenderedNode(u);this.sourceRowIndex=f;var h=this.obtainOrderView(c),d=s.obtainOrderView(c);h.prependView(d).setSize(a).setOffset(this.table.renderedColumnToSource(0)).start();for(var v=0;v<a;v++){h.render();var p=h.getCurrentNode(),m=this.table.renderedColumnToSource(v);Ne(p,"hide")||(p.className=""),p.removeAttribute("style"),p.removeAttribute("dir"),this.table.cellRenderer(f,m,p)}h.end()}}}]),r}(dv);function Jc(e){return Jc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jc(e)}function Nce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LA(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,Lce(n.key),n)}}function Hce(e,t,r){return t&&LA(e.prototype,t),r&&LA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lce(e){var t=jce(e,"string");return Jc(t)==="symbol"?t:String(t)}function jce(e,t){if(Jc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Jc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bce=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.cellRenderer;Nce(this,e),this.rootNode=t,this.rootDocument=this.rootNode.ownerDocument,this.rowHeaders=null,this.columnHeaders=null,this.colGroup=null,this.rows=null,this.cells=null,this.rowFilter=null,this.columnFilter=null,this.rowUtils=null,this.columnUtils=null,this.rowsToRender=0,this.columnsToRender=0,this.rowHeaderFunctions=[],this.rowHeadersCount=0,this.columnHeaderFunctions=[],this.columnHeadersCount=0,this.cellRenderer=n}return Hce(e,[{key:"setAxisUtils",value:function(r,n){this.rowUtils=r,this.columnUtils=n}},{key:"setViewportSize",value:function(r,n){this.rowsToRender=r,this.columnsToRender=n}},{key:"setFilters",value:function(r,n){this.rowFilter=r,this.columnFilter=n}},{key:"setHeaderContentRenderers",value:function(r,n){this.rowHeaderFunctions=r,this.rowHeadersCount=r.length,this.columnHeaderFunctions=n,this.columnHeadersCount=n.length}},{key:"setRenderers",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=r.rowHeaders,o=r.columnHeaders,i=r.colGroup,a=r.rows,l=r.cells;n.setTable(this),o.setTable(this),i.setTable(this),a.setTable(this),l.setTable(this),this.rowHeaders=n,this.columnHeaders=o,this.colGroup=i,this.rows=a,this.cells=l}},{key:"renderedRowToSource",value:function(r){return this.rowFilter.renderedToSource(r)}},{key:"renderedColumnToSource",value:function(r){return this.columnFilter.renderedToSource(r)}},{key:"render",value:function(){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();for(var r=this.rowsToRender,n=this.rows,o=0;o<r;o++){var i=n.getRenderedNode(o);if(i.firstChild){var a=this.renderedRowToSource(o),l=this.rowUtils.getHeight(a);l?i.firstChild.style.height="".concat(l-1,"px"):i.firstChild.style.height=""}}}}]),e}();function eh(e){return eh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eh(e)}function Fce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jA(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,Wce(n.key),n)}}function Vce(e,t,r){return t&&jA(e.prototype,t),r&&jA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wce(e){var t=Uce(e,"string");return eh(t)==="symbol"?t:String(t)}function Uce(e,t){if(eh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(eh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zce=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.TABLE,n=t.THEAD,o=t.COLGROUP,i=t.TBODY,a=t.rowUtils,l=t.columnUtils,s=t.cellRenderer;Fce(this,e),this.renderer=new Bce(r,{cellRenderer:s}),this.renderer.setRenderers({rowHeaders:new Kfe,columnHeaders:new oce(n),colGroup:new vce(o),rows:new Rce(i),cells:new Dce}),this.renderer.setAxisUtils(a,l)}return Vce(e,[{key:"setFilters",value:function(r,n){return this.renderer.setFilters(r,n),this}},{key:"setViewportSize",value:function(r,n){return this.renderer.setViewportSize(r,n),this}},{key:"setHeaderContentRenderers",value:function(r,n){return this.renderer.setHeaderContentRenderers(r,n),this}},{key:"adjust",value:function(){this.renderer.adjust()}},{key:"render",value:function(){this.renderer.render()}}]),e}();function th(e){return th=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},th(e)}function Yce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BA(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,Kce(n.key),n)}}function Gce(e,t,r){return t&&BA(e.prototype,t),r&&BA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kce(e){var t=Xce(e,"string");return th(t)==="symbol"?t:String(t)}function Xce(e,t){if(th(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(th(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qce=function(){function e(t,r){Yce(this,e),this.dataAccessObject=t,this.wtSettings=r,this.headerWidths=new Map}return Gce(e,[{key:"getWidth",value:function(r){return this.wtSettings.getSetting("columnWidth",r)||this.wtSettings.getSetting("defaultColumnWidth")}},{key:"getStretchedColumnWidth",value:function(r){var n=this.dataAccessObject.wtViewport.columnsRenderCalculator,o=this.getWidth(r);if(n){var i=n.getStretchedColumnWidth(r,o);i&&(o=i)}return o}},{key:"getHeaderHeight",value:function(r){var n=this.wtSettings.getSetting("defaultRowHeight"),o=this.dataAccessObject.wtViewport.oversizedColumnHeaders[r];return o!==void 0&&(n=n?Math.max(n,o):o),n}},{key:"getHeaderWidth",value:function(r){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(r))}},{key:"calculateWidths",value:function(){var r=this.wtSettings,n=this.dataAccessObject,o=n.wtTable,i=n.wtViewport,a=n.cloneSource,l=a?a.wtTable.holder:o.holder,s=l.offsetHeight<l.scrollHeight?Zt():0,u=r.getSetting("rowHeaderWidth");if(i.columnsRenderCalculator.refreshStretching(i.getViewportWidth()-s),u=r.getSetting("onModifyRowHeaderWidth",u),u!=null)for(var f=r.getSetting("rowHeaders").length,c=r.getSetting("defaultColumnWidth"),h=0;h<f;h++){var d=Array.isArray(u)?u[h]:u;d=d??c,this.headerWidths.set(h,d)}}}]),e}();function rh(e){return rh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rh(e)}function Zce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FA(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,Jce(n.key),n)}}function Qce(e,t,r){return t&&FA(e.prototype,t),r&&FA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jce(e){var t=ehe(e,"string");return rh(t)==="symbol"?t:String(t)}function ehe(e,t){if(rh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(rh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var the=function(){function e(t,r){Zce(this,e),this.dataAccessObject=t,this.wtSettings=r}return Qce(e,[{key:"getHeight",value:function(r){var n=this.wtSettings.getSetting("rowHeight",r),o=this.dataAccessObject.wtViewport.oversizedRows[r];return o!==void 0&&(n=n===void 0?o:Math.max(n,o)),n}}]),e}();function nh(e){return nh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nh(e)}function rhe(e){return ihe(e)||ohe(e)||tW(e)||nhe()}function nhe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ohe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ihe(e){if(Array.isArray(e))return hO(e)}function ahe(e,t){return uhe(e)||she(e,t)||tW(e,t)||lhe()}function lhe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tW(e,t){if(e){if(typeof e=="string")return hO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hO(e,t)}}function hO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function she(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function uhe(e){if(Array.isArray(e))return e}function fhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VA(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,rW(n.key),n)}}function che(e,t,r){return t&&VA(e.prototype,t),r&&VA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cn(e,t,r){return t=rW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rW(e){var t=hhe(e,"string");return nh(t)==="symbol"?t:String(t)}function hhe(e,t){if(nh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dhe=function(){function e(t,r,n,o,i){var a=this;fhe(this,e),Cn(this,"wtSettings",null),Cn(this,"domBindings",void 0),Cn(this,"TBODY",null),Cn(this,"THEAD",null),Cn(this,"COLGROUP",null),Cn(this,"hasTableHeight",!0),Cn(this,"hasTableWidth",!0),Cn(this,"isTableVisible",!1),Cn(this,"tableOffset",0),Cn(this,"holderOffset",0),this.domBindings=n,this.isMaster=i==="master",this.name=i,this.dataAccessObject=t,this.facadeGetter=r,this.wtSettings=o,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=n.rootTable,wT(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;var l=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",function(){return a._modifyRowHeaderWidth(l)}),this.rowUtils=new the(this.dataAccessObject,this.wtSettings),this.columnUtils=new qce(this.dataAccessObject,this.wtSettings),this.tableRenderer=new zce({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer")})}return che(e,[{key:"is",value:function(r){return this.name===r}},{key:"fixTableDomTree",value:function(){var r=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=r.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=r.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=r.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}},{key:"createSpreader",value:function(r){var n=r.parentNode,o;return(!n||n.nodeType!==Node.ELEMENT_NODE||!Ne(n,"wtHolder"))&&(o=this.domBindings.rootDocument.createElement("div"),o.className="wtSpreader",n&&n.insertBefore(o,r),o.appendChild(r)),o.style.position="relative",o}},{key:"createHider",value:function(r){var n=r.parentNode,o;return(!n||n.nodeType!==Node.ELEMENT_NODE||!Ne(n,"wtHolder"))&&(o=this.domBindings.rootDocument.createElement("div"),o.className="wtHider",n&&n.insertBefore(o,r),o.appendChild(r)),o}},{key:"createHolder",value:function(r){var n=r.parentNode,o;return(!n||n.nodeType!==Node.ELEMENT_NODE||!Ne(n,"wtHolder"))&&(o=this.domBindings.rootDocument.createElement("div"),o.style.position="relative",o.className="wtHolder",n&&n.insertBefore(o,r),this.isMaster&&(o.parentNode.className+="ht_master handsontable",o.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr")),o.appendChild(r)),o}},{key:"draw",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.wtSettings,o=this.dataAccessObject,i=o.wtOverlays,a=o.wtViewport,l=n.getSetting("totalRows"),s=n.getSetting("totalColumns"),u=n.getSetting("rowHeaders"),f=u.length,c=n.getSetting("columnHeaders"),h=c.length,d=!1,v=r;if(this.isMaster&&(this.holderOffset=Vt(this.holder),v=a.createRenderCalculators(v),f&&!n.getSetting("fixedColumnsStart"))){var p=i.inlineStartOverlay.getScrollPosition(),m=this.correctHeaderWidth;this.correctHeaderWidth=p!==0,m!==this.correctHeaderWidth&&(v=!1)}if(this.isMaster&&(d=i.updateStateOfRendering()),v)this.isMaster&&a.createVisibleCalculators(),i&&i.refresh(!0);else{this.isMaster?this.tableOffset=Vt(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;var w=l>0?this.getFirstRenderedRow():0,S=s>0?this.getFirstRenderedColumn():0;this.rowFilter=new afe(w,l,h),this.columnFilter=new efe(S,s,f);var C=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();var P={};this.wtSettings.getSetting("beforeDraw",!0,P),C=P.skipRender!==!0}if(C){this.tableRenderer.setHeaderContentRenderers(u,c),(this.is(xn)||this.is(li))&&this.tableRenderer.setHeaderContentRenderers(u,[]),this.resetOversizedRows(),this.tableRenderer.setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render();var R;if(this.isMaster&&(R=this.dataAccessObject.workspaceWidth,this.dataAccessObject.wtViewport.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(xn))&&this.markOversizedRows(),this.isMaster){this.dataAccessObject.wtViewport.createVisibleCalculators(),this.dataAccessObject.wtOverlays.refresh(!1),this.dataAccessObject.wtOverlays.applyToDOM();var W=vt(this.hider),z=vt(this.TABLE);W!==0&&z!==W&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),R!==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(xn)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}var q=!1;return this.isMaster&&(q=i.topOverlay.resetFixedPosition(),i.bottomOverlay.clone&&(q=i.bottomOverlay.resetFixedPosition()||q),q=i.inlineStartOverlay.resetFixedPosition()||q,i.topInlineStartCornerOverlay&&i.topInlineStartCornerOverlay.resetFixedPosition(),i.bottomInlineStartCornerOverlay&&i.bottomInlineStartCornerOverlay.clone&&i.bottomInlineStartCornerOverlay.resetFixedPosition()),q?(i.refreshAll(),i.adjustElementsSize()):this.refreshSelections(v),d&&i.syncScrollWithMaster(),this.dataAccessObject.drawn=!0,this}},{key:"markIfOversizedColumnHeader",value:function(r){for(var n=this.columnFilter.renderedToSource(r),o=this.wtSettings.getSetting("columnHeaders").length,i=this.wtSettings.getSetting("defaultRowHeight"),a,l,s,u=this.wtSettings.getSetting("columnHeaderHeight")||[];o;)o-=1,a=this.getColumnHeaderHeight(o),l=this.getColumnHeader(n,o),l&&(s=no(l),(!a&&i<s||a<s)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=s),Array.isArray(u)?u[o]!==null&&u[o]!==void 0&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=u[o]):isNaN(u)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=u),this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]<(u[o]||u)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=u[o]||u))}},{key:"adjustColumnHeaderHeights",value:function(){for(var r=this.wtSettings,n=this.THEAD.childNodes,o=this.dataAccessObject.wtViewport.oversizedColumnHeaders,i=r.getSetting("columnHeaders"),a=0,l=i.length;a<l;a++)if(o[a]){if(!n[a]||n[a].childNodes.length===0)return;n[a].childNodes[0].style.height="".concat(o[a],"px")}}},{key:"resetOversizedRows",value:function(){var r=this.wtSettings,n=this.dataAccessObject.wtViewport;if(!(!this.isMaster&&!this.is(xn))&&!r.getSetting("externalRowCalculator"))for(var o=this.getRenderedRowsCount(),i=0;i<o;i++){var a=this.rowFilter.renderedToSource(i);n.oversizedRows&&n.oversizedRows[a]&&(n.oversizedRows[a]=void 0)}}},{key:"removeClassFromCells",value:function(r){for(var n=this.TABLE.querySelectorAll(".".concat(r)),o=0,i=n.length;o<i;o++)Be(n[o],r)}},{key:"refreshSelections",value:function(r){var n=this.wtSettings,o=this.dataAccessObject.selections;if(o){var i=Array.from(o),a=i.length;if(r){for(var l=[],s=0;s<a;s++){for(var u=i[s].settings,f=u.highlightHeaderClassName,c=u.highlightRowClassName,h=u.highlightColumnClassName,d=i[s].classNames,v=d.length,p=0;p<v;p++)l.includes(d[p])||l.push(d[p]);f&&!l.includes(f)&&l.push(f),c&&!l.includes(c)&&l.push(c),h&&!l.includes(h)&&l.push(h)}var m=n.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(m))for(var w=0;w<m.length;w++)l.push(m[w]);for(var S=l.length,C=0;C<S;C++)this.removeClassFromCells(l[C])}for(var P=0;P<a;P++)i[P].draw(this.facadeGetter(),r)}}},{key:"getCell",value:function(r){var n=r.row,o=r.col,i=this.wtSettings.getSetting("onModifyGetCellCoords",n,o);if(i&&Array.isArray(i)){var a=ahe(i,2);n=a[0],o=a[1]}if(this.isRowBeforeRenderedRows(n))return-1;if(this.isRowAfterRenderedRows(n))return-2;if(this.isColumnBeforeRenderedColumns(o))return-3;if(this.isColumnAfterRenderedColumns(o))return-4;var l=this.getRow(n);if(!l&&n>=0)throw new Error("TR was expected to be rendered but is not");var s=l.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(o)];if(!s&&o>=0)throw new Error("TD or TH was expected to be rendered but is not");return s}},{key:"getRow",value:function(r){var n=null,o=null;if(r<0){var i;n=(i=this.rowFilter)===null||i===void 0?void 0:i.sourceRowToVisibleColHeadedRow(r),o=this.THEAD}else{var a;n=(a=this.rowFilter)===null||a===void 0?void 0:a.sourceToRendered(r),o=this.TBODY}return n!==void 0&&o!==void 0?o.childNodes.length<n+1?!1:o.childNodes[n]:!1}},{key:"getColumnHeader",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=this.THEAD.childNodes[n];return o==null?void 0:o.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(r)]}},{key:"getColumnHeaders",value:function(r){var n=[],o=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(r);return this.THEAD.childNodes.forEach(function(i){var a=i.childNodes[o];a&&n.push(a)}),n}},{key:"getRowHeader",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0)!==0){var o=this.wtSettings.getSetting("rowHeaders").length;if(!(n>=o)){var i=this.TBODY.childNodes[this.rowFilter.sourceToRendered(r)];return i==null?void 0:i.childNodes[n]}}}},{key:"getRowHeaders",value:function(r){if(this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0)===0)return[];for(var n=[],o=this.wtSettings.getSetting("rowHeaders").length,i=0;i<o;i++){var a=this.TBODY.childNodes[this.rowFilter.sourceToRendered(r)],l=a==null?void 0:a.childNodes[i];l&&n.push(l)}return n}},{key:"getCoords",value:function(r){var n=r;if(n.nodeName!=="TD"&&n.nodeName!=="TH"&&(n=ii(n,["TD","TH"])),n===null)return null;var o=n.parentNode,i=o.parentNode,a=nV(o),l=n.cellIndex;if(Xo(Aa,n,this.wtRootElement)||Xo(ka,n,this.wtRootElement))i.nodeName==="THEAD"&&(a-=i.childNodes.length);else if(Xo(li,n,this.wtRootElement)||Xo(xn,n,this.wtRootElement)){var s=this.wtSettings.getSetting("totalRows");a=s-i.childNodes.length+a}else i===this.THEAD?a=this.rowFilter.visibleColHeadedRowToSourceRow(a):a=this.rowFilter.renderedToSource(a);return Xo(Aa,n,this.wtRootElement)||Xo($a,n,this.wtRootElement)||Xo(li,n,this.wtRootElement)?l=this.columnFilter.offsettedTH(l):l=this.columnFilter.visibleRowHeadedColumnToSourceColumn(l),this.wot.createCellCoords(a,l)}},{key:"markOversizedRows",value:function(){if(!this.wtSettings.getSetting("externalRowCalculator")){var r=this.TBODY.childNodes.length,n=r*this.wtSettings.getSetting("defaultRowHeight"),o=no(this.TBODY)-1,i,a,l,s,u;if(!(n===o&&!this.wtSettings.getSetting("fixedRowsBottom")))for(;r;)r-=1,l=this.rowFilter.renderedToSource(r),i=this.getRowHeight(l),s=this.getTrForRow(l),u=s.querySelector("th"),u?a=no(u):a=no(s)-1,(!i&&this.wtSettings.getSetting("defaultRowHeight")<a||i<a)&&(a+=1,this.dataAccessObject.wtViewport.oversizedRows[l]=a)}}},{key:"getTrForRow",value:function(r){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(r)]}},{key:"isColumnHeaderRendered",value:function(r){if(r>=0)return!1;var n=this.wtSettings.getSetting("rowHeaders"),o=n.length;return Math.abs(r)<=o}},{key:"isRowHeaderRendered",value:function(r){if(r>=0)return!1;var n=this.wtSettings.getSetting("columnHeaders"),o=n.length;return Math.abs(r)<=o}},{key:"isRowBeforeRenderedRows",value:function(r){var n=this.getFirstRenderedRow();return r<0&&n<=0?!this.isRowHeaderRendered(r):r<n}},{key:"isRowAfterRenderedRows",value:function(r){return r>this.getLastRenderedRow()}},{key:"isColumnBeforeRenderedColumns",value:function(r){var n=this.getFirstRenderedColumn();return r<0&&n<=0?!this.isColumnHeaderRendered(r):r<n}},{key:"isColumnAfterRenderedColumns",value:function(r){return this.columnFilter&&r>this.getLastRenderedColumn()}},{key:"isColumnAfterViewport",value:function(r){return this.columnFilter&&r>this.getLastVisibleColumn()}},{key:"isRowAfterViewport",value:function(r){return this.rowFilter&&r>this.getLastVisibleRow()}},{key:"isColumnBeforeViewport",value:function(r){return this.columnFilter&&this.columnFilter.sourceToRendered(r)<0&&r>=0}},{key:"isLastRowFullyVisible",value:function(){return this.getLastVisibleRow()===this.getLastRenderedRow()}},{key:"isLastColumnFullyVisible",value:function(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}},{key:"allRowsInViewport",value:function(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}},{key:"allColumnsInViewport",value:function(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}},{key:"getRowHeight",value:function(r){return this.rowUtils.getHeight(r)}},{key:"getColumnHeaderHeight",value:function(r){return this.columnUtils.getHeaderHeight(r)}},{key:"getColumnWidth",value:function(r){return this.columnUtils.getWidth(r)}},{key:"getStretchedColumnWidth",value:function(r){return this.columnUtils.getStretchedColumnWidth(r)}},{key:"hasDefinedSize",value:function(){return this.hasTableHeight&&this.hasTableWidth}},{key:"getWidth",value:function(){return vt(this.TABLE)}},{key:"getHeight",value:function(){return Tt(this.TABLE)}},{key:"getTotalWidth",value:function(){var r=vt(this.hider);return r!==0?r:this.getWidth()}},{key:"getTotalHeight",value:function(){var r=Tt(this.hider);return r!==0?r:this.getHeight()}},{key:"isVisible",value:function(){return ns(this.TABLE)}},{key:"_modifyRowHeaderWidth",value:function(r){var n=wt(r)?r():null;return Array.isArray(n)?(n=rhe(n),n[n.length-1]=this._correctRowHeaderWidth(n[n.length-1])):n=this._correctRowHeaderWidth(n),n}},{key:"_correctRowHeaderWidth",value:function(r){var n=r;return typeof r!="number"&&(n=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(n+=1),n}}]),e}();const mf=dhe;var vhe="stickyRowsBottom",nW={getFirstRenderedRow:function(){var t=this.wtSettings.getSetting("totalRows"),r=this.wtSettings.getSetting("fixedRowsBottom"),n=t-r;return t===0||r===0?-1:n<0?0:n},getFirstVisibleRow:function(){return this.getFirstRenderedRow()},getLastRenderedRow:function(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow:function(){return this.getLastRenderedRow()},getRenderedRowsCount:function(){var t=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsBottom"),t)},getVisibleRowsCount:function(){return this.getRenderedRowsCount()}};jn(nW,"MIXIN_NAME",vhe,{writable:!1,enumerable:!1});const oW=nW;var yhe="stickyColumnsStart",iW={getFirstRenderedColumn:function(){var t=this.wtSettings.getSetting("totalColumns");return t===0?-1:0},getFirstVisibleColumn:function(){return this.getFirstRenderedColumn()},getLastRenderedColumn:function(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn:function(){return this.getLastRenderedColumn()},getRenderedColumnsCount:function(){var t=this.wtSettings.getSetting("totalColumns");return Math.min(this.wtSettings.getSetting("fixedColumnsStart"),t)},getVisibleColumnsCount:function(){return this.getRenderedColumnsCount()}};jn(iW,"MIXIN_NAME",yhe,{writable:!1,enumerable:!1});const xT=iW;function vs(e){return vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vs(e)}function WA(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,ghe(n.key),n)}}function phe(e,t,r){return t&&WA(e.prototype,t),r&&WA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ghe(e){var t=mhe(e,"string");return vs(t)==="symbol"?t:String(t)}function mhe(e,t){if(vs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function whe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dO(e,t)}function dO(e,t){return dO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},dO(e,t)}function She(e){var t=Ohe();return function(){var n=Qp(e),o;if(t){var i=Qp(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Che(this,o)}}function Che(e,t){if(t&&(vs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _he(e)}function _he(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ohe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qp(e){return Qp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qp(e)}var DT=function(e){whe(r,e);var t=She(r);function r(n,o,i,a){return bhe(this,r),t.call(this,n,o,i,a,li)}return phe(r)}(mf);mt(DT,oW);mt(DT,xT);const Rhe=DT;var ka="top",xn="bottom",$a="inline_start",Aa="top_inline_start_corner",li="bottom_inline_start_corner",Ehe=[ka,xn,$a,Aa,li],The=new Map([[ka,"ht_clone_".concat(ka)],[xn,"ht_clone_".concat(xn)],[$a,"ht_clone_".concat($a," ht_clone_left")],[Aa,"ht_clone_".concat(Aa," ht_clone_top_left_corner")],[li,"ht_clone_".concat(li," ht_clone_bottom_left_corner")]]);function oh(e){return oh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oh(e)}function Phe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UA(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,aW(n.key),n)}}function khe(e,t,r){return t&&UA(e.prototype,t),r&&UA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function IS(e,t,r){return t=aW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aW(e){var t=$he(e,"string");return oh(t)==="symbol"?t:String(t)}function $he(e,t){if(oh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(oh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ahe=function(){function e(t){Phe(this,e),IS(this,"dataAccessObject",void 0),IS(this,"lastScrolledColumnPos",-1),IS(this,"lastScrolledRowPos",-1),this.dataAccessObject=t}return khe(e,[{key:"scrollViewport",value:function(r,n,o,i,a){var l=this.scrollViewportHorizontally(r.col,o,a),s=this.scrollViewportVertically(r.row,n,i);return l||s}},{key:"scrollViewportHorizontally",value:function(r,n,o){var i=this.dataAccessObject,a=i.drawn,l=i.totalColumns;if(!a||!Number.isInteger(r)||r<0||r>l)return!1;var s=this.getFirstVisibleColumn(),u=this.getLastVisibleColumn(),f=n===void 0&&o===void 0,c=this.dataAccessObject,h=c.fixedColumnsStart,d=c.inlineStartOverlay;if(f&&r<h)return!1;var v=!1;return s===-1?v=d.scrollTo(r,f?r>this.lastScrolledColumnPos:n):(f&&(r<s||r>u)||!f)&&(v=d.scrollTo(r,f?r>u:n)),v&&(this.lastScrolledColumnPos=r),v}},{key:"scrollViewportVertically",value:function(r,n,o){var i=this.dataAccessObject,a=i.drawn,l=i.totalRows;if(!a||!Number.isInteger(r)||r<0||r>l)return!1;var s=this.getFirstVisibleRow(),u=this.getLastVisibleRow(),f=n===void 0&&o===void 0,c=this.dataAccessObject,h=c.fixedRowsBottom,d=c.fixedRowsTop,v=c.topOverlay;if(f&&(r<d||r>l-h-1))return!1;var p=!1;return s===-1?p=v.scrollTo(r,f?r>this.lastScrolledRowPos:o):(f&&(r<s||r>u)||!f)&&(p=v.scrollTo(r,f?r>u:o)),p&&(this.lastScrolledRowPos=r),p}},{key:"getFirstVisibleRow",value:function(){var r=this.dataAccessObject,n=r.topOverlay,o=r.wtTable,i=r.wtViewport,a=r.totalRows,l=r.fixedRowsTop,s=r.rootWindow,u=o.getFirstVisibleRow();if(n.mainTableScrollableElement===s){var f=Vt(o.wtRootElement),c=no(o.hider),h=no(s),d=Dc(s,s);if(f.top+c-h<=d){var v=i.getColumnHeaderHeight();v+=n.sumCellSizes(0,l);for(var p=a;p>0;p--)if(v+=n.sumCellSizes(p-1,p),f.top+c-v<=d){u=p;break}}}return u}},{key:"getLastVisibleRow",value:function(){var r=this.dataAccessObject,n=r.topOverlay,o=r.wtTable,i=r.wtViewport,a=r.totalRows,l=r.rootWindow,s=o.getLastVisibleRow();if(n.mainTableScrollableElement===l){var u=Vt(o.wtRootElement),f=Dc(l,l);if(u.top>f){for(var c=no(l),h=i.getColumnHeaderHeight(),d=1;d<=a;d++)if(h+=n.sumCellSizes(d-1,d),u.top+h-f>=c){s=d-2;break}}}return s}},{key:"getFirstVisibleColumn",value:function(){var r=this.dataAccessObject,n=r.inlineStartOverlay,o=r.wtTable,i=r.wtViewport,a=r.totalColumns,l=r.rootWindow,s=o.getFirstVisibleColumn();if(n.mainTableScrollableElement===l){var u=Vt(o.wtRootElement),f=yc(o.hider),c=yc(l),h=Math.abs(Lp(l,l));if(u.left+f-c<=h){for(var d=i.getRowHeaderWidth(),v=a;v>0;v--)if(d+=n.sumCellSizes(v-1,v),u.left+f-d<=h){s=v;break}}}return s}},{key:"getLastVisibleColumn",value:function(){var r=this.dataAccessObject,n=r.wtSettings,o=r.inlineStartOverlay,i=r.wtTable,a=r.wtViewport,l=r.totalColumns,s=r.rootWindow,u=i.getLastVisibleColumn();if(o.mainTableScrollableElement===s){var f=n.getSetting("rtlMode"),c=null;if(f){var h=i.TABLE.getBoundingClientRect(),d=this.dataAccessObject.rootWindow.document,v=d.documentElement.offsetWidth;c=Math.abs(h.right-v)}else{var p=Vt(i.wtRootElement);c=p.left}var m=Math.abs(Lp(s,s));if(c>m){for(var w=yc(s),S=a.getRowHeaderWidth(),C=1;C<=l;C++)if(S+=o.sumCellSizes(C-1,C),c+S-m>=w){u=C-2;break}}}return u}}]),e}();const Ihe=Ahe;function ih(e){return ih=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ih(e)}function Mhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zA(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,lW(n.key),n)}}function xhe(e,t,r){return t&&zA(e.prototype,t),r&&zA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function rn(e,t,r){return t=lW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lW(e){var t=Dhe(e,"string");return ih(t)==="symbol"?t:String(t)}function Dhe(e,t){if(ih(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ih(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var NT=function(){function e(t,r){Mhe(this,e),rn(this,"wtTable",void 0),rn(this,"wtScroll",void 0),rn(this,"wtViewport",void 0),rn(this,"wtOverlays",void 0),rn(this,"selections",void 0),rn(this,"wtEvent",void 0),rn(this,"guid","wt_".concat(gT())),rn(this,"drawInterrupted",!1),rn(this,"drawn",!1),rn(this,"domBindings",void 0),rn(this,"wtSettings",void 0),this.domBindings={rootTable:t,rootDocument:t.ownerDocument,rootWindow:t.ownerDocument.defaultView},this.wtSettings=r,this.wtScroll=new Ihe(this.createScrollDao())}return xhe(e,[{key:"eventManager",get:function(){return new Pt(this)}},{key:"findOriginalHeaders",value:function(){var r=[];if(this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(var n=0,o=this.wtTable.THEAD.childNodes[0].childNodes.length;n<o;n++)r.push(this.wtTable.THEAD.childNodes[0].childNodes[n].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(i,a){bi(a,r[i])}])}}},{key:"createCellCoords",value:function(r,n){return new Wp(r,n,this.wtSettings.getSetting("rtlMode"))}},{key:"createCellRange",value:function(r,n,o){return new IT(r,n,o,this.wtSettings.getSetting("rtlMode"))}},{key:"draw",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this.drawInterrupted=!1,!r&&!this.wtTable.isVisible()?this.drawInterrupted=!0:this.wtTable.draw(r),this}},{key:"getCell",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!n)return this.wtTable.getCell(r);var o=this.wtSettings.getSetting("totalRows"),i=this.wtSettings.getSetting("fixedRowsTop"),a=this.wtSettings.getSetting("fixedRowsBottom"),l=this.wtSettings.getSetting("fixedColumnsStart");if(r.row<i&&r.col<l)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(r);if(r.row<i)return this.wtOverlays.topOverlay.clone.wtTable.getCell(r);if(r.col<l&&r.row>=o-a){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(r)}else{if(r.col<l)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(r);if(r.row<o&&r.row>=o-a&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(r)}return this.wtTable.getCell(r)}},{key:"scrollViewport",value:function(r,n,o,i,a){return r.col<0||r.row<0?!1:this.wtScroll.scrollViewport(r,n,o,i,a)}},{key:"scrollViewportHorizontally",value:function(r,n,o){return r<0?!1:this.wtScroll.scrollViewportHorizontally(r,n,o)}},{key:"scrollViewportVertically",value:function(r,n,o){return r<0?!1:this.wtScroll.scrollViewportVertically(r,n,o)}},{key:"getViewport",value:function(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}},{key:"destroy",value:function(){this.wtOverlays.destroy(),this.wtEvent.destroy()}},{key:"createScrollDao",value:function(){var r=this;return{get drawn(){return r.drawn},get topOverlay(){return r.wtOverlays.topOverlay},get inlineStartOverlay(){return r.wtOverlays.inlineStartOverlay},get wtTable(){return r.wtTable},get wtViewport(){return r.wtViewport},get wtSettings(){return r.wtSettings},get rootWindow(){return r.domBindings.rootWindow},get totalRows(){return r.wtSettings.getSetting("totalRows")},get totalColumns(){return r.wtSettings.getSetting("totalColumns")},get fixedRowsTop(){return r.wtSettings.getSetting("fixedRowsTop")},get fixedRowsBottom(){return r.wtSettings.getSetting("fixedRowsBottom")},get fixedColumnsStart(){return r.wtSettings.getSetting("fixedColumnsStart")}}}},{key:"getTableDao",value:function(){var r=this;return{get wot(){return r},get parentTableOffset(){return r.cloneSource.wtTable.tableOffset},get cloneSource(){return r.cloneSource},get workspaceWidth(){return r.wtViewport.getWorkspaceWidth()},get wtViewport(){return r.wtViewport},get wtOverlays(){return r.wtOverlays},get selections(){return r.selections},get drawn(){return r.drawn},set drawn(n){r.drawn=n},get wtTable(){return r.wtTable},get startColumnRendered(){return r.wtViewport.columnsRenderCalculator.startColumn},get startColumnVisible(){return r.wtViewport.columnsVisibleCalculator.startColumn},get endColumnRendered(){return r.wtViewport.columnsRenderCalculator.endColumn},get endColumnVisible(){return r.wtViewport.columnsVisibleCalculator.endColumn},get countColumnsRendered(){return r.wtViewport.columnsRenderCalculator.count},get countColumnsVisible(){return r.wtViewport.columnsVisibleCalculator.count},get startRowRendered(){return r.wtViewport.rowsRenderCalculator.startRow},get startRowVisible(){return r.wtViewport.rowsVisibleCalculator.startRow},get endRowRendered(){return r.wtViewport.rowsRenderCalculator.endRow},get endRowVisible(){return r.wtViewport.rowsVisibleCalculator.endRow},get countRowsRendered(){return r.wtViewport.rowsRenderCalculator.count},get countRowsVisible(){return r.wtViewport.rowsVisibleCalculator.count}}}}]),e}();function ys(e){return ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ys(e)}function YA(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,sW(n.key),n)}}function Nhe(e,t,r){return t&&YA(e.prototype,t),r&&YA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lhe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vO(e,t)}function vO(e,t){return vO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},vO(e,t)}function jhe(e){var t=Fhe();return function(){var n=Jp(e),o;if(t){var i=Jp(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Bhe(this,o)}}function Bhe(e,t){if(t&&(ys(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ky(e)}function Ky(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fhe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Jp(e){return Jp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jp(e)}function GA(e,t,r){return t=sW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sW(e){var t=Vhe(e,"string");return ys(t)==="symbol"?t:String(t)}function Vhe(e,t){if(ys(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ys(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Whe=function(e){Lhe(r,e);var t=jhe(r);function r(n,o,i){var a;Hhe(this,r),a=t.call(this,n,o),GA(Ky(a),"cloneSource",void 0),GA(Ky(a),"cloneOverlay",void 0);var l=a.wtSettings.getSetting("facade",Ky(a));return a.cloneSource=i.source,a.cloneOverlay=i.overlay,a.wtTable=a.cloneOverlay.createTable(a.getTableDao(),l,a.domBindings,a.wtSettings),a.wtViewport=i.viewport,a.selections=i.selections,a.wtEvent=new QV(l,a.domBindings,a.wtSettings,a.eventManager,a.wtTable,a.selections,i.event),a.findOriginalHeaders(),a}return Nhe(r)}(NT);function ah(e){return ah=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ah(e)}function Uhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KA(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,uW(n.key),n)}}function zhe(e,t,r){return t&&KA(e.prototype,t),r&&KA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yhe(e,t,r){return t=uW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uW(e){var t=Ghe(e,"string");return ah(t)==="symbol"?t:String(t)}function Ghe(e,t){if(ah(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ah(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vv=function(){function e(t,r,n,o,i){Uhe(this,e),Yhe(this,"wtSettings",null),jn(this,"wot",t,{writable:!1}),this.domBindings=i,this.facadeGetter=r,this.wtSettings=o;var a=this.wot.wtTable,l=a.TABLE,s=a.hider,u=a.spreader,f=a.holder,c=a.wtRootElement;this.instance=this.wot,this.type=n,this.mainTableScrollableElement=null,this.TABLE=l,this.hider=s,this.spreader=u,this.holder=f,this.wtRootElement=c,this.trimmingContainer=is(this.hider.parentNode.parentNode),this.updateStateOfRendering(),this.clone=this.makeClone()}return zhe(e,[{key:"updateStateOfRendering",value:function(){var r=this.needFullRender;this.needFullRender=this.shouldBeRendered();var n=r!==this.needFullRender;return n&&!this.needFullRender&&this.reset(),n}},{key:"shouldBeRendered",value:function(){return!0}},{key:"updateTrimmingContainer",value:function(){this.trimmingContainer=is(this.hider.parentNode.parentNode)}},{key:"updateMainScrollableElement",value:function(){var r=this.wot.wtTable,n=this.domBindings.rootWindow;n.getComputedStyle(r.wtRootElement.parentNode).getPropertyValue("overflow")==="hidden"?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=Nc(r.TABLE)}},{key:"getRelativeCellPosition",value:function(r,n,o){if(this.clone.wtTable.holder.contains(r)===!1){gt("The provided element is not a child of the ".concat(this.type," overlay"));return}var i=this.mainTableScrollableElement===this.domBindings.rootWindow,a=o<this.wtSettings.getSetting("fixedColumnsStart"),l=n<this.wtSettings.getSetting("fixedRowsTop"),s=n>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),u=this.clone.wtTable.spreader,f={start:this.getRelativeStartPosition(u),top:u.offsetTop},c={start:this.getRelativeStartPosition(r),top:r.offsetTop},h=null;return i?h=this.getRelativeCellPositionWithinWindow(l,a,c,f):h=this.getRelativeCellPositionWithinHolder(l,s,a,c,f),h}},{key:"getRelativeStartPosition",value:function(r){return this.isRtl()?r.offsetParent.offsetWidth-r.offsetLeft-r.offsetWidth:r.offsetLeft}},{key:"getRelativeCellPositionWithinWindow",value:function(r,n,o,i){var a=this.wot.wtTable.wtRootElement.getBoundingClientRect(),l=0,s=0;if(!n)l=i.start;else{var u=a.left;this.isRtl()&&(u=this.domBindings.rootWindow.innerWidth-(a.left+a.width+Zt())),l=u<=0?-1*u:0}if(r){var f=this.clone.wtTable.TABLE.getBoundingClientRect();s=f.top-a.top}else s=i.top;return{start:o.start+l,top:o.top+s}}},{key:"getRelativeCellPositionWithinHolder",value:function(r,n,o,i,a){var l={horizontal:this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),vertical:this.wot.wtOverlays.topOverlay.getScrollPosition()},s=0,u=0;if(o||(s=l.horizontal-a.start),n){var f=this.wot.wtTable.wtRootElement.getBoundingClientRect(),c=this.clone.wtTable.TABLE.getBoundingClientRect();u=c.top*-1+f.top}else r||(u=l.vertical-a.top);return{start:i.start-s,top:i.top-u}}},{key:"makeClone",value:function(){if(Ehe.indexOf(this.type)===-1)throw new Error('Clone type "'.concat(this.type,'" is not supported.'));var r=this.wot.wtTable,n=this.domBindings,o=n.rootDocument,i=n.rootWindow,a=o.createElement("DIV"),l=o.createElement("TABLE"),s=r.wtRootElement.parentNode;a.className="".concat(The.get(this.type)," handsontable"),a.setAttribute("dir",this.isRtl()?"rtl":"ltr"),a.style.position="absolute",a.style.top=0,a.style.overflow="visible",this.isRtl()?a.style.right=0:a.style.left=0,l.className=r.TABLE.className,a.appendChild(l),s.appendChild(a);var u=this.wtSettings.getSetting("preventOverflow");return u===!0||u==="horizontal"&&this.type===ka||u==="vertical"&&this.type===$a?this.mainTableScrollableElement=i:i.getComputedStyle(s).getPropertyValue("overflow")==="hidden"?this.mainTableScrollableElement=r.holder:this.mainTableScrollableElement=Nc(r.TABLE),new Whe(l,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selections:this.wot.selections})}},{key:"refresh",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.shouldBeRendered();this.clone&&(this.needFullRender||n)&&this.clone.draw(r),this.needFullRender=n}},{key:"reset",value:function(){if(this.clone){var r=this.clone.wtTable.holder,n=this.clone.wtTable.hider,o=r.style,i=n.style,a=r.parentNode.style;$([o,i,a],function(l){l.width="",l.height=""})}}},{key:"isRtl",value:function(){return this.wtSettings.getSetting("rtlMode")}},{key:"destroy",value:function(){this.clone.eventManager.destroy()}}]),e}();function ps(e){return ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ps(e)}function Xy(e,t,r){return fW()?Xy=Reflect.construct.bind():Xy=function(o,i,a){var l=[null];l.push.apply(l,i);var s=Function.bind.apply(o,l),u=new s;return a&&eg(u,a.prototype),u},Xy.apply(null,arguments)}function Khe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XA(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,qhe(n.key),n)}}function Xhe(e,t,r){return t&&XA(e.prototype,t),r&&XA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qhe(e){var t=Zhe(e,"string");return ps(t)==="symbol"?t:String(t)}function Zhe(e,t){if(ps(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ps(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qhe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eg(e,t)}function eg(e,t){return eg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},eg(e,t)}function Jhe(e){var t=fW();return function(){var n=tg(e),o;if(t){var i=tg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ede(this,o)}}function ede(e,t){if(t&&(ps(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tde(e)}function tde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fW(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tg(e){return tg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tg(e)}var rde=function(e){Qhe(r,e);var t=Jhe(r);function r(n,o,i,a,l,s){var u;return Khe(this,r),u=t.call(this,n,o,li,i,a),u.bottomOverlay=l,u.inlineStartOverlay=s,u}return Xhe(r,[{key:"createTable",value:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return Xy(Rhe,i)}},{key:"shouldBeRendered",value:function(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}},{key:"resetFixedPosition",value:function(){var o=this.wot;if(this.updateTrimmingContainer(),!o.wtTable.holder.parentNode)return!1;var i=this.clone.wtTable.holder.parentNode;if(i.style.top="",this.trimmingContainer===this.domBindings.rootWindow){var a=this.inlineStartOverlay.getOverlayOffset(),l=this.bottomOverlay.getOverlayOffset();i.style[this.isRtl()?"right":"left"]="".concat(a,"px"),i.style.bottom="".concat(l,"px")}else lv(i),this.repositionOverlay();var s=Tt(this.clone.wtTable.TABLE),u=vt(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(s=0),i.style.height="".concat(s,"px"),i.style.width="".concat(u,"px"),!1}},{key:"repositionOverlay",value:function(){var o=this.wot,i=o.wtTable,a=o.wtViewport,l=this.domBindings.rootDocument,s=this.clone.wtTable.holder.parentNode,u=0;a.hasVerticalScroll()||(u+=a.getWorkspaceHeight()-i.getTotalHeight()),a.hasVerticalScroll()&&a.hasHorizontalScroll()&&(u+=Zt(l)),s.style.bottom="".concat(u,"px")}}]),r}(vv),nde="calculatedColumns",cW={getFirstRenderedColumn:function(){var t=this.dataAccessObject.startColumnRendered;return t===null?-1:t},getFirstVisibleColumn:function(){var t=this.dataAccessObject.startColumnVisible;return t===null?-1:t},getLastRenderedColumn:function(){var t=this.dataAccessObject.endColumnRendered;return t===null?-1:t},getLastVisibleColumn:function(){var t=this.dataAccessObject.endColumnVisible;return t===null?-1:t},getRenderedColumnsCount:function(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount:function(){return this.dataAccessObject.countColumnsVisible}};jn(cW,"MIXIN_NAME",nde,{writable:!1,enumerable:!1});const HT=cW;function gs(e){return gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gs(e)}function qA(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,ide(n.key),n)}}function ode(e,t,r){return t&&qA(e.prototype,t),r&&qA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ide(e){var t=ade(e,"string");return gs(t)==="symbol"?t:String(t)}function ade(e,t){if(gs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yO(e,t)}function yO(e,t){return yO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},yO(e,t)}function ude(e){var t=hde();return function(){var n=rg(e),o;if(t){var i=rg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return fde(this,o)}}function fde(e,t){if(t&&(gs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cde(e)}function cde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hde(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rg(e){return rg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rg(e)}var LT=function(e){sde(r,e);var t=ude(r);function r(n,o,i,a){return lde(this,r),t.call(this,n,o,i,a,xn)}return ode(r)}(mf);mt(LT,oW);mt(LT,HT);const dde=LT;function ms(e){return ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ms(e)}function qy(e,t,r){return dW()?qy=Reflect.construct.bind():qy=function(o,i,a){var l=[null];l.push.apply(l,i);var s=Function.bind.apply(o,l),u=new s;return a&&ng(u,a.prototype),u},qy.apply(null,arguments)}function vde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZA(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,vW(n.key),n)}}function yde(e,t,r){return t&&ZA(e.prototype,t),r&&ZA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ng(e,t)}function ng(e,t){return ng=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},ng(e,t)}function gde(e){var t=dW();return function(){var n=og(e),o;if(t){var i=og(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return mde(this,o)}}function mde(e,t){if(t&&(ms(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hW(e)}function hW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dW(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function og(e){return og=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},og(e)}function bde(e,t,r){return t=vW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vW(e){var t=wde(e,"string");return ms(t)==="symbol"?t:String(t)}function wde(e,t){if(ms(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ms(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Sde=function(e){pde(r,e);var t=gde(r);function r(n,o,i,a){var l;return vde(this,r),l=t.call(this,n,o,xn,i,a),bde(hW(l),"cachedFixedRowsBottom",-1),l.cachedFixedRowsBottom=l.wtSettings.getSetting("fixedRowsBottom"),l}return yde(r,[{key:"createTable",value:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return qy(dde,i)}},{key:"shouldBeRendered",value:function(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}},{key:"resetFixedPosition",value:function(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;var o=this.domBindings.rootWindow,i=this.clone.wtTable.holder.parentNode;i.style.top="";var a=0,l=this.wtSettings.getSetting("preventOverflow");this.trimmingContainer===o&&(!l||l!=="vertical")?(a=this.getOverlayOffset(),i.style.bottom="".concat(a,"px")):(a=this.getScrollPosition(),this.repositionOverlay());var s=this.adjustHeaderBordersPosition(a);return this.adjustElementsSize(),s}},{key:"repositionOverlay",value:function(){var o=this.wot,i=o.wtTable,a=o.wtViewport,l=this.domBindings.rootDocument,s=this.clone.wtTable.holder.parentNode,u=0;a.hasVerticalScroll()||(u+=a.getWorkspaceHeight()-i.getTotalHeight()),a.hasVerticalScroll()&&a.hasHorizontalScroll()&&(u+=Zt(l)),s.style.bottom="".concat(u,"px")}},{key:"setScrollPosition",value:function(o){var i=this.domBindings.rootWindow,a=!1;return this.mainTableScrollableElement===i?(i.scrollTo(Pa(i),o),a=!0):this.mainTableScrollableElement.scrollTop!==o&&(this.mainTableScrollableElement.scrollTop=o,a=!0),a}},{key:"onScroll",value:function(){this.wtSettings.getSetting("onScrollHorizontally")}},{key:"sumCellSizes",value:function(o,i){for(var a=this.wot,l=a.wtTable,s=a.wtSettings,u=s.getSetting("defaultRowHeight"),f=o,c=0;f<i;){var h=l.getRowHeight(f);c+=h===void 0?u:h,f+=1}return c}},{key:"adjustElementsSize",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.updateTrimmingContainer(),(this.needFullRender||o)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}},{key:"adjustRootElementSize",value:function(){var o=this.wot,i=o.wtTable,a=o.wtViewport,l=this.domBindings,s=l.rootDocument,u=l.rootWindow,f=Zt(s),c=this.clone.wtTable.holder.parentNode,h=c.style,d=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==u||d==="horizontal"){var v=a.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(v-=f),v=Math.min(v,i.wtRootElement.scrollWidth),h.width="".concat(v,"px")}else h.width="";this.clone.wtTable.holder.style.width=h.width;var p=Tt(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(p=0),h.height="".concat(p,"px")}},{key:"adjustRootChildrenSize",value:function(){var o=this.clone.wtTable.holder;this.clone.wtTable.hider.style.width=this.hider.style.width,o.style.width=o.parentNode.style.width,o.style.height=o.parentNode.style.height}},{key:"applyToDOM",value:function(){var o=this.wtSettings.getSetting("totalRows");if(typeof this.wot.wtViewport.rowsRenderCalculator.startPosition=="number")this.spreader.style.top="".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition,"px");else if(o===0)this.spreader.style.top="0";else throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){var o=this.isRtl()?"right":"left",i=this.clone.wtTable.spreader;typeof this.wot.wtViewport.columnsRenderCalculator.startPosition=="number"?i.style[o]="".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition,"px"):i.style[o]=""}},{key:"scrollTo",value:function(o,i){var a=this.getTableParentOffset(),l=this.wot.cloneSource?this.wot.cloneSource:this.wot,s=l.wtTable.holder,u=0;i&&s.offsetHeight!==s.clientHeight&&(u=Zt(this.domBindings.rootDocument)),i?(a+=this.sumCellSizes(0,o+1),a-=this.wot.wtViewport.getViewportHeight(),a+=1):a+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),o),a+=u,this.setScrollPosition(a)}},{key:"getTableParentOffset",value:function(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}},{key:"getScrollPosition",value:function(){return Dc(this.mainTableScrollableElement,this.domBindings.rootWindow)}},{key:"getOverlayOffset",value:function(){var o=this.domBindings.rootWindow,i=this.wtSettings.getSetting("preventOverflow"),a=0;if(this.trimmingContainer===o&&(!i||i!=="vertical")){var l=this.wot.wtTable.getTotalHeight(),s=this.clone.wtTable.getTotalHeight(),u=l-s,f=this.domBindings.rootDocument.documentElement.clientHeight;a=Math.max(this.getTableParentOffset()-this.getScrollPosition()-f+l,0),a>u&&(a=0)}return a}},{key:"adjustHeaderBordersPosition",value:function(o){var i=this.wtSettings.getSetting("fixedRowsBottom"),a=this.cachedFixedRowsBottom!==i,l=this.wtSettings.getSetting("columnHeaders"),s=!1;if((a||i===0)&&l.length>0){var u=this.wot.wtTable.holder.parentNode,f=Ne(u,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),o||this.wtSettings.getSetting("totalRows")===0?(te(u,"innerBorderBottom"),s=!f):(Be(u,"innerBorderBottom"),s=f)}return s}}]),r}(vv),Cde="calculatedRows",yW={getFirstRenderedRow:function(){var t=this.dataAccessObject.startRowRendered;return t===null?-1:t},getFirstVisibleRow:function(){var t=this.dataAccessObject.startRowVisible;return t===null?-1:t},getLastRenderedRow:function(){var t=this.dataAccessObject.endRowRendered;return t===null?-1:t},getLastVisibleRow:function(){var t=this.dataAccessObject.endRowVisible;return t===null?-1:t},getRenderedRowsCount:function(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount:function(){return this.dataAccessObject.countRowsVisible}};jn(yW,"MIXIN_NAME",Cde,{writable:!1,enumerable:!1});const pW=yW;function bs(e){return bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bs(e)}function QA(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,Ode(n.key),n)}}function _de(e,t,r){return t&&QA(e.prototype,t),r&&QA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ode(e){var t=Rde(e,"string");return bs(t)==="symbol"?t:String(t)}function Rde(e,t){if(bs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(bs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ede(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pO(e,t)}function pO(e,t){return pO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},pO(e,t)}function Pde(e){var t=Ade();return function(){var n=ig(e),o;if(t){var i=ig(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return kde(this,o)}}function kde(e,t){if(t&&(bs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $de(e)}function $de(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ade(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ig(e){return ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ig(e)}var jT=function(e){Tde(r,e);var t=Pde(r);function r(n,o,i,a){return Ede(this,r),t.call(this,n,o,i,a,$a)}return _de(r)}(mf);mt(jT,pW);mt(jT,xT);const Ide=jT;function ws(e){return ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ws(e)}function Zy(e,t,r){return gW()?Zy=Reflect.construct.bind():Zy=function(o,i,a){var l=[null];l.push.apply(l,i);var s=Function.bind.apply(o,l),u=new s;return a&&ag(u,a.prototype),u},Zy.apply(null,arguments)}function Mde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JA(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,Dde(n.key),n)}}function xde(e,t,r){return t&&JA(e.prototype,t),r&&JA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dde(e){var t=Nde(e,"string");return ws(t)==="symbol"?t:String(t)}function Nde(e,t){if(ws(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ws(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ag(e,t)}function ag(e,t){return ag=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},ag(e,t)}function Lde(e){var t=gW();return function(){var n=lg(e),o;if(t){var i=lg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return jde(this,o)}}function jde(e,t){if(t&&(ws(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bde(e)}function Bde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gW(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function lg(e){return lg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lg(e)}var Fde=function(e){Hde(r,e);var t=Lde(r);function r(n,o,i,a){return Mde(this,r),t.call(this,n,o,$a,i,a)}return xde(r,[{key:"createTable",value:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return Zy(Ide,i)}},{key:"shouldBeRendered",value:function(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}},{key:"resetFixedPosition",value:function(){var o=this.wot.wtTable;if(!this.needFullRender||!o.holder.parentNode)return!1;var i=this.domBindings.rootWindow,a=this.clone.wtTable.holder.parentNode,l=this.wtSettings.getSetting("preventOverflow"),s=0;this.trimmingContainer===i&&(!l||l!=="horizontal")?(s=this.getOverlayOffset()*(this.isRtl()?-1:1),Om(a,"".concat(s,"px"),"0px")):(s=this.getScrollPosition(),lv(a));var u=this.adjustHeaderBordersPosition(s);return this.adjustElementsSize(),u}},{key:"setScrollPosition",value:function(o){var i=this.domBindings.rootWindow,a=!1;return this.isRtl()&&(o=-o),this.mainTableScrollableElement===i&&i.scrollX!==o?(i.scrollTo(o,os(i)),a=!0):this.mainTableScrollableElement.scrollLeft!==o&&(this.mainTableScrollableElement.scrollLeft=o,a=!0),a}},{key:"onScroll",value:function(){this.wtSettings.getSetting("onScrollVertically")}},{key:"sumCellSizes",value:function(o,i){for(var a=this.wtSettings.getSetting("defaultColumnWidth"),l=o,s=0;l<i;)s+=this.wot.wtTable.getStretchedColumnWidth(l)||a,l+=1;return s}},{key:"adjustElementsSize",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.updateTrimmingContainer(),(this.needFullRender||o)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}},{key:"adjustRootElementSize",value:function(){var o=this.wot.wtTable,i=this.domBindings,a=i.rootDocument,l=i.rootWindow,s=Zt(a),u=this.clone.wtTable.holder.parentNode,f=u.style,c=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==l||c==="vertical"){var h=this.wot.wtViewport.getWorkspaceHeight();this.wot.wtOverlays.hasScrollbarBottom&&(h-=s),h=Math.min(h,o.wtRootElement.scrollHeight),f.height="".concat(h,"px")}else f.height="";this.clone.wtTable.holder.style.height=f.height;var d=vt(this.clone.wtTable.TABLE);f.width="".concat(d,"px")}},{key:"adjustRootChildrenSize",value:function(){var o,i=this.clone.wtTable.holder,a=this.wot.selections,l=this.facadeGetter(),s=Math.abs((o=a==null?void 0:a.getCell().getBorder(l).cornerCenterPointOffset)!==null&&o!==void 0?o:0);this.clone.wtTable.hider.style.height=this.hider.style.height,i.style.height=i.parentNode.style.height,i.style.width="".concat(parseInt(i.parentNode.style.width,10)+s,"px")}},{key:"applyToDOM",value:function(){var o=this.wtSettings.getSetting("totalColumns"),i=this.isRtl()?"right":"left";if(typeof this.wot.wtViewport.columnsRenderCalculator.startPosition=="number")this.spreader.style[i]="".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition,"px");else if(o===0)this.spreader.style[i]="0";else throw new Error("Incorrect value of the columnsRenderCalculator");this.isRtl()?this.spreader.style.left="":this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){typeof this.wot.wtViewport.rowsRenderCalculator.startPosition=="number"?this.clone.wtTable.spreader.style.top="".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition,"px"):this.clone.wtTable.spreader.style.top=""}},{key:"scrollTo",value:function(o,i){var a=this.getTableParentOffset(),l=this.wot.cloneSource?this.wot.cloneSource:this.wot,s=l.wtTable.holder,u=0;if(i){var f=this.wot.wtTable.getColumnWidth(o),c=this.wot.wtViewport.getViewportWidth();f>c&&(i=!1)}return i&&s.offsetWidth!==s.clientWidth&&(u=Zt(this.domBindings.rootDocument)),i?(a+=this.sumCellSizes(0,o+1),a-=this.wot.wtViewport.getViewportWidth()):a+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),o),a+=u,this.setScrollPosition(a)}},{key:"getTableParentOffset",value:function(){var o=this.wtSettings.getSetting("preventOverflow"),i=0;return!o&&this.trimmingContainer===this.domBindings.rootWindow&&(i=this.wot.wtTable.holderOffset.left),i}},{key:"getScrollPosition",value:function(){return Math.abs(Lp(this.mainTableScrollableElement,this.domBindings.rootWindow))}},{key:"getOverlayOffset",value:function(){var o=this.domBindings.rootWindow,i=this.wtSettings.getSetting("preventOverflow"),a=0;if(this.trimmingContainer===o&&(!i||i!=="horizontal")){this.isRtl()?a=Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):a=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0);var l=this.wot.wtTable.getTotalWidth(),s=this.clone.wtTable.getTotalWidth(),u=l-s;a>u&&(a=0)}return a}},{key:"adjustHeaderBordersPosition",value:function(o){var i=this.wot.wtTable.holder.parentNode,a=this.wtSettings.getSetting("rowHeaders"),l=this.wtSettings.getSetting("fixedColumnsStart"),s=this.wtSettings.getSetting("totalRows");s?Be(i,"emptyRows"):te(i,"emptyRows");var u=!1;if(l&&!a.length)te(i,"innerBorderLeft innerBorderInlineStart");else if(!l&&a.length){var f=Ne(i,"innerBorderInlineStart");o?(te(i,"innerBorderLeft innerBorderInlineStart"),u=!f):(Be(i,"innerBorderLeft innerBorderInlineStart"),u=f)}return u}}]),r}(vv),Vde="stickyRowsTop",mW={getFirstRenderedRow:function(){var t=this.wtSettings.getSetting("totalRows");return t===0?-1:0},getFirstVisibleRow:function(){return this.getFirstRenderedRow()},getLastRenderedRow:function(){return this.getRenderedRowsCount()-1},getLastVisibleRow:function(){return this.getLastRenderedRow()},getRenderedRowsCount:function(){var t=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsTop"),t)},getVisibleRowsCount:function(){return this.getRenderedRowsCount()}};jn(mW,"MIXIN_NAME",Vde,{writable:!1,enumerable:!1});const bW=mW;function Ss(e){return Ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ss(e)}function eI(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,Ude(n.key),n)}}function Wde(e,t,r){return t&&eI(e.prototype,t),r&&eI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ude(e){var t=zde(e,"string");return Ss(t)==="symbol"?t:String(t)}function zde(e,t){if(Ss(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ss(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gO(e,t)}function gO(e,t){return gO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},gO(e,t)}function Kde(e){var t=Zde();return function(){var n=sg(e),o;if(t){var i=sg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Xde(this,o)}}function Xde(e,t){if(t&&(Ss(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qde(e)}function qde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zde(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sg(e){return sg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},sg(e)}var BT=function(e){Gde(r,e);var t=Kde(r);function r(n,o,i,a){return Yde(this,r),t.call(this,n,o,i,a,Aa)}return Wde(r)}(mf);mt(BT,bW);mt(BT,xT);const Qde=BT;function Cs(e){return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cs(e)}function Qy(e,t,r){return wW()?Qy=Reflect.construct.bind():Qy=function(o,i,a){var l=[null];l.push.apply(l,i);var s=Function.bind.apply(o,l),u=new s;return a&&ug(u,a.prototype),u},Qy.apply(null,arguments)}function Jde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tI(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,SW(n.key),n)}}function eve(e,t,r){return t&&tI(e.prototype,t),r&&tI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tve(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ug(e,t)}function ug(e,t){return ug=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},ug(e,t)}function rve(e){var t=wW();return function(){var n=fg(e),o;if(t){var i=fg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return nve(this,o)}}function nve(e,t){if(t&&(Cs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mO(e)}function mO(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wW(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fg(e){return fg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fg(e)}function rI(e,t,r){return t=SW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SW(e){var t=ove(e,"string");return Cs(t)==="symbol"?t:String(t)}function ove(e,t){if(Cs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Cs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ive=function(e){tve(r,e);var t=rve(r);function r(n,o,i,a,l,s){var u;return Jde(this,r),u=t.call(this,n,o,Aa,i,a),rI(mO(u),"topOverlay",void 0),rI(mO(u),"inlineStartOverlay",void 0),u.topOverlay=l,u.inlineStartOverlay=s,u}return eve(r,[{key:"createTable",value:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return Qy(Qde,i)}},{key:"shouldBeRendered",value:function(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}},{key:"resetFixedPosition",value:function(){if(this.updateTrimmingContainer(),!this.wot.wtTable.holder.parentNode)return!1;var o=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.domBindings.rootWindow){var i=this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1),a=this.topOverlay.getOverlayOffset();Om(o,"".concat(i,"px"),"".concat(a,"px"))}else lv(o);var l=Tt(this.clone.wtTable.TABLE),s=vt(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(l=0),o.style.height="".concat(l,"px"),o.style.width="".concat(s,"px"),!1}}]),r}(vv);function _s(e){return _s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_s(e)}function nI(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,lve(n.key),n)}}function ave(e,t,r){return t&&nI(e.prototype,t),r&&nI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function lve(e){var t=sve(e,"string");return _s(t)==="symbol"?t:String(t)}function sve(e,t){if(_s(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_s(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fve(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bO(e,t)}function bO(e,t){return bO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},bO(e,t)}function cve(e){var t=vve();return function(){var n=cg(e),o;if(t){var i=cg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return hve(this,o)}}function hve(e,t){if(t&&(_s(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dve(e)}function dve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vve(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cg(e){return cg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},cg(e)}var FT=function(e){fve(r,e);var t=cve(r);function r(n,o,i,a){return uve(this,r),t.call(this,n,o,i,a,ka)}return ave(r)}(mf);mt(FT,bW);mt(FT,HT);const yve=FT;function Os(e){return Os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Os(e)}function Jy(e,t,r){return _W()?Jy=Reflect.construct.bind():Jy=function(o,i,a){var l=[null];l.push.apply(l,i);var s=Function.bind.apply(o,l),u=new s;return a&&hg(u,a.prototype),u},Jy.apply(null,arguments)}function pve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oI(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,OW(n.key),n)}}function gve(e,t,r){return t&&oI(e.prototype,t),r&&oI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function mve(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hg(e,t)}function hg(e,t){return hg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},hg(e,t)}function bve(e){var t=_W();return function(){var n=dg(e),o;if(t){var i=dg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return wve(this,o)}}function wve(e,t){if(t&&(Os(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CW(e)}function CW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _W(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dg(e){return dg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},dg(e)}function Sve(e,t,r){return t=OW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OW(e){var t=Cve(e,"string");return Os(t)==="symbol"?t:String(t)}function Cve(e,t){if(Os(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Os(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _ve=function(e){mve(r,e);var t=bve(r);function r(n,o,i,a){var l;return pve(this,r),l=t.call(this,n,o,ka,i,a),Sve(CW(l),"cachedFixedRowsTop",-1),l.cachedFixedRowsTop=l.wtSettings.getSetting("fixedRowsTop"),l}return gve(r,[{key:"createTable",value:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return Jy(yve,i)}},{key:"shouldBeRendered",value:function(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}},{key:"resetFixedPosition",value:function(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;var o=this.clone.wtTable.holder.parentNode,i=this.domBindings.rootWindow,a=this.wtSettings.getSetting("preventOverflow"),l=0,s=!1;if(this.trimmingContainer===i&&(!a||a!=="vertical")){var u=this.wot.wtTable,f=u.hider.getBoundingClientRect(),c=Math.ceil(f.bottom),h=o.offsetHeight;s=c===h,l=this.getOverlayOffset(),Om(o,"0px","".concat(l,"px"))}else l=this.getScrollPosition(),lv(o);var d=this.adjustHeaderBordersPosition(l,s);return this.adjustElementsSize(),d}},{key:"setScrollPosition",value:function(o){var i=this.domBindings.rootWindow,a=!1;return this.mainTableScrollableElement===i&&i.scrollY!==o?(i.scrollTo(Pa(i),o),a=!0):this.mainTableScrollableElement.scrollTop!==o&&(this.mainTableScrollableElement.scrollTop=o,a=!0),a}},{key:"onScroll",value:function(){this.wtSettings.getSetting("onScrollHorizontally")}},{key:"sumCellSizes",value:function(o,i){for(var a=this.wtSettings.getSetting("defaultRowHeight"),l=o,s=0;l<i;){var u=this.wot.wtTable.getRowHeight(l);s+=u===void 0?a:u,l+=1}return s}},{key:"adjustElementsSize",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.updateTrimmingContainer(),(this.needFullRender||o)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}},{key:"adjustRootElementSize",value:function(){var o=this.wot.wtTable,i=this.domBindings,a=i.rootDocument,l=i.rootWindow,s=Zt(a),u=this.clone.wtTable.holder.parentNode,f=u.style,c=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==l||c==="horizontal"){var h=this.wot.wtViewport.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(h-=s),h=Math.min(h,o.wtRootElement.scrollWidth),f.width="".concat(h,"px")}else f.width="";this.clone.wtTable.holder.style.width=f.width;var d=Tt(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(d=0),f.height="".concat(d,"px")}},{key:"adjustRootChildrenSize",value:function(){var o,i=this.clone.wtTable.holder,a=this.wot.selections,l=this.facadeGetter(),s=Math.abs((o=a==null?void 0:a.getCell().getBorder(l).cornerCenterPointOffset)!==null&&o!==void 0?o:0);this.clone.wtTable.hider.style.width=this.hider.style.width,i.style.width=i.parentNode.style.width,i.style.height="".concat(parseInt(i.parentNode.style.height,10)+s,"px")}},{key:"applyToDOM",value:function(){var o=this.wtSettings.getSetting("totalRows");if(typeof this.wot.wtViewport.rowsRenderCalculator.startPosition=="number")this.spreader.style.top="".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition,"px");else if(o===0)this.spreader.style.top="0";else throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){var o=this.isRtl()?"right":"left",i=this.clone.wtTable.spreader;typeof this.wot.wtViewport.columnsRenderCalculator.startPosition=="number"?i.style[o]="".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition,"px"):i.style[o]=""}},{key:"scrollTo",value:function(o,i){var a=this.wot,l=this.wtSettings,s=a.cloneSource?a.cloneSource:a,u=s.wtTable.holder,f=this.getTableParentOffset(),c=0;if(i){var h=this.wot.wtTable.getRowHeight(o),d=this.wot.wtViewport.getViewportHeight();h>d&&(i=!1)}if(i&&u.offsetHeight!==u.clientHeight&&(c=Zt(this.domBindings.rootDocument)),i){var v=l.getSetting("fixedRowsBottom"),p=l.getSetting("totalRows");f+=this.sumCellSizes(0,o+1),f-=a.wtViewport.getViewportHeight()-this.sumCellSizes(p-v,p),f+=1}else f+=this.sumCellSizes(l.getSetting("fixedRowsTop"),o);return f+=c,this.setScrollPosition(f)}},{key:"getTableParentOffset",value:function(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}},{key:"getScrollPosition",value:function(){return Dc(this.mainTableScrollableElement,this.domBindings.rootWindow)}},{key:"getOverlayOffset",value:function(){var o=this.domBindings.rootWindow,i=this.wtSettings.getSetting("preventOverflow"),a=0;if(this.trimmingContainer===o&&(!i||i!=="vertical")){var l=this.wot.wtTable.getTotalHeight(),s=this.clone.wtTable.getTotalHeight(),u=l-s;a=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),a>u&&(a=0)}return a}},{key:"adjustHeaderBordersPosition",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.wot.wtTable.holder.parentNode,l=this.wtSettings.getSetting("totalColumns");l?Be(a,"emptyColumns"):te(a,"emptyColumns");var s=!1;if(!i){var u=this.wtSettings.getSetting("fixedRowsTop"),f=this.cachedFixedRowsTop!==u,c=this.wtSettings.getSetting("columnHeaders");if((f||u===0)&&c.length>0){var h=Ne(a,"innerBorderTop");this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop"),o||this.wtSettings.getSetting("totalRows")===0?(te(a,"innerBorderTop"),s=!h):(Be(a,"innerBorderTop"),s=h)}}return s}}]),r}(vv);function lh(e){return lh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lh(e)}function Qo(e,t,r){return Ove()?Qo=Reflect.construct.bind():Qo=function(o,i,a){var l=[null];l.push.apply(l,i);var s=Function.bind.apply(o,l),u=new s;return a&&wO(u,a.prototype),u},Qo.apply(null,arguments)}function Ove(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wO(e,t){return wO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},wO(e,t)}function Rve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iI(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,RW(n.key),n)}}function Eve(e,t,r){return t&&iI(e.prototype,t),r&&iI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function zn(e,t,r){return t=RW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RW(e){var t=Tve(e,"string");return lh(t)==="symbol"?t:String(t)}function Tve(e,t){if(lh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(lh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pve=function(){function e(t,r,n,o,i,a){var l=this;Rve(this,e),zn(this,"wot",null),zn(this,"topOverlay",null),zn(this,"bottomOverlay",null),zn(this,"inlineStartOverlay",null),zn(this,"topInlineStartCornerOverlay",null),zn(this,"bottomInlineStartCornerOverlay",null),zn(this,"browserLineHeight",void 0),zn(this,"wtSettings",null),zn(this,"resizeObserver",new ResizeObserver(function(h){um(function(){!Array.isArray(h)||!h.length||l.wtSettings.getSetting("onContainerElementResize")})})),this.wot=t,this.wtSettings=o,this.domBindings=n,this.facadeGetter=r,this.wtTable=a;var s=this.domBindings,u=s.rootDocument,f=s.rootWindow;this.instance=this.wot,this.eventManager=i,this.scrollbarSize=Zt(u);var c=f.getComputedStyle(a.wtRootElement.parentNode).getPropertyValue("overflow")==="hidden";this.scrollableElement=c?a.holder:Nc(a.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=f.scrollX,this.lastScrollY=f.scrollY}return Eve(e,[{key:"getOverlays",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=[this.topOverlay,this.topInlineStartCornerOverlay,this.inlineStartOverlay,this.bottomOverlay,this.bottomInlineStartCornerOverlay];return r&&n.push(this.wtTable),n}},{key:"initBrowserLineHeight",value:function(){var r=this.domBindings,n=r.rootWindow,o=r.rootDocument,i=n.getComputedStyle(o.body),a=parseInt(i.lineHeight,10),l=parseInt(i.fontSize,10)*1.2;this.browserLineHeight=a||l}},{key:"initOverlays",value:function(){var r=[this.wot,this.facadeGetter,this.wtSettings,this.domBindings];this.topOverlay=Qo(_ve,r),this.bottomOverlay=Qo(Sde,r),this.inlineStartOverlay=Qo(Fde,r),this.topInlineStartCornerOverlay=Qo(ive,r.concat([this.topOverlay,this.inlineStartOverlay])),this.bottomInlineStartCornerOverlay=Qo(rde,r.concat([this.bottomOverlay,this.inlineStartOverlay]))}},{key:"updateStateOfRendering",value:function(){var r=this.topOverlay.updateStateOfRendering();return r=this.bottomOverlay.updateStateOfRendering()||r,r=this.inlineStartOverlay.updateStateOfRendering()||r,this.inlineStartOverlay.needFullRender&&(this.topOverlay.needFullRender&&(r=this.topInlineStartCornerOverlay.updateStateOfRendering()||r),this.bottomOverlay.needFullRender&&(r=this.bottomInlineStartCornerOverlay.updateStateOfRendering()||r)),r}},{key:"refreshAll",value:function(){if(this.wot.drawn){if(!this.wtTable.holder.parentNode){this.destroy();return}this.wot.draw(!0),this.verticalScrolling&&this.inlineStartOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1}}},{key:"registerListeners",value:function(){var r=this,n=this.domBindings,o=n.rootDocument,i=n.rootWindow,a=this.topOverlay.mainTableScrollableElement,l=this.inlineStartOverlay.mainTableScrollableElement;this.eventManager.addEventListener(o.documentElement,"keydown",function(v){return r.onKeyDown(v)}),this.eventManager.addEventListener(o.documentElement,"keyup",function(){return r.onKeyUp()}),this.eventManager.addEventListener(o,"visibilitychange",function(){return r.onKeyUp()}),this.eventManager.addEventListener(a,"scroll",function(v){return r.onTableScroll(v)},{passive:!0}),a!==l&&this.eventManager.addEventListener(l,"scroll",function(v){return r.onTableScroll(v)},{passive:!0});var s=i.devicePixelRatio&&i.devicePixelRatio>1,u=this.scrollableElement===i,f=this.wtSettings.getSetting("preventWheel"),c={passive:u};(f||s||!KE())&&this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",function(v){return r.onCloneWheel(v,f)},c);var h=[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];h.forEach(function(v){if(v&&v.needFullRender){var p=v.clone.wtTable.holder;r.eventManager.addEventListener(p,"wheel",function(m){return r.onCloneWheel(m,f)},c)}});var d;this.eventManager.addEventListener(i,"resize",function(){clearTimeout(d),d=setTimeout(function(){r.wtSettings.getSetting("onWindowResize")},200)}),u||this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement)}},{key:"deregisterListeners",value:function(){this.eventManager.clearEvents(!0)}},{key:"onTableScroll",value:function(r){var n=this.domBindings.rootWindow,o=this.inlineStartOverlay.mainTableScrollableElement,i=this.topOverlay.mainTableScrollableElement,a=r.target;this.keyPressed&&(i!==n&&a!==n&&!r.target.contains(i)||o!==n&&a!==n&&!r.target.contains(o))||this.syncScrollPositions(r)}},{key:"onCloneWheel",value:function(r,n){var o=this.domBindings.rootWindow,i=this.inlineStartOverlay.mainTableScrollableElement,a=this.topOverlay.mainTableScrollableElement,l=r.target,s=a!==o&&l!==o&&!l.contains(a),u=i!==o&&l!==o&&!l.contains(i);if(!(this.keyPressed&&(s||u))){var f=this.translateMouseWheelToScroll(r);(n||this.scrollableElement!==o&&f)&&r.preventDefault()}}},{key:"onKeyDown",value:function(r){this.keyPressed=ls(r.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}},{key:"onKeyUp",value:function(){this.keyPressed=!1}},{key:"translateMouseWheelToScroll",value:function(r){var n=isNaN(r.deltaY)?-1*r.wheelDeltaY:r.deltaY,o=isNaN(r.deltaX)?-1*r.wheelDeltaX:r.deltaX;r.deltaMode===1&&(o+=o*this.browserLineHeight,n+=n*this.browserLineHeight);var i=this.scrollVertically(n),a=this.scrollHorizontally(o);return i||a}},{key:"scrollVertically",value:function(r){var n=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=r,n!==this.scrollableElement.scrollTop}},{key:"scrollHorizontally",value:function(r){var n=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=r,n!==this.scrollableElement.scrollLeft}},{key:"syncScrollPositions",value:function(){if(!this.destroyed){var r=this.domBindings.rootWindow,n=this.topOverlay.clone.wtTable.holder,o=this.inlineStartOverlay.clone.wtTable.holder,i=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop],a=i[0],l=i[1];if(this.horizontalScrolling=n.scrollLeft!==a||this.lastScrollX!==r.scrollX,this.verticalScrolling=o.scrollTop!==l||this.lastScrollY!==r.scrollY,this.lastScrollX=r.scrollX,this.lastScrollY=r.scrollY,this.horizontalScrolling){n.scrollLeft=a;var s=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;s&&(s.scrollLeft=a)}this.verticalScrolling&&(o.scrollTop=l),this.refreshAll()}}},{key:"syncScrollWithMaster",value:function(){var r=this.topOverlay.mainTableScrollableElement,n=r.scrollLeft,o=r.scrollTop;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=n),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=n),this.inlineStartOverlay.needFullRender&&(this.inlineStartOverlay.clone.wtTable.holder.scrollTop=o)}},{key:"updateMainScrollableElements",value:function(){this.deregisterListeners(),this.inlineStartOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();var r=this.wtTable,n=this.domBindings.rootWindow;n.getComputedStyle(r.wtRootElement.parentNode).getPropertyValue("overflow")==="hidden"?this.scrollableElement=r.holder:this.scrollableElement=Nc(r.TABLE),this.registerListeners()}},{key:"destroy",value:function(){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}},{key:"refresh",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.updateLastSpreaderSize();n&&this.adjustElementsSize(),this.bottomOverlay.clone&&this.bottomOverlay.refresh(r),this.inlineStartOverlay.refresh(r),this.topOverlay.refresh(r),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.refresh(r),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.refresh(r)}},{key:"updateLastSpreaderSize",value:function(){var r=this.wtTable.spreader,n=r.clientWidth,o=r.clientHeight,i=n!==this.spreaderLastSize.width||o!==this.spreaderLastSize.height;return i&&(this.spreaderLastSize.width=n,this.spreaderLastSize.height=o),i}},{key:"adjustElementsSize",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.wot.wtViewport,o=this.wtTable,i=this.wtSettings.getSetting("totalColumns"),a=this.wtSettings.getSetting("totalRows"),l=n.getRowHeaderWidth(),s=n.getColumnHeaderHeight(),u=o.hider.style;if(u.width="".concat(l+this.inlineStartOverlay.sumCellSizes(0,i),"px"),u.height="".concat(s+this.topOverlay.sumCellSizes(0,a)+1,"px"),this.scrollbarSize>0){var f=o.wtRootElement,c=f.scrollHeight,h=f.scrollWidth,d=o.holder,v=d.scrollHeight,p=d.scrollWidth;this.hasScrollbarRight=c<v,this.hasScrollbarBottom=h<p,this.hasScrollbarRight&&o.hider.scrollWidth+this.scrollbarSize>h?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&o.hider.scrollHeight+this.scrollbarSize>c&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(r),this.inlineStartOverlay.adjustElementsSize(r),this.bottomOverlay.adjustElementsSize(r)}},{key:"applyToDOM",value:function(){this.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.inlineStartOverlay.applyToDOM())}},{key:"getParentOverlay",value:function(r){if(!r)return null;var n=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay],o=null;return $(n,function(i){i&&i.clone&&i.clone.wtTable.TABLE.contains(r)&&(o=i.clone)}),o}},{key:"syncOverlayTableClassNames",value:function(){var r=this.wtTable.TABLE,n=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];$(n,function(o){o&&(o.clone.wtTable.TABLE.className=r.className)})}}]),e}();const kve=Pve;function sh(e){return sh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sh(e)}function $ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aI(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,EW(n.key),n)}}function Ave(e,t,r){return t&&aI(e.prototype,t),r&&aI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function lI(e,t,r){return t=EW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EW(e){var t=Ive(e,"string");return sh(t)==="symbol"?t:String(t)}function Ive(e,t){if(sh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(sh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mve=function(){function e(t){var r=this;$ve(this,e),lI(this,"settings",{}),lI(this,"defaults",Object.freeze(this.getDefaults())),ze(this.defaults,function(n,o){if(t[o]!==void 0)r.settings[o]=t[o];else{if(n===void 0)throw new Error('A required setting "'.concat(o,'" was not provided'));r.settings[o]=n}})}return Ave(e,[{key:"getDefaults",value:function(){var r=this;return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:function(){return!1},preventWheel:!1,data:void 0,freezeOverlays:!1,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:function(){return r.getSetting("fixedColumnsStart")>0||r.getSetting("rowHeaders").length>0},shouldRenderTopOverlay:function(){return r.getSetting("fixedRowsTop")>0||r.getSetting("columnHeaders").length>0},shouldRenderBottomOverlay:function(){return r.getSetting("fixedRowsBottom")>0},minSpareRows:0,rowHeaders:function(){return[]},columnHeaders:function(){return[]},totalRows:void 0,totalColumns:void 0,cellRenderer:function(o,i,a){var l=r.getSetting("data",o,i);bi(a,l??"")},columnWidth:function(){},rowHeight:function(){},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,onScrollVertically:null,onScrollHorizontally:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:function(o){return o},onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:function(o){return o},onBeforeHighlightingColumnHeader:function(o){return o},onWindowResize:null,onContainerElementResize:null,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1}}},{key:"update",value:function(r,n){var o=this;return n===void 0?ze(r,function(i,a){o.settings[a]=i}):this.settings[r]=n,this}},{key:"getSetting",value:function(r,n,o,i,a){return typeof this.settings[r]=="function"?this.settings[r](n,o,i,a):n!==void 0&&Array.isArray(this.settings[r])?this.settings[r][n]:this.settings[r]}},{key:"getSettingPure",value:function(r){return this.settings[r]}},{key:"has",value:function(r){return!!this.settings[r]}}]),e}();function Rs(e){return Rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rs(e)}function xve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sI(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,Nve(n.key),n)}}function Dve(e,t,r){return t&&sI(e.prototype,t),r&&sI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nve(e){var t=Hve(e,"string");return Rs(t)==="symbol"?t:String(t)}function Hve(e,t){if(Rs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Rs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lve(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&SO(e,t)}function SO(e,t){return SO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},SO(e,t)}function jve(e){var t=Vve();return function(){var n=vg(e),o;if(t){var i=vg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Bve(this,o)}}function Bve(e,t){if(t&&(Rs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fve(e)}function Fve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vve(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vg(e){return vg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vg(e)}var VT=function(e){Lve(r,e);var t=jve(r);function r(n,o,i,a){return xve(this,r),t.call(this,n,o,i,a,"master")}return Dve(r,[{key:"alignOverlaysWithTrimmingContainer",value:function(){var o=is(this.wtRootElement),i=this.domBindings.rootWindow;if(o===i){var a=this.wtSettings.getSetting("preventOverflow");a||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{var l=o.parentElement,s=as(o,"height",i),u=as(o,"overflow",i),f=this.holder.style,c=o.scrollWidth,h=o.scrollHeight,d=o.getBoundingClientRect(),v=d.width,p=d.height,m=["auto","hidden","scroll"];if(l&&m.includes(u)){var w=o.cloneNode(!1);w.style.overflow="auto",w.style.position="absolute",o.nextElementSibling?l.insertBefore(w,o.nextElementSibling):l.appendChild(w);var S=parseInt(wi(w,i).height,10);l.removeChild(w),S===0&&(p=0)}p=Math.min(p,h),f.height=s==="auto"?"auto":"".concat(p,"px"),v=Math.min(v,c),f.width="".concat(v,"px"),f.overflow="",this.hasTableHeight=f.height==="auto"?!0:p>0,this.hasTableWidth=v>0}this.isTableVisible=ns(this.TABLE)}},{key:"markOversizedColumnHeaders",value:function(){var o=this.wtSettings,i=this.dataAccessObject.wtViewport,a="master",l=o.getSetting("columnHeaders"),s=l.length;if(s&&!i.hasOversizedColumnHeadersMarked[a]){for(var u=o.getSetting("rowHeaders"),f=u.length,c=this.getRenderedColumnsCount(),h=0;h<s;h++)for(var d=-1*f;d<c;d++)this.markIfOversizedColumnHeader(d);i.hasOversizedColumnHeadersMarked[a]=!0}}}]),r}(mf);mt(VT,pW);mt(VT,HT);const Wve=VT;function uh(e){return uh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uh(e)}function Uve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uI(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,Yve(n.key),n)}}function zve(e,t,r){return t&&uI(e.prototype,t),r&&uI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yve(e){var t=Gve(e,"string");return uh(t)==="symbol"?t:String(t)}function Gve(e,t){if(uh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(uh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kve=function(){function e(t,r,n,o,i){var a=this;Uve(this,e),this.dataAccessObject=t,this.wot=t.wot,this.instance=this.wot,this.domBindings=r,this.wtSettings=n,this.wtTable=i,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=o,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",function(){a.clientHeight=a.getWorkspaceHeight()})}return zve(e,[{key:"getWorkspaceHeight",value:function(){var r=this.domBindings.rootDocument,n=this.dataAccessObject.topOverlayTrimmingContainer,o=0;if(n===this.domBindings.rootWindow)o=r.documentElement.clientHeight;else{var i=Tt(n);o=i>0&&n.clientHeight>0?n.clientHeight:1/0}return o}},{key:"getWorkspaceWidth",value:function(){var r=this.wtSettings,n=this.domBindings,o=n.rootDocument,i=n.rootWindow,a=this.dataAccessObject.inlineStartOverlayTrimmingContainer,l=o.documentElement.offsetWidth,s=r.getSetting("totalColumns"),u=r.getSetting("preventOverflow"),f=r.getSetting("rtlMode"),c=this.wtTable.TABLE.getBoundingClientRect(),h=f?c.right-l:c.left,d=l-h,v,p;if(u)return vt(this.wtTable.wtRootElement);if(r.getSetting("freezeOverlays")?v=Math.min(d,l):v=Math.min(this.getContainerFillWidth(),d,l),a===i&&s>0&&this.sumColumnWidths(0,s-1)>v)return o.documentElement.clientWidth;if(a!==i&&(p=as(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",i),p==="scroll"||p==="hidden"||p==="auto"))return Math.max(v,a.clientWidth);var m=r.getSetting("stretchH");return m==="none"||!m?Math.max(v,vt(this.wtTable.TABLE)):v}},{key:"hasVerticalScroll",value:function(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}},{key:"hasHorizontalScroll",value:function(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}},{key:"sumColumnWidths",value:function(r,n){for(var o=0,i=r;i<n;)o+=this.wtTable.getColumnWidth(i),i+=1;return o}},{key:"getContainerFillWidth",value:function(){if(this.containerWidth)return this.containerWidth;var r=this.wtTable.holder,n=this.domBindings.rootDocument.createElement("div");n.style.width="100%",n.style.height="1px",r.appendChild(n);var o=n.offsetWidth;return this.containerWidth=o,r.removeChild(n),o}},{key:"getWorkspaceOffset",value:function(){return Vt(this.wtTable.TABLE)}},{key:"getColumnHeaderHeight",value:function(){var r=this.wtSettings.getSetting("columnHeaders");return r.length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=Tt(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}},{key:"getViewportHeight",value:function(){var r=this.getWorkspaceHeight();if(r===1/0)return r;var n=this.getColumnHeaderHeight();return n>0&&(r-=n),r}},{key:"getRowHeaderWidth",value:function(){var r=this.wtSettings.getSetting("rowHeaderWidth"),n=this.wtSettings.getSetting("rowHeaders");if(r){this.rowHeaderWidth=0;for(var o=0,i=n.length;o<i;o++)this.rowHeaderWidth+=r[o]||r}if(isNaN(this.rowHeaderWidth))if(n.length){var a=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(var l=0,s=n.length;l<s;l++)a?(this.rowHeaderWidth+=vt(a),a=a.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}},{key:"getViewportWidth",value:function(){var r=this.getWorkspaceWidth();if(r===1/0)return r;var n=this.getRowHeaderWidth();return n>0?r-n:r}},{key:"createRowsCalculator",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ki,n=this.wtSettings,o=this.wtTable,i,a,l;this.rowHeaderWidth=NaN,n.getSetting("renderAllRows")&&r===Ki?i=1/0:i=this.getViewportHeight();var s=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset,u=n.getSetting("fixedRowsTop"),f=n.getSetting("fixedRowsBottom"),c=n.getSetting("totalRows");return u&&s>=0&&(l=this.dataAccessObject.topOverlay.sumCellSizes(0,u),s+=l,i-=l),f&&this.dataAccessObject.bottomOverlay.clone&&(l=this.dataAccessObject.bottomOverlay.sumCellSizes(c-f,c),i-=l),o.holder.clientHeight===o.holder.offsetHeight?a=0:a=Zt(this.domBindings.rootDocument),new VV({viewportSize:i,scrollOffset:s,totalItems:n.getSetting("totalRows"),itemSizeFn:function(d){return o.getRowHeight(d)},overrideFn:n.getSettingPure("viewportRowCalculatorOverride"),calculationType:r,scrollbarHeight:a})}},{key:"createColumnsCalculator",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ki,n=this.wtSettings,o=this.wtTable,i=this.getViewportWidth(),a=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;var l=n.getSetting("fixedColumnsStart");if(l&&a>=0){var s=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,l);a+=s,i-=s}return o.holder.clientWidth!==o.holder.offsetWidth&&(i-=Zt(this.domBindings.rootDocument)),new AT({viewportSize:i,scrollOffset:a,totalItems:n.getSetting("totalColumns"),itemSizeFn:function(f){return o.getColumnWidth(f)},overrideFn:n.getSettingPure("viewportColumnCalculatorOverride"),calculationType:r,stretchMode:n.getSetting("stretchH"),stretchingItemWidthFn:function(f,c){return n.getSetting("onBeforeStretchingColumnWidth",f,c)},inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}},{key:"createRenderCalculators",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=r;if(n){var o=this.createRowsCalculator(or),i=this.createColumnsCalculator(or);this.areAllProposedVisibleRowsAlreadyRendered(o)&&this.areAllProposedVisibleColumnsAlreadyRendered(i)||(n=!1)}return n||(this.rowsRenderCalculator=this.createRowsCalculator(Ki),this.columnsRenderCalculator=this.createColumnsCalculator(Ki)),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,n}},{key:"createVisibleCalculators",value:function(){this.rowsVisibleCalculator=this.createRowsCalculator(or),this.columnsVisibleCalculator=this.createColumnsCalculator(or)}},{key:"areAllProposedVisibleRowsAlreadyRendered",value:function(r){if(!this.rowsVisibleCalculator)return!1;var n=r.startRow,o=r.endRow,i=r.isVisibleInTrimmingContainer;if(n===null&&o===null)return!i;var a=this.rowsRenderCalculator,l=a.startRow,s=a.endRow;return n<l||n===l&&n>0?!1:!(o>s||o===s&&o<this.wtSettings.getSetting("totalRows")-1)}},{key:"areAllProposedVisibleColumnsAlreadyRendered",value:function(r){if(!this.columnsVisibleCalculator)return!1;var n=r.startColumn,o=r.endColumn,i=r.isVisibleInTrimmingContainer;if(n===null&&o===null)return!i;var a=this.columnsRenderCalculator,l=a.startColumn,s=a.endColumn;return n<l||n===l&&n>0?!1:!(o>s||o===s&&o<this.wtSettings.getSetting("totalColumns")-1)}},{key:"resetHasOversizedColumnHeadersMarked",value:function(){ze(this.hasOversizedColumnHeadersMarked,function(r,n,o){o[n]=void 0})}}]),e}();const Xve=Kve;function Es(e){return Es=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Es(e)}function qve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fI(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,Qve(n.key),n)}}function Zve(e,t,r){return t&&fI(e.prototype,t),r&&fI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qve(e){var t=Jve(e,"string");return Es(t)==="symbol"?t:String(t)}function Jve(e,t){if(Es(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Es(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&CO(e,t)}function CO(e,t){return CO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},CO(e,t)}function tye(e){var t=nye();return function(){var n=yg(e),o;if(t){var i=yg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return rye(this,o)}}function rye(e,t){if(t&&(Es(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _O(e)}function _O(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nye(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yg(e){return yg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yg(e)}var oye=function(e){eye(r,e);var t=tye(r);function r(n,o){var i;qve(this,r),i=t.call(this,n,new Mve(o));var a=i.wtSettings.getSetting("facade",_O(i));return i.wtTable=new Wve(i.getTableDao(),a,i.domBindings,i.wtSettings),i.wtViewport=new Xve(i.getViewportDao(),i.domBindings,i.wtSettings,i.eventManager,i.wtTable),i.selections=i.wtSettings.getSetting("selections"),i.wtEvent=new QV(a,i.domBindings,i.wtSettings,i.eventManager,i.wtTable,i.selections),i.wtOverlays=new kve(_O(i),a,i.domBindings,i.wtSettings,i.eventManager,i.wtTable),i.exportSettingsAsClassNames(),i.findOriginalHeaders(),i}return Zve(r,[{key:"exportSettingsAsClassNames",value:function(){var o=this,i={rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},a=[],l=[];ze(i,function(s,u){o.wtSettings.getSetting(u).length&&l.push(s),a.push(s)}),Be(this.wtTable.wtRootElement.parentNode,a),te(this.wtTable.wtRootElement.parentNode,l)}},{key:"getViewportDao",value:function(){var o=this;return{get wot(){return o},get topOverlayTrimmingContainer(){return o.wtOverlays.topOverlay.trimmingContainer},get inlineStartOverlayTrimmingContainer(){return o.wtOverlays.inlineStartOverlay.trimmingContainer},get topScrollPosition(){return o.wtOverlays.topOverlay.getScrollPosition()},get topParentOffset(){return o.wtOverlays.topOverlay.getTableParentOffset()},get inlineStartScrollPosition(){return o.wtOverlays.inlineStartOverlay.getScrollPosition()},get inlineStartParentOffset(){return o.wtOverlays.inlineStartOverlay.getTableParentOffset()},get topOverlay(){return o.wtOverlays.topOverlay},get inlineStartOverlay(){return o.wtOverlays.inlineStartOverlay},get bottomOverlay(){return o.wtOverlays.bottomOverlay}}}}]),r}(NT);function fh(e){return fh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fh(e)}function iye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cI(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,lye(n.key),n)}}function aye(e,t,r){return t&&cI(e.prototype,t),r&&cI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function lye(e){var t=sye(e,"string");return fh(t)==="symbol"?t:String(t)}function sye(e,t){if(fh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(fh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uye=function(){function e(t){iye(this,e),t instanceof NT?this._wot=t:this._initFromSettings(t)}return aye(e,[{key:"_initFromSettings",value:function(r){r.facade=function(n){var o=new e(n);return function(){return o}},this._wot=new oye(r.table,r)}},{key:"guid",get:function(){return this._wot.guid}},{key:"rootDocument",get:function(){return this._wot.domBindings.rootDocument}},{key:"rootWindow",get:function(){return this._wot.domBindings.rootWindow}},{key:"wtSettings",get:function(){return this._wot.wtSettings}},{key:"cloneSource",get:function(){return this._wot.cloneSource}},{key:"cloneOverlay",get:function(){return this._wot.cloneOverlay}},{key:"selections",get:function(){return this._wot.selections}},{key:"wtViewport",get:function(){return this._wot.wtViewport}},{key:"wtOverlays",get:function(){return this._wot.wtOverlays}},{key:"wtTable",get:function(){return this._wot.wtTable}},{key:"wtEvent",get:function(){return this._wot.wtEvent}},{key:"wtScroll",get:function(){return this._wot.wtScroll}},{key:"drawn",get:function(){return this._wot.drawn},set:function(r){this._wot.drawn=r}},{key:"drawInterrupted",get:function(){return this._wot.drawInterrupted},set:function(r){this._wot.drawInterrupted=r}},{key:"lastMouseOver",get:function(){return this._wot.lastMouseOver},set:function(r){this._wot.lastMouseOver=r}},{key:"momentumScrolling",get:function(){return this._wot.momentumScrolling},set:function(r){this._wot.momentumScrolling=r}},{key:"touchApplied",get:function(){return this._wot.touchApplied},set:function(r){this._wot.touchApplied=r}},{key:"domBindings",get:function(){return this._wot.domBindings}},{key:"eventListeners",get:function(){return this._wot.eventListeners},set:function(r){this._wot.eventListeners=r}},{key:"eventManager",get:function(){return this._wot.eventManager}},{key:"createCellCoords",value:function(r,n){return this._wot.createCellCoords(r,n)}},{key:"createCellRange",value:function(r,n,o){return this._wot.createCellRange(r,n,o)}},{key:"draw",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this._wot.draw(r),this}},{key:"getCell",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this._wot.getCell(r,n)}},{key:"scrollViewport",value:function(r,n,o,i,a){return this._wot.scrollViewport(r,n,o,i,a)}},{key:"scrollViewportHorizontally",value:function(r,n,o){return this._wot.scrollViewportHorizontally(r,n,o)}},{key:"scrollViewportVertically",value:function(r,n,o){return this._wot.scrollViewportVertically(r,n,o)}},{key:"getViewport",value:function(){return this._wot.getViewport()}},{key:"getOverlayName",value:function(){return this._wot.cloneOverlay?this._wot.cloneOverlay.type:"master"}},{key:"exportSettingsAsClassNames",value:function(){return this._wot.exportSettingsAsClassNames()}},{key:"update",value:function(r,n){return this._wot.wtSettings.update(r,n),this}},{key:"getSetting",value:function(r,n,o,i,a){return this._wot.wtSettings.getSetting(r,n,o,i,a)}},{key:"hasSetting",value:function(r){return this._wot.wtSettings.hasSetting(r)}},{key:"destroy",value:function(){this._wot.destroy()}}]),e}(),fye=Ut,TW=Ye,cye=Ud,hye=Fr,dye=xd.f,vye=TW(dye),yye=TW([].push),hI=function(e){return function(t){for(var r=hye(t),n=cye(r),o=n.length,i=0,a=[],l;o>i;)l=n[i++],(!fye||vye(r,l))&&yye(a,e?[l,r[l]]:r[l]);return a}},pye={entries:hI(!0),values:hI(!1)},gye=xe,mye=pye.values;gye({target:"Object",stat:!0},{values:function(t){return mye(t)}});function ch(e){return ch=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ch(e)}function MS(e,t){return Cye(e)||Sye(e,t)||wye(e,t)||bye()}function bye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wye(e,t){if(e){if(typeof e=="string")return dI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dI(e,t)}}function dI(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Sye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function Cye(e){if(Array.isArray(e))return e}function _ye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vI(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,Rye(n.key),n)}}function Oye(e,t,r){return t&&vI(e.prototype,t),r&&vI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rye(e){var t=Eye(e,"string");return ch(t)==="symbol"?t:String(t)}function Eye(e,t){if(ch(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ch(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tye=function(){function e(t,r){_ye(this,e),r&&(this.eventManager=t.eventManager,this.instance=t,this.wot=t,this.settings=r,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={width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"},this.cornerCenterPointOffset=-(parseInt(this.cornerDefaultStyle.width,10)/2),this.corner=null,this.cornerStyle=null,this.createBorders(r),this.registerListeners())}return Oye(e,[{key:"registerListeners",value:function(){var r=this,n=this.wot.rootDocument.body;this.eventManager.addEventListener(n,"mousedown",function(){return r.onMouseDown()}),this.eventManager.addEventListener(n,"mouseup",function(){return r.onMouseUp()});for(var o=function(s){var u=r.main.childNodes[s];r.eventManager.addEventListener(u,"mouseenter",function(f){return r.onMouseEnter(f,r.main.childNodes[s])})},i=0,a=this.main.childNodes.length;i<a;i++)o(i)}},{key:"onMouseDown",value:function(){this.mouseDown=!0}},{key:"onMouseUp",value:function(){this.mouseDown=!1}},{key:"onMouseEnter",value:function(r,n){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;r.preventDefault(),gn(r);var o=this,i=this.wot.rootDocument.body,a=n.getBoundingClientRect();n.style.display="none";function l(u){if(u.clientY<Math.floor(a.top)||u.clientY>Math.ceil(a.top+a.height)||u.clientX<Math.floor(a.left)||u.clientX>Math.ceil(a.left+a.width))return!0}function s(u){l(u)&&(o.eventManager.removeEventListener(i,"mousemove",s),n.style.display="block")}this.eventManager.addEventListener(i,"mousemove",s)}},{key:"createBorders",value:function(r){var n=this.wot.rootDocument;this.main=n.createElement("div");var o=["top","start","bottom","end","corner"],i=this.main.style;i.position="absolute",i.top=0,i.left=0;for(var a=0;a<5;a++){var l=o[a],s=n.createElement("div");s.className="wtBorder ".concat(this.settings.className||""),this.settings[l]&&this.settings[l].hide&&(s.className+=" hidden"),i=s.style,i.backgroundColor=this.settings[l]&&this.settings[l].color?this.settings[l].color:r.border.color,i.height=this.settings[l]&&this.settings[l].width?"".concat(this.settings[l].width,"px"):"".concat(r.border.width,"px"),i.width=this.settings[l]&&this.settings[l].width?"".concat(this.settings[l].width,"px"):"".concat(r.border.width,"px"),this.main.appendChild(s)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),cn()&&this.createMultipleSelectorHandles(),this.disappear();var u=this.wot.wtTable,f=u.bordersHolder;f||(f=n.createElement("div"),f.className="htBorders",u.bordersHolder=f,u.spreader.appendChild(f)),f.appendChild(this.main)}},{key:"createMultipleSelectorHandles",value:function(){var r=this,n=this.wot.rootDocument;this.selectionHandles={top:n.createElement("DIV"),topHitArea:n.createElement("DIV"),bottom:n.createElement("DIV"),bottomHitArea:n.createElement("DIV")};var o=10,i=40;this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};var a={position:"absolute",height:"".concat(i,"px"),width:"".concat(i,"px"),"border-radius":"".concat(parseInt(i/1.5,10),"px")};ze(a,function(s,u){r.selectionHandles.styles.bottomHitArea[u]=s,r.selectionHandles.styles.topHitArea[u]=s});var l={position:"absolute",height:"".concat(o,"px"),width:"".concat(o,"px"),"border-radius":"".concat(parseInt(o/1.5,10),"px"),background:"#F5F5FF",border:"1px solid #4285c8"};ze(l,function(s,u){r.selectionHandles.styles.bottom[u]=s,r.selectionHandles.styles.top[u]=s}),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}},{key:"isPartRange",value:function(r,n){var o=this.wot.selections.createOrGetArea();return!!(o.cellRange&&(r!==o.cellRange.to.row||n!==o.cellRange.to.col))}},{key:"updateMultipleSelectionHandlesPosition",value:function(r,n,o,i,a,l){var s=this.wot.wtSettings.getSetting("rtlMode"),u=s?"right":"left",f=this.selectionHandles.styles,c=f.top,h=f.topHitArea,d=f.bottom,v=f.bottomHitArea,p=parseInt(c.borderWidth,10),m=parseInt(c.width,10),w=parseInt(h.width,10),S=this.wot.wtTable.getWidth(),C=this.wot.wtTable.getHeight();c.top="".concat(parseInt(o-m-1,10),"px"),c[u]="".concat(parseInt(i-m-1,10),"px"),h.top="".concat(parseInt(o-w/4*3,10),"px"),h[u]="".concat(parseInt(i-w/4*3,10),"px");var P=Math.min(parseInt(i+a,10),S-m-p*2),R=Math.min(parseInt(i+a-w/4,10),S-w-p*2);d[u]="".concat(P,"px"),v[u]="".concat(R,"px");var W=Math.min(parseInt(o+l,10),C-m-p*2),z=Math.min(parseInt(o+l-w/4,10),C-w-p*2);d.top="".concat(W,"px"),v.top="".concat(z,"px"),this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(c.display="block",h.display="block",this.isPartRange(r,n)?(d.display="none",v.display="none"):(d.display="block",v.display="block")):(c.display="none",d.display="none",h.display="none",v.display="none"),r===this.wot.wtSettings.getSetting("fixedRowsTop")||n===this.wot.wtSettings.getSetting("fixedColumnsStart")?(c.zIndex="9999",h.zIndex="9999"):(c.zIndex="",h.zIndex="")}},{key:"appear",value:function(r){if(!this.disabled){for(var n=this.wot,o=n.wtTable,i=n.rootDocument,a=n.rootWindow,l,s,u,f,c,h,d=o.getRenderedRowsCount(),v=0;v<d;v+=1){var p=o.rowFilter.renderedToSource(v);if(p>=r[0]&&p<=r[2]){l=p,c=r[0];break}}for(var m=d-1;m>=0;m-=1){var w=o.rowFilter.renderedToSource(m);if(w>=r[0]&&w<=r[2]){s=w;break}}for(var S=o.getRenderedColumnsCount(),C=0;C<S;C+=1){var P=o.columnFilter.renderedToSource(C);if(P>=r[1]&&P<=r[3]){u=P,h=r[1];break}}for(var R=S-1;R>=0;R-=1){var W=o.columnFilter.renderedToSource(R);if(W>=r[1]&&W<=r[3]){f=W;break}}if(l===void 0||u===void 0){this.disappear();return}var z=o.getCell(this.wot.createCellCoords(l,u)),q=l!==s||u!==f,K=q?o.getCell(this.wot.createCellCoords(s,f)):z,X=Vt(z),Q=q?Vt(K):X,ae=Vt(o.TABLE),Z=vt(o.TABLE),he=X.top,Ee=X.left,_e=this.wot.wtSettings.getSetting("rtlMode"),Oe=0,k=0;if(_e){var y=vt(z),g=a.innerWidth-ae.left-Z;k=Ee+y-Q.left,Oe=a.innerWidth-Ee-y-g-1}else k=Q.left+vt(K)-Ee,Oe=Ee-ae.left-1;if(this.isEntireColumnSelected(l,s)){var b=this.getDimensionsFromHeader("columns",u,f,c,ae),_=null;if(b){var T=MS(b,3);_=T[0],Oe=T[1],k=T[2]}_&&(z=_)}var I=he-ae.top-1,B=Q.top+Tt(K)-he;if(this.isEntireRowSelected(u,f)){var V=this.getDimensionsFromHeader("rows",l,s,h,ae),Y=null;if(V){var J=MS(V,3);Y=J[0],I=J[1],B=J[2]}Y&&(z=Y)}var ee=wi(z,a);parseInt(ee.borderTopWidth,10)>0&&(I+=1,B=B>0?B-1:0),parseInt(ee[_e?"borderRightWidth":"borderLeftWidth"],10)>0&&(Oe+=1,k=k>0?k-1:0);var le=_e?"right":"left";this.topStyle.top="".concat(I,"px"),this.topStyle[le]="".concat(Oe,"px"),this.topStyle.width="".concat(k,"px"),this.topStyle.display="block",this.startStyle.top="".concat(I,"px"),this.startStyle[le]="".concat(Oe,"px"),this.startStyle.height="".concat(B,"px"),this.startStyle.display="block";var Te=Math.floor(this.settings.border.width/2);this.bottomStyle.top="".concat(I+B-Te,"px"),this.bottomStyle[le]="".concat(Oe,"px"),this.bottomStyle.width="".concat(k,"px"),this.bottomStyle.display="block",this.endStyle.top="".concat(I,"px"),this.endStyle[le]="".concat(Oe+k-Te,"px"),this.endStyle.height="".concat(B+1,"px"),this.endStyle.display="block";var de=this.settings.border.cornerVisible;de=typeof de=="function"?de(this.settings.layerLevel):de;var ve=this.wot.getSetting("onModifyGetCellCoords",s,f),G=s,De=f;if(ve&&Array.isArray(ve)){var Xe=MS(ve,4);G=Xe[2],De=Xe[3]}if(cn()||!de||this.isPartRange(G,De))this.cornerStyle.display="none";else{this.cornerStyle.top="".concat(I+B+this.cornerCenterPointOffset-1,"px"),this.cornerStyle[le]="".concat(Oe+k+this.cornerCenterPointOffset-1,"px"),this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";var $e=is(o.TABLE),Ie=$e===a;Ie&&($e=i.documentElement);var Ae=parseInt(this.cornerDefaultStyle.width,10)/2,O=parseInt(this.cornerDefaultStyle.height,10)/2;if(f===this.wot.getSetting("totalColumns")-1){var E=Ie?K.getBoundingClientRect().left:K.offsetLeft,A=!1,H=0;_e?(H=E-parseInt(this.cornerDefaultStyle.width,10)/2,A=H<0):(H=E+vt(K)+parseInt(this.cornerDefaultStyle.width,10)/2,A=H>=yc($e)),A&&(this.cornerStyle[le]="".concat(Math.floor(Oe+k+this.cornerCenterPointOffset-Ae),"px"),this.cornerStyle[_e?"borderLeftWidth":"borderRightWidth"]=0)}if(s===this.wot.getSetting("totalRows")-1){var M=Ie?K.getBoundingClientRect().top:K.offsetTop,j=M+Tt(K)+parseInt(this.cornerDefaultStyle.height,10)/2,x=j>=no($e);x&&(this.cornerStyle.top="".concat(Math.floor(I+B+this.cornerCenterPointOffset-O),"px"),this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}cn()&&this.updateMultipleSelectionHandlesPosition(s,f,I,Oe,k,B)}}},{key:"isEntireColumnSelected",value:function(r,n){return r===this.wot.wtTable.getFirstRenderedRow()&&n===this.wot.wtTable.getLastRenderedRow()}},{key:"isEntireRowSelected",value:function(r,n){return r===this.wot.wtTable.getFirstRenderedColumn()&&n===this.wot.wtTable.getLastRenderedColumn()}},{key:"getDimensionsFromHeader",value:function(r,n,o,i,a){var l=this.wot.wtTable,s=l.wtRootElement.parentNode,u=null,f=null,c=null,h=null,d=null,v=null,p=null,m=null;switch(r){case"rows":u=function(){return l.getRowHeader.apply(l,arguments)},f=function(){return Tt.apply(void 0,arguments)},c="ht__selection--rows",v="top";break;case"columns":u=function(){return l.getColumnHeader.apply(l,arguments)},f=function(){return vt.apply(void 0,arguments)},c="ht__selection--columns",v="left";break}if(s.classList.contains(c)){var w=this.wot.getSetting("columnHeaders").length;if(p=u(n,w-i),m=u(o,w-i),!p||!m)return!1;var S=Vt(p),C=Vt(m);return p&&m&&(h=S[v]-a[v]-1,d=C[v]+f(m)-S[v]),[p,h,d]}return!1}},{key:"changeBorderStyle",value:function(r,n){var o=this[r].style,i=n[r];!i||i.hide?te(this[r],"hidden"):(Ne(this[r],"hidden")&&Be(this[r],"hidden"),o.backgroundColor=i.color,(r==="top"||r==="bottom")&&(o.height="".concat(i.width,"px")),(r==="start"||r==="end")&&(o.width="".concat(i.width,"px")))}},{key:"changeBorderToDefaultStyle",value:function(r){var n={width:1,color:"#000"},o=this[r].style;o.backgroundColor=n.color,o.width="".concat(n.width,"px"),o.height="".concat(n.width,"px")}},{key:"toggleHiddenClass",value:function(r,n){this.changeBorderToDefaultStyle(r),n?te(this[r],"hidden"):Be(this[r],"hidden")}},{key:"disappear",value:function(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",cn()&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}},{key:"destroy",value:function(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}}]),e}();const Pye=Tye;function kye(e,t){return Mye(e)||Iye(e,t)||Aye(e,t)||$ye()}function $ye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Aye(e,t){if(e){if(typeof e=="string")return yI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yI(e,t)}}function yI(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Iye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function Mye(e){if(Array.isArray(e))return e}function Ts(e){return Ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ts(e)}function xye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pI(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,Nye(n.key),n)}}function Dye(e,t,r){return t&&pI(e.prototype,t),r&&pI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nye(e){var t=Hye(e,"string");return Ts(t)==="symbol"?t:String(t)}function Hye(e,t){if(Ts(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ts(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lye=function(){function e(t,r){xye(this,e),this.settings=t,this.cellRange=r||null,this.instanceBorders={},this.classNames=[this.settings.className],this.classNameGenerator=this.linearClassNameGenerator(this.settings.className,this.settings.layerLevel)}return Dye(e,[{key:"getBorder",value:function(r){return this.instanceBorders[r.guid]||(this.instanceBorders[r.guid]=new Pye(r,this.settings)),this.instanceBorders[r.guid]}},{key:"isEmpty",value:function(){return this.cellRange===null}},{key:"add",value:function(r){return this.isEmpty()?this.cellRange=this.settings.createCellRange(r):this.cellRange.expand(r),this}},{key:"replace",value:function(r,n){if(!this.isEmpty()){if(this.cellRange.from.isEqual(r))return this.cellRange.from=n,!0;if(this.cellRange.to.isEqual(r))return this.cellRange.to=n,!0}return!1}},{key:"clear",value:function(){return this.cellRange=null,this}},{key:"getCorners",value:function(){var r=this.cellRange.getOuterTopStartCorner(),n=this.cellRange.getOuterBottomEndCorner();return[r.row,r.col,n.row,n.col]}},{key:"addClassAtCoords",value:function(r,n,o,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,l=r.wtTable.getCell(this.settings.createCellCoords(n,o));if(Ts(l)==="object"){var s=i;a&&(s=this.classNameGenerator(l),this.classNames.includes(s)||this.classNames.push(s)),te(l,s)}return this}},{key:"linearClassNameGenerator",value:function(r,n){return function o(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1;if(n===0||a===0)return r;var l=a>=0?a:n,s=r;l-=1;var u=l===0?r:"".concat(r,"-").concat(l);if(Ne(i,u)){var f=l+1;s="".concat(r,"-").concat(f)}else s=o(i,l);return s}}},{key:"draw",value:function(r){if(this.isEmpty()){this.settings.border&&this.getBorder(r).disappear();return}var n=r.wtTable.getRenderedRowsCount(),o=r.wtTable.getRenderedColumnsCount(),i=this.getCorners(),a=kye(i,4),l=a[0],s=a[1],u=a[2],f=a[3],c=this.settings,h=c.highlightHeaderClassName,d=c.highlightColumnClassName,v=c.highlightRowClassName,p=c.highlightOnlyClosestHeader,m=c.selectionType,w=m===void 0||["active-header","header"].includes(m);if(w&&s!==null&&f!==null)for(var S=0,C=0;C<o;C+=1){var P=r.wtTable.columnFilter.renderedToSource(C);if(P>=s&&P<=f){var R=r.wtTable.getColumnHeaders(P),W=R.length-1;p&&R.length>1&&(R=[R[W]]);for(var z=0;z<R.length;z+=1){var q=[],K=R[z];h&&q.push(h),d&&q.push(d),z=p?W:z;var X=r.getSetting("onBeforeHighlightingColumnHeader",P,z,{selectionType:m,columnCursor:S,selectionWidth:f-s+1,classNames:q});X!==P&&(K=r.wtTable.getColumnHeader(X,z)),te(K,q)}S+=1}}if(l!==null&&u!==null)for(var Q=0,ae=0;ae<n;ae+=1){var Z=r.wtTable.rowFilter.renderedToSource(ae);if(w&&Z>=l&&Z<=u){var he=r.wtTable.getRowHeaders(Z),Ee=he.length-1;p&&he.length>1&&(he=[he[Ee]]);for(var _e=0;_e<he.length;_e+=1){var Oe=[],k=he[_e];h&&Oe.push(h),v&&Oe.push(v),_e=p?Ee:_e;var y=r.getSetting("onBeforeHighlightingRowHeader",Z,_e,{selectionType:m,rowCursor:Q,selectionHeight:u-l+1,classNames:Oe});y!==Z&&(k=r.wtTable.getRowHeader(y,_e)),te(k,Oe)}Q+=1}if(s!==null&&f!==null)for(var g=0;g<o;g+=1){var b=r.wtTable.columnFilter.renderedToSource(g);Z>=l&&Z<=u&&b>=s&&b<=f?this.settings.className&&this.addClassAtCoords(r,Z,b,this.settings.className,this.settings.markIntersections):Z>=l&&Z<=u?v&&this.addClassAtCoords(r,Z,b,v):b>=s&&b<=f&&d&&this.addClassAtCoords(r,Z,b,d);var _=r.getSetting("onAfterDrawSelection",Z,b,this.settings.layerLevel);typeof _=="string"&&this.addClassAtCoords(r,Z,b,_)}}r.getSetting("onBeforeDrawBorders",i,this.settings.className),this.settings.border&&this.getBorder(r).appear(i)}},{key:"destroy",value:function(){Object.values(this.instanceBorders).forEach(function(r){return r.destroy()})}}]),e}();const jye=Lye;function gI(e){var t=e.isShiftKey,r=e.isLeftClick,n=e.isRightClick,o=e.coords,i=e.selection,a=e.controller,l=e.cellCoordsFactory,s=i.isSelected()?i.getSelectedRange().current():null,u=i.isSelectedByCorner(),f=i.isSelectedByRowHeader();if(t&&s)o.row>=0&&o.col>=0&&!a.cell?i.setRangeEnd(o):(u||f)&&o.row>=0&&o.col>=0&&!a.cell?i.setRangeEnd(l(o.row,o.col)):u&&o.row<0&&!a.column?i.setRangeEnd(l(s.to.row,o.col)):f&&o.col<0&&!a.row?i.setRangeEnd(l(o.row,s.to.col)):(!u&&!f&&o.col<0||u&&o.col<0)&&!a.row?i.selectRows(Math.max(s.from.row,0),o.row,o.col):(!u&&!f&&o.row<0||f&&o.row<0)&&!a.column&&i.selectColumns(Math.max(s.from.col,0),o.col,o.row);else{var c=!i.inInSelection(o),h=r||n&&c;o.row<0&&o.col>=0&&!a.column?h&&i.selectColumns(o.col,o.col,o.row):o.col<0&&o.row>=0&&!a.row?h&&i.selectRows(o.row,o.row,o.col):o.col>=0&&o.row>=0&&!a.cell?h&&i.setRangeStart(o):o.col<0&&o.row<0&&i.selectAll(!0,!0)}}function Bye(e){var t=e.isLeftClick,r=e.coords,n=e.selection,o=e.controller,i=e.cellCoordsFactory;if(t){var a=n.isSelectedByRowHeader(),l=n.isSelectedByColumnHeader(),s=n.tableProps.countCols(),u=n.tableProps.countRows();l&&!o.column?n.setRangeEnd(i(u-1,r.col)):a&&!o.row?n.setRangeEnd(i(r.row,s-1)):o.cell||n.setRangeEnd(r)}}var Fye=new Map([["mousedown",gI],["mouseover",Bye],["touchstart",gI]]);function mI(e,t){var r=t.coords,n=t.selection,o=t.controller,i=t.cellCoordsFactory;Fye.get(e.type)({coords:r,selection:n,controller:o,cellCoordsFactory:i,isShiftKey:e.shiftKey,isLeftClick:Em(e)||e.type==="touchstart",isRightClick:Si(e)})}var PW=new WeakMap,WT=Symbol("rootInstance");function Vye(e){PW.set(e,!0)}function Wye(e){return e===WT}function OO(e){return PW.has(e)}function hh(e){return hh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hh(e)}function Nf(e,t){return Yye(e)||zye(e,t)||kW(e,t)||Uye()}function Uye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function Yye(e){if(Array.isArray(e))return e}function bI(e){return Xye(e)||Kye(e)||kW(e)||Gye()}function Gye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kW(e,t){if(e){if(typeof e=="string")return RO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return RO(e,t)}}function Kye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xye(e){if(Array.isArray(e))return RO(e)}function RO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wI(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,$W(n.key),n)}}function Zye(e,t,r){return t&&wI(e.prototype,t),r&&wI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function SI(e,t,r){Qye(e,t),t.set(e,r)}function Qye(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Vo(e,t,r){return t=$W(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $W(e){var t=Jye(e,"string");return hh(t)==="symbol"?t:String(t)}function Jye(e,t){if(hh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CI(e,t){var r=AW(e,t,"get");return epe(e,r)}function epe(e,t){return t.get?t.get.call(e):t.value}function _I(e,t,r){var n=AW(e,t,"set");return tpe(e,n,r),r}function AW(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function tpe(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}var Di=new WeakMap,xS=new WeakMap,DS=new WeakMap,rpe=function(){function e(t){qye(this,e),Vo(this,"instance",void 0),Vo(this,"eventManager",void 0),Vo(this,"settings",void 0),Vo(this,"THEAD",void 0),Vo(this,"TBODY",void 0),Vo(this,"_wt",void 0),Vo(this,"activeWt",void 0),SI(this,xS,{writable:!0,value:0}),SI(this,DS,{writable:!0,value:0}),Vo(this,"postponedAdjustElementsSize",!1),this.instance=t,this.eventManager=new Pt(this.instance),this.settings=this.instance.getSettings(),Di.set(this,{selectionMouseDown:!1,mouseDown:void 0,table:void 0,lastWidth:0,lastHeight:0}),this.createElements(),this.registerEvents(),this.initializeWalkontable()}return Zye(e,[{key:"render",value:function(){this.instance.isRenderSuspended()||(this.instance.runHooks("beforeRender",this.instance.forceFullRender),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize(!0)),this._wt.draw(!this.instance.forceFullRender),this.instance.runHooks("afterRender",this.instance.forceFullRender),this.instance.forceFullRender=!1,this.instance.renderCall=!1)}},{key:"adjustElementsSize",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.instance.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this._wt.wtOverlays.adjustElementsSize(r)}},{key:"getCellAtCoords",value:function(r,n){var o=this._wt.getCell(r,n);return o<0?null:o}},{key:"scrollViewport",value:function(r,n,o,i,a){return this._wt.scrollViewport(r,n,o,i,a)}},{key:"scrollViewportHorizontally",value:function(r,n,o){return this._wt.scrollViewportHorizontally(r,n,o)}},{key:"scrollViewportVertically",value:function(r,n,o){return this._wt.scrollViewportVertically(r,n,o)}},{key:"createElements",value:function(){var r=Di.get(this),n=this.instance,o=n.rootElement,i=n.rootDocument,a=o.getAttribute("style");a&&o.setAttribute("data-originalstyle",a),te(o,"handsontable"),r.table=i.createElement("TABLE"),te(r.table,"htCore"),this.instance.getSettings().tableClassName&&te(r.table,this.instance.getSettings().tableClassName),this.THEAD=i.createElement("THEAD"),r.table.appendChild(this.THEAD),this.TBODY=i.createElement("TBODY"),r.table.appendChild(this.TBODY),this.instance.table=r.table,this.instance.container.insertBefore(r.table,this.instance.container.firstChild)}},{key:"registerEvents",value:function(){var r=this,n=Di.get(this),o=this.instance,i=o.rootElement,a=o.rootDocument,l=o.selection,s=a.documentElement;this.eventManager.addEventListener(i,"mousedown",function(u){if(n.selectionMouseDown=!0,!r.isTextSelectionAllowed(u.target)){var f=r.instance.rootWindow;V_(f),u.preventDefault(),f.focus()}}),this.eventManager.addEventListener(i,"mouseup",function(){n.selectionMouseDown=!1}),this.eventManager.addEventListener(i,"mousemove",function(u){n.selectionMouseDown&&!r.isTextSelectionAllowed(u.target)&&(r.settings.fragmentSelection&&V_(r.instance.rootWindow),u.preventDefault())}),this.eventManager.addEventListener(s,"keyup",function(u){l.isInProgress()&&!u.shiftKey&&l.finish()}),this.eventManager.addEventListener(s,"mouseup",function(u){l.isInProgress()&&Em(u)&&l.finish(),n.mouseDown=!1,(Rm(a.activeElement)||!l.isSelected()&&!l.isSelectedByAnyHeader()&&!i.contains(u.target)&&!Si(u))&&r.instance.unlisten()}),this.eventManager.addEventListener(s,"contextmenu",function(u){l.isInProgress()&&Si(u)&&(l.finish(),n.mouseDown=!1)}),this.eventManager.addEventListener(s,"touchend",function(){l.isInProgress()&&l.finish(),n.mouseDown=!1}),this.eventManager.addEventListener(s,"mousedown",function(u){var f=u.target,c=u.x||u.clientX,h=u.y||u.clientY,d=u.target;if(!(n.mouseDown||!i||!r.instance.view)){var v=r.instance.view._wt.wtTable.holder;if(d===v){var p=Zt(a);if(a.elementFromPoint(c+p,h)!==v||a.elementFromPoint(c,h+p)!==v)return}else for(;d!==s;){if(d===null){if(u.isTargetWebComponent)break;return}if(d===i)return;d=d.parentNode}var m=typeof r.settings.outsideClickDeselects=="function"?r.settings.outsideClickDeselects(f):r.settings.outsideClickDeselects;m?r.instance.deselectCell():r.instance.destroyEditor(!1,!1)}}),this.eventManager.addEventListener(n.table,"selectstart",function(u){r.settings.fragmentSelection||Hc(u.target)||u.preventDefault()})}},{key:"translateFromRenderableToVisualCoords",value:function(r){var n,o=r.row,i=r.col;return(n=this.instance)._createCellCoords.apply(n,bI(this.translateFromRenderableToVisualIndex(o,i)))}},{key:"translateFromRenderableToVisualIndex",value:function(r,n){var o=r>=0?this.instance.rowIndexMapper.getVisualFromRenderableIndex(r):r,i=n>=0?this.instance.columnIndexMapper.getVisualFromRenderableIndex(n):n;return o===null&&(o=r),i===null&&(i=n),[o,i]}},{key:"countRenderableIndexes",value:function(r,n){var o=Math.min(r.getNotTrimmedIndexesLength(),n),i=r.getNearestNotHiddenIndex(o-1,-1);return i===null?0:r.getRenderableFromVisualIndex(i)+1}},{key:"countRenderableColumns",value:function(){return this.countRenderableIndexes(this.instance.columnIndexMapper,this.settings.maxCols)}},{key:"countRenderableRows",value:function(){return this.countRenderableIndexes(this.instance.rowIndexMapper,this.settings.maxRows)}},{key:"countNotHiddenRowIndexes",value:function(r,n){return this.countNotHiddenIndexes(r,n,this.instance.rowIndexMapper,this.countRenderableRows())}},{key:"countNotHiddenColumnIndexes",value:function(r,n){return this.countNotHiddenIndexes(r,n,this.instance.columnIndexMapper,this.countRenderableColumns())}},{key:"countNotHiddenIndexes",value:function(r,n,o,i){if(isNaN(r)||r<0)return 0;var a=o.getNearestNotHiddenIndex(r,n),l=o.getRenderableFromVisualIndex(a);if(!Number.isInteger(l))return 0;var s=0;return n<0?s=l+1:n>0&&(s=i-l),s}},{key:"countNotHiddenFixedColumnsStart",value:function(){var r=this.instance.countCols(),n=Math.min(parseInt(this.settings.fixedColumnsStart,10),r)-1;return this.countNotHiddenColumnIndexes(n,-1)}},{key:"countNotHiddenFixedRowsTop",value:function(){var r=this.instance.countRows(),n=Math.min(parseInt(this.settings.fixedRowsTop,10),r)-1;return this.countNotHiddenRowIndexes(n,-1)}},{key:"countNotHiddenFixedRowsBottom",value:function(){var r=this.instance.countRows(),n=Math.max(r-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(n,1)}},{key:"isMainTableNotFullyCoveredByOverlays",value:function(){var r=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),n=this.countNotHiddenFixedColumnsStart();return this.instance.countRenderedRows()>r&&this.instance.countRenderedCols()>n}},{key:"initializeWalkontable",value:function(){var r=this,n=Di.get(this),o={rtlMode:this.instance.isRtl(),externalRowCalculator:this.instance.getPlugin("autoRowSize")&&this.instance.getPlugin("autoRowSize").isEnabled(),table:n.table,isDataViewInstance:function(){return OO(r.instance)},preventOverflow:function(){return r.settings.preventOverflow},preventWheel:function(){return r.settings.preventWheel},stretchH:function(){return r.settings.stretchH},data:function(f,c){var h;return(h=r.instance).getDataAtCell.apply(h,bI(r.translateFromRenderableToVisualIndex(f,c)))},totalRows:function(){return r.countRenderableRows()},totalColumns:function(){return r.countRenderableColumns()},fixedColumnsStart:function(){return r.countNotHiddenFixedColumnsStart()},fixedRowsTop:function(){return r.countNotHiddenFixedRowsTop()},fixedRowsBottom:function(){return r.countNotHiddenFixedRowsBottom()},shouldRenderInlineStartOverlay:function(){return r.settings.fixedColumnsStart>0||o.rowHeaders().length>0},shouldRenderTopOverlay:function(){return r.settings.fixedRowsTop>0||o.columnHeaders().length>0},shouldRenderBottomOverlay:function(){return r.settings.fixedRowsBottom>0},minSpareRows:function(){return r.settings.minSpareRows},renderAllRows:this.settings.renderAllRows,rowHeaders:function(){var f=[];return r.instance.hasRowHeaders()&&f.push(function(c,h){var d=c>=0?r.instance.rowIndexMapper.getVisualFromRenderableIndex(c):c;r.appendRowHeader(d,h)}),r.instance.runHooks("afterGetRowHeaderRenderers",f),_I(r,DS,f.length),f},columnHeaders:function(){var f=[];return r.instance.hasColHeaders()&&f.push(function(c,h){var d=c>=0?r.instance.columnIndexMapper.getVisualFromRenderableIndex(c):c;r.appendColHeader(d,h)}),r.instance.runHooks("afterGetColumnHeaderRenderers",f),_I(r,xS,f.length),f},columnWidth:function(f){var c=r.instance.columnIndexMapper.getVisualFromRenderableIndex(f);return r.instance.getColWidth(c===null?f:c)},rowHeight:function(f){var c=r.instance.rowIndexMapper.getVisualFromRenderableIndex(f);return r.instance.getRowHeight(c===null?f:c)},cellRenderer:function(f,c,h){var d=r.translateFromRenderableToVisualIndex(f,c),v=Nf(d,2),p=v[0],m=v[1],w=r.instance.runHooks("modifyGetCellCoords",p,m),S=p,C=m;if(Array.isArray(w)){var P=Nf(w,2);S=P[0],C=P[1]}var R=r.instance.getCellMeta(S,C),W=r.instance.colToProp(C),z=r.instance.getDataAtRowProp(S,W);r.instance.hasHook("beforeValueRender")&&(z=r.instance.runHooks("beforeValueRender",z,R)),r.instance.runHooks("beforeRenderer",h,p,m,W,z,R),r.instance.getCellRenderer(R)(r.instance,h,p,m,W,z,R),r.instance.runHooks("afterRenderer",h,p,m,W,z,R)},selections:this.instance.selection.highlight,hideBorderOnMouseDownOver:function(){return r.settings.fragmentSelection},onWindowResize:function(){r.instance&&!r.instance.isDestroyed&&r.instance.refreshDimensions()},onContainerElementResize:function(){r.instance&&!r.instance.isDestroyed&&r.instance.refreshDimensions()},onCellMouseDown:function(f,c,h,d){var v=r.translateFromRenderableToVisualCoords(c),p={row:!1,column:!1,cell:!1};r.instance.listen(),r.activeWt=d,n.mouseDown=!0,r.instance.runHooks("beforeOnCellMouseDown",f,v,h,p),!Gi(f)&&(mI(f,{coords:v,selection:r.instance.selection,controller:p,cellCoordsFactory:function(w,S){return r.instance._createCellCoords(w,S)}}),r.instance.runHooks("afterOnCellMouseDown",f,v,h),r.activeWt=r._wt)},onCellContextMenu:function(f,c,h,d){var v=r.translateFromRenderableToVisualCoords(c);r.activeWt=d,n.mouseDown=!1,r.instance.selection.isInProgress()&&r.instance.selection.finish(),r.instance.runHooks("beforeOnCellContextMenu",f,v,h),!Gi(f)&&(r.instance.runHooks("afterOnCellContextMenu",f,v,h),r.activeWt=r._wt)},onCellMouseOut:function(f,c,h,d){var v=r.translateFromRenderableToVisualCoords(c);r.activeWt=d,r.instance.runHooks("beforeOnCellMouseOut",f,v,h),!Gi(f)&&(r.instance.runHooks("afterOnCellMouseOut",f,v,h),r.activeWt=r._wt)},onCellMouseOver:function(f,c,h,d){var v=r.translateFromRenderableToVisualCoords(c),p={row:!1,column:!1,cell:!1};r.activeWt=d,r.instance.runHooks("beforeOnCellMouseOver",f,v,h,p),!Gi(f)&&(n.mouseDown&&mI(f,{coords:v,selection:r.instance.selection,controller:p,cellCoordsFactory:function(w,S){return r.instance._createCellCoords(w,S)}}),r.instance.runHooks("afterOnCellMouseOver",f,v,h),r.activeWt=r._wt)},onCellMouseUp:function(f,c,h,d){var v=r.translateFromRenderableToVisualCoords(c);r.activeWt=d,r.instance.runHooks("beforeOnCellMouseUp",f,v,h),!(Gi(f)||r.instance.isDestroyed)&&(r.instance.runHooks("afterOnCellMouseUp",f,v,h),r.activeWt=r._wt)},onCellCornerMouseDown:function(f){f.preventDefault(),r.instance.runHooks("afterOnCellCornerMouseDown",f)},onCellCornerDblClick:function(f){f.preventDefault(),r.instance.runHooks("afterOnCellCornerDblClick",f)},beforeDraw:function(f,c){return r.beforeRender(f,c)},onDraw:function(f){return r.afterRender(f)},onScrollVertically:function(){return r.instance.runHooks("afterScrollVertically")},onScrollHorizontally:function(){return r.instance.runHooks("afterScrollHorizontally")},onBeforeRemoveCellClassNames:function(){return r.instance.runHooks("beforeRemoveCellClassNames")},onBeforeHighlightingRowHeader:function(f,c,h){var d=r.instance.rowIndexMapper,v=d.getVisualFromRenderableIndex(f),p=r.instance.runHooks("beforeHighlightingRowHeader",v,c,h);return d.getRenderableFromVisualIndex(d.getNearestNotHiddenIndex(p,1))},onBeforeHighlightingColumnHeader:function(f,c,h){var d=r.instance.columnIndexMapper,v=d.getVisualFromRenderableIndex(f),p=r.instance.runHooks("beforeHighlightingColumnHeader",v,c,h);return d.getRenderableFromVisualIndex(d.getNearestNotHiddenIndex(p,1))},onAfterDrawSelection:function(f,c,h){var d,v=r.translateFromRenderableToVisualIndex(f,c),p=Nf(v,2),m=p[0],w=p[1],S=r.instance.selection.getSelectedRange(),C=S.size();if(C>0){var P=(h??0)+1-C,R=S.peekByIndex(P);d=[R.from.row,R.from.col,R.to.row,R.to.col]}return r.instance.runHooks("afterDrawSelection",m,w,d,h)},onBeforeDrawBorders:function(f,c){var h=Nf(f,4),d=h[0],v=h[1],p=h[2],m=h[3],w=[r.instance.rowIndexMapper.getVisualFromRenderableIndex(d),r.instance.columnIndexMapper.getVisualFromRenderableIndex(v),r.instance.rowIndexMapper.getVisualFromRenderableIndex(p),r.instance.columnIndexMapper.getVisualFromRenderableIndex(m)];return r.instance.runHooks("beforeDrawBorders",w,c)},onBeforeTouchScroll:function(){return r.instance.runHooks("beforeTouchScroll")},onAfterMomentumScroll:function(){return r.instance.runHooks("afterMomentumScroll")},onBeforeStretchingColumnWidth:function(f,c){var h=r.instance.columnIndexMapper.getVisualFromRenderableIndex(c);return r.instance.runHooks("beforeStretchingColumnWidth",f,h)},onModifyRowHeaderWidth:function(f){return r.instance.runHooks("modifyRowHeaderWidth",f)},onModifyGetCellCoords:function(f,c,h){var d=r.instance.rowIndexMapper,v=r.instance.columnIndexMapper,p=c>=0?v.getVisualFromRenderableIndex(c):c,m=f>=0?d.getVisualFromRenderableIndex(f):f,w=r.instance.runHooks("modifyGetCellCoords",m,p,h);if(Array.isArray(w)){var S=Nf(w,4),C=S[0],P=S[1],R=S[2],W=S[3];return[C>=0?d.getRenderableFromVisualIndex(d.getNearestNotHiddenIndex(C,1)):C,P>=0?v.getRenderableFromVisualIndex(v.getNearestNotHiddenIndex(P,1)):P,R>=0?d.getRenderableFromVisualIndex(d.getNearestNotHiddenIndex(R,-1)):R,W>=0?v.getRenderableFromVisualIndex(v.getNearestNotHiddenIndex(W,-1)):W]}},viewportRowCalculatorOverride:function(f){var c=r.settings.viewportRowRenderingOffset;if(c==="auto"&&r.settings.fixedRowsTop&&(c=10),c>0||c==="auto"){var h=r.countRenderableRows(),d=f.startRow,v=f.endRow;if(typeof c=="number")f.startRow=Math.max(d-c,0),f.endRow=Math.min(v+c,h-1);else if(c==="auto"){var p=Math.ceil(v/h*12);f.startRow=Math.max(d-p,0),f.endRow=Math.min(v+p,h-1)}}r.instance.runHooks("afterViewportRowCalculatorOverride",f)},viewportColumnCalculatorOverride:function(f){var c=r.settings.viewportColumnRenderingOffset;if(c==="auto"&&r.settings.fixedColumnsStart&&(c=10),c>0||c==="auto"){var h=r.countRenderableColumns(),d=f.startColumn,v=f.endColumn;if(typeof c=="number"&&(f.startColumn=Math.max(d-c,0),f.endColumn=Math.min(v+c,h-1)),c==="auto"){var p=Math.ceil(v/h*6);f.startColumn=Math.max(d-p,0),f.endColumn=Math.min(v+p,h-1)}}r.instance.runHooks("afterViewportColumnCalculatorOverride",f)},rowHeaderWidth:function(){return r.settings.rowHeaderWidth},columnHeaderHeight:function(){var f=r.instance.runHooks("modifyColumnHeaderHeight");return r.settings.columnHeaderHeight||f}};this.instance.runHooks("beforeInitWalkontable",o),this._wt=new uye(o),this.activeWt=this._wt;var i=this._wt.wtTable.spreader,a=this.instance.rootElement.getBoundingClientRect(),l=a.width,s=a.height;this.setLastSize(l,s),this.eventManager.addEventListener(i,"mousedown",function(u){u.target===i&&u.which===3&&u.stopPropagation()}),this.eventManager.addEventListener(i,"contextmenu",function(u){u.target===i&&u.which===3&&u.stopPropagation()}),this.eventManager.addEventListener(this.instance.rootDocument.documentElement,"click",function(){r.settings.observeDOMVisibility&&r._wt.drawInterrupted&&(r.instance.forceFullRender=!0,r.render())})}},{key:"isTextSelectionAllowed",value:function(r){if(Hc(r))return!0;var n=ai(r,this.instance.view._wt.wtTable.spreader);return!!(this.settings.fragmentSelection===!0&&n||this.settings.fragmentSelection==="cell"&&this.isSelectedOnlyCell()&&n||!this.settings.fragmentSelection&&this.isCellEdited()&&this.isSelectedOnlyCell())}},{key:"isMouseDown",value:function(){return Di.get(this).mouseDown}},{key:"isSelectedOnlyCell",value:function(){var r,n;return(r=(n=this.instance.getSelectedRangeLast())===null||n===void 0?void 0:n.isSingle())!==null&&r!==void 0?r:!1}},{key:"isCellEdited",value:function(){var r=this.instance.getActiveEditor();return r&&r.isOpened()}},{key:"beforeRender",value:function(r,n){r&&this.instance.runHooks("beforeViewRender",this.instance.forceFullRender,n)}},{key:"afterRender",value:function(r){r&&this.instance.runHooks("afterViewRender",this.instance.forceFullRender)}},{key:"appendRowHeader",value:function(r,n){if(n.firstChild){var o=n.firstChild;if(!Ne(o,"relative")){pn(n),this.appendRowHeader(r,n);return}this.updateCellHeader(o.querySelector(".rowHeader"),r,this.instance.getRowHeader)}else{var i=this.instance,a=i.rootDocument,l=i.getRowHeader,s=a.createElement("div"),u=a.createElement("span");s.className="relative",u.className="rowHeader",this.updateCellHeader(u,r,l),s.appendChild(u),n.appendChild(s)}this.instance.runHooks("afterGetRowHeader",r,n)}},{key:"appendColHeader",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.instance.getColHeader,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if(n.firstChild){var a=n.firstChild;Ne(a,"relative")?this.updateCellHeader(a.querySelector(".colHeader"),r,o,i):(pn(n),this.appendColHeader(r,n,o,i))}else{var l=this.instance.rootDocument,s=l.createElement("div"),u=l.createElement("span");s.className="relative",u.className="colHeader",this.updateCellHeader(u,r,o,i),s.appendChild(u),n.appendChild(s)}this.instance.runHooks("afterGetColHeader",r,n,i)}},{key:"updateCellHeader",value:function(r,n,o){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=n,l=this._wt.wtOverlays.getParentOverlay(r)||this._wt;r.parentNode&&(Ne(r,"colHeader")?a=l.wtTable.columnFilter.sourceToRendered(n):Ne(r,"rowHeader")&&(a=l.wtTable.rowFilter.sourceToRendered(n))),a>-1?Ka(r,o(n,i)):(bi(r,String.fromCharCode(160)),te(r,"cornerHeader"))}},{key:"maximumVisibleElementWidth",value:function(r){var n=this._wt.wtViewport.getWorkspaceWidth(),o=n-r;return o>0?o:0}},{key:"maximumVisibleElementHeight",value:function(r){var n=this._wt.wtViewport.getWorkspaceHeight(),o=n-r;return o>0?o:0}},{key:"setLastSize",value:function(r,n){var o=Di.get(this),i=[r,n];o.lastWidth=i[0],o.lastHeight=i[1]}},{key:"getLastSize",value:function(){var r=Di.get(this);return{width:r.lastWidth,height:r.lastHeight}}},{key:"getFirstFullyVisibleRow",value:function(){return this.instance.rowIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getFirstVisibleRow())}},{key:"getLastFullyVisibleRow",value:function(){return this.instance.rowIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getLastVisibleRow())}},{key:"getFirstFullyVisibleColumn",value:function(){return this.instance.columnIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getFirstVisibleColumn())}},{key:"getLastFullyVisibleColumn",value:function(){return this.instance.columnIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getLastVisibleColumn())}},{key:"getColumnHeadersCount",value:function(){return CI(this,xS)}},{key:"getRowHeadersCount",value:function(){return CI(this,DS)}},{key:"destroy",value:function(){this._wt.destroy(),this.eventManager.destroy()}}]),e}();const npe=rpe;function EO(e){return EO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},EO(e)}var IW="ABCDEFGHIJKLMNOPQRSTUVWXYZ",TO=IW.length;function km(e){for(var t=e+1,r="",n;t>0;)n=(t-1)%TO,r=String.fromCharCode(65+n)+r,t=parseInt((t-n)/TO,10);return r}function ope(e){var t=0;if(e)for(var r=0,n=e.length-1;r<e.length;r+=1,n-=1)t+=Math.pow(TO,n)*(IW.indexOf(e[r])+1);return t-=1,t}function ipe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:100,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:4,r=[],n,o;for(n=0;n<e;n++){var i=[];for(o=0;o<t;o++)i.push(km(o)+(n+1));r.push(i)}return r}function ape(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:100,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:4,r=[],n,o;for(n=0;n<e;n++){var i={};for(o=0;o<t;o++)i["prop".concat(o)]=km(o)+(n+1);r.push(i)}return r}function lpe(e,t){for(var r=[],n,o=0;o<e;o++){n=[];for(var i=0;i<t;i++)n.push("");r.push(n)}return r}function PO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=e,n=[];return(!Array.isArray(e)||!Array.isArray(e[0]))&&(r=[e]),r.forEach(function(o,i){Array.isArray(o)?o.forEach(function(a,l){n.push([i+t,l,a])}):Object.keys(o).forEach(function(a){n.push([i+t,a,o[a]])})}),n}function UT(e){var t=0;return Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&Ue(e[0])&&(t=fm(e[0]))),t}function MW(e){return!!(Array.isArray(e)&&e.length&&e.every(function(t){return Array.isArray(t)}))}function xW(e){return!!(Array.isArray(e)&&e.length&&e.every(function(t){return EO(t)==="object"&&!Array.isArray(t)&&t!==null}))}const spe=Object.freeze(Object.defineProperty({__proto__:null,countFirstRowKeys:UT,createEmptySpreadsheetData:lpe,createSpreadsheetData:ipe,createSpreadsheetObjectData:ape,dataRowToChangesArray:PO,isArrayOfArrays:MW,isArrayOfObjects:xW,spreadsheetColumnIndex:ope,spreadsheetColumnLabel:km},Symbol.toStringTag,{value:"Module"}));function dh(e){return dh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dh(e)}function upe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OI(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,cpe(n.key),n)}}function fpe(e,t,r){return t&&OI(e.prototype,t),r&&OI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function cpe(e){var t=hpe(e,"string");return dh(t)==="symbol"?t:String(t)}function hpe(e,t){if(dh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(dh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dpe=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];upe(this,e),this.hot=t,this.data=r,this.dataType="array",this.colToProp=function(){},this.propToCol=function(){}}return fpe(e,[{key:"modifyRowData",value:function(r){var n;return this.hot.hasHook("modifyRowData")&&(n=this.hot.runHooks("modifyRowData",r)),n!==void 0&&!Number.isInteger(n)?n:this.data[r]}},{key:"getData",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return!this.data||this.data.length===0?this.data:this.getByRange(null,null,r)}},{key:"setData",value:function(r){this.data=r}},{key:"getAtColumn",value:function(r){var n=this,o=[];return $(this.data,function(i,a){var l=n.getAtCell(a,r);o.push(l)}),o}},{key:"getAtRow",value:function(r,n,o){var i=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,l=n===void 0&&o===void 0,s=null,u=null;if(s=this.modifyRowData(r),Array.isArray(s))u=[],l?s.forEach(function(h,d){u[d]=i.getAtPhysicalCell(r,d,s)}):Ce(n,o,function(h){u[h-n]=i.getAtPhysicalCell(r,h,s)});else if(Ue(s)||wt(s))if(a?u=[]:u={},!l||a){var f=0,c=this.countFirstRowKeys()-1;Ce(f,c,function(h){var d=i.colToProp(h);if(h>=(n||f)&&h<=(o||c)&&!Number.isInteger(d)){var v=i.getAtPhysicalCell(r,d,s);a?u.push(v):Ly(u,d,v)}})}else ze(s,function(h,d){Ly(u,d,i.getAtPhysicalCell(r,d,s))});return u}},{key:"setAtCell",value:function(r,n,o){if(!(r>=this.countRows()||n>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){var i=Ta(o);this.hot.runHooks("modifySourceData",r,this.propToCol(n),i,"set"),i.isTouched()&&(o=i.value)}Number.isInteger(n)?this.data[r][n]=o:Ly(this.data[r],n,o)}}},{key:"getAtPhysicalCell",value:function(r,n,o){var i=null;if(o&&(typeof n=="string"?i=XB(o,n):typeof n=="function"?i=n(o):i=o[n]),this.hot.hasHook("modifySourceData")){var a=Ta(i);this.hot.runHooks("modifySourceData",r,this.colToProp(n),a,"get"),a.isTouched()&&(i=a.value)}return i}},{key:"getAtCell",value:function(r,n){var o=this.modifyRowData(r);return this.getAtPhysicalCell(r,this.colToProp(n),o)}},{key:"getByRange",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,l=null,s=null,u=null,f=null;n===null||o===null?(a=!0,l=0,u=this.countRows()-1):(l=Math.min(n.row,o.row),s=Math.min(n.col,o.col),u=Math.max(n.row,o.row),f=Math.max(n.col,o.col));var c=[];return Ce(l,u,function(h){c.push(a?r.getAtRow(h,void 0,void 0,i):r.getAtRow(h,s,f,i))}),c}},{key:"countRows",value:function(){if(this.hot.hasHook("modifySourceLength")){var r=this.hot.runHooks("modifySourceLength");if(Number.isInteger(r))return r}return this.data.length}},{key:"countFirstRowKeys",value:function(){return UT(this.data)}},{key:"destroy",value:function(){this.data=null,this.hot=null}}]),e}();const vpe=dpe;var RI=xt,ype=function(e){return e!==void 0&&(RI(e,"value")||RI(e,"writable"))},ppe=xe,gpe=Xt,mpe=zt,bpe=Ht,wpe=ype,Spe=Hn,Cpe=em;function DW(e,t){var r=arguments.length<3?e:arguments[2],n,o;if(bpe(e)===r)return e[t];if(n=Spe.f(e,t),n)return wpe(n)?n.value:n.get===void 0?void 0:gpe(n.get,r);if(mpe(o=Cpe(e)))return DW(o,t,r)}ppe({target:"Reflect",stat:!0},{get:DW});var _pe=xe,Ope=Fe,Rpe=Fr,NW=Hn.f,HW=Ut,Epe=!HW||Ope(function(){NW(1)});_pe({target:"Object",stat:!0,forced:Epe,sham:!HW},{getOwnPropertyDescriptor:function(t,r){return NW(Rpe(t),r)}});var Tpe="localHooks",LW={_localHooks:Object.create(null),addLocalHook:function(t,r){return this._localHooks[t]||(this._localHooks[t]=[]),this._localHooks[t].push(r),this},runLocalHooks:function(t,r,n,o,i,a,l){if(this._localHooks[t])for(var s=this._localHooks[t].length,u=0;u<s;u++)jp(this._localHooks[t][u],this,r,n,o,i,a,l)},clearLocalHooks:function(){return this._localHooks={},this}};jn(LW,"MIXIN_NAME",Tpe,{writable:!1,enumerable:!1});const kr=LW;function vh(e){return vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vh(e)}function Ppe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EI(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,$pe(n.key),n)}}function kpe(e,t,r){return t&&EI(e.prototype,t),r&&EI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $pe(e){var t=Ape(e,"string");return vh(t)==="symbol"?t:String(t)}function Ape(e,t){if(vh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xa=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;Ppe(this,e),this.indexedValues=[],this.initValueOrFn=t}return kpe(e,[{key:"getValues",value:function(){return this.indexedValues}},{key:"getValueAtIndex",value:function(r){var n=this.indexedValues;if(r<n.length)return n[r]}},{key:"setValues",value:function(r){this.indexedValues=r.slice(),this.runLocalHooks("change")}},{key:"setValueAtIndex",value:function(r,n){return r<this.indexedValues.length?(this.indexedValues[r]=n,this.runLocalHooks("change"),!0):!1}},{key:"clear",value:function(){this.setDefaultValues()}},{key:"getLength",value:function(){return this.getValues().length}},{key:"setDefaultValues",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,wt(this.initValueOrFn)?Ce(n-1,function(o){return r.indexedValues.push(r.initValueOrFn(o))}):Ce(n-1,function(){return r.indexedValues.push(r.initValueOrFn)}),this.runLocalHooks("change")}},{key:"init",value:function(r){return this.setDefaultValues(r),this.runLocalHooks("init"),this}},{key:"insert",value:function(){this.runLocalHooks("change")}},{key:"remove",value:function(){this.runLocalHooks("change")}},{key:"destroy",value:function(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}]),e}();mt(Xa,kr);function NS(e){return Dpe(e)||xpe(e)||Mpe(e)||Ipe()}function Ipe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mpe(e,t){if(e){if(typeof e=="string")return kO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kO(e,t)}}function xpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Dpe(e){if(Array.isArray(e))return kO(e)}function kO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function zT(e,t,r,n){var o=r.length?r[0]:void 0;return[].concat(NS(e.slice(0,o)),NS(r.map(function(i,a){return wt(n)?n(i,a):n})),NS(o===void 0?[]:e.slice(o)))}function YT(e,t){return jr(e,function(r,n){return t.includes(n)===!1})}function Ps(e){return Ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ps(e)}function Npe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TI(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,Lpe(n.key),n)}}function Hpe(e,t,r){return t&&TI(e.prototype,t),r&&TI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lpe(e){var t=jpe(e,"string");return Ps(t)==="symbol"?t:String(t)}function jpe(e,t){if(Ps(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ps(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gc(){return typeof Reflect<"u"&&Reflect.get?gc=Reflect.get.bind():gc=function(t,r,n){var o=Bpe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},gc.apply(this,arguments)}function Bpe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ia(e),e!==null););return e}function Fpe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$O(e,t)}function $O(e,t){return $O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},$O(e,t)}function Vpe(e){var t=zpe();return function(){var n=Ia(e),o;if(t){var i=Ia(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Wpe(this,o)}}function Wpe(e,t){if(t&&(Ps(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Upe(e)}function Upe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zpe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ia(e){return Ia=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ia(e)}var Ei=function(e){Fpe(r,e);var t=Vpe(r);function r(){return Npe(this,r),t.apply(this,arguments)}return Hpe(r,[{key:"insert",value:function(o,i){this.indexedValues=zT(this.indexedValues,o,i,this.initValueOrFn),gc(Ia(r.prototype),"insert",this).call(this,o,i)}},{key:"remove",value:function(o){this.indexedValues=YT(this.indexedValues,o),gc(Ia(r.prototype),"remove",this).call(this,o)}}]),r}(Xa);function ks(e){return ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ks(e)}function Ype(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PI(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,Kpe(n.key),n)}}function Gpe(e,t,r){return t&&PI(e.prototype,t),r&&PI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kpe(e){var t=Xpe(e,"string");return ks(t)==="symbol"?t:String(t)}function Xpe(e,t){if(ks(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ks(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qpe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&AO(e,t)}function AO(e,t){return AO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},AO(e,t)}function Zpe(e){var t=ege();return function(){var n=pg(e),o;if(t){var i=pg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Qpe(this,o)}}function Qpe(e,t){if(t&&(ks(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jpe(e)}function Jpe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ege(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pg(e){return pg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},pg(e)}var $m=function(e){qpe(r,e);var t=Zpe(r);function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return Ype(this,r),t.call(this,n)}return Gpe(r,[{key:"getHiddenIndexes",value:function(){return Lt(this.getValues(),function(o,i,a){return i&&o.push(a),o},[])}}]),r}(Ei);function HS(e){return oge(e)||nge(e)||rge(e)||tge()}function tge(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rge(e,t){if(e){if(typeof e=="string")return IO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return IO(e,t)}}function nge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oge(e){if(Array.isArray(e))return IO(e)}function IO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function GT(e,t,r){return[].concat(HS(e.slice(0,t)),HS(r),HS(e.slice(t)))}function yh(e,t){return jr(e,function(r){return t.includes(r)===!1})}function KT(e,t){return We(e,function(r){return r-t.filter(function(n){return n<r}).length})}function XT(e,t){var r=t[0],n=t.length;return We(e,function(o){return o>=r?o+n:o})}function $s(e){return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$s(e)}function ige(e){return uge(e)||sge(e)||lge(e)||age()}function age(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lge(e,t){if(e){if(typeof e=="string")return MO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return MO(e,t)}}function sge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uge(e){if(Array.isArray(e))return MO(e)}function MO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kI(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,BW(n.key),n)}}function cge(e,t,r){return t&&kI(e.prototype,t),r&&kI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jn(){return typeof Reflect<"u"&&Reflect.get?Jn=Reflect.get.bind():Jn=function(t,r,n){var o=hge(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Jn.apply(this,arguments)}function hge(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=un(e),e!==null););return e}function dge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xO(e,t)}function xO(e,t){return xO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},xO(e,t)}function vge(e){var t=pge();return function(){var n=un(e),o;if(t){var i=un(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return yge(this,o)}}function yge(e,t){if(t&&($s(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jW(e)}function jW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pge(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function un(e){return un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},un(e)}function gge(e,t,r){return t=BW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BW(e){var t=mge(e,"string");return $s(t)==="symbol"?t:String(t)}function mge(e,t){if($s(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if($s(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Am=function(e){dge(r,e);var t=vge(r);function r(){var n;fge(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),gge(jW(n),"orderOfIndexes",[]),n}return cge(r,[{key:"getValues",value:function(){var o=this;return this.orderOfIndexes.map(function(i){return o.indexedValues[i]})}},{key:"setValues",value:function(o){this.orderOfIndexes=ige(Array(o.length).keys()),Jn(un(r.prototype),"setValues",this).call(this,o)}},{key:"setValueAtIndex",value:function(o,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.orderOfIndexes.length;return o<this.indexedValues.length?(this.indexedValues[o]=i,this.orderOfIndexes.includes(o)===!1&&this.orderOfIndexes.splice(a,0,o),this.runLocalHooks("change"),!0):!1}},{key:"clearValue",value:function(o){this.orderOfIndexes=yh(this.orderOfIndexes,[o]),wt(this.initValueOrFn)?Jn(un(r.prototype),"setValueAtIndex",this).call(this,o,this.initValueOrFn(o)):Jn(un(r.prototype),"setValueAtIndex",this).call(this,o,this.initValueOrFn)}},{key:"getLength",value:function(){return this.orderOfIndexes.length}},{key:"setDefaultValues",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,Jn(un(r.prototype),"setDefaultValues",this).call(this,o)}},{key:"insert",value:function(o,i){this.indexedValues=zT(this.indexedValues,o,i,this.initValueOrFn),this.orderOfIndexes=XT(this.orderOfIndexes,i),Jn(un(r.prototype),"insert",this).call(this,o,i)}},{key:"remove",value:function(o){this.indexedValues=YT(this.indexedValues,o),this.orderOfIndexes=yh(this.orderOfIndexes,o),this.orderOfIndexes=KT(this.orderOfIndexes,o),Jn(un(r.prototype),"remove",this).call(this,o)}},{key:"getEntries",value:function(){var o=this;return this.orderOfIndexes.map(function(i){return[i,o.getValueAtIndex(i)]})}}]),r}(Xa);function As(e){return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},As(e)}function bge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $I(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,Sge(n.key),n)}}function wge(e,t,r){return t&&$I(e.prototype,t),r&&$I(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sge(e){var t=Cge(e,"string");return As(t)==="symbol"?t:String(t)}function Cge(e,t){if(As(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(As(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _ge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DO(e,t)}function DO(e,t){return DO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},DO(e,t)}function Oge(e){var t=Tge();return function(){var n=gg(e),o;if(t){var i=gg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Rge(this,o)}}function Rge(e,t){if(t&&(As(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ege(e)}function Ege(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tge(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gg(e){return gg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gg(e)}var yv=function(e){_ge(r,e);var t=Oge(r);function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return bge(this,r),t.call(this,n)}return wge(r,[{key:"getTrimmedIndexes",value:function(){return Lt(this.getValues(),function(o,i,a){return i&&o.push(a),o},[])}}]),r}(Ei),AI=new Map([["indexesSequence",{getListWithInsertedItems:GT,getListWithRemovedItems:yh}],["physicallyIndexed",{getListWithInsertedItems:zT,getListWithRemovedItems:YT}]]),FW=function(t){if(AI.has(t)===!1)throw new Error("Alter strategy with ID '".concat(t,"' does not exist."));return AI.get(t)};function Is(e){return Is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Is(e)}function Pge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function II(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,$ge(n.key),n)}}function kge(e,t,r){return t&&II(e.prototype,t),r&&II(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $ge(e){var t=Age(e,"string");return Is(t)==="symbol"?t:String(t)}function Age(e,t){if(Is(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Is(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mc(){return typeof Reflect<"u"&&Reflect.get?mc=Reflect.get.bind():mc=function(t,r,n){var o=Ige(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},mc.apply(this,arguments)}function Ige(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ma(e),e!==null););return e}function Mge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&NO(e,t)}function NO(e,t){return NO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},NO(e,t)}function xge(e){var t=Hge();return function(){var n=Ma(e),o;if(t){var i=Ma(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Dge(this,o)}}function Dge(e,t){if(t&&(Is(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nge(e)}function Nge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hge(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ma(e){return Ma=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ma(e)}var VW=function(e){Mge(r,e);var t=xge(r);function r(){return Pge(this,r),t.call(this,function(n){return n})}return kge(r,[{key:"insert",value:function(o,i){var a=XT(this.indexedValues,i);this.indexedValues=GT(a,o,i),mc(Ma(r.prototype),"insert",this).call(this,o,i)}},{key:"remove",value:function(o){var i=yh(this.indexedValues,o);this.indexedValues=KT(i,o),mc(Ma(r.prototype),"remove",this).call(this,o)}}]),r}(Xa),MI=new Map([["hiding",$m],["index",Xa],["linkedPhysicalIndexToValue",Am],["physicalIndexToValue",Ei],["trimming",yv]]);function Lge(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!MI.has(e))throw new Error('The provided map type ("'.concat(e,'") does not exist.'));return new(MI.get(e))(t)}function ph(e){return ph=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ph(e)}function jge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xI(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,Fge(n.key),n)}}function Bge(e,t,r){return t&&xI(e.prototype,t),r&&xI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fge(e){var t=Vge(e,"string");return ph(t)==="symbol"?t:String(t)}function Vge(e,t){if(ph(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ph(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var HO=0,qT=function(){function e(){jge(this,e),this.collection=new Map}return Bge(e,[{key:"register",value:function(r,n){var o=this;this.collection.has(r)===!1&&(this.collection.set(r,n),n.addLocalHook("change",function(){return o.runLocalHooks("change",n)}),HO+=1)}},{key:"unregister",value:function(r){var n=this.collection.get(r);pe(n)&&(n.destroy(),this.collection.delete(r),this.runLocalHooks("change",n),HO-=1)}},{key:"unregisterAll",value:function(){var r=this;this.collection.forEach(function(n,o){return r.unregister(o)}),this.collection.clear()}},{key:"get",value:function(r){return pt(r)?Array.from(this.collection.values()):this.collection.get(r)}},{key:"getLength",value:function(){return this.collection.size}},{key:"removeFromEvery",value:function(r){this.collection.forEach(function(n){n.remove(r)})}},{key:"insertToEvery",value:function(r,n){this.collection.forEach(function(o){o.insert(r,n)})}},{key:"initEvery",value:function(r){this.collection.forEach(function(n){n.init(r)})}}]),e}();mt(qT,kr);function Wge(){return HO}function Ms(e){return Ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ms(e)}function Uge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DI(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,Yge(n.key),n)}}function zge(e,t,r){return t&&DI(e.prototype,t),r&&DI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yge(e){var t=Gge(e,"string");return Ms(t)==="symbol"?t:String(t)}function Gge(e,t){if(Ms(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ms(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&LO(e,t)}function LO(e,t){return LO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},LO(e,t)}function Xge(e){var t=Qge();return function(){var n=mg(e),o;if(t){var i=mg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return qge(this,o)}}function qge(e,t){if(t&&(Ms(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zge(e)}function Zge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qge(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mg(e){return mg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mg(e)}var NI=function(e){Kge(r,e);var t=Xge(r);function r(n,o){var i;return Uge(this,r),i=t.call(this),i.mergedValuesCache=[],i.aggregationFunction=n,i.fallbackValue=o,i}return zge(r,[{key:"getMergedValues",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(o===!0)return this.mergedValuesCache;if(this.getLength()===0)return[];for(var i=We(this.get(),function(c){return c.getValues()}),a=[],l=pe(i[0])&&i[0].length||0,s=0;s<l;s+=1){for(var u=[],f=0;f<this.getLength();f+=1)u.push(i[f][s]);a.push(u)}return We(a,this.aggregationFunction)}},{key:"getMergedValueAtIndex",value:function(o,i){var a=this.getMergedValues(i)[o];return pe(a)?a:this.fallbackValue}},{key:"updateCache",value:function(){this.mergedValuesCache=this.getMergedValues(!1)}}]),r}(qT);function gh(e){return gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gh(e)}function Jge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HI(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,tme(n.key),n)}}function eme(e,t,r){return t&&HI(e.prototype,t),r&&HI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tme(e){var t=rme(e,"string");return gh(t)==="symbol"?t:String(t)}function rme(e,t){if(gh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nme(e,t,r){ome(e,t),t.set(e,r)}function ome(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ime(e,t,r){var n=WW(e,t,"set");return ame(e,n,r),r}function ame(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}function lme(e,t){var r=WW(e,t,"get");return sme(e,r)}function WW(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function sme(e,t){return t.get?t.get.call(e):t.value}var LS=new WeakMap,UW=function(){function e(){Jge(this,e),nme(this,LS,{writable:!0,value:[]})}return eme(e,[{key:"subscribe",value:function(r){return this.addLocalHook("change",r),this._write(lme(this,LS)),this}},{key:"unsubscribe",value:function(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}},{key:"_write",value:function(r){return r.length>0&&this.runLocalHooks("change",r),this}},{key:"_writeInitialChanges",value:function(r){ime(this,LS,r)}}]),e}();mt(UW,kr);function LI(e,t){for(var r=[],n=0,o=0;n<e.length&&o<t.length;n++,o++)e[n]!==t[o]&&r.push({op:"replace",index:o,oldValue:e[n],newValue:t[o]});for(;n<t.length;n++)r.push({op:"insert",index:n,oldValue:void 0,newValue:t[n]});for(;o<e.length;o++)r.push({op:"remove",index:o,oldValue:e[o],newValue:void 0});return r}function mh(e){return mh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mh(e)}function ume(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jI(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,cme(n.key),n)}}function fme(e,t,r){return t&&jI(e.prototype,t),r&&jI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function cme(e){var t=hme(e,"string");return mh(t)==="symbol"?t:String(t)}function hme(e,t){if(mh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(mh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hf(e,t,r){dme(e,t),t.set(e,r)}function dme(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ur(e,t){var r=zW(e,t,"get");return vme(e,r)}function vme(e,t){return t.get?t.get.call(e):t.value}function Qv(e,t,r){var n=zW(e,t,"set");return yme(e,n,r),r}function zW(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function yme(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}var Jv=new WeakMap,Lf=new WeakMap,ey=new WeakMap,ty=new WeakMap,ry=new WeakMap,pme=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.initialIndexValue;ume(this,e),Hf(this,Jv,{writable:!0,value:new Set}),Hf(this,Lf,{writable:!0,value:[]}),Hf(this,ey,{writable:!0,value:[]}),Hf(this,ty,{writable:!0,value:!1}),Hf(this,ry,{writable:!0,value:!1}),Qv(this,ry,r??!1)}return fme(e,[{key:"createObserver",value:function(){var r=this,n=new UW;return Ur(this,Jv).add(n),n.addLocalHook("unsubscribe",function(){Ur(r,Jv).delete(n)}),n._writeInitialChanges(LI(Ur(this,Lf),Ur(this,ey))),n}},{key:"emit",value:function(r){var n=Ur(this,ey);(!Ur(this,ty)||Ur(this,Lf).length!==r.length)&&(r.length===0?r=new Array(n.length).fill(Ur(this,ry)):Qv(this,Lf,new Array(r.length).fill(Ur(this,ry))),Ur(this,ty)||(Qv(this,ty,!0),n=Ur(this,Lf)));var o=LI(n,r);Ur(this,Jv).forEach(function(i){return i._write(o)}),Qv(this,ey,r)}}]),e}();function bh(e){return bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bh(e)}var BI;function jS(e){return wme(e)||bme(e)||mme(e)||gme()}function gme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mme(e,t){if(e){if(typeof e=="string")return jO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jO(e,t)}}function bme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wme(e){if(Array.isArray(e))return jO(e)}function jO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Sme(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Cme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FI(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,Ome(n.key),n)}}function _me(e,t,r){return t&&FI(e.prototype,t),r&&FI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ome(e){var t=Rme(e,"string");return bh(t)==="symbol"?t:String(t)}function Rme(e,t){if(bh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(bh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var VI=new Set(["getFirstNotHiddenIndex"]),BO=function(){function e(){var t=this;Cme(this,e),this.indexesSequence=new VW,this.trimmingMapsCollection=new NI(function(r){return r.some(function(n){return n===!0})},!1),this.hidingMapsCollection=new NI(function(r){return r.some(function(n){return n===!0})},!1),this.variousMapsCollection=new qT,this.hidingChangesObservable=new pme({initialIndexValue:!1}),this.notTrimmedIndexesCache=[],this.notHiddenIndexesCache=[],this.isBatched=!1,this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1,this.renderablePhysicalIndexesCache=[],this.fromPhysicalToVisualIndexesCache=new Map,this.fromVisualToRenderableIndexesCache=new Map,this.indexesSequence.addLocalHook("change",function(){t.indexesSequenceChanged=!0,t.updateCache(),t.runLocalHooks("change",t.indexesSequence,null)}),this.trimmingMapsCollection.addLocalHook("change",function(r){t.trimmedIndexesChanged=!0,t.updateCache(),t.runLocalHooks("change",r,t.trimmingMapsCollection)}),this.hidingMapsCollection.addLocalHook("change",function(r){t.hiddenIndexesChanged=!0,t.updateCache(),t.runLocalHooks("change",r,t.hidingMapsCollection)}),this.variousMapsCollection.addLocalHook("change",function(r){t.runLocalHooks("change",r,t.variousMapsCollection)})}return _me(e,[{key:"suspendOperations",value:function(){this.isBatched=!0}},{key:"resumeOperations",value:function(){this.isBatched=!1,this.updateCache()}},{key:"createChangesObserver",value:function(r){if(r!=="hiding")throw new Error('Unsupported index map type "'.concat(r,'".'));return this.hidingChangesObservable.createObserver()}},{key:"createAndRegisterIndexMap",value:function(r,n,o){return this.registerMap(r,Lge(n,o))}},{key:"registerMap",value:function(r,n){if(this.trimmingMapsCollection.get(r)||this.hidingMapsCollection.get(r)||this.variousMapsCollection.get(r))throw Error('Map with name "'.concat(r,'" has been already registered.'));n instanceof yv?this.trimmingMapsCollection.register(r,n):n instanceof $m?this.hidingMapsCollection.register(r,n):this.variousMapsCollection.register(r,n);var o=this.getNumberOfIndexes();return o>0&&n.init(o),n}},{key:"unregisterMap",value:function(r){this.trimmingMapsCollection.unregister(r),this.hidingMapsCollection.unregister(r),this.variousMapsCollection.unregister(r)}},{key:"unregisterAll",value:function(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}},{key:"getPhysicalFromVisualIndex",value:function(r){var n=this.notTrimmedIndexesCache[r];return pe(n)?n:null}},{key:"getPhysicalFromRenderableIndex",value:function(r){var n=this.renderablePhysicalIndexesCache[r];return pe(n)?n:null}},{key:"getVisualFromPhysicalIndex",value:function(r){var n=this.fromPhysicalToVisualIndexesCache.get(r);return pe(n)?n:null}},{key:"getVisualFromRenderableIndex",value:function(r){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(r))}},{key:"getRenderableFromVisualIndex",value:function(r){var n=this.fromVisualToRenderableIndexesCache.get(r);return pe(n)?n:null}},{key:"getFirstNotHiddenIndex",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:r-n;VI.has("getFirstNotHiddenIndex")&&(VI.delete("getFirstNotHiddenIndex"),gt(dt(BI||(BI=Sme([`The method "getFirstNotHiddenIndex" is deprecated and will be removed in the next
major release. Please use "getNearestNotHiddenIndex" instead.`],[`The method "getFirstNotHiddenIndex" is deprecated and will be removed in the next\\x20
major release. Please use "getNearestNotHiddenIndex" instead.`])))));var a=this.getPhysicalFromVisualIndex(r);return a===null?o===!0&&i!==r-n?this.getFirstNotHiddenIndex(i,-n,!1,i):null:this.isHidden(a)===!1?r:this.getFirstNotHiddenIndex(r+n,n,o,i)}},{key:"getNearestNotHiddenIndex",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.getPhysicalFromVisualIndex(r);if(i===null)return null;if(this.fromVisualToRenderableIndexesCache.has(r))return r;var a=Array.from(this.fromVisualToRenderableIndexesCache.keys()),l=-1;return n>0?l=a.findIndex(function(s){return s>r}):l=a.reverse().findIndex(function(s){return s<r}),l===-1?o?this.getNearestNotHiddenIndex(r,-n,!1):null:a[l]}},{key:"initToLength",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=jS(new Array(r).keys()),this.notHiddenIndexesCache=jS(new Array(r).keys()),this.suspendOperations(),this.indexesSequence.init(r),this.trimmingMapsCollection.initEvery(r),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(r),this.variousMapsCollection.initEvery(r),this.resumeOperations(),this.runLocalHooks("init")}},{key:"fitToLength",value:function(r){var n=this.getNumberOfIndexes();if(r<n){var o=jS(Array(this.getNumberOfIndexes()-r).keys()).map(function(i){return i+r});this.removeIndexes(o)}else this.insertIndexes(n,r-n)}},{key:"getIndexesSequence",value:function(){return this.indexesSequence.getValues()}},{key:"setIndexesSequence",value:function(r){this.indexesSequence.setValues(r)}},{key:"getNotTrimmedIndexes",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(n===!0)return this.notTrimmedIndexesCache;var o=this.getIndexesSequence();return o.filter(function(i){return r.isTrimmed(i)===!1})}},{key:"getNotTrimmedIndexesLength",value:function(){return this.getNotTrimmedIndexes().length}},{key:"getNotHiddenIndexes",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(n===!0)return this.notHiddenIndexesCache;var o=this.getIndexesSequence();return o.filter(function(i){return r.isHidden(i)===!1})}},{key:"getNotHiddenIndexesLength",value:function(){return this.getNotHiddenIndexes().length}},{key:"getRenderableIndexes",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(n===!0)return this.renderablePhysicalIndexesCache;var o=this.getNotTrimmedIndexes();return o.filter(function(i){return r.isHidden(i)===!1})}},{key:"getRenderableIndexesLength",value:function(){return this.getRenderableIndexes().length}},{key:"getNumberOfIndexes",value:function(){return this.getIndexesSequence().length}},{key:"moveIndexes",value:function(r,n){var o=this;typeof r=="number"&&(r=[r]);var i=We(r,function(c){return o.getPhysicalFromVisualIndex(c)}),a=this.getNotTrimmedIndexesLength(),l=r.length,s=yh(this.getIndexesSequence(),i),u=a-l;if(n+l<a){var f=s.filter(function(c){return o.isTrimmed(c)===!1})[n];u=s.indexOf(f)}this.setIndexesSequence(GT(s,u,i))}},{key:"isTrimmed",value:function(r){return this.trimmingMapsCollection.getMergedValueAtIndex(r)}},{key:"isHidden",value:function(r){return this.hidingMapsCollection.getMergedValueAtIndex(r)}},{key:"insertIndexes",value:function(r,n){var o=this.getNotTrimmedIndexes()[r],i=pe(o)?o:this.getNumberOfIndexes(),a=this.getIndexesSequence().includes(o)?this.getIndexesSequence().indexOf(o):this.getNumberOfIndexes(),l=We(new Array(n).fill(i),function(s,u){return s+u});this.suspendOperations(),this.indexesSequence.insert(a,l),this.trimmingMapsCollection.insertToEvery(a,l),this.hidingMapsCollection.insertToEvery(a,l),this.variousMapsCollection.insertToEvery(a,l),this.resumeOperations()}},{key:"removeIndexes",value:function(r){this.suspendOperations(),this.indexesSequence.remove(r),this.trimmingMapsCollection.removeFromEvery(r),this.hidingMapsCollection.removeFromEvery(r),this.variousMapsCollection.removeFromEvery(r),this.resumeOperations()}},{key:"updateCache",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(r===!0||this.isBatched===!1&&n===!0)&&(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)}},{key:"cacheFromPhysicalToVisualIndexes",value:function(){var r=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(var n=0;n<r;n+=1){var o=this.getPhysicalFromVisualIndex(n);this.fromPhysicalToVisualIndexesCache.set(o,n)}}},{key:"cacheFromVisualToRenderableIndexes",value:function(){var r=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(var n=0;n<r;n+=1){var o=this.getPhysicalFromRenderableIndex(n),i=this.getVisualFromPhysicalIndex(o);this.fromVisualToRenderableIndexesCache.set(i,n)}}}]),e}();mt(BO,kr);var WI;function Eme(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Tme(e,t){return ze(t,function(r,n){pt(e[n])&&(e[n]=r)}),e}function YW(e){var t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/,r=t.exec(e);return r?"".concat(r[1].toLowerCase(),"-").concat(r[2].toUpperCase()):e}function GW(e){pe(e)&&RT(dt(WI||(WI=Eme(['Language with code "',`" was not found. You should register particular language
before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`],['Language with code "',`" was not found. You should register particular language\\x20
before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`])),e))}function Pme(e,t){var r=Array.isArray(e)&&Number.isInteger(t);return r?e[t]:e}var KW=en("phraseFormatters"),kme=KW.register,$me=KW.getValues;function Ame(e,t){kme(e,t)}function Ime(){return $me()}Ame("pluralize",Pme);var XW="ContextMenu:items",Ve=XW,ZT="".concat(Ve,".noItems"),Im="".concat(Ve,".insertRowAbove"),Mm="".concat(Ve,".insertRowBelow"),xm="".concat(Ve,".insertColumnOnTheLeft"),Dm="".concat(Ve,".insertColumnOnTheRight"),Nm="".concat(Ve,".removeRow"),Hm="".concat(Ve,".removeColumn"),Lm="".concat(Ve,".undo"),jm="".concat(Ve,".redo"),Bm="".concat(Ve,".readOnly"),Fm="".concat(Ve,".clearColumn"),Vm="".concat(Ve,".copy"),Wm="".concat(Ve,".copyWithHeaders"),Um="".concat(Ve,".copyWithGroupHeaders"),zm="".concat(Ve,".copyHeadersOnly"),Ym="".concat(Ve,".cut"),Gm="".concat(Ve,".freezeColumn"),Km="".concat(Ve,".unfreezeColumn"),Xm="".concat(Ve,".mergeCells"),qm="".concat(Ve,".unmergeCells"),Zm="".concat(Ve,".addComment"),Qm="".concat(Ve,".editComment"),Jm="".concat(Ve,".removeComment"),eb="".concat(Ve,".readOnlyComment"),tb="".concat(Ve,".align"),rb="".concat(Ve,".align.left"),nb="".concat(Ve,".align.center"),ob="".concat(Ve,".align.right"),ib="".concat(Ve,".align.justify"),ab="".concat(Ve,".align.top"),lb="".concat(Ve,".align.middle"),sb="".concat(Ve,".align.bottom"),ub="".concat(Ve,".borders"),fb="".concat(Ve,".borders.top"),cb="".concat(Ve,".borders.right"),hb="".concat(Ve,".borders.bottom"),db="".concat(Ve,".borders.left"),vb="".concat(Ve,".borders.remove"),yb="".concat(Ve,".nestedHeaders.insertChildRow"),pb="".concat(Ve,".nestedHeaders.detachFromParent"),gb="".concat(Ve,".hideColumn"),mb="".concat(Ve,".showColumn"),bb="".concat(Ve,".hideRow"),wb="".concat(Ve,".showRow"),br="Filters:",Dt="".concat(br,"conditions"),pv="".concat(Dt,".none"),Sb="".concat(Dt,".isEmpty"),Cb="".concat(Dt,".isNotEmpty"),_b="".concat(Dt,".isEqualTo"),Ob="".concat(Dt,".isNotEqualTo"),Rb="".concat(Dt,".beginsWith"),Eb="".concat(Dt,".endsWith"),Tb="".concat(Dt,".contains"),Pb="".concat(Dt,".doesNotContain"),Mme="".concat(Dt,".byValue"),kb="".concat(Dt,".greaterThan"),$b="".concat(Dt,".greaterThanOrEqualTo"),Ab="".concat(Dt,".lessThan"),Ib="".concat(Dt,".lessThanOrEqualTo"),Mb="".concat(Dt,".isBetween"),xb="".concat(Dt,".isNotBetween"),Db="".concat(Dt,".after"),Nb="".concat(Dt,".before"),Hb="".concat(Dt,".today"),Lb="".concat(Dt,".tomorrow"),jb="".concat(Dt,".yesterday"),Bb="".concat(br,"labels.filterByCondition"),Fb="".concat(br,"labels.filterByValue"),Vb="".concat(br,"labels.conjunction"),gv="".concat(br,"labels.disjunction"),wh="".concat(br,"values.blankCells"),Wb="".concat(br,"buttons.selectAll"),Ub="".concat(br,"buttons.clear"),zb="".concat(br,"buttons.ok"),Yb="".concat(br,"buttons.cancel"),Gb="".concat(br,"buttons.placeholder.search"),Kb="".concat(br,"buttons.placeholder.value"),Xb="".concat(br,"buttons.placeholder.secondValue");const xme=Object.freeze(Object.defineProperty({__proto__:null,CONTEXTMENU_ITEMS_ADD_COMMENT:Zm,CONTEXTMENU_ITEMS_ALIGNMENT:tb,CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM:sb,CONTEXTMENU_ITEMS_ALIGNMENT_CENTER:nb,CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY:ib,CONTEXTMENU_ITEMS_ALIGNMENT_LEFT:rb,CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE:lb,CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT:ob,CONTEXTMENU_ITEMS_ALIGNMENT_TOP:ab,CONTEXTMENU_ITEMS_BORDERS:ub,CONTEXTMENU_ITEMS_BORDERS_BOTTOM:hb,CONTEXTMENU_ITEMS_BORDERS_LEFT:db,CONTEXTMENU_ITEMS_BORDERS_RIGHT:cb,CONTEXTMENU_ITEMS_BORDERS_TOP:fb,CONTEXTMENU_ITEMS_CLEAR_COLUMN:Fm,CONTEXTMENU_ITEMS_COPY:Vm,CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY:zm,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS:Um,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS:Wm,CONTEXTMENU_ITEMS_CUT:Ym,CONTEXTMENU_ITEMS_EDIT_COMMENT:Qm,CONTEXTMENU_ITEMS_FREEZE_COLUMN:Gm,CONTEXTMENU_ITEMS_HIDE_COLUMN:gb,CONTEXTMENU_ITEMS_HIDE_ROW:bb,CONTEXTMENU_ITEMS_INSERT_LEFT:xm,CONTEXTMENU_ITEMS_INSERT_RIGHT:Dm,CONTEXTMENU_ITEMS_MERGE_CELLS:Xm,CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD:pb,CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD:yb,CONTEXTMENU_ITEMS_NO_ITEMS:ZT,CONTEXTMENU_ITEMS_READ_ONLY:Bm,CONTEXTMENU_ITEMS_READ_ONLY_COMMENT:eb,CONTEXTMENU_ITEMS_REDO:jm,CONTEXTMENU_ITEMS_REMOVE_BORDERS:vb,CONTEXTMENU_ITEMS_REMOVE_COLUMN:Hm,CONTEXTMENU_ITEMS_REMOVE_COMMENT:Jm,CONTEXTMENU_ITEMS_REMOVE_ROW:Nm,CONTEXTMENU_ITEMS_ROW_ABOVE:Im,CONTEXTMENU_ITEMS_ROW_BELOW:Mm,CONTEXTMENU_ITEMS_SHOW_COLUMN:mb,CONTEXTMENU_ITEMS_SHOW_ROW:wb,CONTEXTMENU_ITEMS_UNDO:Lm,CONTEXTMENU_ITEMS_UNFREEZE_COLUMN:Km,CONTEXTMENU_ITEMS_UNMERGE_CELLS:qm,CONTEXT_MENU_ITEMS_NAMESPACE:XW,FILTERS_BUTTONS_CANCEL:Yb,FILTERS_BUTTONS_CLEAR:Ub,FILTERS_BUTTONS_OK:zb,FILTERS_BUTTONS_PLACEHOLDER_SEARCH:Gb,FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE:Xb,FILTERS_BUTTONS_PLACEHOLDER_VALUE:Kb,FILTERS_BUTTONS_SELECT_ALL:Wb,FILTERS_CONDITIONS_AFTER:Db,FILTERS_CONDITIONS_BEFORE:Nb,FILTERS_CONDITIONS_BEGINS_WITH:Rb,FILTERS_CONDITIONS_BETWEEN:Mb,FILTERS_CONDITIONS_BY_VALUE:Mme,FILTERS_CONDITIONS_CONTAINS:Tb,FILTERS_CONDITIONS_EMPTY:Sb,FILTERS_CONDITIONS_ENDS_WITH:Eb,FILTERS_CONDITIONS_EQUAL:_b,FILTERS_CONDITIONS_GREATER_THAN:kb,FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL:$b,FILTERS_CONDITIONS_LESS_THAN:Ab,FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL:Ib,FILTERS_CONDITIONS_NAMESPACE:Dt,FILTERS_CONDITIONS_NONE:pv,FILTERS_CONDITIONS_NOT_BETWEEN:xb,FILTERS_CONDITIONS_NOT_CONTAIN:Pb,FILTERS_CONDITIONS_NOT_EMPTY:Cb,FILTERS_CONDITIONS_NOT_EQUAL:Ob,FILTERS_CONDITIONS_TODAY:Hb,FILTERS_CONDITIONS_TOMORROW:Lb,FILTERS_CONDITIONS_YESTERDAY:jb,FILTERS_DIVS_FILTER_BY_CONDITION:Bb,FILTERS_DIVS_FILTER_BY_VALUE:Fb,FILTERS_LABELS_CONJUNCTION:Vb,FILTERS_LABELS_DISJUNCTION:gv,FILTERS_NAMESPACE:br,FILTERS_VALUES_BLANK_CELLS:wh},Symbol.toStringTag,{value:"Module"}));function Sh(e){return Sh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sh(e)}var se;function fe(e,t,r){return t=Dme(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dme(e){var t=Nme(e,"string");return Sh(t)==="symbol"?t:String(t)}function Nme(e,t){if(Sh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Sh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Hme=(se={languageCode:"en-US"},fe(se,ZT,"No available options"),fe(se,Im,"Insert row above"),fe(se,Mm,"Insert row below"),fe(se,xm,"Insert column left"),fe(se,Dm,"Insert column right"),fe(se,Nm,["Remove row","Remove rows"]),fe(se,Hm,["Remove column","Remove columns"]),fe(se,Lm,"Undo"),fe(se,jm,"Redo"),fe(se,Bm,"Read only"),fe(se,Fm,"Clear column"),fe(se,tb,"Alignment"),fe(se,rb,"Left"),fe(se,nb,"Center"),fe(se,ob,"Right"),fe(se,ib,"Justify"),fe(se,ab,"Top"),fe(se,lb,"Middle"),fe(se,sb,"Bottom"),fe(se,Gm,"Freeze column"),fe(se,Km,"Unfreeze column"),fe(se,ub,"Borders"),fe(se,fb,"Top"),fe(se,cb,"Right"),fe(se,hb,"Bottom"),fe(se,db,"Left"),fe(se,vb,"Remove border(s)"),fe(se,Zm,"Add comment"),fe(se,Qm,"Edit comment"),fe(se,Jm,"Delete comment"),fe(se,eb,"Read-only comment"),fe(se,Xm,"Merge cells"),fe(se,qm,"Unmerge cells"),fe(se,Vm,"Copy"),fe(se,Wm,["Copy with header","Copy with headers"]),fe(se,Um,["Copy with group header","Copy with group headers"]),fe(se,zm,["Copy header only","Copy headers only"]),fe(se,Ym,"Cut"),fe(se,yb,"Insert child row"),fe(se,pb,"Detach from parent"),fe(se,gb,["Hide column","Hide columns"]),fe(se,mb,["Show column","Show columns"]),fe(se,bb,["Hide row","Hide rows"]),fe(se,wb,["Show row","Show rows"]),fe(se,pv,"None"),fe(se,Sb,"Is empty"),fe(se,Cb,"Is not empty"),fe(se,_b,"Is equal to"),fe(se,Ob,"Is not equal to"),fe(se,Rb,"Begins with"),fe(se,Eb,"Ends with"),fe(se,Tb,"Contains"),fe(se,Pb,"Does not contain"),fe(se,kb,"Greater than"),fe(se,$b,"Greater than or equal to"),fe(se,Ab,"Less than"),fe(se,Ib,"Less than or equal to"),fe(se,Mb,"Is between"),fe(se,xb,"Is not between"),fe(se,Db,"After"),fe(se,Nb,"Before"),fe(se,Hb,"Today"),fe(se,Lb,"Tomorrow"),fe(se,jb,"Yesterday"),fe(se,wh,"Blank cells"),fe(se,Bb,"Filter by condition"),fe(se,Fb,"Filter by value"),fe(se,Vb,"And"),fe(se,gv,"Or"),fe(se,Wb,"Select all"),fe(se,Ub,"Clear"),fe(se,zb,"OK"),fe(se,Yb,"Cancel"),fe(se,Gb,"Search"),fe(se,Kb,"Value"),fe(se,Xb,"Second value"),se);const qW=Hme;var FO=qW.languageCode,qb=en("languagesDictionaries"),Lme=qb.register,ZW=qb.getItem,jme=qb.hasItem,Bme=qb.getValues;QT(qW);function QT(e,t){var r=e,n=t;return Ue(e)&&(n=e,r=n.languageCode),Fme(r,n),Lme(r,ar(n)),ar(n)}function Fme(e,t){e!==FO&&Tme(t,ZW(FO))}function QW(e){return JT(e)?ar(ZW(e)):null}function JT(e){return jme(e)}function Vme(){return Bme()}function JW(e,t,r){var n=QW(e);if(n===null)return null;var o=n[t];if(pt(o))return null;var i=Wme(o,r);return Array.isArray(i)?i[0]:i}function Wme(e,t){var r=e;return $(Ime(),function(n){r=n(e,t)}),r}function Ume(e){var t=YW(e);return JT(t)||(t=FO,GW(e)),t}var zme=xe,Yme=Ut,Gme=qL,Kme=Fr,Xme=Hn,qme=hf;zme({target:"Object",stat:!0,sham:!Yme},{getOwnPropertyDescriptors:function(t){for(var r=Kme(t),n=Xme.f,o=Gme(r),i={},a=0,l,s;o.length>a;)s=n(r,l=o[a++]),s!==void 0&&qme(i,l,s);return i}});var Zb="active-header",Qb="area",Ch="cell",eP="fill",mv="header",tP="custom-selection";function xs(e){return xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xs(e)}function Zme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UI(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,t2(n.key),n)}}function Qme(e,t,r){return t&&UI(e.prototype,t),r&&UI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ep(){return typeof Reflect<"u"&&Reflect.get?ep=Reflect.get.bind():ep=function(t,r,n){var o=Jme(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ep.apply(this,arguments)}function Jme(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ds(e),e!==null););return e}function ebe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&VO(e,t)}function VO(e,t){return VO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},VO(e,t)}function tbe(e){var t=nbe();return function(){var n=Ds(e),o;if(t){var i=Ds(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return rbe(this,o)}}function rbe(e,t){if(t&&(xs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e2(e)}function e2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nbe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ds(e){return Ds=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ds(e)}function obe(e,t,r){return t=t2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t2(e){var t=ibe(e,"string");return xs(t)==="symbol"?t:String(t)}function ibe(e,t){if(xs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var abe=function(e){ebe(r,e);var t=tbe(r);function r(n,o){var i;return Zme(this,r),i=t.call(this,n,null),obe(e2(i),"visualCellRange",null),i.visualCellRange=o||null,i.commit(),i}return Qme(r,[{key:"add",value:function(o){return this.visualCellRange===null?this.visualCellRange=this.settings.createCellRange(o):this.visualCellRange.expand(o),this}},{key:"clear",value:function(){return this.visualCellRange=null,ep(Ds(r.prototype),"clear",this).call(this)}},{key:"trimToVisibleCellsRangeOnly",value:function(o){var i=o.from,a=o.to,l=this.getNearestNotHiddenCoords(i,1),s=this.getNearestNotHiddenCoords(a,-1);if(l===null||s===null)return null;if(l.row>s.row||l.col>s.col){var u=this.settings.type==="header"||this.settings.type==="active-header";if(!u)return null;l=i,s=a}return this.settings.createCellRange(l,l,s)}},{key:"getNearestNotHiddenCoords",value:function(o,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:i,l=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper(),o.row,i);if(l===null)return null;var s=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper(),o.col,a);return s===null?null:this.settings.createCellCoords(l,s)}},{key:"getNearestNotHiddenIndex",value:function(o,i,a){if(i<0)return i;var l=o.getNearestNotHiddenIndex(i,a),s=this.settings.type==="header"||this.settings.type==="active-header";return s&&l===null?-1:l}},{key:"commit",value:function(){if(this.visualCellRange===null)return this;var o=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return o===null?this.cellRange=null:this.cellRange=this.createRenderableCellRange(o.from,o.to),this}},{key:"syncWith",value:function(o){var i=o.getVerticalDirection()==="N-S"?1:-1,a=o.getHorizontalDirection()==="W-E"?1:-1,l=this.getNearestNotHiddenCoords(o.from.clone().normalize(),i,a);if(l!==null&&o.overlaps(l)){if(this.cellRange===null){var s=this.settings.visualToRenderableCoords(l);this.cellRange=this.settings.createCellRange(s)}return o.setHighlight(l),this}return o.setHighlight(o.from),this}},{key:"getCorners",value:function(){var o=this.cellRange,i=o.from,a=o.to,l=i.row===null||a.row===null,s=i.col===null||a.col===null,u=this.settings.createCellCoords(l?null:Math.min(i.row,a.row),s?null:Math.min(i.col,a.col)),f=this.settings.createCellCoords(l?null:Math.max(i.row,a.row),s?null:Math.max(i.col,a.col));return[u.row,u.col,f.row,f.col]}},{key:"getVisualCorners",value:function(){var o=this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner()),i=this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());return[o.row,o.col,i.row,i.col]}},{key:"createRenderableCellRange",value:function(o,i){var a=this.settings.visualToRenderableCoords(o),l=this.settings.visualToRenderableCoords(i);return this.settings.createCellRange(a,a,l)}}]),r}(jye);const bf=abe;function _h(e){return _h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_h(e)}var lbe=["activeHeaderClassName"];function zI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function YI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zI(Object(r),!0).forEach(function(n){sbe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sbe(e,t,r){return t=ube(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ube(e){var t=fbe(e,"string");return _h(t)==="symbol"?t:String(t)}function fbe(e,t){if(_h(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_h(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cbe(e,t){if(e==null)return{};var r=hbe(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hbe(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function dbe(e){var t=e.activeHeaderClassName,r=cbe(e,lbe),n=new bf(YI(YI({highlightHeaderClassName:t},r),{},{selectionType:Zb}));return n}function Oh(e){return Oh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oh(e)}var vbe=["layerLevel","areaCornerVisible"];function GI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function KI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GI(Object(r),!0).forEach(function(n){ybe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ybe(e,t,r){return t=pbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pbe(e){var t=gbe(e,"string");return Oh(t)==="symbol"?t:String(t)}function gbe(e,t){if(Oh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Oh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mbe(e,t){if(e==null)return{};var r=bbe(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bbe(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function wbe(e){var t=e.layerLevel,r=e.areaCornerVisible,n=mbe(e,vbe),o=new bf(KI(KI({className:"area",markIntersections:!0,layerLevel:Math.min(t,7),border:{width:1,color:"#4b89ff",cornerVisible:r}},n),{},{selectionType:Qb}));return o}function Rh(e){return Rh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rh(e)}var Sbe=["cellCornerVisible"];function XI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function qI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XI(Object(r),!0).forEach(function(n){Cbe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cbe(e,t,r){return t=_be(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _be(e){var t=Obe(e,"string");return Rh(t)==="symbol"?t:String(t)}function Obe(e,t){if(Rh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Rh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rbe(e,t){if(e==null)return{};var r=Ebe(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ebe(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Tbe(e){var t=e.cellCornerVisible,r=Rbe(e,Sbe),n=new bf(qI(qI({className:"current",border:{width:2,color:"#4b89ff",cornerVisible:t}},r),{},{selectionType:Ch}));return n}function Eh(e){return Eh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eh(e)}var Pbe=["border","visualCellRange"];function ZI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function BS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZI(Object(r),!0).forEach(function(n){kbe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kbe(e,t,r){return t=$be(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $be(e){var t=Abe(e,"string");return Eh(t)==="symbol"?t:String(t)}function Abe(e,t){if(Eh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Eh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ibe(e,t){if(e==null)return{};var r=Mbe(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Mbe(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function xbe(e){var t=e.border,r=e.visualCellRange,n=Ibe(e,Pbe),o=new bf(BS(BS(BS({},t),n),{},{selectionType:tP}),r);return o}var QI=Ut,Dbe=Ye,Nbe=Xt,Hbe=Fe,FS=Ud,Lbe=Vd,jbe=xd,Bbe=Pr,Fbe=Nd,sl=Object.assign,JI=Object.defineProperty,Vbe=Dbe([].concat),Wbe=!sl||Hbe(function(){if(QI&&sl({b:1},sl(JI({},"a",{enumerable:!0,get:function(){JI(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(o){t[o]=o}),sl({},e)[r]!=7||FS(sl({},t)).join("")!=n})?function(t,r){for(var n=Bbe(t),o=arguments.length,i=1,a=Lbe.f,l=jbe.f;o>i;)for(var s=Fbe(arguments[i++]),u=a?Vbe(FS(s),a(s)):FS(s),f=u.length,c=0,h;f>c;)h=u[c++],(!QI||Nbe(l,s,h))&&(n[h]=s[h]);return n}:sl,Ube=xe,eM=Wbe;Ube({target:"Object",stat:!0,arity:2,forced:Object.assign!==eM},{assign:eM});function Th(e){return Th=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Th(e)}function tM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tM(Object(r),!0).forEach(function(n){zbe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zbe(e,t,r){return t=Ybe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ybe(e){var t=Gbe(e,"string");return Th(t)==="symbol"?t:String(t)}function Gbe(e,t){if(Th(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Th(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kbe(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function Xbe(e){var t=Object.assign({},(Kbe(e),e)),r=new bf(rM(rM({className:"fill",border:{width:1,color:"#ff0000"}},t),{},{selectionType:eP}));return r}function Ph(e){return Ph=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ph(e)}var qbe=["headerClassName","rowClassName","columnClassName"];function nM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nM(Object(r),!0).forEach(function(n){Zbe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zbe(e,t,r){return t=Qbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qbe(e){var t=Jbe(e,"string");return Ph(t)==="symbol"?t:String(t)}function Jbe(e,t){if(Ph(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ph(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ewe(e,t){if(e==null)return{};var r=twe(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function twe(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function rwe(e){var t=e.headerClassName,r=e.rowClassName,n=e.columnClassName,o=ewe(e,qbe),i=new bf(oM(oM({className:"highlight",highlightHeaderClassName:t,highlightRowClassName:r,highlightColumnClassName:n},o),{},{highlightOnlyClosestHeader:!0,selectionType:mv}));return i}function kh(e){return kh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kh(e)}function iM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function nwe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iM(Object(r),!0).forEach(function(n){owe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function owe(e,t,r){return t=iwe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iwe(e){var t=awe(e,"string");return kh(t)==="symbol"?t:String(t)}function awe(e,t){if(kh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(kh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var r2=en("highlight/types"),wf=r2.register,lwe=r2.getItem;wf(Zb,dbe);wf(Qb,wbe);wf(Ch,Tbe);wf(tP,xbe);wf(eP,Xbe);wf(mv,rwe);function ul(e,t){return lwe(e)(nwe({type:e},t))}function $h(e){return $h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$h(e)}function Wo(e){return cwe(e)||fwe(e)||uwe(e)||swe()}function swe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uwe(e,t){if(e){if(typeof e=="string")return WO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return WO(e,t)}}function fwe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cwe(e){if(Array.isArray(e))return WO(e)}function WO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function aM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function jf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aM(Object(r),!0).forEach(function(n){hwe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hwe(e,t,r){return t=n2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lM(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,n2(n.key),n)}}function vwe(e,t,r){return t&&lM(e.prototype,t),r&&lM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function n2(e){var t=ywe(e,"string");return $h(t)==="symbol"?t:String(t)}function ywe(e,t){if($h(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if($h(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pwe=function(e){function t(r){dwe(this,t),this.options=r,this.layerLevel=0,this.cell=ul(Ch,r),this.fill=ul(eP,r),this.areas=new Map,this.headers=new Map,this.activeHeaders=new Map,this.customSelections=[]}return vwe(t,[{key:"isEnabledFor",value:function(n,o){var i=n;n===Ch&&(i="current");var a=this.options.disabledCellSelection(o.row,o.col);return typeof a=="string"&&(a=[a]),a===!1||Array.isArray(a)&&!a.includes(i)}},{key:"useLayerLevel",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.layerLevel=n,this}},{key:"getCell",value:function(){return this.cell}},{key:"getFill",value:function(){return this.fill}},{key:"createOrGetArea",value:function(){var n=this.layerLevel,o;return this.areas.has(n)?o=this.areas.get(n):(o=ul(Qb,jf({layerLevel:n},this.options)),this.areas.set(n,o)),o}},{key:"getAreas",value:function(){return Wo(this.areas.values())}},{key:"createOrGetHeader",value:function(){var n=this.layerLevel,o;return this.headers.has(n)?o=this.headers.get(n):(o=ul(mv,jf({},this.options)),this.headers.set(n,o)),o}},{key:"getHeaders",value:function(){return Wo(this.headers.values())}},{key:"createOrGetActiveHeader",value:function(){var n=this.layerLevel,o;return this.activeHeaders.has(n)?o=this.activeHeaders.get(n):(o=ul(Zb,jf({},this.options)),this.activeHeaders.set(n,o)),o}},{key:"getActiveHeaders",value:function(){return Wo(this.activeHeaders.values())}},{key:"getCustomSelections",value:function(){return Wo(this.customSelections.values())}},{key:"addCustomSelection",value:function(n){this.customSelections.push(ul(tP,jf(jf({},this.options),n)))}},{key:"clear",value:function(){this.cell.clear(),this.fill.clear(),$(this.areas.values(),function(n){return void n.clear()}),$(this.headers.values(),function(n){return void n.clear()}),$(this.activeHeaders.values(),function(n){return void n.clear()})}},{key:e,value:function(){return[this.cell,this.fill].concat(Wo(this.areas.values()),Wo(this.headers.values()),Wo(this.activeHeaders.values()),Wo(this.customSelections))[Symbol.iterator]()}}]),t}(Symbol.iterator);const gwe=pwe;function Ah(e){return Ah=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ah(e)}function mwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sM(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,wwe(n.key),n)}}function bwe(e,t,r){return t&&sM(e.prototype,t),r&&sM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function wwe(e){var t=Swe(e,"string");return Ah(t)==="symbol"?t:String(t)}function Swe(e,t){if(Ah(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ah(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cwe=function(e){function t(r){mwe(this,t),this.ranges=[],this.createCellRange=r}return bwe(t,[{key:"isEmpty",value:function(){return this.size()===0}},{key:"set",value:function(n){return this.clear(),this.ranges.push(this.createCellRange(n)),this}},{key:"add",value:function(n){return this.ranges.push(this.createCellRange(n)),this}},{key:"pop",value:function(){return this.ranges.pop(),this}},{key:"current",value:function(){return this.peekByIndex(0)}},{key:"previous",value:function(){return this.peekByIndex(-1)}},{key:"includes",value:function(n){return this.ranges.some(function(o){return o.includes(n)})}},{key:"clear",value:function(){return this.ranges.length=0,this}},{key:"size",value:function(){return this.ranges.length}},{key:"peekByIndex",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,o=this.size()+n-1,i;return o>=0&&(i=this.ranges[o]),i}},{key:e,value:function(){return this.ranges[Symbol.iterator]()}}]),t}(Symbol.iterator);const _we=Cwe;function Ih(e){return Ih=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ih(e)}function Owe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uM(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,Ewe(n.key),n)}}function Rwe(e,t,r){return t&&uM(e.prototype,t),r&&uM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ewe(e){var t=Twe(e,"string");return Ih(t)==="symbol"?t:String(t)}function Twe(e,t){if(Ih(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ih(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var o2=function(){function e(t,r){Owe(this,e),this.range=t,this.options=r}return Rwe(e,[{key:"transformStart",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.options.createCellCoords(r,n),a=this.range.current().highlight,l=this.options.visualToRenderableCoords(a),s=l.row,u=l.col,f=a,c=0,h=0;if(this.runLocalHooks("beforeTransformStart",i),s!==null&&u!==null){var d=this.options.countRows(),v=this.options.countCols(),p=this.options.fixedRowsBottom(),m=this.options.minSpareRows(),w=this.options.minSpareCols(),S=this.options.autoWrapRow(),C=this.options.autoWrapCol();s+r>d-1?o&&m>0&&!(p&&s>=d-p-1)?(this.runLocalHooks("insertRowRequire",d),d=this.options.countRows()):C&&(i.row=1-d,i.col=u+i.col===v-1?1-v:1):C&&s+i.row<0&&u+i.col>=0&&(i.row=d-1,i.col=u+i.col===0?v-1:-1),u+i.col>v-1?o&&w>0?(this.runLocalHooks("insertColRequire",v),v=this.options.countCols()):S&&(i.row=s+i.row===d-1?1-d:1,i.col=1-v):S&&u+i.col<0&&s+i.row>=0&&(i.row=s+i.row===0?d-1:-1,i.col=v-1);var P=this.options.createCellCoords(s+i.row,u+i.col);c=0,h=0,P.row<0?(c=-1,P.row=0):P.row>0&&P.row>=d&&(c=1,P.row=d-1),P.col<0?(h=-1,P.col=0):P.col>0&&P.col>=v&&(h=1,P.col=v-1),f=this.options.renderableToVisualCoords(P)}return this.runLocalHooks("afterTransformStart",f,c,h),f}},{key:"transformEnd",value:function(r,n){var o=this.options.createCellCoords(r,n),i=this.range.current(),a=i.to,l=0,s=0;this.runLocalHooks("beforeTransformEnd",o);var u=this.options.visualToRenderableCoords(i.highlight),f=u.row,c=u.col;if(f!==null&&c!==null){var h=this.options.countRows(),d=this.options.countCols(),v=this.options.visualToRenderableCoords(i.to),p=v.row,m=v.col,w=this.options.createCellCoords(p+o.row,m+o.col);l=0,s=0,w.row<0?(l=-1,w.row=0):w.row>0&&w.row>=h&&(l=1,w.row=h-1),w.col<0?(s=-1,w.col=0):w.col>0&&w.col>=d&&(s=1,w.col=d-1),a=this.options.renderableToVisualCoords(w)}return this.runLocalHooks("afterTransformEnd",a,l,s),a}}]),e}();mt(o2,kr);const Pwe=o2;function i2(e,t){return Iwe(e)||Awe(e,t)||$we(e,t)||kwe()}function kwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $we(e,t){if(e){if(typeof e=="string")return fM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fM(e,t)}}function fM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Awe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function Iwe(e){if(Array.isArray(e))return e}function UO(e){return UO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},UO(e)}var Jb=0,ew=1,a2=2,rP=3,Mwe=[rP,a2],xwe=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],VS=Symbol("root"),cM=Symbol("child");function Ns(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:VS;if(t!==VS&&t!==cM)throw new Error("The second argument is used internally only and cannot be overwritten.");var r=Array.isArray(e),n=t===VS,o=Jb;if(r){var i=e[0];if(e.length===0)o=ew;else if(n&&i instanceof IT)o=rP;else if(n&&Array.isArray(i))o=Ns(i,cM);else if(e.length>=2&&e.length<=4){var a=!e.some(function(l,s){return!xwe[s].includes(UO(l))});a&&(o=a2)}}return o}function Mh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.keepDirection,n=r===void 0?!1:r,o=t.propToCol;if(!Mwe.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(i){var a=e===rP,l=a?i.from.row:i[0],s=a?i.from.col:i[1],u=a?i.to.row:i[2],f=a?i.to.col:i[3];if(typeof o=="function"&&(typeof s=="string"&&(s=o(s)),typeof f=="string"&&(f=o(f))),pt(u)&&(u=l),pt(f)&&(f=s),!n){var c=l,h=s,d=u,v=f;l=Math.min(c,d),s=Math.min(h,v),u=Math.max(c,d),f=Math.max(h,v)}return[l,s,u,f]}}function Dwe(e){var t=Ns(e);if(t===Jb||t===ew)return[];var r=Mh(t),n=new Set;$(e,function(a){var l=r(a),s=i2(l,4),u=s[1],f=s[3],c=Math.max(u,0),h=f-c+1;$(Array.from(new Array(h),function(d,v){return c+v}),function(d){n.has(d)||n.add(d)})});var o=Array.from(n).sort(function(a,l){return a-l}),i=Lt(o,function(a,l,s,u){return s!==0&&l===u[s-1]+1?a[a.length-1][1]+=1:a.push([l,1]),a},[]);return i}function Nwe(e){var t=Ns(e);if(t===Jb||t===ew)return[];var r=Mh(t),n=new Set;$(e,function(a){var l=r(a),s=i2(l,3),u=s[0],f=s[2],c=Math.max(u,0),h=f-c+1;$(Array.from(new Array(h),function(d,v){return c+v}),function(d){n.has(d)||n.add(d)})});var o=Array.from(n).sort(function(a,l){return a-l}),i=Lt(o,function(a,l,s,u){return s!==0&&l===u[s-1]+1?a[a.length-1][1]+=1:a.push([l,1]),a},[]);return i}function Uo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0;return typeof e=="number"&&e>=0&&e<t}function xh(e){return xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xh(e)}var hM;function dM(e,t){return Bwe(e)||jwe(e,t)||Lwe(e,t)||Hwe()}function Hwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lwe(e,t){if(e){if(typeof e=="string")return vM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vM(e,t)}}function vM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jwe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function Bwe(e){if(Array.isArray(e))return e}function Fwe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Vwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yM(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,Uwe(n.key),n)}}function Wwe(e,t,r){return t&&yM(e.prototype,t),r&&yM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uwe(e){var t=zwe(e,"string");return xh(t)==="symbol"?t:String(t)}function zwe(e,t){if(xh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l2=function(){function e(t,r){var n=this;Vwe(this,e),this.settings=t,this.tableProps=r,this.inProgress=!1,this.selectedByCorner=!1,this.selectedByRowHeader=new Set,this.selectedByColumnHeader=new Set,this.selectedRange=new _we(function(o,i,a){return n.tableProps.createCellRange(o,i,a)}),this.highlight=new gwe({headerClassName:t.currentHeaderClassName,activeHeaderClassName:t.activeHeaderClassName,rowClassName:t.currentRowClassName,columnClassName:t.currentColClassName,disabledCellSelection:function(i,a){return n.tableProps.isDisabledCellSelection(i,a)},cellCornerVisible:function(){return n.isCellCornerVisible.apply(n,arguments)},areaCornerVisible:function(){return n.isAreaCornerVisible.apply(n,arguments)},visualToRenderableCoords:function(i){return n.tableProps.visualToRenderableCoords(i)},renderableToVisualCoords:function(i){return n.tableProps.renderableToVisualCoords(i)},createCellCoords:function(i,a){return n.tableProps.createCellCoords(i,a)},createCellRange:function(i,a,l){return n.tableProps.createCellRange(i,a,l)},rowIndexMapper:function(){return n.tableProps.rowIndexMapper()},columnIndexMapper:function(){return n.tableProps.columnIndexMapper()}}),this.transformation=new Pwe(this.selectedRange,{countRows:function(){return n.tableProps.countRowsTranslated()},countCols:function(){return n.tableProps.countColsTranslated()},visualToRenderableCoords:function(i){return n.tableProps.visualToRenderableCoords(i)},renderableToVisualCoords:function(i){return n.tableProps.renderableToVisualCoords(i)},createCellCoords:function(i,a){return n.tableProps.createCellCoords(i,a)},fixedRowsBottom:function(){return t.fixedRowsBottom},minSpareRows:function(){return t.minSpareRows},minSpareCols:function(){return t.minSpareCols},autoWrapRow:function(){return t.autoWrapRow},autoWrapCol:function(){return t.autoWrapCol}}),this.transformation.addLocalHook("beforeTransformStart",function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n.runLocalHooks.apply(n,["beforeModifyTransformStart"].concat(i))}),this.transformation.addLocalHook("afterTransformStart",function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n.runLocalHooks.apply(n,["afterModifyTransformStart"].concat(i))}),this.transformation.addLocalHook("beforeTransformEnd",function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n.runLocalHooks.apply(n,["beforeModifyTransformEnd"].concat(i))}),this.transformation.addLocalHook("afterTransformEnd",function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n.runLocalHooks.apply(n,["afterModifyTransformEnd"].concat(i))}),this.transformation.addLocalHook("insertRowRequire",function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n.runLocalHooks.apply(n,["insertRowRequire"].concat(i))}),this.transformation.addLocalHook("insertColRequire",function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n.runLocalHooks.apply(n,["insertColRequire"].concat(i))})}return Wwe(e,[{key:"getSelectedRange",value:function(){return this.selectedRange}},{key:"begin",value:function(){this.inProgress=!0}},{key:"finish",value:function(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1}},{key:"isInProgress",value:function(){return this.inProgress}},{key:"setRangeStart",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.settings.selectionMode==="multiple",a=pt(n)?this.tableProps.getShortcutManager().isCtrlPressed():n,l=r.row<0,s=r.col<0,u=l&&s,f=r.clone();this.selectedByCorner=u,this.runLocalHooks("beforeSetRangeStart".concat(o?"Only":""),f),(!i||i&&!a&&pt(n))&&this.selectedRange.clear(),this.selectedRange.add(f),this.getLayerLevel()===0&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),!u&&s&&this.selectedByRowHeader.add(this.getLayerLevel()),!u&&l&&this.selectedByColumnHeader.add(this.getLayerLevel()),o||this.setRangeEnd(r)}},{key:"setRangeStartOnly",value:function(r,n){this.setRangeStart(r,n,!0)}},{key:"setRangeEnd",value:function(r){if(!this.selectedRange.isEmpty()){var n=r.clone();this.runLocalHooks("beforeSetRangeEnd",n),this.begin();var o=this.selectedRange.current();this.settings.selectionMode!=="single"&&o.setTo(this.tableProps.createCellCoords(n.row,n.col)),this.highlight.getCell().clear(),this.highlight.isEnabledFor(Ch,o.highlight)&&this.highlight.getCell().add(this.selectedRange.current().highlight).commit().syncWith(o);var i=this.getLayerLevel();i<this.highlight.layerLevel&&($(this.highlight.getAreas(),function(p){return void p.clear()}),$(this.highlight.getHeaders(),function(p){return void p.clear()}),$(this.highlight.getActiveHeaders(),function(p){return void p.clear()})),this.highlight.useLayerLevel(i);var a=this.highlight.createOrGetArea(),l=this.highlight.createOrGetHeader(),s=this.highlight.createOrGetActiveHeader();if(a.clear(),l.clear(),s.clear(),this.highlight.isEnabledFor(Qb,o.highlight)&&(this.isMultiple()||i>=1)&&(a.add(o.from).add(o.to).commit(),i===1)){var u=this.selectedRange.previous();this.highlight.useLayerLevel(i-1).createOrGetArea().add(u.from).commit().syncWith(u),this.highlight.useLayerLevel(i)}if(this.highlight.isEnabledFor(mv,o.highlight)){var f=this.tableProps.countRowsTranslated()===0,c=this.tableProps.countColsTranslated()===0,h=o;if((f||c)&&(h=o.clone()),f&&(h.from.row=-1),c&&(h.from.col=-1),this.settings.selectionMode==="single"?(this.isSelectedByAnyHeader()&&h.from.normalize(),l.add(h.from).commit()):l.add(h.from).add(h.to).commit(),this.isEntireRowSelected()){var d=this.tableProps.countCols()===o.getWidth();d&&s.add(this.tableProps.createCellCoords(o.from.row,-1)).add(this.tableProps.createCellCoords(o.to.row,-1)).commit()}if(this.isEntireColumnSelected()){var v=this.tableProps.countRows()===o.getHeight();v&&s.add(this.tableProps.createCellCoords(-1,o.from.col)).add(this.tableProps.createCellCoords(-1,o.to.col)).commit()}}this.runLocalHooks("afterSetRangeEnd",r)}}},{key:"isMultiple",value:function(){var r=Ta(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",r),r.value}},{key:"transformStart",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.setRangeStart(this.transformation.transformStart(r,n,o))}},{key:"transformEnd",value:function(r,n){this.setRangeEnd(this.transformation.transformEnd(r,n))}},{key:"getLayerLevel",value:function(){return this.selectedRange.size()-1}},{key:"isSelected",value:function(){return!this.selectedRange.isEmpty()}},{key:"isSelectedByRowHeader",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner(r)&&this.isEntireRowSelected(r)}},{key:"isEntireRowSelected",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getLayerLevel();return r===-1?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(r)}},{key:"isSelectedByColumnHeader",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner()&&this.isEntireColumnSelected(r)}},{key:"isEntireColumnSelected",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getLayerLevel();return r===-1?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(r)}},{key:"isSelectedByAnyHeader",value:function(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}},{key:"isSelectedByCorner",value:function(){return this.selectedByCorner}},{key:"inInSelection",value:function(r){return this.selectedRange.includes(r)}},{key:"isCellCornerVisible",value:function(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}},{key:"isAreaCornerVisible",value:function(r){return Number.isInteger(r)&&r!==this.getLayerLevel()?!1:this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple()}},{key:"clear",value:function(){this.selectedRange.clear(),this.highlight.clear()}},{key:"deselect",value:function(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}},{key:"selectAll",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o=this.tableProps.countRows(),i=this.tableProps.countCols();if(!(!r&&!n&&(o===0||i===0))){var a=this.tableProps.createCellCoords(n?-1:0,r?-1:0),l=this.tableProps.createCellCoords(o-1,i-1);this.clear(),this.setRangeStartOnly(a),this.selectedByRowHeader.add(this.getLayerLevel()),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(l),this.finish()}}},{key:"selectCells",value:function(r){var n=this,o=Ns(r);if(o===ew)return!1;if(o===Jb)throw new Error(dt(hM||(hM=Fwe([`Unsupported format of the selection ranges was passed. To select cells pass
the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,
columnEnd/columnPropEnd]]) or as an array of CellRange objects.`],[`Unsupported format of the selection ranges was passed. To select cells pass\\x20
the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\\x20
columnEnd/columnPropEnd]]) or as an array of CellRange objects.`]))));var i=Mh(o,{propToCol:function(f){return n.tableProps.propToCol(f)},keepDirection:!0}),a=this.tableProps.countRows(),l=this.tableProps.countCols(),s=!r.some(function(u){var f=i(u),c=dM(f,4),h=c[0],d=c[1],v=c[2],p=c[3],m=Uo(h,a)&&Uo(d,l)&&Uo(v,a)&&Uo(p,l);return!m});return s&&(this.clear(),$(r,function(u){var f=i(u),c=dM(f,4),h=c[0],d=c[1],v=c[2],p=c[3];n.setRangeStartOnly(n.tableProps.createCellCoords(h,d),!1),n.setRangeEnd(n.tableProps.createCellCoords(v,p)),n.finish()})),s}},{key:"selectColumns",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1,i=typeof r=="string"?this.tableProps.propToCol(r):r,a=typeof n=="string"?this.tableProps.propToCol(n):n,l=this.tableProps.countCols(),s=this.tableProps.countRows(),u=Uo(i,l)&&Uo(a,l);return u&&(this.setRangeStartOnly(this.tableProps.createCellCoords(o,i)),this.setRangeEnd(this.tableProps.createCellCoords(s-1,a)),this.finish()),u}},{key:"selectRows",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1,i=this.tableProps.countRows(),a=this.tableProps.countCols(),l=Uo(r,i)&&Uo(n,i);return l&&(this.setRangeStartOnly(this.tableProps.createCellCoords(r,o)),this.setRangeEnd(this.tableProps.createCellCoords(n,a-1)),this.finish()),l}},{key:"refresh",value:function(){var r=this.highlight.getCustomSelections();if(r.forEach(function(u){u.commit()}),!!this.isSelected()){var n=this.highlight.getCell(),o=this.getLayerLevel();n.commit().syncWith(this.selectedRange.current());for(var i=0;i<this.selectedRange.size();i+=1){this.highlight.useLayerLevel(i);var a=this.highlight.createOrGetArea(),l=this.highlight.createOrGetHeader(),s=this.highlight.createOrGetActiveHeader();a.commit(),l.commit(),s.commit()}this.highlight.useLayerLevel(o)}}}]),e}();mt(l2,kr);const Ywe=l2;var Gwe=xe,s2=Yd,Kwe=Hn.f,Xwe=Ua,pM=Yt,qwe=jE,Zwe=Tr,Qwe=BE,gM=s2("".startsWith),Jwe=s2("".slice),eSe=Math.min,u2=Qwe("startsWith"),tSe=!u2&&!!function(){var e=Kwe(String.prototype,"startsWith");return e&&!e.writable}();Gwe({target:"String",proto:!0,forced:!tSe&&!u2},{startsWith:function(t){var r=pM(Zwe(this));qwe(t);var n=Xwe(eSe(arguments.length>1?arguments[1]:void 0,r.length)),o=pM(t);return gM?gM(r,o,n):Jwe(r,n,n+o.length)===o}});var mM=/^(\r\n|\n\r|\r|\n)/,rSe=/^[^\t\r\n]+/,bM=/^\t/;function nSe(e){var t=[[""]];if(e.length===0)return t;for(var r=0,n=0,o;e.length>0&&o!==e.length;)if(o=e.length,e.match(bM))e=e.replace(bM,""),r+=1,t[n][r]="";else if(e.match(mM))e=e.replace(mM,""),r=0,n+=1,t[n]=[""];else{var i="";if(e.startsWith('"')){for(var a=0,l=!0;l;){var s=e.slice(0,1);s==='"'&&(a+=1),i+=s,e=e.slice(1),(e.length===0||e.match(/^[\t\r\n]/)&&a%2===0)&&(l=!1)}i=i.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,function(f){return new Array(Math.floor(f.length/2)).fill('"').join("")})}else{var u=e.match(rSe);i=u?u[0]:"",e=e.slice(i.length)}t[n][r]=i}return t}function bc(e){var t,r,n,o,i="",a;for(t=0,r=e.length;t<r;t+=1){for(o=e[t].length,n=0;n<o;n+=1)n>0&&(i+=" "),a=e[t][n],typeof a=="string"?a.indexOf(`
`)>-1?i+='"'.concat(a.replace(/"/g,'""'),'"'):i+=a:a==null?i+="":i+=a;t!==r-1&&(i+=`
`)}return i}function WS(e){return lSe(e)||aSe(e)||iSe(e)||oSe()}function oSe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iSe(e,t){if(e){if(typeof e=="string")return zO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zO(e,t)}}function aSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lSe(e){if(Array.isArray(e))return zO(e)}function zO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Hs(e){return Hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hs(e)}function sSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wM(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,fSe(n.key),n)}}function uSe(e,t,r){return t&&wM(e.prototype,t),r&&wM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function fSe(e){var t=cSe(e,"string");return Hs(t)==="symbol"?t:String(t)}function cSe(e,t){if(Hs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Hs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hSe=function(){function e(t,r,n){sSe(this,e),this.instance=t,this.metaManager=n,this.tableMeta=n.getTableMeta(),this.dataSource=r,this.duckSchema=this.createDuckSchema(),this.colToPropCache=void 0,this.propToColCache=void 0,this.createMap()}return uSe(e,[{key:"createMap",value:function(){var r=this.getSchema();if(typeof r>"u")throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");var n=this.tableMeta.columns,o;if(this.colToPropCache=[],this.propToColCache=new Map,n){var i=0,a=0,l=!1;if(typeof n=="function"){var s=fm(r);i=s>0?s:this.countFirstRowKeys(),l=!0}else{var u=this.tableMeta.maxCols;i=Math.min(u,n.length)}for(o=0;o<i;o++){var f=l?n(o):n[o];if(Ue(f)){if(typeof f.data<"u"){var c=l?a:o;this.colToPropCache[c]=f.data,this.propToColCache.set(f.data,c)}a+=1}}}else this.recursiveDuckColumns(r)}},{key:"countFirstRowKeys",value:function(){return UT(this.dataSource)}},{key:"recursiveDuckColumns",value:function(r,n,o){var i=this,a=n,l=o,s;return typeof a>"u"&&(a=0,l=""),Hs(r)==="object"&&!Array.isArray(r)&&ze(r,function(u,f){u===null?(s=l+f,i.colToPropCache.push(s),i.propToColCache.set(s,a),a+=1):a=i.recursiveDuckColumns(u,a,"".concat(f,"."))}),a}},{key:"colToProp",value:function(r){if(Number.isInteger(r)===!1)return r;var n=this.instance.toPhysicalColumn(r);return n===null?r:this.colToPropCache&&pe(this.colToPropCache[n])?this.colToPropCache[n]:n}},{key:"propToCol",value:function(r){var n=this.propToColCache.get(r);if(pe(n))return this.instance.toVisualColumn(n);var o=this.instance.toVisualColumn(r);return o===null?r:o}},{key:"getSchema",value:function(){var r=this.tableMeta.dataSchema;return r?typeof r=="function"?r():r:this.duckSchema}},{key:"createDuckSchema",value:function(){return this.dataSource&&this.dataSource[0]?rs(this.dataSource[0]):{}}},{key:"refreshDuckSchema",value:function(){this.duckSchema=this.createDuckSchema()}},{key:"createRow",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i.source,l=i.mode,s=l===void 0?"above":l,u=this.instance.countSourceRows(),f=u,c=0,h=r;(typeof h!="number"||h>=u)&&(h=u),h<this.instance.countRows()&&(f=this.instance.toPhysicalRow(h));var d=this.instance.runHooks("beforeCreateRow",h,o,a);if(d===!1||f===null)return{delta:0};for(var v=this.tableMeta.maxRows,p=this.getSchema().length,m=[],w=function(){var P=null;n.instance.dataType==="array"?n.tableMeta.dataSchema?P=ar(n.getSchema()):(P=[],Ce(p-1,function(){return P.push(null)})):n.instance.dataType==="function"?P=n.tableMeta.dataSchema(h+c):(P={},tv(P,n.getSchema())),m.push(P),c+=1};c<o&&u+c<v;)w();this.instance.rowIndexMapper.insertIndexes(h,c),s==="below"&&(f=Math.min(f+1,u)),this.spliceData(f,0,m);var S=this.instance.toVisualRow(f);return this.instance.countSourceRows()===m.length&&this.instance.columnIndexMapper.initToLength(this.instance.getInitialColumnCount()),c>0&&(r==null?this.metaManager.createRow(null,c):a!=="auto"&&this.metaManager.createRow(f,o)),this.instance.runHooks("afterCreateRow",S,c,a),this.instance.forceFullRender=!0,{delta:c,startPhysicalIndex:f}}},{key:"createCol",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.source,a=o.mode,l=a===void 0?"start":a;if(!this.instance.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.");var s=this.dataSource,u=this.tableMeta.maxCols,f=this.instance.countSourceCols(),c=r;(typeof c!="number"||c>=f)&&(c=f);var h=this.instance.runHooks("beforeCreateCol",c,n,i);if(h===!1)return{delta:0};var d=f;c<this.instance.countCols()&&(d=this.instance.toPhysicalColumn(c));var v=this.instance.countSourceRows(),p=this.instance.countCols(),m=0,w=d;l==="end"&&(w=Math.min(w+1,f));for(var S=w;m<n&&p<u;){if(typeof c!="number"||c>=p)if(v>0)for(var C=0;C<v;C+=1)typeof s[C]>"u"&&(s[C]=[]),s[C].push(null);else s.push([null]);else for(var P=0;P<v;P++)s[P].splice(w,0,null);m+=1,w+=1,p+=1}this.instance.columnIndexMapper.insertIndexes(c,m),m>0&&(r==null?this.metaManager.createColumn(null,m):i!=="auto"&&this.metaManager.createColumn(S,n));var R=this.instance.toVisualColumn(S);return this.instance.runHooks("afterCreateCol",R,m,i),this.instance.forceFullRender=!0,this.refreshDuckSchema(),{delta:m,startPhysicalIndex:S}}},{key:"removeRow",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,i=arguments.length>2?arguments[2]:void 0,a=Number.isInteger(r)?r:-o,l=this.visualRowsToPhysical(a,o),s=this.instance.countSourceRows();a=(s+a)%s;var u=this.instance.runHooks("beforeRemoveRow",a,l.length,l,i);if(u===!1)return!1;var f=l.length;if(this.filterData(a,f,l),a<this.instance.countRows()){this.instance.rowIndexMapper.removeIndexes(l);var c=pe(this.tableMeta.columns)||pe(this.tableMeta.dataSchema);this.instance.rowIndexMapper.getNotTrimmedIndexesLength()===0&&c===!1&&this.instance.columnIndexMapper.setIndexesSequence([])}var h=l.slice(0).sort(function(d,v){return v-d});return h.forEach(function(d){n.metaManager.removeRow(d,1)}),this.instance.runHooks("afterRemoveRow",a,f,l,i),this.instance.forceFullRender=!0,!0}},{key:"removeCol",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if(this.instance.dataType==="object"||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");var i=typeof r!="number"?-n:r;i=(this.instance.countCols()+i)%this.instance.countCols();var a=this.visualColumnsToPhysical(i,n),l=a.slice(0).sort(function(S,C){return C-S}),s=this.instance.runHooks("beforeRemoveCol",i,n,a,o);if(s===!1)return!1;for(var u=!0,f=l.length,c=this.dataSource,h=0;h<f;h++)u&&a[0]!==a[h]-h&&(u=!1);if(u)for(var d=0,v=this.instance.countSourceRows();d<v;d++)c[d].splice(a[0],n),d===0&&this.metaManager.removeColumn(a[0],n);else for(var p=0,m=this.instance.countSourceRows();p<m;p++)for(var w=0;w<f;w++)c[p].splice(l[w],1),p===0&&this.metaManager.removeColumn(l[w],1);return i<this.instance.countCols()&&(this.instance.columnIndexMapper.removeIndexes(a),this.instance.columnIndexMapper.getNotTrimmedIndexesLength()===0&&this.instance.rowIndexMapper.setIndexesSequence([])),this.instance.runHooks("afterRemoveCol",i,n,a,o),this.instance.forceFullRender=!0,this.refreshDuckSchema(),!0}},{key:"spliceCol",value:function(r,n,o){for(var i=this.instance.getDataAtCol(r),a=i.slice(n,n+o),l=i.slice(n+o),s=arguments.length,u=new Array(s>3?s-3:0),f=3;f<s;f++)u[f-3]=arguments[f];S_(u,l);for(var c=0;c<o;)u.push(null),c+=1;return YB(u),this.instance.populateFromArray(n,r,u,null,null,"spliceCol"),a}},{key:"spliceRow",value:function(r,n,o){for(var i=this.instance.getSourceDataAtRow(r),a=i.slice(n,n+o),l=i.slice(n+o),s=arguments.length,u=new Array(s>3?s-3:0),f=3;f<s;f++)u[f-3]=arguments[f];S_(u,l);for(var c=0;c<o;)u.push(null),c+=1;return this.instance.populateFromArray(r,n,[u],null,null,"spliceRow"),a}},{key:"spliceData",value:function(r,n,o){var i=this,a=this.instance.runHooks("beforeDataSplice",r,n,o);if(a!==!1){var l=[].concat(WS(this.dataSource.slice(0,r)),WS(o),WS(this.dataSource.slice(r)));this.dataSource.length=0,l.forEach(function(s){return i.dataSource.push(s)})}}},{key:"filterData",value:function(r,n,o){var i=this.instance.runHooks("filterData",r,n,o);Array.isArray(i)===!1&&(i=this.dataSource.filter(function(a,l){return o.indexOf(l)===-1})),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,i)}},{key:"get",value:function(r,n){var o=this.instance.toPhysicalRow(r),i=this.dataSource[o],a=this.instance.runHooks("modifyRowData",o);i=isNaN(a)?a:i;var l=null;if(i&&i.hasOwnProperty&&It(i,n))l=i[n];else if(typeof n=="string"&&n.indexOf(".")>-1){var s=n.split("."),u=i;if(!u)return null;for(var f=0,c=s.length;f<c;f++)if(u=u[s[f]],typeof u>"u")return null;l=u}else typeof n=="function"&&(l=n(this.dataSource.slice(o,o+1)[0]));if(this.instance.hasHook("modifyData")){var h=Ta(l);this.instance.runHooks("modifyData",o,this.propToCol(n),h,"get"),h.isTouched()&&(l=h.value)}return l}},{key:"getCopyable",value:function(r,n){return this.instance.getCellMeta(r,this.propToCol(n)).copyable?this.get(r,n):""}},{key:"set",value:function(r,n,o){var i=this.instance.toPhysicalRow(r),a=o,l=this.dataSource[i],s=this.instance.runHooks("modifyRowData",i);if(l=isNaN(s)?s:l,this.instance.hasHook("modifyData")){var u=Ta(a);this.instance.runHooks("modifyData",i,this.propToCol(n),u,"set"),u.isTouched()&&(a=u.value)}if(l&&l.hasOwnProperty&&It(l,n))l[n]=a;else if(typeof n=="string"&&n.indexOf(".")>-1){var f=n.split("."),c=l,h=0,d;for(h=0,d=f.length-1;h<d;h++)typeof c[f[h]]>"u"&&(c[f[h]]={}),c=c[f[h]];c[f[h]]=a}else typeof n=="function"?n(this.dataSource.slice(i,i+1)[0],a):l[n]=a}},{key:"visualRowsToPhysical",value:function(r,n){for(var o=this.instance.countSourceRows(),i=[],a=(o+r)%o,l=n,s;a<o&&l;)s=this.instance.toPhysicalRow(a),i.push(s),l-=1,a+=1;return i}},{key:"visualColumnsToPhysical",value:function(r,n){for(var o=this.instance.countCols(),i=[],a=(o+r)%o,l=n;a<o&&l;){var s=this.instance.toPhysicalColumn(a);i.push(s),l-=1,a+=1}return i}},{key:"clear",value:function(){for(var r=0;r<this.instance.countSourceRows();r++)for(var n=0;n<this.instance.countCols();n++)this.set(r,this.colToProp(n),"")}},{key:"getLength",value:function(){var r=this.tableMeta.maxRows,n;r<0||r===0?n=0:n=r||1/0;var o=this.instance.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(o,n)}},{key:"getAll",value:function(){var r={row:0,col:0},n={row:Math.max(this.instance.countRows()-1,0),col:Math.max(this.instance.countCols()-1,0)};return r.row-n.row===0&&!this.instance.countSourceRows()?[]:this.getRange(r,n,e.DESTINATION_RENDERER)}},{key:"countCachedColumns",value:function(){return this.colToPropCache.length}},{key:"getRange",value:function(r,n,o){var i=[],a,l,s,u=this.tableMeta.maxRows,f=this.tableMeta.maxCols;if(u===0||f===0)return[];var c=o===e.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,h=Math.min(Math.max(u-1,0),Math.max(r.row,n.row)),d=Math.min(Math.max(f-1,0),Math.max(r.col,n.col));for(a=Math.min(r.row,n.row);a<=h;a++){s=[];var v=a>=0?this.instance.toPhysicalRow(a):a;for(l=Math.min(r.col,n.col);l<=d&&v!==null;l++)s.push(c.call(this,a,this.colToProp(l)));v!==null&&i.push(s)}return i}},{key:"getText",value:function(r,n){return bc(this.getRange(r,n,e.DESTINATION_RENDERER))}},{key:"getCopyableText",value:function(r,n){return bc(this.getRange(r,n,e.DESTINATION_CLIPBOARD_GENERATOR))}},{key:"destroy",value:function(){this.instance=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}],[{key:"DESTINATION_RENDERER",get:function(){return 1}},{key:"DESTINATION_CLIPBOARD_GENERATOR",get:function(){return 2}}]),e}();const dSe=hSe;var bv=en("cellTypes"),vSe=bv.register,ySe=bv.getItem,f2=bv.hasItem,pSe=bv.getNames;bv.getValues;function nP(e){if(!f2(e))throw Error('You declared cell type "'.concat(e,`" as a string that is not mapped to a known object.
Cell type must be an object or a string mapped to an object registered by
"Handsontable.cellTypes.registerCellType" method`));return ySe(e)}function an(e,t){typeof e!="string"&&(t=e,e=t.CELL_TYPE);var r=t,n=r.editor,o=r.renderer,i=r.validator;n&&_r(e,n),o&&$n(e,o),i&&Hl(e,i),vSe(e,t)}function gSe(e,t){var r;return e==="CELL_TYPE"?!1:((r=t._automaticallyAssignedMetaProps)===null||r===void 0?void 0:r.has(e))||!It(t,e)}function tw(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,n=typeof t.type=="string"?nP(t.type):t.type;if(e._automaticallyAssignedMetaProps&&ze(t,function(i,a){return void e._automaticallyAssignedMetaProps.delete(a)}),!!Ue(n)){r===e&&!e._automaticallyAssignedMetaProps&&(e._automaticallyAssignedMetaProps=new Set);var o={};ze(n,function(i,a){if(gSe(a,r)){var l;o[a]=i,(l=e._automaticallyAssignedMetaProps)===null||l===void 0||l.add(a)}}),Wt(e,o)}}function mSe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];function r(){}Ho(r,e);for(var n=0;n<t.length;n++)r.prototype[t[n]]=void 0;return r}function tp(e){return Number.isInteger(e)&&e>=0}function rp(e,t){if(!e())throw new Error("Assertion failed: ".concat(t))}function ny(e){return e==null}function YO(e){return YO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},YO(e)}const c2=function(){return{_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!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",isEmptyCol:function(t){var r,n,o;for(r=0,n=this.countRows();r<n;r++)if(o=this.getDataAtCell(r,t),Kt(o)===!1)return!1;return!0},isEmptyRow:function(t){var r,n,o,i;for(r=0,n=this.countCols();r<n;r++)if(o=this.getDataAtCell(t,r),Kt(o)===!1)return YO(o)==="object"?(i=this.getCellMeta(t,r),GE(this.getSchema()[i.prop],o)):!1;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,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}};function Dh(e){return Dh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dh(e)}function SM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function CM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SM(Object(r),!0).forEach(function(n){bSe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bSe(e,t,r){return t=d2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _M(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,d2(n.key),n)}}function h2(e,t,r){return t&&_M(e.prototype,t),r&&_M(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d2(e){var t=wSe(e,"string");return Dh(t)==="symbol"?t:String(t)}function wSe(e,t){if(Dh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Dh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function v2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SSe(){return h2(function e(){v2(this,e)})}var CSe=function(){function e(t){v2(this,e),this.metaCtor=SSe(),this.meta=this.metaCtor.prototype,Wt(this.meta,c2()),this.meta.instance=t}return h2(e,[{key:"getMetaConstructor",value:function(){return this.metaCtor}},{key:"getMeta",value:function(){return this.meta}},{key:"updateMeta",value:function(r){var n;Wt(this.meta,r),tw(this.meta,CM(CM({},r),{},{type:(n=r.type)!==null&&n!==void 0?n:this.meta.type}),r)}}]),e}();function Nh(e){return Nh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nh(e)}function _Se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OM(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,RSe(n.key),n)}}function OSe(e,t,r){return t&&OM(e.prototype,t),r&&OM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function RSe(e){var t=ESe(e,"string");return Nh(t)==="symbol"?t:String(t)}function ESe(e,t){if(Nh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Nh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var TSe=function(){function e(t){_Se(this,e);var r=t.getMetaConstructor();this.meta=new r}return OSe(e,[{key:"getMeta",value:function(){return this.meta}},{key:"updateMeta",value:function(r){Wt(this.meta,r),tw(this.meta,r,r)}}]),e}();function Hh(e){return Hh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hh(e)}function RM(e){return ASe(e)||$Se(e)||kSe(e)||PSe()}function PSe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kSe(e,t){if(e){if(typeof e=="string")return GO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return GO(e,t)}}function $Se(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ASe(e){if(Array.isArray(e))return GO(e)}function GO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ISe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EM(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,xSe(n.key),n)}}function MSe(e,t,r){return t&&EM(e.prototype,t),r&&EM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function xSe(e){var t=DSe(e,"string");return Hh(t)==="symbol"?t:String(t)}function DSe(e,t){if(Hh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Hh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KO=function(e){function t(r){ISe(this,t),this.valueFactory=r,this.data=[],this.index=[],this.holes=new Set}return MSe(t,[{key:"obtain",value:function(n){rp(function(){return tp(n)},"Expecting an unsigned number.");var o=this._getStorageIndexByKey(n),i;if(o>=0)i=this.data[o],i===void 0&&(i=this.valueFactory(n),this.data[o]=i);else if(i=this.valueFactory(n),this.holes.size>0){var a=this.holes.values().next().value;this.holes.delete(a),this.data[a]=i,this.index[n]=a}else this.data.push(i),this.index[n]=this.data.length-1;return i}},{key:"insert",value:function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;rp(function(){return tp(n)||ny(n)},"Expecting an unsigned number or null/undefined argument.");for(var i=[],a=this.data.length,l=0;l<o;l++)i.push(a+l),this.data.push(void 0);var s=ny(n)?this.index.length:n;this.index=[].concat(RM(this.index.slice(0,s)),i,RM(this.index.slice(s)))}},{key:"remove",value:function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;rp(function(){return tp(n)||ny(n)},"Expecting an unsigned number or null/undefined argument.");for(var i=this.index.splice(ny(n)?this.index.length-o:n,o),a=0;a<i.length;a++){var l=i[a];typeof l=="number"&&this.holes.add(l)}}},{key:"size",value:function(){return this.data.length-this.holes.size}},{key:"values",value:function(){var n=this;return jr(this.data,function(o,i){return!n.holes.has(i)})[Symbol.iterator]()}},{key:"entries",value:function(){for(var n=[],o=0;o<this.data.length;o++){var i=this._getKeyByStorageIndex(o);i!==-1&&n.push([i,this.data[o]])}var a=0;return{next:function(){if(a<n.length){var s=n[a];return a+=1,{value:s,done:!1}}return{done:!0}}}}},{key:"clear",value:function(){this.data=[],this.index=[],this.holes.clear()}},{key:"_getStorageIndexByKey",value:function(n){return this.index.length>n?this.index[n]:-1}},{key:"_getKeyByStorageIndex",value:function(n){return this.index.indexOf(n)}},{key:e,value:function(){return this.entries()}}]),t}(Symbol.iterator);function Lh(e){return Lh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lh(e)}function NSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TM(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,LSe(n.key),n)}}function HSe(e,t,r){return t&&TM(e.prototype,t),r&&TM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function LSe(e){var t=jSe(e,"string");return Lh(t)==="symbol"?t:String(t)}function jSe(e,t){if(Lh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Lh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var BSe=["data","width"],FSe=function(){function e(t){var r=this;NSe(this,e),this.globalMeta=t,this.metas=new KO(function(){return r._createMeta()})}return HSe(e,[{key:"updateMeta",value:function(r,n){var o=this.getMeta(r);Wt(o,n),tw(o,n)}},{key:"createColumn",value:function(r,n){this.metas.insert(r,n)}},{key:"removeColumn",value:function(r,n){this.metas.remove(r,n)}},{key:"getMeta",value:function(r){return this.metas.obtain(r)}},{key:"getMetaConstructor",value:function(r){return this.metas.obtain(r).constructor}},{key:"clearCache",value:function(){this.metas.clear()}},{key:"_createMeta",value:function(){return mSe(this.globalMeta.getMetaConstructor(),BSe).prototype}}]),e}();function jh(e){return jh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jh(e)}function VSe(e){return YSe(e)||zSe(e)||USe(e)||WSe()}function WSe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function USe(e,t){if(e){if(typeof e=="string")return XO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return XO(e,t)}}function zSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function YSe(e){if(Array.isArray(e))return XO(e)}function XO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function GSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PM(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,XSe(n.key),n)}}function KSe(e,t,r){return t&&PM(e.prototype,t),r&&PM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function XSe(e){var t=qSe(e,"string");return jh(t)==="symbol"?t:String(t)}function qSe(e,t){if(jh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(jh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ZSe=function(){function e(t){var r=this;GSe(this,e),this.columnMeta=t,this.metas=new KO(function(){return r._createRow()})}return KSe(e,[{key:"updateMeta",value:function(r,n,o){var i=this.getMeta(r,n);Wt(i,o),tw(i,o)}},{key:"createRow",value:function(r,n){this.metas.insert(r,n)}},{key:"createColumn",value:function(r,n){for(var o=0;o<this.metas.size();o++)this.metas.obtain(o).insert(r,n)}},{key:"removeRow",value:function(r,n){this.metas.remove(r,n)}},{key:"removeColumn",value:function(r,n){for(var o=0;o<this.metas.size();o++)this.metas.obtain(o).remove(r,n)}},{key:"getMeta",value:function(r,n,o){var i=this.metas.obtain(r).obtain(n);return o===void 0?i:i[o]}},{key:"setMeta",value:function(r,n,o,i){var a,l=this.metas.obtain(r).obtain(n);(a=l._automaticallyAssignedMetaProps)===null||a===void 0||a.delete(o),l[o]=i}},{key:"removeMeta",value:function(r,n,o){var i=this.metas.obtain(r).obtain(n);delete i[o]}},{key:"getMetas",value:function(){for(var r=[],n=Array.from(this.metas.values()),o=0;o<n.length;o++)r.push.apply(r,VSe(n[o].values()));return r}},{key:"getMetasAtRow",value:function(r){rp(function(){return tp(r)},"Expecting an unsigned number.");var n=new Map(this.metas);return n.has(r)?Array.from(n.get(r).values()):[]}},{key:"clearCache",value:function(){this.metas.clear()}},{key:"_createRow",value:function(){var r=this;return new KO(function(n){return r._createMeta(n)})}},{key:"_createMeta",value:function(r){var n=this.columnMeta.getMetaConstructor(r);return new n}}]),e}();function Bh(e){return Bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bh(e)}function QSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kM(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,eCe(n.key),n)}}function JSe(e,t,r){return t&&kM(e.prototype,t),r&&kM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function eCe(e){var t=tCe(e,"string");return Bh(t)==="symbol"?t:String(t)}function tCe(e,t){if(Bh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Bh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var y2=function(){function e(t){var r=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];QSe(this,e),this.hot=t,this.globalMeta=new CSe(t),this.tableMeta=new TSe(this.globalMeta),this.columnMeta=new FSe(this.globalMeta),this.cellMeta=new ZSe(this.columnMeta),o.forEach(function(i){return new i(r)}),this.globalMeta.updateMeta(n)}return JSe(e,[{key:"getGlobalMeta",value:function(){return this.globalMeta.getMeta()}},{key:"updateGlobalMeta",value:function(r){this.globalMeta.updateMeta(r)}},{key:"getTableMeta",value:function(){return this.tableMeta.getMeta()}},{key:"updateTableMeta",value:function(r){this.tableMeta.updateMeta(r)}},{key:"getColumnMeta",value:function(r){return this.columnMeta.getMeta(r)}},{key:"updateColumnMeta",value:function(r,n){this.columnMeta.updateMeta(r,n)}},{key:"getCellMeta",value:function(r,n,o){var i=o.visualRow,a=o.visualColumn,l=this.cellMeta.getMeta(r,n);return l.visualRow=i,l.visualCol=a,l.row=r,l.col=n,this.runLocalHooks("afterGetCellMeta",l),l}},{key:"getCellMetaKeyValue",value:function(r,n,o){if(typeof o!="string")throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(r,n,o)}},{key:"setCellMeta",value:function(r,n,o,i){this.cellMeta.setMeta(r,n,o,i)}},{key:"updateCellMeta",value:function(r,n,o){this.cellMeta.updateMeta(r,n,o)}},{key:"removeCellMeta",value:function(r,n,o){this.cellMeta.removeMeta(r,n,o)}},{key:"getCellsMeta",value:function(){return this.cellMeta.getMetas()}},{key:"getCellsMetaAtRow",value:function(r){return this.cellMeta.getMetasAtRow(r)}},{key:"createRow",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cellMeta.createRow(r,n)}},{key:"removeRow",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cellMeta.removeRow(r,n)}},{key:"createColumn",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cellMeta.createColumn(r,n),this.columnMeta.createColumn(r,n)}},{key:"removeColumn",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cellMeta.removeColumn(r,n),this.columnMeta.removeColumn(r,n)}},{key:"clearCellsCache",value:function(){this.cellMeta.clearCache()}},{key:"clearCache",value:function(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}]),e}();mt(y2,kr);function bg(e){return bg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bg(e)}function $M(e,t,r,n){var o=n.hotInstance,i=n.dataMap,a=n.dataSource,l=n.internalSource,s=n.source,u=n.metaManager,f=n.firstRun,c=Er(l),h=o.getSettings();Array.isArray(h.dataSchema)?o.dataType="array":wt(h.dataSchema)?o.dataType="function":o.dataType="object",i&&i.destroy(),e=o.runHooks("before".concat(c),e,f,s);var d=new dSe(o,e,u);if(t(d),bg(e)==="object"&&e!==null)e.push&&e.splice||(e=[e]);else if(e===null){var v=d.getSchema();e=[];var p,m=0,w=0;for(m=0,w=h.startRows;m<w;m++)if((o.dataType==="object"||o.dataType==="function")&&h.dataSchema)p=ar(v),e.push(p);else if(o.dataType==="array")p=ar(v[0]),e.push(p);else{p=[];for(var S=0,C=h.startCols;S<C;S++)p.push(null);e.push(p)}}else throw new Error("".concat(l," only accepts array of objects or array of arrays (").concat(bg(e)," given)"));Array.isArray(e[0])&&(o.dataType="array"),h.data=e,d.dataSource=e,a.data=e,a.dataType=o.dataType,a.colToProp=d.colToProp.bind(d),a.propToCol=d.propToCol.bind(d),a.countCachedColumns=d.countCachedColumns.bind(d),r(d),o.runHooks("after".concat(c),e,f,s),f||(o.runHooks("afterChange",null,l),o.render())}function Fh(e){return Fh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fh(e)}function rCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AM(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,oCe(n.key),n)}}function nCe(e,t,r){return t&&AM(e.prototype,t),r&&AM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function oCe(e){var t=iCe(e,"string");return Fh(t)==="symbol"?t:String(t)}function iCe(e,t){if(Fh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Fh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var aCe=function(){function e(t){var r=this;rCe(this,e),this.metaManager=t,this.metaSyncMemo=new Map,t.addLocalHook("afterGetCellMeta",function(n){return r.extendCellMeta(n)}),be.getSingleton().add("beforeRender",function(n){n&&r.metaSyncMemo.clear()},this.metaManager.hot)}return nCe(e,[{key:"extendCellMeta",value:function(r){var n,o=r.row,i=r.col;if(!((n=this.metaSyncMemo.get(o))!==null&&n!==void 0&&n.has(i))){var a=r.visualRow,l=r.visualCol,s=this.metaManager.hot,u=s.colToProp(l);r.prop=u,s.runHooks("beforeGetCellMeta",a,l,r);var f=It(r,"type")?r.type:null,c=wt(r.cells)?r.cells(o,i,u):null;if(f)if(c){var h;c.type=(h=c.type)!==null&&h!==void 0?h:f}else c={type:f};c&&this.metaManager.updateCellMeta(o,i,c),s.runHooks("afterGetCellMeta",a,l,r),this.metaSyncMemo.has(o)||this.metaSyncMemo.set(o,new Set),this.metaSyncMemo.get(o).add(i)}}}]),e}();function Vh(e){return Vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vh(e)}function lCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IM(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,uCe(n.key),n)}}function sCe(e,t,r){return t&&IM(e.prototype,t),r&&IM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function uCe(e){var t=fCe(e,"string");return Vh(t)==="symbol"?t:String(t)}function fCe(e,t){if(Vh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Vh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cCe=function(){function e(t){lCe(this,e),this.metaManager=t,this.usageTracker=new Set,this.propDescriptors=new Map([["fixedColumnsLeft",{target:"fixedColumnsStart",onChange:function(n){var o=this.metaManager.hot.isRtl();if(o&&n==="fixedColumnsLeft")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:function(n,o,i){if(!i)throw new Error("The `".concat(n,"` option can not be updated after the Handsontable is initialized."))}}]]),this.extendMetaProps()}return sCe(e,[{key:"extendMetaProps",value:function(){var r=this;this.propDescriptors.forEach(function(n,o){var i=n.target,a=n.onChange,l=a===void 0?function(){}:a,s=typeof i=="string",u=s?i:o,f="_".concat(u);r.metaManager.globalMeta.meta[f]=r.metaManager.globalMeta.meta[u],r.installPropWatcher(o,f,l),s&&r.installPropWatcher(i,f,l)})}},{key:"installPropWatcher",value:function(r,n,o){var i=this;Object.defineProperty(this.metaManager.globalMeta.meta,r,{get:function(){return this[n]},set:function(l){var s=!i.usageTracker.has(r);i.usageTracker.add(r),o.call(i,r,l,s),this[n]=l},enumerable:!0,configurable:!0})}}]),e}(),MM=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"]]),oy=function(t){return t.map(function(r){var n=r.toLowerCase();return MM.has(n)?MM.get(n):n}).sort().join("+")},hCe=function(t){return t.split("+")},xM=function(t){return t.toLowerCase()},DM;function dCe(e){return pCe(e)||yCe(e)||p2(e)||vCe()}function vCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yCe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pCe(e){if(Array.isArray(e))return qO(e)}function gCe(e,t){return wCe(e)||bCe(e,t)||p2(e,t)||mCe()}function mCe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p2(e,t){if(e){if(typeof e=="string")return qO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qO(e,t)}}function qO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bCe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function wCe(e){if(Array.isArray(e))return e}function SCe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var CCe=function(t){var r=Pm({errorIdExists:function(f){return'The "'.concat(f,'" shortcut is already registered in the "').concat(t,'" context.')}}),n=function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=f.keys,h=f.callback,d=f.group,v=f.runOnlyIf,p=v===void 0?function(){return!0}:v,m=f.captureCtrl,w=m===void 0?!1:m,S=f.preventDefault,C=S===void 0?!0:S,P=f.stopPropagation,R=P===void 0?!1:P,W=f.relativeToGroup,z=f.position;if(pt(d))throw new Error("You need to define the shortcut's group.");if(wt(h)===!1)throw new Error("The shortcut's callback needs to be a function.");if(Array.isArray(c)===!1)throw new Error(dt(DM||(DM=SCe([`Pass the shortcut's keys as an array of arrays,
using the KeyboardEvent.key properties:
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`],[`Pass the shortcut\\'s keys as an array of arrays,\\x20
using the KeyboardEvent.key properties:\\x20
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`]))));var q={callback:h,group:d,runOnlyIf:p,captureCtrl:w,preventDefault:C,stopPropagation:R};if(pe(W)){var K=[W,z];q.relativeToGroup=K[0],q.position=K[1]}c.forEach(function(X){var Q=oy(X),ae=r.hasItem(Q);if(ae){var Z=r.getItem(Q),he=Z.findIndex(function(Ee){return Ee.group===W});he!==-1?z==="before"?he-=1:he+=1:he=Z.length,Z.splice(he,0,q)}else r.addItem(Q,[q])})},o=function(f){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};f.forEach(function(h){ze(c,function(d,v){Object.prototype.hasOwnProperty.call(h,v)===!1&&(h[v]=c[v])}),n(h)})},i=function(f){var c=oy(f);r.removeItem(c)},a=function(f){var c=r.getItems();c.forEach(function(h){var d=gCe(h,2),v=d[0],p=d[1],m=p.filter(function(w){return w.group!==f});m.length===0?i(hCe(v)):(p.length=0,p.push.apply(p,dCe(m)))})},l=function(f){var c=oy(f),h=r.getItem(c);return pe(h)?h.slice():[]},s=function(f){var c=oy(f);return r.hasItem(c)};return{addShortcut:n,addShortcuts:o,getShortcuts:l,hasShortcut:s,removeShortcutsByKeys:i,removeShortcutsByGroup:a}};function _Ce(){var e=new Set;return{press:function(r){e.add(r)},release:function(r){e.delete(r)},releaseAll:function(){e.clear()},isPressed:function(r){return e.has(r)}}}var OCe=["meta","alt","shift","control"],Bf=_Ce();function RCe(e,t,r,n,o){var i=function(d){return OCe.includes(d)},a=function(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p=[];return d.altKey&&p.push("alt"),v&&(d.ctrlKey||d.metaKey)?p.push("control/meta"):(d.ctrlKey&&p.push("control"),d.metaKey&&p.push("meta")),d.shiftKey&&p.push("shift"),p},l=function(d){if(t(d)!==!1){var v=r(d);if(!(d.keyCode===229||v===!1||Gi(d))){var p=xM(d.key),m=[];i(p)?Bf.press(p):m=a(d);var w=[p].concat(m),S=o(d,w);!S&&(kp()&&m.includes("meta")||!kp()&&m.includes("control"))&&o(d,[p].concat(a(d,!0))),n(d)}}},s=function(d){if(t(d)!==!1){var v=xM(d.key);i(v)!==!1&&Bf.release(v)}},u=function(){Bf.releaseAll()},f=function(){for(var d=e;d;)d.document.documentElement.addEventListener("keydown",l),d.document.documentElement.addEventListener("keyup",s),d.document.documentElement.addEventListener("blur",u),d=xc(d)},c=function(){for(var d=e;d;)d.document.documentElement.removeEventListener("keydown",l),d.document.documentElement.removeEventListener("keyup",s),d.document.documentElement.removeEventListener("blur",u),d=xc(d)};return{mount:f,unmount:c,isPressed:function(d){return Bf.isPressed(d)},releasePressedKeys:function(){return Bf.releaseAll()}}}var ECe=function(t){var r=t.ownerWindow,n=t.handleEvent,o=t.beforeKeyDown,i=t.afterKeyDown,a=Pm({errorIdExists:function(p){return'The "'.concat(p,'" context name is already registered.')}}),l="grid",s=function(p){var m=CCe(p);return a.addItem(p,m),m},u=function(){return l},f=function(p){return a.getItem(p)},c=function(p){l=p},h=!1,d=RCe(r,n,o,i,function(v,p){var m=f(u()),w=!1;if(!m.hasShortcut(p))return w;for(var S=m.getShortcuts(p),C=0;C<S.length;C++){var P=S[C],R=P.callback,W=P.runOnlyIf,z=P.preventDefault,q=P.stopPropagation,K=P.captureCtrl;if(W(v)!==!1&&(h=K,w=R(v,p)===!1,h=!1,z&&v.preventDefault(),q&&v.stopPropagation(),w))break}return w});return d.mount(),{addContext:s,getActiveContextName:u,getContext:f,setActiveContextName:c,isCtrlPressed:function(){return!h&&(d.isPressed("control")||d.isPressed("meta"))},releasePressedKeys:function(){return d.releasePressedKeys()},destroy:function(){return d.unmount()}}},NM,HM;function Sr(e){return Sr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sr(e)}function LM(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _n(e,t){return kCe(e)||PCe(e,t)||g2(e,t)||TCe()}function TCe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PCe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function kCe(e){if(Array.isArray(e))return e}function fl(e){return ICe(e)||ACe(e)||g2(e)||$Ce()}function $Ce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g2(e,t){if(e){if(typeof e=="string")return ZO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ZO(e,t)}}function ACe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ICe(e){if(Array.isArray(e))return ZO(e)}function ZO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var MCe="gridDefault",US=null,iy=new Set;function oP(e,t){var r,n=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=!1,a=this,l=new Pt(a),s,u,f,c,h=!0;Wye(o)&&Vye(this),this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;var d=(r=t==null?void 0:t.layoutDirection)!==null&&r!==void 0?r:"inherit",v=["rtl","ltr"].includes(d)?d:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",v),this.isRtl=function(){return v==="rtl"},this.isLtr=function(){return!a.isRtl()},this.getDirectionFactor=function(){return a.isLtr()?1:-1},t.language=Ume(t.language);var p=new y2(a,t,[aCe,cCe]),m=p.getTableMeta(),w=p.getGlobalMeta(),S=Pm();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),OO(this)&&eV(t.licenseKey,e),this.guid="ht_".concat(gT()),this.columnIndexMapper=new BO,this.rowIndexMapper=new BO,u=new vpe(a),(!this.rootElement.id||this.rootElement.id.substring(0,3)==="ht_")&&(this.rootElement.id=this.guid);var C=function(g){var b=g.row,_=g.col;return a._createCellCoords(b>=0?a.rowIndexMapper.getRenderableFromVisualIndex(b):b,_>=0?a.columnIndexMapper.getRenderableFromVisualIndex(_):_)},P=function(g){var b=g.row,_=g.col;return a._createCellCoords(b>=0?a.rowIndexMapper.getVisualFromRenderableIndex(b):b,_>=0?a.columnIndexMapper.getVisualFromRenderableIndex(_):_)},R=new Ywe(m,{rowIndexMapper:function(){return a.rowIndexMapper},columnIndexMapper:function(){return a.columnIndexMapper},countCols:function(){return a.countCols()},countRows:function(){return a.countRows()},propToCol:function(g){return s.propToCol(g)},isEditorOpened:function(){return a.getActiveEditor()?a.getActiveEditor().isOpened():!1},countColsTranslated:function(){return n.view.countRenderableColumns()},countRowsTranslated:function(){return n.view.countRenderableRows()},getShortcutManager:function(){return a.getShortcutManager()},createCellCoords:function(g,b){return a._createCellCoords(g,b)},createCellRange:function(g,b,_){return a._createCellRange(g,b,_)},visualToRenderableCoords:C,renderableToVisualCoords:P,isDisabledCellSelection:function(g,b){return a.getCellMeta(g,b).disableVisualSelection}});this.selection=R;var W=function(g){var b=g.hiddenIndexesChanged;b&&n.selection.refresh()};this.columnIndexMapper.addLocalHook("cacheUpdated",W),this.rowIndexMapper.addLocalHook("cacheUpdated",W),this.selection.addLocalHook("beforeSetRangeStart",function(y){n.runHooks("beforeSetRangeStart",y)}),this.selection.addLocalHook("beforeSetRangeStartOnly",function(y){n.runHooks("beforeSetRangeStartOnly",y)}),this.selection.addLocalHook("beforeSetRangeEnd",function(y){n.runHooks("beforeSetRangeEnd",y),y.row<0&&(y.row=n.view._wt.wtTable.getFirstVisibleRow()),y.col<0&&(y.col=n.view._wt.wtTable.getFirstVisibleColumn())}),this.selection.addLocalHook("afterSetRangeEnd",function(y){var g=Ta(!1),b=n.selection.getSelectedRange(),_=b.current(),T=_.from,I=_.to,B=b.size()-1;n.runHooks("afterSelection",T.row,T.col,I.row,I.col,g,B),n.runHooks("afterSelectionByProp",T.row,a.colToProp(T.col),I.row,a.colToProp(I.col),g,B);var V=n.selection.isSelectedByAnyHeader(),Y=n.selection.selectedRange.current(),J=!0;i&&(J=!1),g.isTouched()&&(J=!g.value);var ee=n.selection.isSelectedByRowHeader(),le=n.selection.isSelectedByColumnHeader();J!==!1&&(V?ee?n.view.scrollViewportVertically(a.rowIndexMapper.getRenderableFromVisualIndex(y.row)):le&&n.view.scrollViewportHorizontally(a.columnIndexMapper.getRenderableFromVisualIndex(y.col)):Y&&!n.selection.isMultiple()?n.view.scrollViewport(C(Y.from)):n.view.scrollViewport(C(y))),ee&&le?te(n.rootElement,["ht__selection--rows","ht__selection--columns"]):ee?(Be(n.rootElement,"ht__selection--columns"),te(n.rootElement,"ht__selection--rows")):le?(Be(n.rootElement,"ht__selection--rows"),te(n.rootElement,"ht__selection--columns")):Be(n.rootElement,["ht__selection--rows","ht__selection--columns"]),n._refreshBorders(null)}),this.selection.addLocalHook("afterSelectionFinished",function(y){var g=y.length-1,b=y[g],_=b.from,T=b.to;n.runHooks("afterSelectionEnd",_.row,_.col,T.row,T.col,g),n.runHooks("afterSelectionEndByProp",_.row,a.colToProp(_.col),T.row,a.colToProp(T.col),g)}),this.selection.addLocalHook("afterIsMultipleSelection",function(y){var g=n.runHooks("afterIsMultipleSelection",y.value);y.value&&(y.value=g)}),this.selection.addLocalHook("beforeModifyTransformStart",function(y){n.runHooks("modifyTransformStart",y)}),this.selection.addLocalHook("afterModifyTransformStart",function(y,g,b){n.runHooks("afterModifyTransformStart",y,g,b)}),this.selection.addLocalHook("beforeModifyTransformEnd",function(y){n.runHooks("modifyTransformEnd",y)}),this.selection.addLocalHook("afterModifyTransformEnd",function(y,g,b){n.runHooks("afterModifyTransformEnd",y,g,b)}),this.selection.addLocalHook("afterDeselect",function(){c.destroyEditor(),n._refreshBorders(),Be(n.rootElement,["ht__selection--rows","ht__selection--columns"]),n.runHooks("afterDeselect")}),this.selection.addLocalHook("insertRowRequire",function(y){n.alter("insert_row_above",y,1,"auto")}),this.selection.addLocalHook("insertColRequire",function(y){n.alter("insert_col_start",y,1,"auto")}),f={alter:function(g,b){var _,T,I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,B=arguments.length>3?arguments[3]:void 0,V=arguments.length>4?arguments[4]:void 0,Y=function(Le){if(Le.length===0)return[];var je=fl(Le);je.sort(function(lt,tt){var Qe=_n(lt,1),et=Qe[0],jt=_n(tt,1),yt=jt[0];return et===yt?0:et>yt?1:-1});var ot=Lt(je,function(lt,tt){var Qe=_n(tt,2),et=Qe[0],jt=Qe[1],yt=lt[lt.length-1],ft=_n(yt,2),it=ft[0],Pi=ft[1],Bo=it+Pi;if(et<=Bo){var Qa=Math.max(jt-(Bo-et),0);yt[1]+=Qa}else lt.push([et,jt]);return lt},[je[0]]);return ot};switch(g){case"insert_row":iy.has(g)||(iy.add(g),gt(dt(NM||(NM=LM(["The `","` action of the `alter()` method is deprecated and will be removed \n in the next major release of Handsontable. Use the `insert_row_above` action instead."],["The \\`","\\` action of the \\`alter()\\` method is deprecated and will be removed\\x20\n in the next major release of Handsontable. Use the \\`insert_row_above\\` action instead."])),g)));case"insert_row_below":case"insert_row_above":var J=a.countSourceRows();if(m.maxRows===J)return;var ee=g==="insert_row_below"?"below":"above";b=(_=b)!==null&&_!==void 0?_:g==="insert_row"||ee==="below"?J:0;var le=s.createRow(b,I,{source:B,mode:ee}),Te=le.delta,de=le.startPhysicalIndex;if(Te){var ve=R.selectedRange.current(),G=ve==null?void 0:ve.from,De=G==null?void 0:G.row,Xe=a.toVisualRow(de);if(R.isSelectedByCorner())a.selectAll();else if(pe(De)&&De>=Xe){var $e=ve.to,Ie=$e.row,Ae=$e.col,O=G.col;R.isSelectedByRowHeader()&&(O=-1),R.getSelectedRange().pop(),R.setRangeStartOnly(a._createCellCoords(De+Te,O),!0),R.setRangeEnd(a._createCellCoords(Ie+Te,Ae))}else a._refreshBorders()}break;case"insert_col":iy.has(g)||(iy.add(g),gt(dt(HM||(HM=LM(["The `","` action of the `alter()` method is deprecated and will be removed \n in the next major release of Handsontable. Use the `insert_col_start` action instead."],["The \\`","\\` action of the \\`alter()\\` method is deprecated and will be removed\\x20\n in the next major release of Handsontable. Use the \\`insert_col_start\\` action instead."])),g)));case"insert_col_start":case"insert_col_end":var E=g==="insert_col_end"?"end":"start";b=(T=b)!==null&&T!==void 0?T:g==="insert_col"||E==="end"?a.countSourceCols():0;var A=s.createCol(b,I,{source:B,mode:E}),H=A.delta,M=A.startPhysicalIndex;if(H){if(Array.isArray(m.colHeaders)){var j=[a.toVisualColumn(M),0];j.length+=H,Array.prototype.splice.apply(m.colHeaders,j)}var x=R.selectedRange.current(),D=x==null?void 0:x.from,F=D==null?void 0:D.col,L=a.toVisualColumn(M);if(R.isSelectedByCorner())a.selectAll();else if(pe(F)&&F>=L){var U=x.to,ie=U.row,me=U.col,Re=D.row;R.isSelectedByColumnHeader()&&(Re=-1),R.getSelectedRange().pop(),R.setRangeStartOnly(a._createCellCoords(Re,F+H),!0),R.setRangeEnd(a._createCellCoords(ie,me+H))}else a._refreshBorders()}break;case"remove_row":var He=function(Le){var je=0;$(Le,function(ot){var lt=_n(ot,2),tt=lt[0],Qe=lt[1],et=Kt(tt)?a.countRows()-1:Math.max(tt-je,0);Number.isInteger(tt)&&(tt=Math.max(tt-je,0));var jt=s.removeRow(tt,Qe,B);if(jt){var yt=a.countRows(),ft=m.fixedRowsTop;ft>=et+1&&(m.fixedRowsTop-=Math.min(Qe,ft-et));var it=m.fixedRowsBottom;it&&et>=yt-it&&(m.fixedRowsBottom-=Math.min(Qe,it)),je+=Qe}})};Array.isArray(b)?He(Y(b)):He([[b,I]]),f.adjustRowsAndCols(),a._refreshBorders();break;case"remove_col":var Ze=function(Le){var je=0;$(Le,function(ot){var lt=_n(ot,2),tt=lt[0],Qe=lt[1],et=Kt(tt)?a.countCols()-1:Math.max(tt-je,0),jt=a.toPhysicalColumn(et);Number.isInteger(tt)&&(tt=Math.max(tt-je,0));var yt=s.removeCol(tt,Qe,B);if(yt){var ft=m.fixedColumnsStart;ft>=et+1&&(m.fixedColumnsStart-=Math.min(Qe,ft-et)),Array.isArray(m.colHeaders)&&(typeof jt>"u"&&(jt=-1),m.colHeaders.splice(jt,Qe)),je+=Qe}})};Array.isArray(b)?Ze(Y(b)):Ze([[b,I]]),f.adjustRowsAndCols(),a._refreshBorders();break;default:throw new Error('There is no such action "'.concat(g,'"'))}V||f.adjustRowsAndCols()},adjustRowsAndCols:function(){var g=m.minRows,b=m.minSpareRows,_=m.minCols,T=m.minSpareCols;if(a.countRows()===0&&a.countCols()===0&&R.deselect(),g){var I=a.countRows();I<g&&s.createRow(I,g-I,{source:"auto"})}if(b){var B=a.countEmptyRows(!0);if(B<b){var V=b-B,Y=Math.min(V,m.maxRows-a.countSourceRows());s.createRow(a.countRows(),Y,{source:"auto"})}}{var J;(_||T)&&(J=a.countEmptyCols(!0));var ee=a.countCols();if(_&&!m.columns&&ee<_){var le=_-ee;J+=le,s.createCol(ee,le,{source:"auto"})}if(T&&!m.columns&&a.dataType==="array"&&J<T){ee=a.countCols();var Te=T-J,de=Math.min(Te,m.maxCols-ee);s.createCol(ee,de,{source:"auto"})}}if(R.isSelected()){var ve=a.countRows(),G=a.countCols();$(R.selectedRange,function(De){var Xe=!1,$e=De.from.row,Ie=De.from.col,Ae=De.to.row,O=De.to.col;$e>ve-1?($e=ve-1,Xe=!0,Ae>$e&&(Ae=$e)):Ae>ve-1&&(Ae=ve-1,Xe=!0,$e>Ae&&($e=Ae)),Ie>G-1?(Ie=G-1,Xe=!0,O>Ie&&(O=Ie)):O>G-1&&(O=G-1,Xe=!0,Ie>O&&(Ie=O)),Xe&&a.selectCell($e,Ie,Ae,O)})}a.view&&a.view.adjustElementsSize()},populateFromArray:function(g,b,_,T,I,B,V){var Y,J,ee,le,Te=[],de={},ve=[],G=g.row,De=g.col;if(J=b.length,J===0)return!1;var Xe=0,$e=0;switch(Ue(_)&&(Xe=_.col-De+1,$e=_.row-G+1),I){case"shift_down":var Ie=fc(b),Ae=Ie.length,O=Math.max(Ae,Xe),E=a.getData().slice(G),A=fc(E).slice(De,De+O);for(ee=0;ee<O;ee+=1)if(ee<Ae){for(Y=0,J=Ie[ee].length;Y<$e-J;Y+=1)Ie[ee].push(Ie[ee][Y%J]);ee<A.length?ve.push(Ie[ee].concat(A[ee])):ve.push(Ie[ee].concat(new Array(E.length).fill(null)))}else ve.push(Ie[ee%Ae].concat(A[ee]));a.populateFromArray(G,De,fc(ve));break;case"shift_right":var H=b.length,M=Math.max(H,$e),j=a.getData().slice(G).map(function(ft){return ft.slice(De)});for(Y=0;Y<M;Y+=1)if(Y<H){for(ee=0,le=b[Y].length;ee<Xe-le;ee+=1)b[Y].push(b[Y][ee%le]);if(Y<j.length)for(var x=0;x<j[Y].length;x+=1)b[Y].push(j[Y][x]);else{var D;(D=b[Y]).push.apply(D,fl(new Array(j[0].length).fill(null)))}}else b.push(b[Y%J].slice(0,M).concat(j[Y]));a.populateFromArray(G,De,b);break;case"overwrite":default:de.row=g.row,de.col=g.col;var F={row:_&&g?_.row-g.row+1:1,col:_&&g?_.col-g.col+1:1},L=0,U=0,ie=!0,me,Re=function(it){var Pi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,Bo=b[it%b.length];return Pi!==null?Bo[Pi%Bo.length]:Bo},He=b.length,Ze=_?_.row-g.row+1:0;for(_?J=Ze:J=Math.max(He,Ze),Y=0;Y<J&&!(_&&de.row>_.row&&Ze>He||!m.allowInsertRow&&de.row>a.countRows()-1||de.row>=m.maxRows);Y++){var ht=Y-L,Le=Re(ht).length,je=_?_.col-g.col+1:0;if(_?le=je:le=Math.max(Le,je),de.col=g.col,me=a.getCellMeta(de.row,de.col),(T==="CopyPaste.paste"||T==="Autofill.fill")&&me.skipRowOnPaste){L+=1,de.row+=1,J+=1;continue}for(U=0,ee=0;ee<le&&!(_&&de.col>_.col&&je>Le||!m.allowInsertColumn&&de.col>a.countCols()-1||de.col>=m.maxCols);ee++){if(me=a.getCellMeta(de.row,de.col),(T==="CopyPaste.paste"||T==="Autofill.fill")&&me.skipColumnOnPaste){U+=1,de.col+=1,le+=1;continue}if(me.readOnly&&T!=="UndoRedo.undo"){de.col+=1;continue}var ot=ee-U,lt=Re(ht,ot),tt=a.getDataAtCell(de.row,de.col),Qe={row:ht,col:ot};if(T==="Autofill.fill"){var et=a.runHooks("beforeAutofillInsidePopulate",Qe,B,b,V,{},F);et&&(lt=pt(et.value)?lt:et.value)}if(lt!==null&&Sr(lt)==="object")if(Array.isArray(lt)&&tt===null&&(tt=[]),tt===null||Sr(tt)!=="object")ie=!1;else{var jt=rs(Array.isArray(tt)?tt:tt[0]||tt),yt=rs(Array.isArray(lt)?lt:lt[0]||lt);GE(jt,yt)||Array.isArray(jt)&&Array.isArray(yt)?lt=ar(lt):ie=!1}else tt!==null&&Sr(tt)==="object"&&(ie=!1);ie&&Te.push([de.row,de.col,lt]),ie=!0,de.col+=1}de.row+=1}a.setDataAtCell(Te,null,null,T||"populateFromArray");break}}};function z(y){var g=YW(y);JT(g)?(a.runHooks("beforeLanguageChange",g),w.language=g,a.runHooks("afterLanguageChange",g)):GW(y)}function q(y,g){var b=y==="className"?a.rootElement:a.table;if(h)te(b,g);else{var _=[],T=[];w[y]&&(_=Array.isArray(w[y])?w[y]:__(w[y])),g&&(T=Array.isArray(g)?g:__(g));var I=C_(_,T),B=C_(T,_);I.length&&Be(b,I),B.length&&te(b,B)}w[y]=g}this.init=function(){u.setData(m.data),a.runHooks("beforeInit"),(cn()||qE())&&te(a.rootElement,"mobile"),this.updateSettings(m,!0),this.view=new npe(this),c=sle.getInstance(a,m,R),a.runHooks("init"),this.forceFullRender=!0,this.view.render(),h&&a.rootElement.offsetParent===null&&fV(a.rootElement,function(){a.view._wt.wtOverlays.updateLastSpreaderSize(),a.render(),a.view.adjustElementsSize()}),Sr(h)==="object"&&(a.runHooks("afterChange",h[0],h[1]),h=!1),a.runHooks("afterInit")};function K(){var y=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue:function(){this.validatorsInQueue+=1,y=!1},removeValidatorFormQueue:function(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty:function(){},checkIfQueueIsEmpty:function(){this.validatorsInQueue===0&&y===!1&&(y=!0,this.onQueueEmpty(this.valid))}}}function X(y){var g=y.replace(",",".");return isNaN(parseFloat(g))===!1?parseFloat(g):y}function Q(y,g,b){if(y.length){var _=a.getActiveEditor(),T=a.runHooks("beforeChange",y,g||"edit"),I=!0;if(T===!1){_&&_.cancelChanges();return}var B=new K;B.onQueueEmpty=function(ve){_&&I&&_.cancelChanges(),b(ve)};for(var V=y.length-1;V>=0;V--)if(y[V]===null)y.splice(V,1);else{var Y=_n(y[V],4),J=Y[0],ee=Y[1],le=Y[3],Te=s.propToCol(ee),de=a.getCellMeta(J,Te);de.type==="numeric"&&typeof le=="string"&&MV(le)&&(y[V][3]=X(le)),a.getCellValidator(de)&&(B.addValidatorToQueue(),a.validateCell(y[V][3],de,function(ve,G){return function(De){if(typeof De!="boolean")throw new Error("Validation error: result is not boolean");if(De===!1&&G.allowInvalid===!1){I=!1,y.splice(ve,1),G.valid=!0;var Xe=a.getCell(G.visualRow,G.visualCol);Xe!==null&&Be(Xe,m.invalidCellClassName)}B.removeValidatorFormQueue()}}(V,de),g))}B.checkIfQueueIsEmpty()}}function ae(y,g){var b=y.length-1;if(!(b<0)){for(;b>=0;b--){var _=!1;if(y[b]===null){y.splice(b,1);continue}if(!((y[b][2]===null||y[b][2]===void 0)&&(y[b][3]===null||y[b][3]===void 0))){if(m.allowInsertRow)for(;y[b][0]>a.countRows()-1;){var T=s.createRow(void 0,void 0,{source:g}),I=T.delta;if(I===0){_=!0;break}}if(a.dataType==="array"&&(!m.columns||m.columns.length===0)&&m.allowInsertColumn)for(;s.propToCol(y[b][1])>a.countCols()-1;){var B=s.createCol(void 0,void 0,{source:g}),V=B.delta;if(V===0){_=!0;break}}_||s.set(y[b][0],y[b][1],y[b][3])}}a.forceFullRender=!0,f.adjustRowsAndCols(),a.runHooks("beforeChangeRender",y,g),c.lockEditor(),a._refreshBorders(null),c.unlockEditor(),a.view.adjustElementsSize(),a.runHooks("afterChange",y,g||"edit");var Y=a.getActiveEditor();Y&&pe(Y.refreshValue)&&Y.refreshValue()}}this._createCellCoords=function(y,g){return a.view._wt.createCellCoords(y,g)},this._createCellRange=function(y,g,b){return a.view._wt.createCellRange(y,g,b)},this.validateCell=function(y,g,b,_){var T=a.getCellValidator(g);function I(B){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!V||g.hidden===!0){b(B);return}var Y=g.visualCol,J=g.visualRow,ee=a.getCell(J,Y,!0);if(ee&&ee.nodeName!=="TH"){var le=a.rowIndexMapper.getRenderableFromVisualIndex(J),Te=a.columnIndexMapper.getRenderableFromVisualIndex(Y);a.view._wt.getSetting("cellRenderer",le,Te,ee)}b(B)}JF(T)&&(T=function(B){return function(V,Y){Y(B.test(V))}}(T)),wt(T)?(y=a.runHooks("beforeValidate",y,g.visualRow,g.prop,_),a._registerImmediate(function(){T.call(g,y,function(B){a&&(B=a.runHooks("afterValidate",B,y,g.visualRow,g.prop,_),g.valid=B,I(B),a.runHooks("postAfterValidate",B,y,g.visualRow,g.prop,_))})})):a._registerImmediate(function(){g.valid=!0,I(g.valid,!1)})};function Z(y,g,b){return Array.isArray(y)?y:[[y,g,b]]}this.setDataAtCell=function(y,g,b,_){var T=Z(y,g,b),I=[],B=_,V,Y,J;for(V=0,Y=T.length;V<Y;V++){if(Sr(T[V])!=="object")throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if(typeof T[V][1]!="number")throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");T[V][1]>=this.countCols()?J=T[V][1]:J=s.colToProp(T[V][1]),I.push([T[V][0],J,u.getAtCell(this.toPhysicalRow(T[V][0]),T[V][1]),T[V][2]])}!B&&Sr(y)==="object"&&(B=g),a.runHooks("afterSetDataAtCell",I,B),Q(I,B,function(){ae(I,B)})},this.setDataAtRowProp=function(y,g,b,_){var T=Z(y,g,b),I=[],B=_,V,Y;for(V=0,Y=T.length;V<Y;V++)I.push([T[V][0],T[V][1],u.getAtCell(this.toPhysicalRow(T[V][0]),T[V][1]),T[V][2]]);!B&&Sr(y)==="object"&&(B=g),a.runHooks("afterSetDataAtRowProp",I,B),Q(I,B,function(){ae(I,B)})},this.listen=function(){a&&!a.isListening()&&(US=a.guid,a.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(US=null,a.runHooks("afterUnlisten"))},this.isListening=function(){return US===a.guid},this.destroyEditor=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;a._refreshBorders(y,g)},this.populateFromArray=function(y,g,b,_,T,I,B,V,Y){if(!(Sr(b)==="object"&&Sr(b[0])==="object"))throw new Error("populateFromArray parameter `input` must be an array of arrays");var J=typeof _=="number"?a._createCellCoords(_,T):null;return f.populateFromArray(a._createCellCoords(y,g),b,J,I,B,V,Y)},this.spliceCol=function(y,g,b){for(var _,T=arguments.length,I=new Array(T>3?T-3:0),B=3;B<T;B++)I[B-3]=arguments[B];return(_=s).spliceCol.apply(_,[y,g,b].concat(I))},this.spliceRow=function(y,g,b){for(var _,T=arguments.length,I=new Array(T>3?T-3:0),B=3;B<T;B++)I[B-3]=arguments[B];return(_=s).spliceRow.apply(_,[y,g,b].concat(I))},this.getSelected=function(){if(R.isSelected())return We(R.getSelectedRange(),function(y){var g=y.from,b=y.to;return[g.row,g.col,b.row,b.col]})},this.getSelectedLast=function(){var y=this.getSelected(),g;return y&&y.length>0&&(g=y[y.length-1]),g},this.getSelectedRange=function(){if(R.isSelected())return Array.from(R.getSelectedRange())},this.getSelectedRangeLast=function(){var y=this.getSelectedRange(),g;return y&&y.length>0&&(g=y[y.length-1]),g},this.emptySelectedCells=function(y){var g=this;if(!(!R.isSelected()||this.countRows()===0||this.countCols()===0)){var b=[];$(R.getSelectedRange(),function(_){var T=_.getTopStartCorner(),I=_.getBottomEndCorner();Ce(T.row,I.row,function(B){Ce(T.col,I.col,function(V){g.getCellMeta(B,V).readOnly||b.push([B,V,null])})})}),b.length>0&&this.setDataAtCell(b,y)}},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){var y=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(y,0),!this.isRenderSuspended()&&y===this.renderSuspendedCounter&&(this.renderCall?this.render():this._refreshBorders(null))},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||(c.lockEditor(),this._refreshBorders(null),c.unlockEditor()))},this.batchRender=function(y){this.suspendRender();var g=y();return this.resumeRender(),g},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,g=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(g,0),(!this.isExecutionSuspended()&&g===this.executionSuspendedCounter||y)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(y){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;this.suspendExecution();var b=y();return this.resumeExecution(g),b},this.batch=function(y){this.suspendRender(),this.suspendExecution();var g=y();return this.resumeExecution(),this.resumeRender(),g},this.refreshDimensions=function(){if(a.view){var y=a.view.getLastSize(),g=y.width,b=y.height,_=a.rootElement.getBoundingClientRect(),T=_.width,I=_.height,B=T!==g||I!==b,V=a.runHooks("beforeRefreshDimensions",{width:g,height:b},{width:T,height:I},B)===!1;V||((B||a.view._wt.wtOverlays.scrollableElement===a.rootWindow)&&(a.view.setLastSize(T,I),a.render()),a.runHooks("afterRefreshDimensions",{width:g,height:b},{width:T,height:I},B))}},this.updateData=function(y,g){var b=this;$M(y,function(_){s=_},function(_){s=_,a.columnIndexMapper.fitToLength(b.getInitialColumnCount()),a.rowIndexMapper.fitToLength(b.countSourceRows()),f.adjustRowsAndCols()},{hotInstance:a,dataMap:s,dataSource:u,internalSource:"updateData",source:g,metaManager:p,firstRun:h})},this.loadData=function(y,g){$M(y,function(b){s=b},function(){p.clearCellsCache(),a.initIndexMappers(),f.adjustRowsAndCols(),h&&(h=[null,"loadData"])},{hotInstance:a,dataMap:s,dataSource:u,internalSource:"loadData",source:g,metaManager:p,firstRun:h})},this.getInitialColumnCount=function(){var y=m.columns,g=0;if(Array.isArray(y))g=y.length;else if(wt(y))if(a.dataType==="array")for(var b=this.countSourceCols(),_=0;_<b;_+=1)y(_)&&(g+=1);else(a.dataType==="object"||a.dataType==="function")&&(g=s.colToPropCache.length);else if(pe(m.dataSchema)){var T=s.getSchema();g=Array.isArray(T)?T.length:fm(T)}else g=this.countSourceCols();return g},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(y,g,b,_){return pt(y)?s.getAll():s.getRange(a._createCellCoords(y,g),a._createCellCoords(b,_),s.DESTINATION_RENDERER)},this.getCopyableText=function(y,g,b,_){return s.getCopyableText(a._createCellCoords(y,g),a._createCellCoords(b,_))},this.getCopyableData=function(y,g){return s.getCopyable(y,s.colToProp(g))},this.getSchema=function(){return s.getSchema()},this.updateSettings=function(y){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,b=(h?a.loadData:a.updateData).bind(this),_=!1,T,I;if(pe(y.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if(pe(y.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if(pe(y.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(T in y)T==="data"||(T==="language"?z(y.language):T==="className"?q("className",y.className):T==="tableClassName"&&a.table?(q("tableClassName",y.tableClassName),a.view._wt.wtOverlays.syncOverlayTableClassNames()):be.getSingleton().isRegistered(T)||be.getSingleton().isDeprecated(T)?(wt(y[T])||Array.isArray(y[T]))&&(y[T].initialHook=!0,a.addHook(T,y[T])):!g&&It(y,T)&&(w[T]=y[T]));y.data===void 0&&m.data===void 0?b(null,"updateSettings"):y.data!==void 0?b(y.data,"updateSettings"):y.columns!==void 0&&(s.createMap(),a.initIndexMappers());var B=a.countCols(),V=m.columns;if(V&&wt(V)&&(_=!0),(y.cell!==void 0||y.cells!==void 0||y.columns!==void 0)&&p.clearCache(),B>0)for(T=0,I=0;T<B;T++){if(V){var Y=_?V(T):V[I];Y&&p.updateColumnMeta(I,Y)}I+=1}pe(y.cell)&&ze(y.cell,function(ve){a.setCellMetaObject(ve.row,ve.col,ve)}),a.runHooks("afterCellMetaReset");var J=a.rootElement.style.height;J!==""&&(J=parseInt(a.rootElement.style.height,10));var ee=y.height;if(wt(ee)&&(ee=ee()),g){var le=a.rootElement.getAttribute("style");le&&a.rootElement.setAttribute("data-initialstyle",a.rootElement.getAttribute("style"))}if(ee===null){var Te=a.rootElement.getAttribute("data-initialstyle");Te&&(Te.indexOf("height")>-1||Te.indexOf("overflow")>-1)?a.rootElement.setAttribute("style",Te):(a.rootElement.style.height="",a.rootElement.style.overflow="")}else ee!==void 0&&(a.rootElement.style.height=isNaN(ee)?"".concat(ee):"".concat(ee,"px"),a.rootElement.style.overflow="hidden");if(typeof y.width<"u"){var de=y.width;wt(de)&&(de=de()),a.rootElement.style.width=isNaN(de)?"".concat(de):"".concat(de,"px")}g||(a.view&&(a.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),a.view._wt.exportSettingsAsClassNames()),a.runHooks("afterUpdateSettings",y)),f.adjustRowsAndCols(),a.view&&!h&&(a.forceFullRender=!0,c.lockEditor(),a._refreshBorders(null),a.view._wt.wtOverlays.adjustElementsSize(),c.unlockEditor()),!g&&a.view&&(J===""||ee===""||ee===void 0)&&J!==ee&&a.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){var y=a.getSelectedLast();if(m.getValue){if(wt(m.getValue))return m.getValue.call(a);if(y)return a.getData()[y[0][0]][m.getValue]}else if(y)return a.getDataAtCell(y[0],y[1])},this.getSettings=function(){return m},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(y,g,b,_,T){f.alter(y,g,b,_,T)},this.getCell=function(y,g){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,_=g,T=y;if(g>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(g)))return null;_=this.columnIndexMapper.getRenderableFromVisualIndex(g)}if(y>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(y)))return null;T=this.rowIndexMapper.getRenderableFromVisualIndex(y)}return T===null||_===null?null:a.view.getCellAtCoords(a._createCellCoords(T,_),b)},this.getCoords=function(y){var g=this.view._wt.wtTable.getCoords(y);if(g===null)return null;var b=g.row,_=g.col,T=b,I=_;return b>=0&&(T=this.rowIndexMapper.getVisualFromRenderableIndex(b)),_>=0&&(I=this.columnIndexMapper.getVisualFromRenderableIndex(_)),a._createCellCoords(T,I)},this.colToProp=function(y){return s.colToProp(y)},this.propToCol=function(y){return s.propToCol(y)},this.toVisualRow=function(y){return n.rowIndexMapper.getVisualFromPhysicalIndex(y)},this.toVisualColumn=function(y){return n.columnIndexMapper.getVisualFromPhysicalIndex(y)},this.toPhysicalRow=function(y){return n.rowIndexMapper.getPhysicalFromVisualIndex(y)},this.toPhysicalColumn=function(y){return n.columnIndexMapper.getPhysicalFromVisualIndex(y)},this.getDataAtCell=function(y,g){return s.get(y,s.colToProp(g))},this.getDataAtRowProp=function(y,g){return s.get(y,g)},this.getDataAtCol=function(y){for(var g=[],b=s.getRange(a._createCellCoords(0,y),a._createCellCoords(m.data.length-1,y),s.DESTINATION_RENDERER),_=0;_<b.length;_+=1)for(var T=0;T<b[_].length;T+=1)g.push(b[_][T]);return g},this.getDataAtProp=function(y){for(var g=[],b=s.getRange(a._createCellCoords(0,s.propToCol(y)),a._createCellCoords(m.data.length-1,s.propToCol(y)),s.DESTINATION_RENDERER),_=0;_<b.length;_+=1)for(var T=0;T<b[_].length;T+=1)g.push(b[_][T]);return g},this.getSourceData=function(y,g,b,_){var T;return y===void 0?T=u.getData():T=u.getByRange(a._createCellCoords(y,g),a._createCellCoords(b,_)),T},this.getSourceDataArray=function(y,g,b,_){var T;return y===void 0?T=u.getData(!0):T=u.getByRange(a._createCellCoords(y,g),a._createCellCoords(b,_),!0),T},this.getSourceDataAtCol=function(y){return u.getAtColumn(y)},this.setSourceDataAtCell=function(y,g,b,_){var T=Z(y,g,b),I=this.hasHook("afterSetSourceDataAtCell"),B=[];I&&$(T,function(Y){var J=_n(Y,3),ee=J[0],le=J[1],Te=J[2];B.push([ee,le,u.getAtCell(ee,le),Te])}),$(T,function(Y){var J=_n(Y,3),ee=J[0],le=J[1],Te=J[2];u.setAtCell(ee,le,Te)}),I&&this.runHooks("afterSetSourceDataAtCell",B,_),this.render();var V=a.getActiveEditor();V&&pe(V.refreshValue)&&V.refreshValue()},this.getSourceDataAtRow=function(y){return u.getAtRow(y)},this.getSourceDataAtCell=function(y,g){return u.getAtCell(y,g)},this.getDataAtRow=function(y){var g=s.getRange(a._createCellCoords(y,0),a._createCellCoords(y,this.countCols()-1),s.DESTINATION_RENDERER);return g[0]||[]},this.getDataType=function(y,g,b,_){var T=this,I=y===void 0?[0,0,this.countRows(),this.countCols()]:[y,g,b,_],B=I[0],V=I[1],Y=I[2],J=I[3],ee=null,le=null;Y===void 0&&(Y=B),J===void 0&&(J=V);var Te="mixed";return Ce(Math.max(Math.min(B,Y),0),Math.max(B,Y),function(de){var ve=!0;return Ce(Math.max(Math.min(V,J),0),Math.max(V,J),function(G){var De=T.getCellMeta(de,G);return le=De.type,ee?ve=ee===le:ee=le,ve}),Te=ve?le:"mixed",ve}),Te},this.removeCellMeta=function(y,g,b){var _=[this.toPhysicalRow(y),this.toPhysicalColumn(g)],T=_[0],I=_[1],B=p.getCellMetaKeyValue(T,I,b),V=a.runHooks("beforeRemoveCellMeta",y,g,b,B);V!==!1&&(p.removeCellMeta(T,I,b),a.runHooks("afterRemoveCellMeta",y,g,b,B)),B=null},this.spliceCellsMeta=function(y){for(var g=this,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,_=arguments.length,T=new Array(_>2?_-2:0),I=2;I<_;I++)T[I-2]=arguments[I];if(T.length>0&&!Array.isArray(T[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");b>0&&p.removeRow(this.toPhysicalRow(y),b),T.length>0&&$(T.reverse(),function(B){p.createRow(g.toPhysicalRow(y)),$(B,function(V,Y){return g.setCellMetaObject(y,Y,V)})}),a.render()},this.setCellMetaObject=function(y,g,b){var _=this;Sr(b)==="object"&&ze(b,function(T,I){_.setCellMeta(y,g,I,T)})},this.setCellMeta=function(y,g,b,_){var T=a.runHooks("beforeSetCellMeta",y,g,b,_);if(T!==!1){var I=y,B=g;y<this.countRows()&&(I=this.toPhysicalRow(y)),g<this.countCols()&&(B=this.toPhysicalColumn(g)),p.setCellMeta(I,B,b,_),a.runHooks("afterSetCellMeta",y,g,b,_)}},this.getCellsMeta=function(){return p.getCellsMeta()},this.getCellMeta=function(y,g){var b=this.toPhysicalRow(y),_=this.toPhysicalColumn(g);return b===null&&(b=y),_===null&&(_=g),p.getCellMeta(b,_,{visualRow:y,visualColumn:g})},this.getCellMetaAtRow=function(y){return p.getCellsMetaAtRow(y)},this.isColumnModificationAllowed=function(){return!(a.dataType==="object"||m.columns)},this.getCellRenderer=function(y,g){var b=typeof y=="number"?a.getCellMeta(y,g).renderer:y.renderer;return typeof b=="string"?Vp(b):pt(b)?Vp("text"):b},this.getCellEditor=function(y,g){var b=typeof y=="number"?a.getCellMeta(y,g).editor:y.editor;return typeof b=="string"?Bp(b):pt(b)?Bp("text"):b},this.getCellValidator=function(y,g){var b=typeof y=="number"?a.getCellMeta(y,g).validator:y.validator;return typeof b=="string"?$T(b):b},this.validateCells=function(y){this._validateCells(y)},this.validateRows=function(y,g){if(!Array.isArray(y))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(g,y)},this.validateColumns=function(y,g){if(!Array.isArray(y))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(g,void 0,y)},this._validateCells=function(y,g,b){var _=new K;y&&(_.onQueueEmpty=y);for(var T=a.countRows()-1;T>=0;){if(g!==void 0&&g.indexOf(T)===-1){T-=1;continue}for(var I=a.countCols()-1;I>=0;){if(b!==void 0&&b.indexOf(I)===-1){I-=1;continue}_.addValidatorToQueue(),a.validateCell(a.getDataAtCell(T,I),a.getCellMeta(T,I),function(B){if(typeof B!="boolean")throw new Error("Validation error: result is not boolean");B===!1&&(_.valid=!1),_.removeValidatorFormQueue()},"validateCells"),I-=1}T-=1}_.checkIfQueueIsEmpty()},this.getRowHeader=function(y){var g=m.rowHeaders,b=y;return b!==void 0&&(b=a.runHooks("modifyRowHeader",b)),b===void 0?(g=[],Ce(a.countRows()-1,function(_){g.push(a.getRowHeader(_))})):Array.isArray(g)&&g[b]!==void 0?g=g[b]:wt(g)?g=g(b):g&&typeof g!="string"&&typeof g!="number"&&(g=b+1),g},this.hasRowHeaders=function(){return!!m.rowHeaders},this.hasColHeaders=function(){if(m.colHeaders!==void 0&&m.colHeaders!==null)return!!m.colHeaders;for(var y=0,g=a.countCols();y<g;y++)if(a.getColHeader(y))return!0;return!1},this.getColHeader=function(y){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,b=a.runHooks("modifyColHeader",y);if(b===void 0){for(var _=[],T=a.countCols(),I=0;I<T;I++)_.push(a.getColHeader(I));return _}var B=m.colHeaders,V=function(le){for(var Te=[],de=a.countCols(),ve=0;ve<de;ve++)wt(m.columns)&&m.columns(ve)&&Te.push(ve);return Te[le]},Y=a.toPhysicalColumn(b),J=V(Y);return m.colHeaders===!1?B=null:m.columns&&wt(m.columns)&&m.columns(J)&&m.columns(J).title?B=m.columns(J).title:m.columns&&m.columns[Y]&&m.columns[Y].title?B=m.columns[Y].title:Array.isArray(m.colHeaders)&&m.colHeaders[Y]!==void 0?B=m.colHeaders[Y]:wt(m.colHeaders)?B=m.colHeaders(Y):m.colHeaders&&typeof m.colHeaders!="string"&&typeof m.colHeaders!="number"&&(B=km(b)),B=a.runHooks("modifyColumnHeaderValue",B,y,g),B},this._getColWidthFromSettings=function(y){var g;if(y>=0){var b=a.getCellMeta(0,y);g=b.width}if((g===void 0||g===m.width)&&(g=m.colWidths),g!=null){switch(Sr(g)){case"object":g=g[y];break;case"function":g=g(y);break}typeof g=="string"&&(g=parseInt(g,10))}return g},this.getColWidth=function(y){var g=a._getColWidthFromSettings(y);return g=a.runHooks("modifyColWidth",g,y),g===void 0&&(g=AT.DEFAULT_WIDTH),g},this._getRowHeightFromSettings=function(y){var g=m.rowHeights;if(g!=null){switch(Sr(g)){case"object":g=g[y];break;case"function":g=g(y);break}typeof g=="string"&&(g=parseInt(g,10))}return g},this.getRowHeight=function(y){var g=a._getRowHeightFromSettings(y);return g=a.runHooks("modifyRowHeight",g,y),g},this.countSourceRows=function(){return u.countRows()},this.countSourceCols=function(){return u.countFirstRowKeys()},this.countRows=function(){return s.getLength()},this.countCols=function(){var y=m.maxCols,g=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(y,g)},this.countRenderedRows=function(){return a.view._wt.drawn?a.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return a.view._wt.drawn?a.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return a.view._wt.drawn?a.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return a.view._wt.drawn?a.view._wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,g=0;return Fp(a.countRows()-1,function(b){if(a.isEmptyRow(b))g+=1;else if(y===!0)return!1}),g},this.countEmptyCols=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,g=0;return Fp(a.countCols()-1,function(b){if(a.isEmptyCol(b))g+=1;else if(y===!0)return!1}),g},this.isEmptyRow=function(y){return m.isEmptyRow.call(a,y)},this.isEmptyCol=function(y){return m.isEmptyCol.call(a,y)},this.selectCell=function(y,g,b,_){var T=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,I=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;return pt(y)||pt(g)?!1:this.selectCells([[y,g,b,_]],T,I)},this.selectCells=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[[]],g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;g===!1&&(i=!0);var _=R.selectCells(y);return _&&b&&a.listen(),i=!1,_},this.selectColumns=function(y){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:y;return R.selectColumns(y,g)},this.selectRows=function(y){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:y;return R.selectRows(y,g)},this.deselectCell=function(){R.deselect()},this.selectAll=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,g=y&&this.hasRowHeaders(),b=y&&this.hasColHeaders();i=!0,R.selectAll(g,b),i=!1};var he=function(g,b){return g.getNearestNotHiddenIndex(b,1,!0)};this.scrollViewportTo=function(y,g){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,_=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,T=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,I=!b,B=!_,V=y,Y=g;if(T){var J=Number.isInteger(y),ee=Number.isInteger(g),le=J?he(this.rowIndexMapper,y):void 0,Te=ee?he(this.columnIndexMapper,g):void 0;if(le===null||Te===null)return!1;V=J?a.rowIndexMapper.getRenderableFromVisualIndex(le):void 0,Y=ee?a.columnIndexMapper.getRenderableFromVisualIndex(Te):void 0}var de=Number.isInteger(V),ve=Number.isInteger(Y);return de&&ve?a.view.scrollViewport(a._createCellCoords(V,Y),I,_,b,B):de&&ve===!1?a.view.scrollViewportVertically(V,I,b):ve&&de===!1?a.view.scrollViewportHorizontally(Y,_,B):!1},this.destroy=function(){if(a._clearTimeouts(),a._clearImmediates(),a.view&&a.view.destroy(),u&&u.destroy(),u=null,this.getShortcutManager().destroy(),p.clearCache(),OO(a)){var y=this.rootDocument.querySelector(".hot-display-license-info");y&&y.parentNode.removeChild(y)}pn(a.rootElement),l.destroy(),c&&c.destroy(),a.batchExecution(function(){a.rowIndexMapper.unregisterAll(),a.columnIndexMapper.unregisterAll(),S.getItems().forEach(function(g){var b=_n(g,2),_=b[1];_.destroy()}),S.clear(),a.runHooks("afterDestroy")},!0),be.getSingleton().destroy(a),ze(a,function(g,b,_){wt(g)?_[b]=Ee(b):b!=="guid"&&(_[b]=null)}),a.isDestroyed=!0,s&&s.destroy(),a.rowIndexMapper=null,a.columnIndexMapper=null,s=null,f=null,R=null,c=null,a=null};function Ee(y){return function(){throw new Error('The "'.concat(y,'" method cannot be called because this Handsontable instance has been destroyed'))}}this.getActiveEditor=function(){return c.getActiveEditor()},this.getPlugin=function(y){var g=Er(y);return g==="UndoRedo"?this.undoRedo:S.getItem(g)},this.getPluginName=function(y){return y===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:S.getId(y)},this.getInstance=function(){return a},this.addHook=function(y,g){be.getSingleton().add(y,g,a)},this.hasHook=function(y){return be.getSingleton().has(y,a)||be.getSingleton().has(y)},this.addHookOnce=function(y,g){be.getSingleton().once(y,g,a)},this.removeHook=function(y,g){be.getSingleton().remove(y,g,a)},this.runHooks=function(y,g,b,_,T,I,B){return be.getSingleton().run(a,y,g,b,_,T,I,B)},this.getTranslatedPhrase=function(y,g){return JW(m.language,y,g)},this.toHTML=function(){return X_(n)},this.toTableElement=function(){var y=n.rootDocument.createElement("div");return y.insertAdjacentHTML("afterbegin",X_(n)),y.firstElementChild},this.timeouts=[],this._registerTimeout=function(y){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,b=y;typeof b=="function"&&(b=setTimeout(b,g)),this.timeouts.push(b)},this._clearTimeouts=function(){$(this.timeouts,function(y){clearTimeout(y)})},this.immediates=[],this._registerImmediate=function(y){this.immediates.push(setImmediate(y))},this._clearImmediates=function(){$(this.immediates,function(y){clearImmediate(y)})},this._refreshBorders=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;c.destroyEditor(y),a.view.render(),g&&R.isSelected()&&c.prepareEditor()},this.isRtl=function(){return a.rootWindow.getComputedStyle(a.rootElement).direction==="rtl"},this.isLtr=function(){return!a.isRtl()},this.getDirectionFactor=function(){return a.isLtr()?1:-1};var _e=ECe({handleEvent:function(g){var b=a.isListening(),_=(g==null?void 0:g.key)!==void 0;return b&&_},beforeKeyDown:function(g){return n.runHooks("beforeKeyDown",g)},afterKeyDown:function(g){n.isDestroyed||a.runHooks("afterDocumentKeyDown",g)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",function(y){y.ctrlKey===!1&&y.metaKey===!1&&_e.releasePressedKeys()}),this.getShortcutManager=function(){return _e};var Oe=_e.addContext("grid"),k={runOnlyIf:function(){return pe(a.getSelected())&&a.countRenderedRows()>0&&a.countRenderedCols()>0},group:MCe};_e.setActiveContextName("grid"),Oe.addShortcuts([{keys:[["Control/Meta","A"]],callback:function(){a.selectAll()}},{keys:[["Control/Meta","Enter"]],callback:function(){for(var g=a.getSelectedRange(),b=g[g.length-1].highlight,_=b.row,T=b.col,I=a.getDataAtCell(_,T),B=new Map,V=0;V<g.length;V++)g[V].forAll(function(Y,J){if(Y>=0&&J>=0&&(Y!==_||J!==T)){var ee=a.getCellMeta(Y,J),le=ee.readOnly;le||B.set("".concat(Y,"x").concat(J),[Y,J,I])}});a.setDataAtCell(Array.from(B.values()))},runOnlyIf:function(){return a.getSelectedRangeLast().getCellsCount()>1}},{keys:[["ArrowUp"]],callback:function(){R.transformStart(-1,0)}},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:function(){R.setRangeStart(a._createCellCoords(a.rowIndexMapper.getNearestNotHiddenIndex(0,1),a.getSelectedRangeLast().highlight.col))}},{keys:[["ArrowUp","Shift"]],callback:function(){R.transformEnd(-1,0)}},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:function(){var g=a.getSelectedRangeLast(),b=g.from,_=g.to,T=a.rowIndexMapper.getNearestNotHiddenIndex(0,1);R.setRangeStart(b.clone()),R.setRangeEnd(a._createCellCoords(T,_.col))},runOnlyIf:function(){return!(a.selection.isSelectedByCorner()||a.selection.isSelectedByColumnHeader())}},{keys:[["ArrowDown"]],callback:function(){R.transformStart(1,0)}},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:function(){R.setRangeStart(a._createCellCoords(a.rowIndexMapper.getNearestNotHiddenIndex(a.countRows()-1,-1),a.getSelectedRangeLast().highlight.col))}},{keys:[["ArrowDown","Shift"]],callback:function(){R.transformEnd(1,0)}},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:function(){var g=a.getSelectedRangeLast(),b=g.from,_=g.to,T=a.rowIndexMapper.getNearestNotHiddenIndex(a.countRows()-1,-1);R.setRangeStart(b.clone()),R.setRangeEnd(a._createCellCoords(T,_.col))},runOnlyIf:function(){return!(a.selection.isSelectedByCorner()||a.selection.isSelectedByColumnHeader())}},{keys:[["ArrowLeft"]],callback:function(){R.transformStart(0,-1*a.getDirectionFactor())}},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:function(){var g,b=a.getSelectedRangeLast().highlight.row,_=(g=a.columnIndexMapper).getNearestNotHiddenIndex.apply(g,fl(a.isRtl()?[a.countCols()-1,-1]:[0,1]));R.setRangeStart(a._createCellCoords(b,_))}},{keys:[["ArrowLeft","Shift"]],callback:function(){R.transformEnd(0,-1*a.getDirectionFactor())}},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:function(){var g,b=a.getSelectedRangeLast(),_=b.from,T=b.to,I=(g=a.columnIndexMapper).getNearestNotHiddenIndex.apply(g,fl(a.isRtl()?[a.countCols()-1,-1]:[0,1]));R.setRangeStart(_.clone()),R.setRangeEnd(a._createCellCoords(T.row,I))},runOnlyIf:function(){return!(a.selection.isSelectedByCorner()||a.selection.isSelectedByRowHeader())}},{keys:[["ArrowRight"]],callback:function(){R.transformStart(0,a.getDirectionFactor())}},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:function(){var g,b=a.getSelectedRangeLast().highlight.row,_=(g=a.columnIndexMapper).getNearestNotHiddenIndex.apply(g,fl(a.isRtl()?[0,1]:[a.countCols()-1,-1]));R.setRangeStart(a._createCellCoords(b,_))}},{keys:[["ArrowRight","Shift"]],callback:function(){R.transformEnd(0,a.getDirectionFactor())}},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:function(){var g,b=a.getSelectedRangeLast(),_=b.from,T=b.to,I=(g=a.columnIndexMapper).getNearestNotHiddenIndex.apply(g,fl(a.isRtl()?[0,1]:[a.countCols()-1,-1]));R.setRangeStart(_.clone()),R.setRangeEnd(a._createCellCoords(T.row,I))},runOnlyIf:function(){return!(a.selection.isSelectedByCorner()||a.selection.isSelectedByRowHeader())}},{keys:[["Home"]],captureCtrl:!0,callback:function(){var g=parseInt(a.getSettings().fixedColumnsStart,10),b=a.getSelectedRangeLast().highlight.row,_=a.columnIndexMapper.getNearestNotHiddenIndex(g,1);R.setRangeStart(a._createCellCoords(b,_))},runOnlyIf:function(){return a.view.isMainTableNotFullyCoveredByOverlays()}},{keys:[["Home","Shift"]],callback:function(){R.setRangeEnd(a._createCellCoords(R.selectedRange.current().from.row,a.columnIndexMapper.getNearestNotHiddenIndex(0,1)))}},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:function(){var g=parseInt(a.getSettings().fixedRowsTop,10),b=parseInt(a.getSettings().fixedColumnsStart,10),_=a.rowIndexMapper.getNearestNotHiddenIndex(g,1),T=a.columnIndexMapper.getNearestNotHiddenIndex(b,1);R.setRangeStart(a._createCellCoords(_,T))},runOnlyIf:function(){return a.view.isMainTableNotFullyCoveredByOverlays()}},{keys:[["End"]],captureCtrl:!0,callback:function(){R.setRangeStart(a._createCellCoords(a.getSelectedRangeLast().highlight.row,a.columnIndexMapper.getNearestNotHiddenIndex(a.countCols()-1,-1)))},runOnlyIf:function(){return a.view.isMainTableNotFullyCoveredByOverlays()}},{keys:[["End","Shift"]],callback:function(){R.setRangeEnd(a._createCellCoords(R.selectedRange.current().from.row,a.columnIndexMapper.getNearestNotHiddenIndex(a.countCols()-1,-1)))}},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:function(){var g=parseInt(a.getSettings().fixedRowsBottom,10),b=a.rowIndexMapper.getNearestNotHiddenIndex(a.countRows()-g-1,-1),_=a.columnIndexMapper.getNearestNotHiddenIndex(a.countCols()-1,-1);R.setRangeStart(a._createCellCoords(b,_))},runOnlyIf:function(){return a.view.isMainTableNotFullyCoveredByOverlays()}},{keys:[["PageUp"]],callback:function(){R.transformStart(-a.countVisibleRows(),0)}},{keys:[["PageUp","Shift"]],callback:function(){var g=a.getSelectedRangeLast(),b=g.to,_=Math.max(b.row-a.countVisibleRows(),0),T=a.rowIndexMapper.getNearestNotHiddenIndex(_,1);if(T!==null){var I=a._createCellCoords(T,b.col),B=b.row-a.view.getFirstFullyVisibleRow(),V=Math.max(I.row-B,0);R.setRangeEnd(I),a.scrollViewportTo(V)}}},{keys:[["PageDown"]],callback:function(){R.transformStart(a.countVisibleRows(),0)}},{keys:[["PageDown","Shift"]],callback:function(){var g=a.getSelectedRangeLast(),b=g.to,_=Math.min(b.row+a.countVisibleRows(),a.countRows()-1),T=a.rowIndexMapper.getNearestNotHiddenIndex(_,-1);if(T!==null){var I=a._createCellCoords(T,b.col),B=b.row-a.view.getFirstFullyVisibleRow(),V=Math.min(I.row-B,a.countRows()-1);R.setRangeEnd(I),a.scrollViewportTo(V)}}},{keys:[["Tab"]],callback:function(g){var b=typeof m.tabMoves=="function"?m.tabMoves(g):m.tabMoves;R.transformStart(b.row,b.col,!0)}},{keys:[["Shift","Tab"]],callback:function(g){var b=typeof m.tabMoves=="function"?m.tabMoves(g):m.tabMoves;R.transformStart(-b.row,-b.col)}}],k),kT().forEach(function(y){var g=fv(y);S.addItem(y,new g(n))}),be.getSingleton().run(a,"construct")}var xCe="hooksRefRegisterer",m2={_hooksStorage:Object.create(null),addHook:function(t,r){return this._hooksStorage[t]||(this._hooksStorage[t]=[]),this.hot.addHook(t,r),this._hooksStorage[t].push(r),this},removeHooksByKey:function(t){var r=this;$(this._hooksStorage[t]||[],function(n){r.hot.removeHook(t,n)})},clearHooks:function(){var t=this;ze(this._hooksStorage,function(r,n){return t.removeHooksByKey(n)}),this._hooksStorage={}}};jn(m2,"MIXIN_NAME",xCe,{writable:!1,enumerable:!1});const DCe=m2;function Ls(e){return Ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ls(e)}function NCe(e,t){return BCe(e)||jCe(e,t)||LCe(e,t)||HCe()}function HCe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LCe(e,t){if(e){if(typeof e=="string")return jM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jM(e,t)}}function jM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jCe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function BCe(e){if(Array.isArray(e))return e}function FCe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&QO(e,t)}function QO(e,t){return QO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},QO(e,t)}function VCe(e){var t=zCe();return function(){var n=wg(e),o;if(t){var i=wg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return WCe(this,o)}}function WCe(e,t){if(t&&(Ls(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UCe(e)}function UCe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zCe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wg(e){return wg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wg(e)}function BM(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FM(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,YCe(n.key),n)}}function VM(e,t,r){return t&&FM(e.prototype,t),r&&FM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function YCe(e){var t=GCe(e,"string");return Ls(t)==="symbol"?t:String(t)}function GCe(e,t){if(Ls(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ls(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KCe="base",Jt=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"}),JO="baseEditor",Sf=function(){function e(t){BM(this,e),this.hot=t,this.instance=t,this.state=Jt.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this.TD=null,this.row=null,this.col=null,this.prop=null,this.originalValue=null,this.cellProperties=null,this.init()}return VM(e,[{key:"_fireCallbacks",value:function(r){this._closeCallback&&(this._closeCallback(r),this._closeCallback=null)}},{key:"init",value:function(){}},{key:"getValue",value:function(){throw Error("Editor getValue() method unimplemented")}},{key:"setValue",value:function(){throw Error("Editor setValue() method unimplemented")}},{key:"open",value:function(){throw Error("Editor open() method unimplemented")}},{key:"close",value:function(){throw Error("Editor close() method unimplemented")}},{key:"prepare",value:function(r,n,o,i,a,l){this.TD=i,this.row=r,this.col=n,this.prop=o,this.originalValue=a,this.cellProperties=l,this.state=Jt.VIRGIN}},{key:"extend",value:function(){return function(r){FCe(o,r);var n=VCe(o);function o(){return BM(this,o),n.apply(this,arguments)}return VM(o)}(this.constructor)}},{key:"saveValue",value:function(r,n){var o=this,i,a,l,s;if(n){var u=this.hot.getSelectedLast();i=Math.max(Math.min(u[0],u[2]),0),a=Math.max(Math.min(u[1],u[3]),0),l=Math.max(u[0],u[2]),s=Math.max(u[1],u[3])}else{var f=[this.row,this.col,null,null];i=f[0],a=f[1],l=f[2],s=f[3]}var c=this.hot.runHooks("modifyGetCellCoords",i,a);if(Array.isArray(c)){var h=NCe(c,2);i=h[0],a=h[1]}var d=this.hot.getShortcutManager(),v=d.getContext("editor"),p={runOnlyIf:function(){return pe(o.hot.getSelected())},group:JO};this.isInFullEditMode()&&v.addShortcuts([{keys:[["ArrowUp"]],callback:function(){o.hot.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:function(){o.hot.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:function(){o.hot.selection.transformStart(0,-1*o.hot.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:function(){o.hot.selection.transformStart(0,o.hot.getDirectionFactor())}}],p),this.hot.populateFromArray(i,a,r,l,s,"edit")}},{key:"beginEditing",value:function(r,n){if(this.state===Jt.VIRGIN){var o=this.hot,i=o.rowIndexMapper.getRenderableFromVisualIndex(this.row),a=o.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(o.view.scrollViewport(o._createCellCoords(i,a)),this.state=Jt.EDITING,this.isInFullEditMode()){var l=typeof r=="string"?r:Mt(this.originalValue);this.setValue(l)}this.open(n),this._opened=!0,this.focus(),o.view.render(),o.runHooks("afterBeginEditing",this.row,this.col)}}},{key:"finishEditing",value:function(r,n,o){var i=this,a;if(o){var l=this._closeCallback;this._closeCallback=function(c){l&&l(c),o(c),i.hot.view.render()}}if(!this.isWaiting()){var s=this.hot.getShortcutManager(),u=s.getContext("editor");if(u.removeShortcutsByGroup(JO),u.removeShortcutsByGroup(Tm),this.state===Jt.VIRGIN){this.hot._registerTimeout(function(){i._fireCallbacks(!0)});return}if(this.state===Jt.EDITING){if(r){this.cancelChanges(),this.hot.view.render();return}var f=this.getValue();this.cellProperties.trimWhitespace?a=[[typeof f=="string"?String.prototype.trim.call(f||""):f]]:a=[[f]],this.state=Jt.WAITING,this.saveValue(a,n),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",function(c){i.state=Jt.FINISHED,i.discardEditor(c)}):(this.state=Jt.FINISHED,this.discardEditor(!0))}}}},{key:"cancelChanges",value:function(){this.state=Jt.FINISHED,this.discardEditor()}},{key:"discardEditor",value:function(r){if(this.state===Jt.FINISHED)if(r===!1&&this.cellProperties.allowInvalid!==!0)this.hot.selectCell(this.row,this.col),this.focus(),this.state=Jt.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=Jt.VIRGIN,this._fireCallbacks(!0);var n=this.hot.getShortcutManager();n.setActiveContextName("grid")}}},{key:"enableFullEditMode",value:function(){this._fullEditMode=!0}},{key:"isInFullEditMode",value:function(){return this._fullEditMode}},{key:"isOpened",value:function(){return this._opened}},{key:"isWaiting",value:function(){return this.state===Jt.WAITING}},{key:"getEditedCellRect",value:function(){var r,n=this.getEditedCell();if(n){var o=this.hot.view._wt,i=o.wtOverlays,a=o.wtViewport,l=this.hot.rootWindow,s=Vt(n),u=vt(n),f=Vt(this.hot.rootElement),c=vt(this.hot.rootElement),h=i.topOverlay.holder,d=i.inlineStartOverlay.holder,v=h!==l?h.scrollTop:0,p=d!==l?d.scrollLeft:0,m=l.innerWidth-f.left-c,w=(r=i.getParentOverlay(n))!==null&&r!==void 0?r:this.hot.view._wt,S=w.wtTable,C=S.name,P=["master","inline_start"].includes(C)?v:0,R=["master","top","bottom"].includes(C)?p:0,W=s.top===f.top?0:1,z=s.top-f.top-W-P,q=0;this.hot.isRtl()?q=l.innerWidth-s.left-u-m-1+R:q=s.left-f.left-1-R,["top","top_inline_start_corner"].includes(C)&&(z+=i.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(C)&&(q+=Math.abs(i.inlineStartOverlay.getOverlayOffset()));var K=this.hot.hasColHeaders(),X=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),Q=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),ae=this.hot.rowIndexMapper.getRenderableIndexesLength(),Z=ae-this.hot.view._wt.getSetting("fixedRowsBottom");(K&&X<=0||X===Z)&&(z+=1),Q<=0&&(q+=1);var he=a.rowsRenderCalculator.startPosition,Ee=a.columnsRenderCalculator.startPosition,_e=Math.abs(i.inlineStartOverlay.getScrollPosition()),Oe=i.topOverlay.getScrollPosition(),k=Zt(this.hot.rootDocument),y=n.offsetTop+he-Oe,g=0;if(this.hot.isRtl()){var b=n.offsetLeft;b>=0?g=S.getWidth()-n.offsetLeft:g=Math.abs(b),g+=Ee-_e-u}else g=n.offsetLeft+Ee-_e;var _=wi(this.TD,this.hot.rootWindow),T=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",I=parseInt(_[T],10)>0?0:1,B=parseInt(_.borderTopWidth,10)>0?0:1,V=vt(n)+I,Y=Tt(n)+B,J=lV(h)?k:0,ee=sV(d)?k:0,le=this.hot.view.maximumVisibleElementWidth(g)-J+I,Te=Math.max(this.hot.view.maximumVisibleElementHeight(y)-ee+B,23);return{top:z,start:q,height:Y,maxHeight:Te,width:V,maxWidth:le}}}},{key:"getEditedCellsLayerClass",value:function(){var r=this.checkEditorSection();switch(r){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"}}},{key:"getEditedCell",value:function(){return this.hot.getCell(this.row,this.col,!0)}},{key:"checkEditorSection",value:function(){var r=this.hot.countRows(),n="";return this.row<this.hot.getSettings().fixedRowsTop?this.col<this.hot.getSettings().fixedColumnsStart?n="top-inline-start-corner":n="top":this.hot.getSettings().fixedRowsBottom&&this.row>=r-this.hot.getSettings().fixedRowsBottom?this.col<this.hot.getSettings().fixedColumnsStart?n="bottom-inline-start-corner":n="bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(n="inline-start"),n}}],[{key:"EDITOR_TYPE",get:function(){return KCe}}]),e}();mt(Sf,DCe);function XCe(){var e={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},t,r=document.body,n=document.createTextNode(""),o=document.createElement("SPAN"),i=function(d,v,p){d.addEventListener(v,p,!1)},a=function(d,v,p){d.removeEventListener(v,p,!1)},l=function(d){var v,p;d?/^[a-zA-Z \.,\\\/\|0-9]$/.test(d)||(d="."):d="",n.textContent!==void 0?n.textContent=t.value+d:n.data=t.value+d,o.style.position="absolute",o.style.fontSize=c(t).fontSize,o.style.fontFamily=c(t).fontFamily,o.style.whiteSpace="pre",r.appendChild(o),v=o.clientWidth+2,r.removeChild(o),t.style.height=e.minHeight+"px",e.minWidth>v?t.style.width=e.minWidth+"px":v>e.maxWidth?t.style.width=e.maxWidth+"px":t.style.width=v+"px",p=t.scrollHeight?t.scrollHeight-1:0,e.minHeight>p?t.style.height=e.minHeight+"px":e.maxHeight<p?(t.style.height=e.maxHeight+"px",t.style.overflowY="visible"):t.style.height=p+"px"},s=function(){window.setTimeout(l,0)},u=function(d){if(d&&d.minHeight)if(d.minHeight=="inherit")e.minHeight=t.clientHeight;else{var v=parseInt(d.minHeight);isNaN(v)||(e.minHeight=v)}if(d&&d.maxHeight)if(d.maxHeight=="inherit")e.maxHeight=t.clientHeight;else{var p=parseInt(d.maxHeight);isNaN(p)||(e.maxHeight=p)}if(d&&d.minWidth)if(d.minWidth=="inherit")e.minWidth=t.clientWidth;else{var m=parseInt(d.minWidth);isNaN(m)||(e.minWidth=m)}if(d&&d.maxWidth)if(d.maxWidth=="inherit")e.maxWidth=t.clientWidth;else{var w=parseInt(d.maxWidth);isNaN(w)||(e.maxWidth=w)}o.firstChild||(o.className="autoResize",o.style.display="inline-block",o.appendChild(n))},f=function(d,v,p){t=d,u(v),t.nodeName=="TEXTAREA"&&(t.style.resize="none",t.style.overflowY="",t.style.height=e.minHeight+"px",t.style.minWidth=e.minWidth+"px",t.style.maxWidth=e.maxWidth+"px",t.style.overflowY="hidden"),p&&(i(t,"change",l),i(t,"cut",s),i(t,"paste",s),i(t,"drop",s),i(t,"keydown",s),i(t,"focus",l),i(t,"compositionstart",s),i(t,"compositionupdate",s),i(t,"compositionend",s)),l()};function c(h){return h.currentStyle||document.defaultView.getComputedStyle(h)}return{init:function(d,v,p){f(d,v,p)},unObserve:function(){a(t,"change",l),a(t,"cut",s),a(t,"paste",s),a(t,"drop",s),a(t,"keydown",s),a(t,"focus",l),a(t,"compositionstart",s),a(t,"compositionupdate",s),a(t,"compositionend",s)},resize:l}}function WM(e,t){for(var r=ST(t),n=t.value.split(`
`),o=r,i=0,a=0;a<n.length;a++){var l=n[a];a!==0&&(i+=n[a-1].length+1);var s=i+l.length;if(e==="home"?o=i:e==="end"&&(o=s),r<=s)break}av(t,o)}function js(e){return js=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},js(e)}function UM(e,t){return JCe(e)||QCe(e,t)||ZCe(e,t)||qCe()}function qCe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZCe(e,t){if(e){if(typeof e=="string")return zM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zM(e,t)}}function zM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function QCe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function JCe(e){if(Array.isArray(e))return e}function e_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YM(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,r_e(n.key),n)}}function t_e(e,t,r){return t&&YM(e.prototype,t),r&&YM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function r_e(e){var t=n_e(e,"string");return js(t)==="symbol"?t:String(t)}function n_e(e,t){if(js(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(js(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wc(){return typeof Reflect<"u"&&Reflect.get?wc=Reflect.get.bind():wc=function(t,r,n){var o=o_e(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},wc.apply(this,arguments)}function o_e(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=xa(e),e!==null););return e}function i_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eR(e,t)}function eR(e,t){return eR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},eR(e,t)}function a_e(e){var t=s_e();return function(){var n=xa(e),o;if(t){var i=xa(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return l_e(this,o)}}function l_e(e,t){if(t&&(js(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return b2(e)}function b2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s_e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xa(e){return xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xa(e)}var u_e="ht_editor_visible",ay="ht_editor_hidden",GM="textEditor",f_e="text",qa=function(e){i_e(r,e);var t=a_e(r);function r(n){var o;return e_e(this,r),o=t.call(this,n),o.eventManager=new Pt(b2(o)),o.autoResize=XCe(),o.TEXTAREA=void 0,o.textareaStyle=void 0,o.TEXTAREA_PARENT=void 0,o.textareaParentStyle=void 0,o.layerClass=void 0,o.createElements(),o.bindEvents(),o.hot.addHookOnce("afterDestroy",function(){return o.destroy()}),o}return t_e(r,[{key:"getValue",value:function(){return this.TEXTAREA.value}},{key:"setValue",value:function(o){this.TEXTAREA.value=o}},{key:"open",value:function(){var o=this;this.refreshDimensions(),this.showEditableElement();var i=this.hot.getShortcutManager();i.setActiveContextName("editor"),this.addHook("afterDocumentKeyDown",function(a){return o.onAfterDocumentKeyDown(a)}),this.registerShortcuts()}},{key:"close",value:function(){this.autoResize.unObserve(),this.hot.rootDocument.activeElement===this.TEXTAREA&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts(),this.removeHooksByKey("afterDocumentKeyDown")}},{key:"prepare",value:function(o,i,a,l,s,u){var f=this.state;if(wc(xa(r.prototype),"prepare",this).call(this,o,i,a,l,s,u),!u.readOnly){this.refreshDimensions(!0);var c=u.allowInvalid,h=u.fragmentSelection;c&&(this.TEXTAREA.value=""),f!==Jt.FINISHED&&this.hideEditableElement();var d=!h;d&&!cn()&&this.focus()}}},{key:"beginEditing",value:function(o,i){this.state===Jt.VIRGIN&&(this.TEXTAREA.value="",wc(xa(r.prototype),"beginEditing",this).call(this,o,i))}},{key:"focus",value:function(){this.TEXTAREA.select(),av(this.TEXTAREA,this.TEXTAREA.value.length)}},{key:"createElements",value:function(){var o=this.hot.rootDocument;this.TEXTAREA=o.createElement("TEXTAREA"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.tabIndex=-1,te(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=o.createElement("DIV"),te(this.TEXTAREA_PARENT,"handsontableInputHolder"),Ne(this.TEXTAREA_PARENT,this.layerClass)&&Be(this.TEXTAREA_PARENT,this.layerClass),te(this.TEXTAREA_PARENT,ay),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}},{key:"hideEditableElement",value:function(){(rF()||tF())&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",Be(this.TEXTAREA_PARENT,this.layerClass),te(this.TEXTAREA_PARENT,ay)}},{key:"showEditableElement",value:function(){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";var o=this.TEXTAREA_PARENT.childNodes,i=!1;Ce(o.length-1,function(a){var l=o[a];if(Ne(l,"handsontableEditor"))return i=!0,!1}),Ne(this.TEXTAREA_PARENT,ay)&&Be(this.TEXTAREA_PARENT,ay),i?(this.layerClass=u_e,te(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),te(this.TEXTAREA_PARENT,this.layerClass))}},{key:"refreshValue",value:function(){var o=this.hot.toPhysicalRow(this.row),i=this.hot.getSourceDataAtCell(o,this.col);this.originalValue=i,this.setValue(i),this.refreshDimensions()}},{key:"refreshDimensions",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(this.state!==Jt.EDITING&&!o)){if(this.TD=this.getEditedCell(),!this.TD){o||this.close();return}var i=this.getEditedCellRect(),a=i.top,l=i.start,s=i.width,u=i.maxWidth,f=i.height,c=i.maxHeight;this.textareaParentStyle.top="".concat(a,"px"),this.textareaParentStyle[this.hot.isRtl()?"right":"left"]="".concat(l,"px"),this.showEditableElement();var h=wi(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=h.fontSize,this.TEXTAREA.style.fontFamily=h.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;var d=wi(this.TEXTAREA),v=parseInt(d.paddingLeft,10)+parseInt(d.paddingRight,10),p=parseInt(d.paddingTop,10)+parseInt(d.paddingBottom,10),m=s-v,w=f-p,S=u-v,C=c-p;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(m,S),minHeight:Math.min(w,C),maxWidth:S,maxHeight:C},!0)}}},{key:"bindEvents",value:function(){var o=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",function(i){return i.stopPropagation()}),this.eventManager.addEventListener(this.TEXTAREA,"paste",function(i){return i.stopPropagation()}),XE()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",function(){return o.finishEditing(!1)}),this.addHook("afterScrollHorizontally",function(){return o.refreshDimensions()}),this.addHook("afterScrollVertically",function(){return o.refreshDimensions()}),this.addHook("afterColumnResize",function(){o.refreshDimensions(),o.focus()}),this.addHook("afterRowResize",function(){o.refreshDimensions(),o.focus()})}},{key:"allowKeyEventPropagation",value:function(){}},{key:"destroy",value:function(){this.eventManager.destroy(),this.clearHooks()}},{key:"registerShortcuts",value:function(){var o=this,i=this.hot.getShortcutManager(),a=i.getContext("editor"),l={runOnlyIf:function(){return pe(o.hot.getSelected())},group:GM},s=function(){o.hot.rootDocument.execCommand("insertText",!1,`
`)};a.addShortcuts([{keys:[["Tab"]],callback:function(f){var c=o.hot.getSettings(),h=typeof c.tabMoves=="function"?c.tabMoves(f):c.tabMoves;o.hot.selection.transformStart(h.row,h.col,!0)}},{keys:[["Shift","Tab"]],callback:function(f){var c=o.hot.getSettings(),h=typeof c.tabMoves=="function"?c.tabMoves(f):c.tabMoves;o.hot.selection.transformStart(-h.row,-h.col)}},{keys:[["Control","Enter"]],callback:function(){return s(),!1},runOnlyIf:function(f){return!o.hot.selection.isMultiple()&&!f.altKey},relativeToGroup:pc,position:"before"},{keys:[["Meta","Enter"]],callback:function(){return s(),!1},runOnlyIf:function(){return!o.hot.selection.isMultiple()},relativeToGroup:pc,position:"before"},{keys:[["Alt","Enter"]],callback:function(){return s(),!1},relativeToGroup:pc,position:"before"},{keys:[["PageUp"]],callback:function(){o.hot.selection.transformStart(-o.hot.countVisibleRows(),0)}},{keys:[["PageDown"]],callback:function(){o.hot.selection.transformStart(o.hot.countVisibleRows(),0)}},{keys:[["Home"]],callback:function(f,c){var h=UM(c,1),d=h[0];WM(d,o.TEXTAREA)}},{keys:[["End"]],callback:function(f,c){var h=UM(c,1),d=h[0];WM(d,o.TEXTAREA)}},{keys:[["Control/Meta","Z"]],preventDefault:!1,callback:function(){o.hot._registerTimeout(function(){o.autoResize.resize()},10)}},{keys:[["Control/Meta","Shift","Z"]],preventDefault:!1,callback:function(){o.hot._registerTimeout(function(){o.autoResize.resize()},10)}}],l)}},{key:"unregisterShortcuts",value:function(){var o=this.hot.getShortcutManager(),i=o.getContext("editor");i.removeShortcutsByGroup(Tm),i.removeShortcutsByGroup(GM),i.removeShortcutsByGroup(JO)}},{key:"onAfterDocumentKeyDown",value:function(o){var i=[we.ARROW_UP,we.ARROW_RIGHT,we.ARROW_DOWN,we.ARROW_LEFT];i.indexOf(o.keyCode)===-1&&this.autoResize.resize(String.fromCharCode(o.keyCode))}}],[{key:"EDITOR_TYPE",get:function(){return f_e}}]),r}(Sf),c_e="base";function wv(e,t,r,n,o,i,a){var l=[],s=[];a.className&&te(t,a.className),a.readOnly&&l.push(a.readOnlyCellClassName),a.valid===!1&&a.invalidCellClassName?l.push(a.invalidCellClassName):s.push(a.invalidCellClassName),a.wordWrap===!1&&a.noWordWrapClassName&&l.push(a.noWordWrapClassName),!i&&a.placeholder&&l.push(a.placeholderCellClassName),Be(t,s),te(t,l)}wv.RENDERER_TYPE=c_e;var h_e="text";function Ti(e,t,r,n,o,i,a){wv.apply(this,[e,t,r,n,o,i,a]);var l=i;if(!l&&a.placeholder&&(l=a.placeholder),l=Mt(l),a.trimWhitespace&&(l=l.trim()),a.rendererTemplate){pn(t);var s=e.rootDocument.createElement("TEMPLATE");s.setAttribute("bind","{{}}"),s.innerHTML=a.rendererTemplate,HTMLTemplateElement.decorate(s),s.model=e.getSourceDataAtRow(r),t.appendChild(s)}else bi(t,l)}Ti.RENDERER_TYPE=h_e;var d_e="text",w2={CELL_TYPE:d_e,editor:qa,renderer:Ti};an(w2);Me.editors={BaseEditor:Sf};function Me(e,t){var r=new oP(e,t||{},WT);return r.init(),r}Me.Core=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new oP(e,t,WT)};Me.DefaultSettings=c2();Me.hooks=be.getSingleton();Me.CellCoords=Wp;Me.CellRange=IT;Me.packageName="handsontable";Me.buildDate="22/03/2023 14:42:41";Me.version="12.3.2";Me.languages={dictionaryKeys:xme,getLanguageDictionary:QW,getLanguagesDictionaries:Vme,registerLanguageDictionary:QT,getTranslatedPhrase:JW};var Ul=Symbol("unassigned"),v_e="The Handsontable instance bound to this component was destroyed and cannot be used properly.";function Sg(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function S2(e){var t=Me.hooks.getRegistered(),r={};Object.assign(r,Me.DefaultSettings);for(var n in r)r[n]={default:Ul};for(var o=0;o<t.length;o++)r[t[o]]={default:Ul};return r.settings={default:Ul},e==="HotTable"&&(r.id={type:String,default:"hot-".concat(Math.random().toString(36).substring(5))}),r}function C2(e){var t={},r=e.settings;if(r!==Ul)for(var n in r)Sg(r,n)&&r[n]!==Ul&&(t[n]=r[n]);for(var o in e)Sg(e,o)&&o!=="settings"&&e[o]!==Ul&&(t[o]=e[o]);return t}function KM(e,t){var r=C2(e),n=e.settings?e.settings:r,o=e.settings?r:null,i={};for(var a in n)Sg(n,a)&&n[a]!==void 0&&(!(t&&a!=="data")||!XM(t[a],n[a]))&&(i[a]=n[a]);for(var l in o)Sg(o,l)&&l!=="id"&&l!=="settings"&&o[l]!==void 0&&(!(t&&l!=="data")||!XM(t[l],o[l]))&&(i[l]=o[l]);return i}function XM(e,t){return JSON.stringify(e)===JSON.stringify(t)}var y_e="12.3.2",iP=G0({name:"HotTable",props:S2("HotTable"),provide:function(){return{columnsCache:this.columnsCache}},watch:{$props:{handler:function(t){var r=KM(t,this.hotInstance?this.hotInstance.getSettings():void 0);!this.hotInstance||r===void 0||(r.data&&(this.hotInstance.isColumnModificationAllowed()||!this.hotInstance.isColumnModificationAllowed()&&this.hotInstance.countSourceCols()===this.miscCache.currentSourceColumns)&&(this.matchHotMappersSize(),delete r.data),Object.keys(r).length?this.hotInstance.updateSettings(r):this.hotInstance.render(),this.miscCache.currentSourceColumns=this.hotInstance.countSourceCols())},deep:!0,immediate:!0}},data:function(){return{__hotInstance:null,miscCache:{currentSourceColumns:null},columnSettings:null,columnsCache:new Map,get hotInstance(){return!this.__hotInstance||this.__hotInstance&&!this.__hotInstance.isDestroyed?this.__hotInstance:(console.warn(v_e),null)},set hotInstance(t){this.__hotInstance=t}}},methods:{hotInit:function(){var t=KM(this.$props);t.columns=this.columnSettings?this.columnSettings:t.columns,this.hotInstance=Uz(new Me.Core(this.$el,t)),this.hotInstance.init(),this.miscCache.currentSourceColumns=this.hotInstance.countSourceCols()},matchHotMappersSize:function(){var t=this;if(this.hotInstance){var r=this.hotInstance.getSourceData(),n=[],o=[],i=this.hotInstance.rowIndexMapper.getNumberOfIndexes(),a=this.hotInstance.isColumnModificationAllowed(),l=0;if(r&&r.length!==i&&r.length<i)for(var s=r.length;s<i;s++)n.push(s);if(a){var u;if(l=this.hotInstance.columnIndexMapper.getNumberOfIndexes(),r&&r[0]&&((u=r[0])===null||u===void 0?void 0:u.length)!==l&&r[0].length<l)for(var f=r[0].length;f<l;f++)o.push(f)}this.hotInstance.batch(function(){n.length>0?t.hotInstance.rowIndexMapper.removeIndexes(n):t.hotInstance.rowIndexMapper.insertIndexes(i-1,r.length-i),a&&r.length!==0&&(o.length>0?t.hotInstance.columnIndexMapper.removeIndexes(o):t.hotInstance.columnIndexMapper.insertIndexes(l-1,r[0].length-l))})}},getColumnSettings:function(){var t=Array.from(this.columnsCache.values());return t.length?t:void 0}},mounted:function(){this.columnSettings=this.getColumnSettings(),this.hotInit()},beforeUnmount:function(){this.hotInstance&&this.hotInstance.destroy()},version:y_e}),p_e=["id"];function g_e(e,t,r,n,o,i){return ec(),tc("div",{id:e.id},[zz(e.$slots,"default")],8,p_e)}iP.render=g_e;iP.__file="src/HotTable.vue";function qM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function m_e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qM(Object(r),!0).forEach(function(n){b_e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b_e(e,t,r){return t=S_e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w_e(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function S_e(e){var t=w_e(e,"string");return typeof t=="symbol"?t:String(t)}var C_e=G0({name:"HotColumn",props:S2("HotColumn"),inject:["columnsCache"],methods:{createColumnSettings:function(){var t=C2(this.$props),r=m_e({},t);t.renderer&&(r.renderer=t.renderer),t.editor&&(r.editor=t.editor),this.columnsCache.set(this,r)}},mounted:function(){this.createColumnSettings()},unmounted:function(){this.columnsCache.delete(this)},render:function(){return null}});C_e.__file="src/HotColumn.vue";function __e(e,t){return`${e}-${t}`}(()=>{if(!window.matchMedia)return{value:Ml(null)};const e=Ml(window.matchMedia("(prefers-color-scheme: dark)").matches);return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>e.value=t.matches),{value:e}})();const O_e={create(){return sY("xlsx.worker.js").defaults(()=>new Worker(new URL(""+new URL("xlsx.worker-b50adc35.js",import.meta.url).href,self.location),{type:"module"}))}};var R_e=xe,E_e=Fe,T_e=Yg.f,P_e=E_e(function(){return!Object.getOwnPropertyNames(1)});R_e({target:"Object",stat:!0,forced:P_e},{getOwnPropertyNames:T_e});function Bs(e){return Bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bs(e)}function k_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZM(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,A_e(n.key),n)}}function $_e(e,t,r){return t&&ZM(e.prototype,t),r&&ZM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function A_e(e){var t=I_e(e,"string");return Bs(t)==="symbol"?t:String(t)}function I_e(e,t){if(Bs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Bs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ln(){return typeof Reflect<"u"&&Reflect.get?ln=Reflect.get.bind():ln=function(t,r,n){var o=M_e(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ln.apply(this,arguments)}function M_e(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Dr(e),e!==null););return e}function x_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tR(e,t)}function tR(e,t){return tR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},tR(e,t)}function D_e(e){var t=L_e();return function(){var n=Dr(e),o;if(t){var i=Dr(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return N_e(this,o)}}function N_e(e,t){if(t&&(Bs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return H_e(e)}function H_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L_e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Dr(e){return Dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Dr(e)}var QM="handsontableEditor",j_e="handsontable",aP=function(e){x_e(r,e);var t=D_e(r);function r(){return k_e(this,r),t.apply(this,arguments)}return $_e(r,[{key:"open",value:function(){ln(Dr(r.prototype),"open",this).call(this),this.htEditor&&this.htEditor.destroy(),this.htContainer.style.display==="none"&&(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(),av(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions()}},{key:"close",value:function(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),ln(Dr(r.prototype),"close",this).call(this)}},{key:"prepare",value:function(o,i,a,l,s,u){ln(Dr(r.prototype),"prepare",this).call(this,o,i,a,l,s,u);var f=this,c={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,afterOnCellMouseDown:function(d,v){var p=this.getSourceData(v.row,v.col);p!==void 0&&f.setValue(p),f.instance.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&Wt(c,u.handsontable),this.htOptions=c}},{key:"beginEditing",value:function(o,i){var a=this.hot.getSettings().onBeginEditing;a&&a()===!1||ln(Dr(r.prototype),"beginEditing",this).call(this,o,i)}},{key:"createElements",value:function(){ln(Dr(r.prototype),"createElements",this).call(this);var o=this.hot.rootDocument.createElement("DIV");o.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(o),this.htContainer=o,this.assignHooks()}},{key:"finishEditing",value:function(o,i,a){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){var l=this.htEditor.getInstance().getValue();l!==void 0&&this.setValue(l)}ln(Dr(r.prototype),"finishEditing",this).call(this,o,i,a)}},{key:"assignHooks",value:function(){var o=this;this.hot.addHook("afterDestroy",function(){o.htEditor&&o.htEditor.destroy()})}},{key:"registerShortcuts",value:function(){var o=this,i=this.hot.getShortcutManager(),a=i.getContext("editor");ln(Dr(r.prototype),"registerShortcuts",this).call(this);var l={group:QM,relativeToGroup:Tm,position:"before"},s=function(f,c){var h=o.htEditor.getInstance();if(f!==void 0&&(f<0||h.flipped&&f>h.countRows()-1?h.deselectCell():h.selectCell(f,0),h.getData().length))return c.preventDefault(),gn(c),o.hot.listen(),o.TEXTAREA.focus(),!1};a.addShortcuts([{keys:[["ArrowUp"]],callback:function(f){var c=o.htEditor.getInstance(),h,d;return!c.getSelectedLast()&&c.flipped?h=c.countRows()-1:c.getSelectedLast()&&(c.flipped?(d=c.getSelectedLast()[0],h=Math.max(0,d-1)):(d=c.getSelectedLast()[0],h=d-1)),s(h,f)},preventDefault:!1},{keys:[["ArrowDown"]],callback:function(f){var c=o.htEditor.getInstance(),h,d;if(!c.getSelectedLast()&&!c.flipped)h=0;else if(c.getSelectedLast()){if(c.flipped)h=c.getSelectedLast()[0]+1;else if(!c.flipped){var v=c.countRows()-1;d=c.getSelectedLast()[0],h=Math.min(v,d+1)}}return s(h,f)},preventDefault:!1}],l)}},{key:"unregisterShortcuts",value:function(){ln(Dr(r.prototype),"unregisterShortcuts",this).call(this);var o=this.hot.getShortcutManager(),i=o.getContext("editor");i.removeShortcutsByGroup(QM)}}],[{key:"EDITOR_TYPE",get:function(){return j_e}}]),r}(qa);function Fs(e){return Fs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fs(e)}function B_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JM(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,_2(n.key),n)}}function F_e(e,t,r){return t&&JM(e.prototype,t),r&&JM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qi(){return typeof Reflect<"u"&&Reflect.get?qi=Reflect.get.bind():qi=function(t,r,n){var o=V_e(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},qi.apply(this,arguments)}function V_e(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=oo(e),e!==null););return e}function W_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rR(e,t)}function rR(e,t){return rR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},rR(e,t)}function U_e(e){var t=Y_e();return function(){var n=oo(e),o;if(t){var i=oo(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return z_e(this,o)}}function z_e(e,t){if(t&&(Fs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nR(e)}function nR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Y_e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function oo(e){return oo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},oo(e)}function G_e(e,t,r){return t=_2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _2(e){var t=K_e(e,"string");return Fs(t)==="symbol"?t:String(t)}function K_e(e,t){if(Fs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Fs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zS=new WeakMap,X_e="autocomplete",lP=function(e){W_e(r,e);var t=U_e(r);function r(n){var o;return B_e(this,r),o=t.call(this,n),G_e(nR(o),"sortByRelevance",function(i,a,l){var s=[],u=[],f=i.length,c=a.length,h,d,v,p;if(f===0){for(v=0;v<c;v++)u.push(v);return u}for(v=0;v<c;v++){if(d=H_(Mt(a[v])),l)p=d.indexOf(i);else{var m=this.cellProperties.locale;p=d.toLocaleLowerCase(m).indexOf(i.toLocaleLowerCase(m))}p!==-1&&(h=d.length-p-f,s.push({baseIndex:v,index:p,charsLeft:h,value:d}))}for(s.sort(function(w,S){if(S.index===-1)return-1;if(w.index===-1)return 1;if(w.index<S.index)return-1;if(S.index<w.index)return 1;if(w.index===S.index){if(w.charsLeft<S.charsLeft)return-1;if(w.charsLeft>S.charsLeft)return 1}return 0}),v=0,c=s.length;v<c;v++)u.push(s[v].baseIndex);return u}),o.query=null,o.strippedChoices=[],o.rawChoices=[],zS.set(nR(o),{skipOne:!1,isMacOS:o.hot.rootWindow.navigator.platform.indexOf("Mac")>-1}),o}return F_e(r,[{key:"getValue",value:function(){var o=this,i=this.rawChoices.find(function(a){var l=o.stripValueIfNeeded(a);return l===o.TEXTAREA.value});return pe(i)?i:this.TEXTAREA.value}},{key:"createElements",value:function(){qi(oo(r.prototype),"createElements",this).call(this),te(this.htContainer,"autocompleteEditor"),te(this.htContainer,this.hot.rootWindow.navigator.platform.indexOf("Mac")===-1?"":"htMacScroll")}},{key:"open",value:function(){var o=this,i=zS.get(this);qi(oo(r.prototype),"open",this).call(this);var a=this.htEditor.getInstance(),l=this.cellProperties.trimDropdown===void 0?!0:this.cellProperties.trimDropdown;this.showEditableElement(),this.focus();var s=Zt();s===0&&i.isMacOS&&(s+=15),this.addHook("beforeKeyDown",function(u){return o.onBeforeKeyDown(u)}),a.updateSettings({colWidths:l?[vt(this.TEXTAREA)-2]:void 0,width:l?vt(this.TEXTAREA)+s:void 0,renderer:function(f,c,h,d,v,p,m){Ti(f,c,h,d,v,p,m);var w=o.cellProperties,S=w.filteringCaseSensitive,C=w.allowHtml,P=w.locale,R=o.query,W=Mt(p),z,q;W&&!C&&(z=S===!0?W.indexOf(R):W.toLocaleLowerCase(P).indexOf(R.toLocaleLowerCase(P)),z!==-1&&(q=W.substr(z,R.length),W=W.replace(q,"<strong>".concat(q,"</strong>")))),c.innerHTML=W},autoColumnSize:!0}),i.skipOne&&(i.skipOne=!1),this.hot._registerTimeout(function(){o.queryChoices(o.TEXTAREA.value)})}},{key:"close",value:function(){this.removeHooksByKey("beforeKeyDown"),qi(oo(r.prototype),"close",this).call(this)}},{key:"discardEditor",value:function(o){qi(oo(r.prototype),"discardEditor",this).call(this,o),this.hot.view.render()}},{key:"queryChoices",value:function(o){var i=this,a=this.cellProperties.source;this.query=o,typeof a=="function"?a.call(this.cellProperties,o,function(l){i.rawChoices=l,i.updateChoicesList(i.stripValuesIfNeeded(l))}):Array.isArray(a)?(this.rawChoices=a,this.updateChoicesList(this.stripValuesIfNeeded(a))):this.updateChoicesList([])}},{key:"updateChoicesList",value:function(o){var i=ST(this.TEXTAREA),a=iV(this.TEXTAREA),l=this.cellProperties.sortByRelevance,s=this.cellProperties.filter,u=null,f=null,c=o;l&&(u=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),c,this.cellProperties.filteringCaseSensitive));var h=Array.isArray(u)?u.length:0;if(s===!1)h&&(f=u[0]);else{for(var d=[],v=0,p=c.length;v<p&&!(l&&h<=v);v++)h?d.push(c[u[v]]):d.push(c[v]);f=0,c=d}this.strippedChoices=c,this.htEditor.loadData(fc([c])),this.updateDropdownHeight(),this.flipDropdownIfNeeded(),this.cellProperties.strict===!0&&this.highlightBestMatchingChoice(f),this.hot.listen(),av(this.TEXTAREA,i,i===a?void 0:a)}},{key:"flipDropdownIfNeeded",value:function(){var o=is(this.hot.view._wt.wtTable.TABLE),i=o===this.hot.rootWindow,a=this.cellProperties.preventOverflow;if(i||!i&&(a||a==="horizontal"))return!1;var l=Vt(this.TEXTAREA),s=Tt(this.TEXTAREA),u=this.getDropdownHeight(),f=o.scrollTop,c=Tt(this.hot.view._wt.wtTable.THEAD),h=Vt(o),d=l.top-h.top-c+f,v=o.scrollHeight-d-c-s,p=u>v&&d>v;return p?this.flipDropdown(u):this.unflipDropdown(),this.limitDropdownIfNeeded(p?d:v,u),p}},{key:"limitDropdownIfNeeded",value:function(o,i){if(i>o){var a=0,l=0,s=0,u=null;do s=this.htEditor.getRowHeight(l)||this.htEditor.view._wt.getSetting("defaultRowHeight"),a+=s,l+=1;while(a<o);u=a-s,this.htEditor.flipped&&(this.htEditor.rootElement.style.top="".concat(parseInt(this.htEditor.rootElement.style.top,10)+i-u,"px")),this.setDropdownHeight(a-s)}}},{key:"flipDropdown",value:function(o){var i=this.htEditor.rootElement.style;i.position="absolute",i.top="".concat(-o,"px"),this.htEditor.flipped=!0}},{key:"unflipDropdown",value:function(){var o=this.htEditor.rootElement.style;o.position="absolute",o.top="",this.htEditor.flipped=void 0}},{key:"updateDropdownHeight",value:function(){var o=this.htEditor.getColWidth(0)+Zt(this.hot.rootDocument)+2,i=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:i?void 0:o}),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}},{key:"setDropdownHeight",value:function(o){this.htEditor.updateSettings({height:o})}},{key:"highlightBestMatchingChoice",value:function(o){typeof o=="number"?this.htEditor.selectCell(o,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}},{key:"getDropdownHeight",value:function(){var o=this.htEditor.getInstance().getRowHeight(0)||23,i=this.cellProperties.visibleRows;return this.strippedChoices.length>=i?i*o:this.strippedChoices.length*o+8}},{key:"stripValueIfNeeded",value:function(o){return this.stripValuesIfNeeded([o])[0]}},{key:"stripValuesIfNeeded",value:function(o){var i=this.cellProperties.allowHtml,a=We(o,function(s){return Mt(s)}),l=We(a,function(s){return i?s:H_(s)});return l}},{key:"allowKeyEventPropagation",value:function(o){var i=this.htEditor.getSelectedRangeLast(),a={row:i?i.from.row:-1},l=!1;return o===we.ARROW_DOWN&&a.row>0&&a.row<this.htEditor.countRows()-1&&(l=!0),o===we.ARROW_UP&&a.row>-1&&(l=!0),l}},{key:"onBeforeKeyDown",value:function(o){var i=this,a=zS.get(this);if(a.skipOne=!1,CV(o.keyCode)||o.keyCode===we.BACKSPACE||o.keyCode===we.DELETE||o.keyCode===we.INSERT){var l=10;if(o.keyCode===we.C&&(o.ctrlKey||o.metaKey))return;this.isOpened()||(l+=10),this.htEditor&&this.hot._registerTimeout(function(){i.queryChoices(i.TEXTAREA.value),a.skipOne=!0},l)}}}],[{key:"EDITOR_TYPE",get:function(){return X_e}}]),r}(aP);function Vs(e){return Vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(e)}function q_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ex(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,Q_e(n.key),n)}}function Z_e(e,t,r){return t&&ex(e.prototype,t),r&&ex(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q_e(e){var t=J_e(e,"string");return Vs(t)==="symbol"?t:String(t)}function J_e(e,t){if(Vs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Vs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eOe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oR(e,t)}function oR(e,t){return oR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},oR(e,t)}function tOe(e){var t=oOe();return function(){var n=Cg(e),o;if(t){var i=Cg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return rOe(this,o)}}function rOe(e,t){if(t&&(Vs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nOe(e)}function nOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oOe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cg(e){return Cg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cg(e)}var iOe="checkbox",O2=function(e){eOe(r,e);var t=tOe(r);function r(){return q_e(this,r),t.apply(this,arguments)}return Z_e(r,[{key:"beginEditing",value:function(o,i){if(i&&i.type==="mouseup"){var a=this.TD.querySelector('input[type="checkbox"]');Ne(a,"htBadValue")||a.click()}}},{key:"finishEditing",value:function(){}},{key:"init",value:function(){}},{key:"open",value:function(){}},{key:"close",value:function(){}},{key:"getValue",value:function(){}},{key:"setValue",value:function(){}},{key:"focus",value:function(){}}],[{key:"EDITOR_TYPE",get:function(){return iOe}}]),r}(Sf),iR={},aOe={get exports(){return iR},set exports(e){iR=e}};const lOe=Yz(Lie);/*!
* Pikaday
*
* Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
*/(function(e,t){(function(r,n){var o;{try{o=lOe}catch{}e.exports=n(o)}})(UC,function(r){var n=typeof r=="function",o=!!window.addEventListener,i=window.document,a=window.setTimeout,l=function(k,y,g,b){o?k.addEventListener(y,g,!!b):k.attachEvent("on"+y,g)},s=function(k,y,g,b){o?k.removeEventListener(y,g,!!b):k.detachEvent("on"+y,g)},u=function(k){return k.trim?k.trim():k.replace(/^\s+|\s+$/g,"")},f=function(k,y){return(" "+k.className+" ").indexOf(" "+y+" ")!==-1},c=function(k,y){f(k,y)||(k.className=k.className===""?y:k.className+" "+y)},h=function(k,y){k.className=u((" "+k.className+" ").replace(" "+y+" "," "))},d=function(k){return/Array/.test(Object.prototype.toString.call(k))},v=function(k){return/Date/.test(Object.prototype.toString.call(k))&&!isNaN(k.getTime())},p=function(k){var y=k.getDay();return y===0||y===6},m=function(k){return k%4===0&&k%100!==0||k%400===0},w=function(k,y){return[31,m(k)?29:28,31,30,31,30,31,31,30,31,30,31][y]},S=function(k){v(k)&&k.setHours(0,0,0,0)},C=function(k,y){return k.getTime()===y.getTime()},P=function(k,y,g){var b,_;for(b in y)_=k[b]!==void 0,_&&typeof y[b]=="object"&&y[b]!==null&&y[b].nodeName===void 0?v(y[b])?g&&(k[b]=new Date(y[b].getTime())):d(y[b])?g&&(k[b]=y[b].slice(0)):k[b]=P({},y[b],g):(g||!_)&&(k[b]=y[b]);return k},R=function(k,y,g){var b;i.createEvent?(b=i.createEvent("HTMLEvents"),b.initEvent(y,!0,!1),b=P(b,g),k.dispatchEvent(b)):i.createEventObject&&(b=i.createEventObject(),b=P(b,g),k.fireEvent("on"+y,b))},W=function(k){return k.month<0&&(k.year-=Math.ceil(Math.abs(k.month)/12),k.month+=12),k.month>11&&(k.year+=Math.floor(Math.abs(k.month)/12),k.month-=12),k},z={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},q=function(k,y,g){for(y+=k.firstDay;y>=7;)y-=7;return g?k.i18n.weekdaysShort[y]:k.i18n.weekdays[y]},K=function(k){var y=[],g="false";if(k.isEmpty)if(k.showDaysInNextAndPreviousMonths)y.push("is-outside-current-month"),k.enableSelectionDaysInNextAndPreviousMonths||y.push("is-selection-disabled");else return'<td class="is-empty"></td>';return k.isDisabled&&y.push("is-disabled"),k.isToday&&y.push("is-today"),k.isSelected&&(y.push("is-selected"),g="true"),k.hasEvent&&y.push("has-event"),k.isInRange&&y.push("is-inrange"),k.isStartRange&&y.push("is-startrange"),k.isEndRange&&y.push("is-endrange"),'<td data-day="'+k.day+'" class="'+y.join(" ")+'" aria-selected="'+g+'"><button class="pika-button pika-day" type="button" data-pika-year="'+k.year+'" data-pika-month="'+k.month+'" data-pika-day="'+k.day+'">'+k.day+"</button></td>"},X=function(k,y){k.setHours(0,0,0,0);var g=k.getDate(),b=k.getDay(),_=y,T=_-1,I=7,B=function(le){return(le+I-1)%I};k.setDate(g+T-B(b));var V=new Date(k.getFullYear(),0,_),Y=24*60*60*1e3,J=(k.getTime()-V.getTime())/Y,ee=1+Math.round((J-T+B(V.getDay()))/I);return ee},Q=function(k,y,g,b){var _=new Date(g,y,k),T=n?r(_).isoWeek():X(_,b);return'<td class="pika-week">'+T+"</td>"},ae=function(k,y,g,b){return'<tr class="pika-row'+(g?" pick-whole-week":"")+(b?" is-selected":"")+'">'+(y?k.reverse():k).join("")+"</tr>"},Z=function(k){return"<tbody>"+k.join("")+"</tbody>"},he=function(k){var y,g=[];for(k.showWeekNumber&&g.push("<th></th>"),y=0;y<7;y++)g.push('<th scope="col"><abbr title="'+q(k,y)+'">'+q(k,y,!0)+"</abbr></th>");return"<thead><tr>"+(k.isRTL?g.reverse():g).join("")+"</tr></thead>"},Ee=function(k,y,g,b,_,T){var I,B,V,Y=k._o,J=g===Y.minYear,ee=g===Y.maxYear,le='<div id="'+T+'" class="pika-title" role="heading" aria-live="assertive">',Te,de,ve=!0,G=!0;for(V=[],I=0;I<12;I++)V.push('<option value="'+(g===_?I-y:12+I-y)+'"'+(I===b?' selected="selected"':"")+(J&&I<Y.minMonth||ee&&I>Y.maxMonth?' disabled="disabled"':"")+">"+Y.i18n.months[I]+"</option>");for(Te='<div class="pika-label">'+Y.i18n.months[b]+'<select class="pika-select pika-select-month" tabindex="-1">'+V.join("")+"</select></div>",d(Y.yearRange)?(I=Y.yearRange[0],B=Y.yearRange[1]+1):(I=g-Y.yearRange,B=1+g+Y.yearRange),V=[];I<B&&I<=Y.maxYear;I++)I>=Y.minYear&&V.push('<option value="'+I+'"'+(I===g?' selected="selected"':"")+">"+I+"</option>");return de='<div class="pika-label">'+g+Y.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+V.join("")+"</select></div>",Y.showMonthAfterYear?le+=de+Te:le+=Te+de,J&&(b===0||Y.minMonth>=b)&&(ve=!1),ee&&(b===11||Y.maxMonth<=b)&&(G=!1),y===0&&(le+='<button class="pika-prev'+(ve?"":" is-disabled")+'" type="button">'+Y.i18n.previousMonth+"</button>"),y===k._o.numberOfMonths-1&&(le+='<button class="pika-next'+(G?"":" is-disabled")+'" type="button">'+Y.i18n.nextMonth+"</button>"),le+="</div>"},_e=function(k,y,g){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+g+'">'+he(k)+Z(y)+"</table>"},Oe=function(k){var y=this,g=y.config(k);y._onMouseDown=function(_){if(y._v){_=_||window.event;var T=_.target||_.srcElement;if(T)if(f(T,"is-disabled")||(f(T,"pika-button")&&!f(T,"is-empty")&&!f(T.parentNode,"is-disabled")?(y.setDate(new Date(T.getAttribute("data-pika-year"),T.getAttribute("data-pika-month"),T.getAttribute("data-pika-day"))),g.bound&&a(function(){y.hide(),g.blurFieldOnSelect&&g.field&&g.field.blur()},100)):f(T,"pika-prev")?y.prevMonth():f(T,"pika-next")&&y.nextMonth()),f(T,"pika-select"))y._c=!0;else if(_.preventDefault)_.preventDefault();else return _.returnValue=!1,!1}},y._onChange=function(_){_=_||window.event;var T=_.target||_.srcElement;T&&(f(T,"pika-select-month")?y.gotoMonth(T.value):f(T,"pika-select-year")&&y.gotoYear(T.value))},y._onKeyChange=function(_){if(_=_||window.event,y.isVisible())switch(_.keyCode){case 13:case 27:g.field&&g.field.blur();break;case 37:y.adjustDate("subtract",1);break;case 38:y.adjustDate("subtract",7);break;case 39:y.adjustDate("add",1);break;case 40:y.adjustDate("add",7);break;case 8:case 46:y.setDate(null);break}},y._parseFieldValue=function(){if(g.parse)return g.parse(g.field.value,g.format);if(n){var _=r(g.field.value,g.format,g.formatStrict);return _&&_.isValid()?_.toDate():null}else return new Date(Date.parse(g.field.value))},y._onInputChange=function(_){var T;_.firedBy!==y&&(T=y._parseFieldValue(),v(T)&&y.setDate(T),y._v||y.show())},y._onInputFocus=function(){y.show()},y._onInputClick=function(){y.show()},y._onInputBlur=function(){var _=i.activeElement;do if(f(_,"pika-single"))return;while(_=_.parentNode);y._c||(y._b=a(function(){y.hide()},50)),y._c=!1},y._onClick=function(_){_=_||window.event;var T=_.target||_.srcElement,I=T;if(T){!o&&f(T,"pika-select")&&(T.onchange||(T.setAttribute("onchange","return;"),l(T,"change",y._onChange)));do if(f(I,"pika-single")||I===g.trigger)return;while(I=I.parentNode);y._v&&T!==g.trigger&&I!==g.trigger&&y.hide()}},y.el=i.createElement("div"),y.el.className="pika-single"+(g.isRTL?" is-rtl":"")+(g.theme?" "+g.theme:""),l(y.el,"mousedown",y._onMouseDown,!0),l(y.el,"touchend",y._onMouseDown,!0),l(y.el,"change",y._onChange),g.keyboardInput&&l(i,"keydown",y._onKeyChange),g.field&&(g.container?g.container.appendChild(y.el):g.bound?i.body.appendChild(y.el):g.field.parentNode.insertBefore(y.el,g.field.nextSibling),l(g.field,"change",y._onInputChange),g.defaultDate||(g.defaultDate=y._parseFieldValue(),g.setDefaultDate=!0));var b=g.defaultDate;v(b)?g.setDefaultDate?y.setDate(b,!0):y.gotoDate(b):y.gotoDate(new Date),g.bound?(this.hide(),y.el.className+=" is-bound",l(g.trigger,"click",y._onInputClick),l(g.trigger,"focus",y._onInputFocus),l(g.trigger,"blur",y._onInputBlur)):this.show()};return Oe.prototype={config:function(k){this._o||(this._o=P({},z,!0));var y=P(this._o,k,!0);y.isRTL=!!y.isRTL,y.field=y.field&&y.field.nodeName?y.field:null,y.theme=typeof y.theme=="string"&&y.theme?y.theme:null,y.bound=!!(y.bound!==void 0?y.field&&y.bound:y.field),y.trigger=y.trigger&&y.trigger.nodeName?y.trigger:y.field,y.disableWeekends=!!y.disableWeekends,y.disableDayFn=typeof y.disableDayFn=="function"?y.disableDayFn:null;var g=parseInt(y.numberOfMonths,10)||1;if(y.numberOfMonths=g>4?4:g,v(y.minDate)||(y.minDate=!1),v(y.maxDate)||(y.maxDate=!1),y.minDate&&y.maxDate&&y.maxDate<y.minDate&&(y.maxDate=y.minDate=!1),y.minDate&&this.setMinDate(y.minDate),y.maxDate&&this.setMaxDate(y.maxDate),d(y.yearRange)){var b=new Date().getFullYear()-10;y.yearRange[0]=parseInt(y.yearRange[0],10)||b,y.yearRange[1]=parseInt(y.yearRange[1],10)||b}else y.yearRange=Math.abs(parseInt(y.yearRange,10))||z.yearRange,y.yearRange>100&&(y.yearRange=100);return y},toString:function(k){return k=k||this._o.format,v(this._d)?this._o.toString?this._o.toString(this._d,k):n?r(this._d).format(k):this._d.toDateString():""},getMoment:function(){return n?r(this._d):null},setMoment:function(k,y){n&&r.isMoment(k)&&this.setDate(k.toDate(),y)},getDate:function(){return v(this._d)?new Date(this._d.getTime()):null},setDate:function(k,y){if(!k)return this._d=null,this._o.field&&(this._o.field.value="",R(this._o.field,"change",{firedBy:this})),this.draw();if(typeof k=="string"&&(k=new Date(Date.parse(k))),!!v(k)){var g=this._o.minDate,b=this._o.maxDate;v(g)&&k<g?k=g:v(b)&&k>b&&(k=b),this._d=new Date(k.getTime()),S(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),R(this._o.field,"change",{firedBy:this})),!y&&typeof this._o.onSelect=="function"&&this._o.onSelect.call(this,this.getDate())}},clear:function(){this.setDate(null)},gotoDate:function(k){var y=!0;if(v(k)){if(this.calendars){var g=new Date(this.calendars[0].year,this.calendars[0].month,1),b=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),_=k.getTime();b.setMonth(b.getMonth()+1),b.setDate(b.getDate()-1),y=_<g.getTime()||b.getTime()<_}y&&(this.calendars=[{month:k.getMonth(),year:k.getFullYear()}],this._o.mainCalendar==="right"&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(k,y){var g=this.getDate()||new Date,b=parseInt(y)*24*60*60*1e3,_;k==="add"?_=new Date(g.valueOf()+b):k==="subtract"&&(_=new Date(g.valueOf()-b)),this.setDate(_)},adjustCalendars:function(){this.calendars[0]=W(this.calendars[0]);for(var k=1;k<this._o.numberOfMonths;k++)this.calendars[k]=W({month:this.calendars[0].month+k,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(k){isNaN(k)||(this.calendars[0].month=parseInt(k,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(k){isNaN(k)||(this.calendars[0].year=parseInt(k,10),this.adjustCalendars())},setMinDate:function(k){k instanceof Date?(S(k),this._o.minDate=k,this._o.minYear=k.getFullYear(),this._o.minMonth=k.getMonth()):(this._o.minDate=z.minDate,this._o.minYear=z.minYear,this._o.minMonth=z.minMonth,this._o.startRange=z.startRange),this.draw()},setMaxDate:function(k){k instanceof Date?(S(k),this._o.maxDate=k,this._o.maxYear=k.getFullYear(),this._o.maxMonth=k.getMonth()):(this._o.maxDate=z.maxDate,this._o.maxYear=z.maxYear,this._o.maxMonth=z.maxMonth,this._o.endRange=z.endRange),this.draw()},setStartRange:function(k){this._o.startRange=k},setEndRange:function(k){this._o.endRange=k},draw:function(k){if(!(!this._v&&!k)){var y=this._o,g=y.minYear,b=y.maxYear,_=y.minMonth,T=y.maxMonth,I="",B;this._y<=g&&(this._y=g,!isNaN(_)&&this._m<_&&(this._m=_)),this._y>=b&&(this._y=b,!isNaN(T)&&this._m>T&&(this._m=T));for(var V=0;V<y.numberOfMonths;V++)B="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),I+='<div class="pika-lendar">'+Ee(this,V,this.calendars[V].year,this.calendars[V].month,this.calendars[0].year,B)+this.render(this.calendars[V].year,this.calendars[V].month,B)+"</div>";this.el.innerHTML=I,y.bound&&y.field.type!=="hidden"&&a(function(){y.trigger.focus()},1),typeof this._o.onDraw=="function"&&this._o.onDraw(this),y.bound&&y.field.setAttribute("aria-label",y.ariaLabel)}},adjustPosition:function(){var k,y,g,b,_,T,I,B,V,Y,J,ee;if(!this._o.container){if(this.el.style.position="absolute",k=this._o.trigger,y=k,g=this.el.offsetWidth,b=this.el.offsetHeight,_=window.innerWidth||i.documentElement.clientWidth,T=window.innerHeight||i.documentElement.clientHeight,I=window.pageYOffset||i.body.scrollTop||i.documentElement.scrollTop,J=!0,ee=!0,typeof k.getBoundingClientRect=="function")Y=k.getBoundingClientRect(),B=Y.left+window.pageXOffset,V=Y.bottom+window.pageYOffset;else for(B=y.offsetLeft,V=y.offsetTop+y.offsetHeight;y=y.offsetParent;)B+=y.offsetLeft,V+=y.offsetTop;(this._o.reposition&&B+g>_||this._o.position.indexOf("right")>-1&&B-g+k.offsetWidth>0)&&(B=B-g+k.offsetWidth,J=!1),(this._o.reposition&&V+b>T+I||this._o.position.indexOf("top")>-1&&V-b-k.offsetHeight>0)&&(V=V-b-k.offsetHeight,ee=!1),this.el.style.left=B+"px",this.el.style.top=V+"px",c(this.el,J?"left-aligned":"right-aligned"),c(this.el,ee?"bottom-aligned":"top-aligned"),h(this.el,J?"right-aligned":"left-aligned"),h(this.el,ee?"top-aligned":"bottom-aligned")}},render:function(k,y,g){var b=this._o,_=new Date,T=w(k,y),I=new Date(k,y,1).getDay(),B=[],V=[];S(_),b.firstDay>0&&(I-=b.firstDay,I<0&&(I+=7));for(var Y=y===0?11:y-1,J=y===11?0:y+1,ee=y===0?k-1:k,le=y===11?k+1:k,Te=w(ee,Y),de=T+I,ve=de;ve>7;)ve-=7;de+=7-ve;for(var G=!1,De=0,Xe=0;De<de;De++){var $e=new Date(k,y,1+(De-I)),Ie=v(this._d)?C($e,this._d):!1,Ae=C($e,_),O=b.events.indexOf($e.toDateString())!==-1,E=De<I||De>=T+I,A=1+(De-I),H=y,M=k,j=b.startRange&&C(b.startRange,$e),x=b.endRange&&C(b.endRange,$e),D=b.startRange&&b.endRange&&b.startRange<$e&&$e<b.endRange,F=b.minDate&&$e<b.minDate||b.maxDate&&$e>b.maxDate||b.disableWeekends&&p($e)||b.disableDayFn&&b.disableDayFn($e);E&&(De<I?(A=Te+A,H=Y,M=ee):(A=A-T,H=J,M=le));var L={day:A,month:H,year:M,hasEvent:O,isSelected:Ie,isToday:Ae,isDisabled:F,isEmpty:E,isStartRange:j,isEndRange:x,isInRange:D,showDaysInNextAndPreviousMonths:b.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:b.enableSelectionDaysInNextAndPreviousMonths};b.pickWholeWeek&&Ie&&(G=!0),V.push(K(L)),++Xe===7&&(b.showWeekNumber&&V.unshift(Q(De-I,y,k,b.firstWeekOfYearMinDays)),B.push(ae(V,b.isRTL,b.pickWholeWeek,G)),V=[],Xe=0,G=!1)}return _e(b,B,g)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),h(this.el,"is-hidden"),this._o.bound&&(l(i,"click",this._onClick),this.adjustPosition()),typeof this._o.onOpen=="function"&&this._o.onOpen.call(this))},hide:function(){var k=this._v;k!==!1&&(this._o.bound&&s(i,"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),c(this.el,"is-hidden"),this._v=!1,k!==void 0&&typeof this._o.onClose=="function"&&this._o.onClose.call(this))},destroy:function(){var k=this._o;this.hide(),s(this.el,"mousedown",this._onMouseDown,!0),s(this.el,"touchend",this._onMouseDown,!0),s(this.el,"change",this._onChange),k.keyboardInput&&s(i,"keydown",this._onKeyChange),k.field&&(s(k.field,"change",this._onInputChange),k.bound&&(s(k.trigger,"click",this._onInputClick),s(k.trigger,"focus",this._onInputFocus),s(k.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},Oe})})(aOe);const tx=iR;function Ws(e){return Ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ws(e)}function sOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rx(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,fOe(n.key),n)}}function uOe(e,t,r){return t&&rx(e.prototype,t),r&&rx(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function fOe(e){var t=cOe(e,"string");return Ws(t)==="symbol"?t:String(t)}function cOe(e,t){if(Ws(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ws(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eo(){return typeof Reflect<"u"&&Reflect.get?eo=Reflect.get.bind():eo=function(t,r,n){var o=hOe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},eo.apply(this,arguments)}function hOe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=fn(e),e!==null););return e}function dOe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&aR(e,t)}function aR(e,t){return aR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},aR(e,t)}function vOe(e){var t=gOe();return function(){var n=fn(e),o;if(t){var i=fn(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return yOe(this,o)}}function yOe(e,t){if(t&&(Ws(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pOe(e)}function pOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gOe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fn(e){return fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fn(e)}var R2="date",nx="dateEditor",E2=function(e){dOe(r,e);var t=vOe(r);function r(n){var o;return sOe(this,r),o=t.call(this,n),o.defaultDateFormat="DD/MM/YYYY",o.isCellEdited=!1,o.parentDestroyed=!1,o.$datePicker=null,o}return uOe(r,[{key:"init",value:function(){var o=this;if(typeof re!="function")throw new Error("You need to include moment.js to your project.");if(typeof tx!="function")throw new Error("You need to include Pikaday to your project.");eo(fn(r.prototype),"init",this).call(this),this.instance.addHook("afterDestroy",function(){o.parentDestroyed=!0,o.destroyElements()})}},{key:"createElements",value:function(){eo(fn(r.prototype),"createElements",this).call(this),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"),te(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker);var o=new Pt(this);o.addEventListener(this.datePicker,"mousedown",function(i){return i.stopPropagation()})}},{key:"destroyElements",value:function(){var o=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),o&&o.removeChild(this.datePicker)}},{key:"prepare",value:function(o,i,a,l,s,u){eo(fn(r.prototype),"prepare",this).call(this,o,i,a,l,s,u)}},{key:"open",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this.hot.getShortcutManager(),a=i.getContext("editor");eo(fn(r.prototype),"open",this).call(this),this.showDatepicker(o),a.addShortcut({keys:[["Enter"]],callback:function(s){s.stopPropagation()},group:nx})}},{key:"close",value:function(){var o,i=this;this._opened=!1,(o=this.$datePicker)!==null&&o!==void 0&&o.destroy&&this.$datePicker.destroy(),this.instance._registerTimeout(function(){i.instance._refreshBorders()});var a=this.hot.getShortcutManager(),l=a.getContext("editor");l.removeShortcutsByGroup(nx),eo(fn(r.prototype),"close",this).call(this)}},{key:"finishEditing",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(o){var a=this.originalValue;a!==void 0&&this.setValue(a)}eo(fn(r.prototype),"finishEditing",this).call(this,o,i)}},{key:"showDatepicker",value:function(o){var i=this.TD.getBoundingClientRect(),a=this.cellProperties.dateFormat||this.defaultDateFormat,l=this.instance.view.isMouseDown(),s=o?ET(o.keyCode):!1,u;this.datePicker.style.display="block",this.$datePicker=new tx(this.getDatePickerConfig()),this.$datePicker._onInputFocus=function(){},this.datePickerStyle.top="".concat(this.hot.rootWindow.pageYOffset+i.top+Tt(this.TD),"px");var f=this.hot.rootWindow.pageXOffset;this.hot.isRtl()?f=i.right-vt(this.datePicker):f=i.left,this.datePickerStyle.left="".concat(f,"px"),this.originalValue?(u=this.originalValue,re(u,a,!0).isValid()&&this.$datePicker.setMoment(re(u,a),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),!s&&!l&&this.setValue("")):this.cellProperties.defaultDate?(u=this.cellProperties.defaultDate,re(u,a,!0).isValid()&&this.$datePicker.setMoment(re(u,a),!0),!s&&!l&&this.setValue("")):this.$datePicker.gotoToday()}},{key:"hideDatepicker",value:function(){this.datePickerStyle.display="none",this.$datePicker.hide()}},{key:"getDatePickerConfig",value:function(){var o=this,i=this.TEXTAREA,a={};this.cellProperties&&this.cellProperties.datePickerConfig&&tv(a,this.cellProperties.datePickerConfig);var l=a.onSelect,s=a.onClose;return a.field=i,a.trigger=i,a.container=this.datePicker,a.bound=!1,a.format=a.format||this.defaultDateFormat,a.reposition=a.reposition||!1,a.isRTL=!1,a.onSelect=function(u){var f=u;isNaN(f.getTime())||(f=re(f).format(o.cellProperties.dateFormat||o.defaultDateFormat)),o.setValue(f),o.hideDatepicker(),l&&l()},a.onClose=function(){o.parentDestroyed||o.finishEditing(!1),s&&s()},a}}],[{key:"EDITOR_TYPE",get:function(){return R2}}]),r}(qa);function Us(e){return Us=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Us(e)}function mOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ox(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,wOe(n.key),n)}}function bOe(e,t,r){return t&&ox(e.prototype,t),r&&ox(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function wOe(e){var t=SOe(e,"string");return Us(t)==="symbol"?t:String(t)}function SOe(e,t){if(Us(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Us(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function np(){return typeof Reflect<"u"&&Reflect.get?np=Reflect.get.bind():np=function(t,r,n){var o=COe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},np.apply(this,arguments)}function COe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=zs(e),e!==null););return e}function _Oe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lR(e,t)}function lR(e,t){return lR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},lR(e,t)}function OOe(e){var t=TOe();return function(){var n=zs(e),o;if(t){var i=zs(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ROe(this,o)}}function ROe(e,t){if(t&&(Us(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return EOe(e)}function EOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TOe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zs(e){return zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zs(e)}var POe="dropdown",sP=function(e){_Oe(r,e);var t=OOe(r);function r(){return mOe(this,r),t.apply(this,arguments)}return bOe(r,[{key:"prepare",value:function(o,i,a,l,s,u){np(zs(r.prototype),"prepare",this).call(this,o,i,a,l,s,u),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}],[{key:"EDITOR_TYPE",get:function(){return POe}}]),r}(lP);be.getSingleton().add("beforeValidate",function(e,t,r){var n=this.getCellMeta(t,this.propToCol(r));n.editor===sP&&n.strict===void 0&&(n.filter=!1,n.strict=!0)});function Ys(e){return Ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ys(e)}function kOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ix(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,AOe(n.key),n)}}function $Oe(e,t,r){return t&&ix(e.prototype,t),r&&ix(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function AOe(e){var t=IOe(e,"string");return Ys(t)==="symbol"?t:String(t)}function IOe(e,t){if(Ys(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ys(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MOe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sR(e,t)}function sR(e,t){return sR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},sR(e,t)}function xOe(e){var t=HOe();return function(){var n=_g(e),o;if(t){var i=_g(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return DOe(this,o)}}function DOe(e,t){if(t&&(Ys(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NOe(e)}function NOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HOe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _g(e){return _g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_g(e)}var LOe="numeric",T2=function(e){MOe(r,e);var t=xOe(r);function r(){return kOe(this,r),t.apply(this,arguments)}return $Oe(r,null,[{key:"EDITOR_TYPE",get:function(){return LOe}}]),r}(qa);function Gs(e){return Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gs(e)}function jOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ax(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,FOe(n.key),n)}}function BOe(e,t,r){return t&&ax(e.prototype,t),r&&ax(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function FOe(e){var t=VOe(e,"string");return Gs(t)==="symbol"?t:String(t)}function VOe(e,t){if(Gs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Gs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function op(){return typeof Reflect<"u"&&Reflect.get?op=Reflect.get.bind():op=function(t,r,n){var o=WOe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},op.apply(this,arguments)}function WOe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ks(e),e!==null););return e}function UOe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uR(e,t)}function uR(e,t){return uR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},uR(e,t)}function zOe(e){var t=KOe();return function(){var n=Ks(e),o;if(t){var i=Ks(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return YOe(this,o)}}function YOe(e,t){if(t&&(Gs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GOe(e)}function GOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KOe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ks(e){return Ks=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ks(e)}var XOe="password",P2=function(e){UOe(r,e);var t=zOe(r);function r(){return jOe(this,r),t.apply(this,arguments)}return BOe(r,[{key:"createElements",value:function(){op(Ks(r.prototype),"createElements",this).call(this),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,pn(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}],[{key:"EDITOR_TYPE",get:function(){return XOe}}]),r}(qa);function Da(e){return Da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Da(e)}function qOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lx(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,QOe(n.key),n)}}function ZOe(e,t,r){return t&&lx(e.prototype,t),r&&lx(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function QOe(e){var t=JOe(e,"string");return Da(t)==="symbol"?t:String(t)}function JOe(e,t){if(Da(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Da(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ip(){return typeof Reflect<"u"&&Reflect.get?ip=Reflect.get.bind():ip=function(t,r,n){var o=eRe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ip.apply(this,arguments)}function eRe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Xs(e),e!==null););return e}function tRe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fR(e,t)}function fR(e,t){return fR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},fR(e,t)}function rRe(e){var t=iRe();return function(){var n=Xs(e),o;if(t){var i=Xs(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return nRe(this,o)}}function nRe(e,t){if(t&&(Da(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oRe(e)}function oRe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iRe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xs(e){return Xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xs(e)}var YS="ht_editor_visible",sx="selectEditor",aRe="select",lRe=function(e){tRe(r,e);var t=rRe(r);function r(){return qOe(this,r),t.apply(this,arguments)}return ZOe(r,[{key:"init",value:function(){this.select=this.hot.rootDocument.createElement("SELECT"),te(this.select,"htSelectEditor"),this.select.style.display="none",this.hot.rootElement.appendChild(this.select),this.registerHooks()}},{key:"getValue",value:function(){return this.select.value}},{key:"setValue",value:function(o){this.select.value=o}},{key:"open",value:function(){this._opened=!0,this.refreshDimensions(),this.select.style.display="";var o=this.hot.getShortcutManager();o.setActiveContextName("editor"),this.registerShortcuts()}},{key:"close",value:function(){this._opened=!1,this.select.style.display="none",Ne(this.select,YS)&&Be(this.select,YS),this.unregisterShortcuts(),this.clearHooks()}},{key:"focus",value:function(){this.select.focus()}},{key:"registerHooks",value:function(){var o=this;this.addHook("afterScrollHorizontally",function(){return o.refreshDimensions()}),this.addHook("afterScrollVertically",function(){return o.refreshDimensions()}),this.addHook("afterColumnResize",function(){return o.refreshDimensions()}),this.addHook("afterRowResize",function(){return o.refreshDimensions()})}},{key:"prepare",value:function(o,i,a,l,s,u){var f=this;ip(Xs(r.prototype),"prepare",this).call(this,o,i,a,l,s,u);var c=this.cellProperties.selectOptions,h;typeof c=="function"?h=this.prepareOptions(c(this.row,this.col,this.prop)):h=this.prepareOptions(c),pn(this.select),ze(h,function(d,v){var p=f.hot.rootDocument.createElement("OPTION");p.value=v,Ka(p,d),f.select.appendChild(p)})}},{key:"prepareOptions",value:function(o){var i={};if(Array.isArray(o))for(var a=0,l=o.length;a<l;a++)i[o[a]]=o[a];else Da(o)==="object"&&(i=o);return i}},{key:"refreshValue",value:function(){var o=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=o,this.setValue(o),this.refreshDimensions()}},{key:"refreshDimensions",value:function(){if(this.state===Jt.EDITING){if(this.TD=this.getEditedCell(),!this.TD){this.close();return}var o=this.getEditedCellRect(),i=o.top,a=o.start,l=o.width,s=o.height,u=this.select.style;u.height="".concat(s,"px"),u.width="".concat(l,"px"),u.top="".concat(i,"px"),u[this.hot.isRtl()?"right":"left"]="".concat(a,"px"),u.margin="0px",te(this.select,YS)}}},{key:"registerShortcuts",value:function(){var o=this,i=this.hot.getShortcutManager(),a=i.getContext("editor"),l={group:sx};this.isInFullEditMode()!==!1&&a.addShortcuts([{keys:[["ArrowUp"]],callback:function(){var u=o.select.selectedIndex-1;u>=0&&(o.select[u].selected=!0)}},{keys:[["ArrowDown"]],callback:function(){var u=o.select.selectedIndex+1;u<=o.select.length-1&&(o.select[u].selected=!0)}}],l)}},{key:"unregisterShortcuts",value:function(){var o=this.hot.getShortcutManager(),i=o.getContext("editor");i.removeShortcutsByGroup(sx)}}],[{key:"EDITOR_TYPE",get:function(){return aRe}}]),r}(Sf);function qs(e){return qs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qs(e)}function sRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ux(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,fRe(n.key),n)}}function uRe(e,t,r){return t&&ux(e.prototype,t),r&&ux(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function fRe(e){var t=cRe(e,"string");return qs(t)==="symbol"?t:String(t)}function cRe(e,t){if(qs(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ap(){return typeof Reflect<"u"&&Reflect.get?ap=Reflect.get.bind():ap=function(t,r,n){var o=hRe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ap.apply(this,arguments)}function hRe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Zs(e),e!==null););return e}function dRe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cR(e,t)}function cR(e,t){return cR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},cR(e,t)}function vRe(e){var t=gRe();return function(){var n=Zs(e),o;if(t){var i=Zs(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return yRe(this,o)}}function yRe(e,t){if(t&&(qs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pRe(e)}function pRe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gRe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zs(e){return Zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zs(e)}var mRe="time",k2=function(e){dRe(r,e);var t=vRe(r);function r(){return sRe(this,r),t.apply(this,arguments)}return uRe(r,[{key:"prepare",value:function(o,i,a,l,s,u){ap(Zs(r.prototype),"prepare",this).call(this,o,i,a,l,s,u),this.TEXTAREA.dir="ltr"}}],[{key:"EDITOR_TYPE",get:function(){return mRe}}]),r}(qa);function bRe(){_r(Sf),_r(lP),_r(O2),_r(E2),_r(sP),_r(aP),_r(T2),_r(P2),_r(lRe),_r(qa),_r(k2)}var wRe="html";function uP(e,t,r,n,o,i,a){wv.apply(this,[e,t,r,n,o,i,a]),Ka(t,i??"",!1)}uP.RENDERER_TYPE=wRe;var SRe="autocomplete";function Cf(e,t,r,n,o,i,a){var l=e.rootDocument,s=a.allowHtml?uP:Ti,u=l.createElement("DIV");if(u.className="htAutocompleteArrow",u.appendChild(l.createTextNode(String.fromCharCode(9660))),s.apply(this,[e,t,r,n,o,i,a]),t.firstChild||t.appendChild(l.createTextNode(String.fromCharCode(160))),t.insertBefore(u,t.firstChild),te(t,"htAutocomplete"),!e.acArrowListener){var f=new Pt(e);e.acArrowListener=function(c){Ne(c.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(r,n),t)},f.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",function(){f.destroy()})}}Cf.RENDERER_TYPE=SRe;var fx=new WeakMap,cx=new WeakMap,CRe="htBadValue",Qs="data-row",Js="data-col",_Re="checkboxRenderer",$2="checkbox";be.getSingleton().add("modifyAutoColumnSizeSeed",function(e,t,r){var n=t.label,o=t.type,i=t.row,a=t.column,l=t.prop;if(o===$2){if(n){var s=n.value,u=n.property,f=r;if(s)f=typeof s=="function"?s(i,a,l,r):s;else if(u){var c=this.getDataAtRowProp(i,u);f=c!==null?c:r}e=f}return e}});function fP(e,t,r,n,o,i,a){var l=e.rootDocument;wv.apply(this,[e,t,r,n,o,i,a]),ORe(e);var s=RRe(l),u=a.label,f=!1;if(typeof a.checkedTemplate>"u"&&(a.checkedTemplate=!0),typeof a.uncheckedTemplate>"u"&&(a.uncheckedTemplate=!1),pn(t),i===a.checkedTemplate||Mt(i).toLocaleLowerCase(a.locale)===Mt(a.checkedTemplate).toLocaleLowerCase(a.locale)?s.checked=!0:i===a.uncheckedTemplate||Mt(i).toLocaleLowerCase(a.locale)===Mt(a.uncheckedTemplate).toLocaleLowerCase(a.locale)?s.checked=!1:Kt(i)?te(s,"noValue"):(s.style.display="none",te(s,CRe),f=!0),s.setAttribute(Qs,r),s.setAttribute(Js,n),!f&&u){var c="";if(u.value)c=typeof u.value=="function"?u.value.call(this,r,n,o,i):u.value;else if(u.property){var h=e.getDataAtRowProp(r,u.property);c=h!==null?h:""}var d=ERe(l,c,u.separated!==!0);u.position==="before"?u.separated?(t.appendChild(d),t.appendChild(s)):(d.appendChild(s),s=d):(!u.position||u.position==="after")&&(u.separated?(t.appendChild(s),t.appendChild(d)):(d.insertBefore(s,d.firstChild),s=d))}(!u||u&&!u.separated)&&t.appendChild(s),f&&t.appendChild(l.createTextNode("#bad-value#")),fx.has(e)||(fx.set(e,!0),v());function v(){var w=e.getShortcutManager(),S=w.getContext("grid"),C={group:_Re};S.addShortcuts([{keys:[["space"]],callback:function(){return p(),!m()}},{keys:[["enter"]],callback:function(){return p(),!m()},runOnlyIf:function(){return e.getSettings().enterBeginsEditing}},{keys:[["delete"],["backspace"]],callback:function(){return p(!0),!m()},relativeToGroup:pc,position:"before"}],C)}function p(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,S=e.getSelectedRange();if(S)for(var C=0;C<S.length;C++){for(var P=S[C].getTopStartCorner(),R=P.row,W=P.col,z=S[C].getBottomEndCorner(),q=z.row,K=z.col,X=[],Q=R;Q<=q;Q+=1)for(var ae=W;ae<=K;ae+=1){var Z=e.getCellMeta(Q,ae);if(Z.type!=="checkbox")return;if(Z.readOnly!==!0){typeof Z.checkedTemplate>"u"&&(Z.checkedTemplate=!0),typeof Z.uncheckedTemplate>"u"&&(Z.uncheckedTemplate=!1);var he=e.getDataAtCell(Q,ae);w===!1?[Z.checkedTemplate,Z.checkedTemplate.toString()].includes(he)?X.push([Q,ae,Z.uncheckedTemplate]):[Z.uncheckedTemplate,Z.uncheckedTemplate.toString(),null,void 0].includes(he)&&X.push([Q,ae,Z.checkedTemplate]):X.push([Q,ae,Z.uncheckedTemplate])}}X.length>0&&e.setDataAtCell(X)}}function m(){var w=e.getSelectedRange();if(w){for(var S=0;S<w.length;S++)for(var C=w[S].getTopStartCorner(),P=w[S].getBottomEndCorner(),R=C.row;R<=P.row;R++)for(var W=C.col;W<=P.col;W++){var z=e.getCellMeta(R,W);if(z.type!=="checkbox")return!1;var q=e.getCell(R,W);if(q==null)return!0;var K=q.querySelectorAll("input[type=checkbox]");if(K.length>0&&!z.readOnly)return!0}return!1}}}fP.RENDERER_TYPE=$2;function ORe(e){var t=cx.get(e);if(!t){var r=e.rootElement;t=new Pt(e),t.addEventListener(r,"click",function(n){return PRe(n,e)}),t.addEventListener(r,"mouseup",function(n){return TRe(n,e)}),t.addEventListener(r,"change",function(n){return kRe(n,e)}),cx.set(e,t)}return t}function RRe(e){var t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("autocomplete","off"),t.setAttribute("tabindex","-1"),t.cloneNode(!1)}function ERe(e,t,r){var n=e.createElement("label");return n.className="htCheckboxRendererLabel ".concat(r?"fullWidth":""),n.appendChild(e.createTextNode(t)),n.cloneNode(!0)}function TRe(e,t){var r=e.target;cP(r)&&(!r.hasAttribute(Qs)||!r.hasAttribute(Js)||setTimeout(t.listen,10))}function PRe(e,t){var r=e.target;if(cP(r)&&!(!r.hasAttribute(Qs)||!r.hasAttribute(Js))){var n=parseInt(r.getAttribute(Qs),10),o=parseInt(r.getAttribute(Js),10),i=t.getCellMeta(n,o);i.readOnly&&e.preventDefault()}}function kRe(e,t){var r=e.target;if(cP(r)&&!(!r.hasAttribute(Qs)||!r.hasAttribute(Js))){var n=parseInt(r.getAttribute(Qs),10),o=parseInt(r.getAttribute(Js),10),i=t.getCellMeta(n,o);if(!i.readOnly){var a=null;e.target.checked?a=i.uncheckedTemplate===void 0?!0:i.checkedTemplate:a=i.uncheckedTemplate===void 0?!1:i.uncheckedTemplate,t.setDataAtCell(n,o,a)}}}function cP(e){return e.tagName==="INPUT"&&e.getAttribute("type")==="checkbox"}var hR={},$Re={get exports(){return hR},set exports(e){hR=e}};(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,o,i){function a(u,f){if(!o[u]){if(!n[u]){var c=typeof Pv=="function"&&Pv;if(!f&&c)return c(u,!0);if(l)return l(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var d=o[u]={exports:{}};n[u][0].call(d.exports,function(v){return a(n[u][1][v]||v)},d,d.exports,r,n,o,i)}return o[u].exports}for(var l=typeof Pv=="function"&&Pv,s=0;s<i.length;s++)a(i[s]);return a}({1:[function(r,n,o){(function(i){var a,l=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,f="[BigNumber Error] ",c=f+"Number primitive has more than 15 significant digits: ",h=1e14,d=14,v=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,w=1e9;function S(K){var X=0|K;return 0<K||K===X?X:X-1}function C(K){for(var X,Q,ae=1,Z=K.length,he=K[0]+"";ae<Z;){for(X=K[ae++]+"",Q=d-X.length;Q--;X="0"+X);he+=X}for(Z=he.length;he.charCodeAt(--Z)===48;);return he.slice(0,Z+1||1)}function P(K,X){var Q,ae,Z=K.c,he=X.c,Ee=K.s,_e=X.s,Oe=K.e,k=X.e;if(!Ee||!_e)return null;if(Q=Z&&!Z[0],ae=he&&!he[0],Q||ae)return Q?ae?0:-_e:Ee;if(Ee!=_e)return Ee;if(Q=Ee<0,ae=Oe==k,!Z||!he)return ae?0:!Z^Q?1:-1;if(!ae)return k<Oe^Q?1:-1;for(_e=(Oe=Z.length)<(k=he.length)?Oe:k,Ee=0;Ee<_e;Ee++)if(Z[Ee]!=he[Ee])return Z[Ee]>he[Ee]^Q?1:-1;return Oe==k?0:k<Oe^Q?1:-1}function R(K,X,Q,ae){if(K<X||Q<K||K!==(K<0?s(K):u(K)))throw Error(f+(ae||"Argument")+(typeof K=="number"?K<X||Q<K?" out of range: ":" not an integer: ":" not a primitive number: ")+String(K))}function W(K){var X=K.c.length-1;return S(K.e/d)==X&&K.c[X]%2!=0}function z(K,X){return(1<K.length?K.charAt(0)+"."+K.slice(1):K)+(X<0?"e":"e+")+X}function q(K,X,Q){var ae,Z;if(X<0){for(Z=Q+".";++X;Z+=Q);K=Z+K}else if(++X>(ae=K.length)){for(Z=Q,X-=ae;--X;Z+=Q);K+=Z}else X<ae&&(K=K.slice(0,X)+"."+K.slice(X));return K}(a=function K(X){var Q,ae,Z,he,Ee,_e,Oe,k,y,g,b=G.prototype={constructor:G,toString:null,valueOf:null},_=new G(1),T=20,I=4,B=-7,V=21,Y=-1e7,J=1e7,ee=!1,le=1,Te=0,de={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},ve="0123456789abcdefghijklmnopqrstuvwxyz";function G(O,E){var A,H,M,j,x,D,F,L,U=this;if(!(U instanceof G))return new G(O,E);if(E==null){if(O instanceof G)return U.s=O.s,U.e=O.e,void(U.c=(O=O.c)?O.slice():O);if((D=typeof O=="number")&&0*O==0){if(U.s=1/O<0?(O=-O,-1):1,O===~~O){for(j=0,x=O;10<=x;x/=10,j++);return U.e=j,void(U.c=[O])}L=String(O)}else{if(L=String(O),!l.test(L))return Z(U,L,D);U.s=L.charCodeAt(0)==45?(L=L.slice(1),-1):1}-1<(j=L.indexOf("."))&&(L=L.replace(".","")),0<(x=L.search(/e/i))?(j<0&&(j=x),j+=+L.slice(x+1),L=L.substring(0,x)):j<0&&(j=L.length)}else{if(R(E,2,ve.length,"Base"),L=String(O),E==10)return Ie(U=new G(O instanceof G?O:L),T+U.e+1,I);if(D=typeof O=="number"){if(0*O!=0)return Z(U,L,D,E);if(U.s=1/O<0?(L=L.slice(1),-1):1,G.DEBUG&&15<L.replace(/^0\.0*|\./,"").length)throw Error(c+O);D=!1}else U.s=L.charCodeAt(0)===45?(L=L.slice(1),-1):1;for(A=ve.slice(0,E),j=x=0,F=L.length;x<F;x++)if(A.indexOf(H=L.charAt(x))<0){if(H=="."){if(j<x){j=F;continue}}else if(!M&&(L==L.toUpperCase()&&(L=L.toLowerCase())||L==L.toLowerCase()&&(L=L.toUpperCase()))){M=!0,x=-1,j=0;continue}return Z(U,String(O),D,E)}-1<(j=(L=ae(L,E,10,U.s)).indexOf("."))?L=L.replace(".",""):j=L.length}for(x=0;L.charCodeAt(x)===48;x++);for(F=L.length;L.charCodeAt(--F)===48;);if(L=L.slice(x,++F)){if(F-=x,D&&G.DEBUG&&15<F&&(v<O||O!==u(O)))throw Error(c+U.s*O);if(J<(j=j-x-1))U.c=U.e=null;else if(j<Y)U.c=[U.e=0];else{if(U.e=j,U.c=[],x=(j+1)%d,j<0&&(x+=d),x<F){for(x&&U.c.push(+L.slice(0,x)),F-=d;x<F;)U.c.push(+L.slice(x,x+=d));L=L.slice(x),x=d-L.length}else x-=F;for(;x--;L+="0");U.c.push(+L)}}else U.c=[U.e=0]}function De(O,E,A,H){var M,j,x,D,F;if(A==null?A=I:R(A,0,8),!O.c)return O.toString();if(M=O.c[0],x=O.e,E==null)F=C(O.c),F=H==1||H==2&&(x<=B||V<=x)?z(F,x):q(F,x,"0");else if(j=(O=Ie(new G(O),E,A)).e,D=(F=C(O.c)).length,H==1||H==2&&(E<=j||j<=B)){for(;D<E;F+="0",D++);F=z(F,j)}else if(E-=x,F=q(F,j,"0"),D<j+1){if(0<--E)for(F+=".";E--;F+="0");}else if(0<(E+=j-D))for(j+1==D&&(F+=".");E--;F+="0");return O.s<0&&M?"-"+F:F}function Xe(O,E){for(var A,H=1,M=new G(O[0]);H<O.length;H++){if(!(A=new G(O[H])).s){M=A;break}E.call(M,A)&&(M=A)}return M}function $e(O,E,A){for(var H=1,M=E.length;!E[--M];E.pop());for(M=E[0];10<=M;M/=10,H++);return(A=H+A*d-1)>J?O.c=O.e=null:O.c=A<Y?[O.e=0]:(O.e=A,E),O}function Ie(O,E,A,H){var M,j,x,D,F,L,U,ie=O.c,me=p;if(ie){e:{for(M=1,D=ie[0];10<=D;D/=10,M++);if((j=E-M)<0)j+=d,x=E,U=(F=ie[L=0])/me[M-x-1]%10|0;else if((L=s((j+1)/d))>=ie.length){if(!H)break e;for(;ie.length<=L;ie.push(0));F=U=0,x=(j%=d)-d+(M=1)}else{for(F=D=ie[L],M=1;10<=D;D/=10,M++);U=(x=(j%=d)-d+M)<0?0:F/me[M-x-1]%10|0}if(H=H||E<0||ie[L+1]!=null||(x<0?F:F%me[M-x-1]),H=A<4?(U||H)&&(A==0||A==(O.s<0?3:2)):5<U||U==5&&(A==4||H||A==6&&(0<j?0<x?F/me[M-x]:0:ie[L-1])%10&1||A==(O.s<0?8:7)),E<1||!ie[0])return ie.length=0,H?(E-=O.e+1,ie[0]=me[(d-E%d)%d],O.e=-E||0):ie[0]=O.e=0,O;if(j==0?(ie.length=L,D=1,L--):(ie.length=L+1,D=me[d-j],ie[L]=0<x?u(F/me[M-x]%me[x])*D:0),H)for(;;){if(L==0){for(j=1,x=ie[0];10<=x;x/=10,j++);for(x=ie[0]+=D,D=1;10<=x;x/=10,D++);j!=D&&(O.e++,ie[0]==h&&(ie[0]=1));break}if(ie[L]+=D,ie[L]!=h)break;ie[L--]=0,D=1}for(j=ie.length;ie[--j]===0;ie.pop());}O.e>J?O.c=O.e=null:O.e<Y&&(O.c=[O.e=0])}return O}function Ae(O){var E,A=O.e;return A===null?O.toString():(E=C(O.c),E=A<=B||V<=A?z(E,A):q(E,A,"0"),O.s<0?"-"+E:E)}return G.clone=K,G.ROUND_UP=0,G.ROUND_DOWN=1,G.ROUND_CEIL=2,G.ROUND_FLOOR=3,G.ROUND_HALF_UP=4,G.ROUND_HALF_DOWN=5,G.ROUND_HALF_EVEN=6,G.ROUND_HALF_CEIL=7,G.ROUND_HALF_FLOOR=8,G.EUCLID=9,G.config=G.set=function(O){var E,A;if(O!=null){if(typeof O!="object")throw Error(f+"Object expected: "+O);if(O.hasOwnProperty(E="DECIMAL_PLACES")&&(R(A=O[E],0,w,E),T=A),O.hasOwnProperty(E="ROUNDING_MODE")&&(R(A=O[E],0,8,E),I=A),O.hasOwnProperty(E="EXPONENTIAL_AT")&&((A=O[E])&&A.pop?(R(A[0],-w,0,E),R(A[1],0,w,E),B=A[0],V=A[1]):(R(A,-w,w,E),B=-(V=A<0?-A:A))),O.hasOwnProperty(E="RANGE"))if((A=O[E])&&A.pop)R(A[0],-w,-1,E),R(A[1],1,w,E),Y=A[0],J=A[1];else{if(R(A,-w,w,E),!A)throw Error(f+E+" cannot be zero: "+A);Y=-(J=A<0?-A:A)}if(O.hasOwnProperty(E="CRYPTO")){if((A=O[E])!==!!A)throw Error(f+E+" not true or false: "+A);if(A){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw ee=!A,Error(f+"crypto unavailable");ee=A}else ee=A}if(O.hasOwnProperty(E="MODULO_MODE")&&(R(A=O[E],0,9,E),le=A),O.hasOwnProperty(E="POW_PRECISION")&&(R(A=O[E],0,w,E),Te=A),O.hasOwnProperty(E="FORMAT")){if(typeof(A=O[E])!="object")throw Error(f+E+" not an object: "+A);de=A}if(O.hasOwnProperty(E="ALPHABET")){if(typeof(A=O[E])!="string"||/^.$|[+-.\s]|(.).*\1/.test(A))throw Error(f+E+" invalid: "+A);ve=A}}return{DECIMAL_PLACES:T,ROUNDING_MODE:I,EXPONENTIAL_AT:[B,V],RANGE:[Y,J],CRYPTO:ee,MODULO_MODE:le,POW_PRECISION:Te,FORMAT:de,ALPHABET:ve}},G.isBigNumber=function(O){return O instanceof G||O&&O._isBigNumber===!0||!1},G.maximum=G.max=function(){return Xe(arguments,b.lt)},G.minimum=G.min=function(){return Xe(arguments,b.gt)},G.random=(he=9007199254740992,Ee=Math.random()*he&2097151?function(){return u(Math.random()*he)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(O){var E,A,H,M,j,x=0,D=[],F=new G(_);if(O==null?O=T:R(O,0,w),M=s(O/d),ee)if(crypto.getRandomValues){for(E=crypto.getRandomValues(new Uint32Array(M*=2));x<M;)9e15<=(j=131072*E[x]+(E[x+1]>>>11))?(A=crypto.getRandomValues(new Uint32Array(2)),E[x]=A[0],E[x+1]=A[1]):(D.push(j%1e14),x+=2);x=M/2}else{if(!crypto.randomBytes)throw ee=!1,Error(f+"crypto unavailable");for(E=crypto.randomBytes(M*=7);x<M;)9e15<=(j=281474976710656*(31&E[x])+1099511627776*E[x+1]+4294967296*E[x+2]+16777216*E[x+3]+(E[x+4]<<16)+(E[x+5]<<8)+E[x+6])?crypto.randomBytes(7).copy(E,x):(D.push(j%1e14),x+=7);x=M/7}if(!ee)for(;x<M;)(j=Ee())<9e15&&(D[x++]=j%1e14);for(M=D[--x],O%=d,M&&O&&(j=p[d-O],D[x]=u(M/j)*j);D[x]===0;D.pop(),x--);if(x<0)D=[H=0];else{for(H=-1;D[0]===0;D.splice(0,1),H-=d);for(x=1,j=D[0];10<=j;j/=10,x++);x<d&&(H-=d-x)}return F.e=H,F.c=D,F}),G.sum=function(){for(var O=1,E=arguments,A=new G(E[0]);O<E.length;)A=A.plus(E[O++]);return A},ae=function(){var O="0123456789";function E(A,H,M,j){for(var x,D,F=[0],L=0,U=A.length;L<U;){for(D=F.length;D--;F[D]*=H);for(F[0]+=j.indexOf(A.charAt(L++)),x=0;x<F.length;x++)F[x]>M-1&&(F[x+1]==null&&(F[x+1]=0),F[x+1]+=F[x]/M|0,F[x]%=M)}return F.reverse()}return function(A,H,M,j,x){var D,F,L,U,ie,me,Re,He,Ze=A.indexOf("."),ht=T,Le=I;for(0<=Ze&&(U=Te,Te=0,A=A.replace(".",""),me=(He=new G(H)).pow(A.length-Ze),Te=U,He.c=E(q(C(me.c),me.e,"0"),10,M,O),He.e=He.c.length),L=U=(Re=E(A,H,M,x?(D=ve,O):(D=O,ve))).length;Re[--U]==0;Re.pop());if(!Re[0])return D.charAt(0);if(Ze<0?--L:(me.c=Re,me.e=L,me.s=j,Re=(me=Q(me,He,ht,Le,M)).c,ie=me.r,L=me.e),Ze=Re[F=L+ht+1],U=M/2,ie=ie||F<0||Re[F+1]!=null,ie=Le<4?(Ze!=null||ie)&&(Le==0||Le==(me.s<0?3:2)):U<Ze||Ze==U&&(Le==4||ie||Le==6&&1&Re[F-1]||Le==(me.s<0?8:7)),F<1||!Re[0])A=ie?q(D.charAt(1),-ht,D.charAt(0)):D.charAt(0);else{if(Re.length=F,ie)for(--M;++Re[--F]>M;)Re[F]=0,F||(++L,Re=[1].concat(Re));for(U=Re.length;!Re[--U];);for(Ze=0,A="";Ze<=U;A+=D.charAt(Re[Ze++]));A=q(A,L,D.charAt(0))}return A}}(),Q=function(){function O(H,M,j){var x,D,F,L,U=0,ie=H.length,me=M%m,Re=M/m|0;for(H=H.slice();ie--;)U=((D=me*(F=H[ie]%m)+(x=Re*F+(L=H[ie]/m|0)*me)%m*m+U)/j|0)+(x/m|0)+Re*L,H[ie]=D%j;return U&&(H=[U].concat(H)),H}function E(H,M,j,x){var D,F;if(j!=x)F=x<j?1:-1;else for(D=F=0;D<j;D++)if(H[D]!=M[D]){F=H[D]>M[D]?1:-1;break}return F}function A(H,M,j,x){for(var D=0;j--;)H[j]-=D,D=H[j]<M[j]?1:0,H[j]=D*x+H[j]-M[j];for(;!H[0]&&1<H.length;H.splice(0,1));}return function(H,M,j,x,D){var F,L,U,ie,me,Re,He,Ze,ht,Le,je,ot,lt,tt,Qe,et,jt,yt=H.s==M.s?1:-1,ft=H.c,it=M.c;if(!(ft&&ft[0]&&it&&it[0]))return new G(H.s&&M.s&&(ft?!it||ft[0]!=it[0]:it)?ft&&ft[0]==0||!it?0*yt:yt/0:NaN);for(ht=(Ze=new G(yt)).c=[],yt=j+(L=H.e-M.e)+1,D||(D=h,L=S(H.e/d)-S(M.e/d),yt=yt/d|0),U=0;it[U]==(ft[U]||0);U++);if(it[U]>(ft[U]||0)&&L--,yt<0)ht.push(1),ie=!0;else{for(tt=ft.length,et=it.length,yt+=2,1<(me=u(D/(it[U=0]+1)))&&(it=O(it,me,D),ft=O(ft,me,D),et=it.length,tt=ft.length),lt=et,je=(Le=ft.slice(0,et)).length;je<et;Le[je++]=0);jt=it.slice(),jt=[0].concat(jt),Qe=it[0],it[1]>=D/2&&Qe++;do{if(me=0,(F=E(it,Le,et,je))<0){if(ot=Le[0],et!=je&&(ot=ot*D+(Le[1]||0)),1<(me=u(ot/Qe)))for(D<=me&&(me=D-1),He=(Re=O(it,me,D)).length,je=Le.length;E(Re,Le,He,je)==1;)me--,A(Re,et<He?jt:it,He,D),He=Re.length,F=1;else me==0&&(F=me=1),He=(Re=it.slice()).length;if(He<je&&(Re=[0].concat(Re)),A(Le,Re,je,D),je=Le.length,F==-1)for(;E(it,Le,et,je)<1;)me++,A(Le,et<je?jt:it,je,D),je=Le.length}else F===0&&(me++,Le=[0]);ht[U++]=me,Le[0]?Le[je++]=ft[lt]||0:(Le=[ft[lt]],je=1)}while((lt++<tt||Le[0]!=null)&&yt--);ie=Le[0]!=null,ht[0]||ht.splice(0,1)}if(D==h){for(U=1,yt=ht[0];10<=yt;yt/=10,U++);Ie(Ze,j+(Ze.e=U+L*d-1)+1,x,ie)}else Ze.e=L,Ze.r=+ie;return Ze}}(),_e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,Oe=/^([^.]+)\.$/,k=/^\.([^.]+)$/,y=/^-?(Infinity|NaN)$/,g=/^\s*\+(?=[\w.])|^\s+|\s+$/g,Z=function(O,E,A,H){var M,j=A?E:E.replace(g,"");if(y.test(j))O.s=isNaN(j)?null:j<0?-1:1,O.c=O.e=null;else{if(!A&&(j=j.replace(_e,function(x,D,F){return M=(F=F.toLowerCase())=="x"?16:F=="b"?2:8,H&&H!=M?x:D}),H&&(M=H,j=j.replace(Oe,"$1").replace(k,"0.$1")),E!=j))return new G(j,M);if(G.DEBUG)throw Error(f+"Not a"+(H?" base "+H:"")+" number: "+E);O.c=O.e=O.s=null}},b.absoluteValue=b.abs=function(){var O=new G(this);return O.s<0&&(O.s=1),O},b.comparedTo=function(O,E){return P(this,new G(O,E))},b.decimalPlaces=b.dp=function(O,E){var A,H,M;if(O!=null)return R(O,0,w),E==null?E=I:R(E,0,8),Ie(new G(this),O+this.e+1,E);if(!(A=this.c))return null;if(H=((M=A.length-1)-S(this.e/d))*d,M=A[M])for(;M%10==0;M/=10,H--);return H<0&&(H=0),H},b.dividedBy=b.div=function(O,E){return Q(this,new G(O,E),T,I)},b.dividedToIntegerBy=b.idiv=function(O,E){return Q(this,new G(O,E),0,1)},b.exponentiatedBy=b.pow=function(O,E){var A,H,M,j,x,D,F,L,U=this;if((O=new G(O)).c&&!O.isInteger())throw Error(f+"Exponent not an integer: "+Ae(O));if(E!=null&&(E=new G(E)),x=14<O.e,!U.c||!U.c[0]||U.c[0]==1&&!U.e&&U.c.length==1||!O.c||!O.c[0])return L=new G(Math.pow(+Ae(U),x?2-W(O):+Ae(O))),E?L.mod(E):L;if(D=O.s<0,E){if(E.c?!E.c[0]:!E.s)return new G(NaN);(H=!D&&U.isInteger()&&E.isInteger())&&(U=U.mod(E))}else{if(9<O.e&&(0<U.e||U.e<-1||(U.e==0?1<U.c[0]||x&&24e7<=U.c[1]:U.c[0]<8e13||x&&U.c[0]<=9999975e7)))return j=U.s<0&&W(O)?-0:0,-1<U.e&&(j=1/j),new G(D?1/j:j);Te&&(j=s(Te/d+2))}for(F=x?(A=new G(.5),D&&(O.s=1),W(O)):(M=Math.abs(+Ae(O)))%2,L=new G(_);;){if(F){if(!(L=L.times(U)).c)break;j?L.c.length>j&&(L.c.length=j):H&&(L=L.mod(E))}if(M){if((M=u(M/2))===0)break;F=M%2}else if(Ie(O=O.times(A),O.e+1,1),14<O.e)F=W(O);else{if((M=+Ae(O))==0)break;F=M%2}U=U.times(U),j?U.c&&U.c.length>j&&(U.c.length=j):H&&(U=U.mod(E))}return H?L:(D&&(L=_.div(L)),E?L.mod(E):j?Ie(L,Te,I,void 0):L)},b.integerValue=function(O){var E=new G(this);return O==null?O=I:R(O,0,8),Ie(E,E.e+1,O)},b.isEqualTo=b.eq=function(O,E){return P(this,new G(O,E))===0},b.isFinite=function(){return!!this.c},b.isGreaterThan=b.gt=function(O,E){return 0<P(this,new G(O,E))},b.isGreaterThanOrEqualTo=b.gte=function(O,E){return(E=P(this,new G(O,E)))===1||E===0},b.isInteger=function(){return!!this.c&&S(this.e/d)>this.c.length-2},b.isLessThan=b.lt=function(O,E){return P(this,new G(O,E))<0},b.isLessThanOrEqualTo=b.lte=function(O,E){return(E=P(this,new G(O,E)))===-1||E===0},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&&this.c[0]==0},b.minus=function(O,E){var A,H,M,j,x=this,D=x.s;if(E=(O=new G(O,E)).s,!D||!E)return new G(NaN);if(D!=E)return O.s=-E,x.plus(O);var F=x.e/d,L=O.e/d,U=x.c,ie=O.c;if(!F||!L){if(!U||!ie)return U?(O.s=-E,O):new G(ie?x:NaN);if(!U[0]||!ie[0])return ie[0]?(O.s=-E,O):new G(U[0]?x:I==3?-0:0)}if(F=S(F),L=S(L),U=U.slice(),D=F-L){for((M=(j=D<0)?(D=-D,U):(L=F,ie)).reverse(),E=D;E--;M.push(0));M.reverse()}else for(H=(j=(D=U.length)<(E=ie.length))?D:E,D=E=0;E<H;E++)if(U[E]!=ie[E]){j=U[E]<ie[E];break}if(j&&(M=U,U=ie,ie=M,O.s=-O.s),0<(E=(H=ie.length)-(A=U.length)))for(;E--;U[A++]=0);for(E=h-1;D<H;){if(U[--H]<ie[H]){for(A=H;A&&!U[--A];U[A]=E);--U[A],U[H]+=h}U[H]-=ie[H]}for(;U[0]==0;U.splice(0,1),--L);return U[0]?$e(O,U,L):(O.s=I==3?-1:1,O.c=[O.e=0],O)},b.modulo=b.mod=function(O,E){var A,H,M=this;return O=new G(O,E),!M.c||!O.s||O.c&&!O.c[0]?new G(NaN):!O.c||M.c&&!M.c[0]?new G(M):(le==9?(H=O.s,O.s=1,A=Q(M,O,0,3),O.s=H,A.s*=H):A=Q(M,O,0,le),(O=M.minus(A.times(O))).c[0]||le!=1||(O.s=M.s),O)},b.multipliedBy=b.times=function(O,E){var A,H,M,j,x,D,F,L,U,ie,me,Re,He,Ze,ht,Le=this,je=Le.c,ot=(O=new G(O,E)).c;if(!(je&&ot&&je[0]&&ot[0]))return!Le.s||!O.s||je&&!je[0]&&!ot||ot&&!ot[0]&&!je?O.c=O.e=O.s=null:(O.s*=Le.s,je&&ot?(O.c=[0],O.e=0):O.c=O.e=null),O;for(H=S(Le.e/d)+S(O.e/d),O.s*=Le.s,(F=je.length)<(ie=ot.length)&&(He=je,je=ot,ot=He,M=F,F=ie,ie=M),M=F+ie,He=[];M--;He.push(0));for(Ze=h,ht=m,M=ie;0<=--M;){for(A=0,me=ot[M]%ht,Re=ot[M]/ht|0,j=M+(x=F);M<j;)A=((L=me*(L=je[--x]%ht)+(D=Re*L+(U=je[x]/ht|0)*me)%ht*ht+He[j]+A)/Ze|0)+(D/ht|0)+Re*U,He[j--]=L%Ze;He[j]=A}return A?++H:He.splice(0,1),$e(O,He,H)},b.negated=function(){var O=new G(this);return O.s=-O.s||null,O},b.plus=function(O,E){var A,H=this,M=H.s;if(E=(O=new G(O,E)).s,!M||!E)return new G(NaN);if(M!=E)return O.s=-E,H.minus(O);var j=H.e/d,x=O.e/d,D=H.c,F=O.c;if(!j||!x){if(!D||!F)return new G(M/0);if(!D[0]||!F[0])return F[0]?O:new G(D[0]?H:0*M)}if(j=S(j),x=S(x),D=D.slice(),M=j-x){for((A=0<M?(x=j,F):(M=-M,D)).reverse();M--;A.push(0));A.reverse()}for((M=D.length)-(E=F.length)<0&&(A=F,F=D,D=A,E=M),M=0;E;)M=(D[--E]=D[E]+F[E]+M)/h|0,D[E]=h===D[E]?0:D[E]%h;return M&&(D=[M].concat(D),++x),$e(O,D,x)},b.precision=b.sd=function(O,E){var A,H,M;if(O!=null&&O!==!!O)return R(O,1,w),E==null?E=I:R(E,0,8),Ie(new G(this),O,E);if(!(A=this.c))return null;if(H=(M=A.length-1)*d+1,M=A[M]){for(;M%10==0;M/=10,H--);for(M=A[0];10<=M;M/=10,H++);}return O&&this.e+1>H&&(H=this.e+1),H},b.shiftedBy=function(O){return R(O,-v,v),this.times("1e"+O)},b.squareRoot=b.sqrt=function(){var O,E,A,H,M,j=this,x=j.c,D=j.s,F=j.e,L=T+4,U=new G("0.5");if(D!==1||!x||!x[0])return new G(!D||D<0&&(!x||x[0])?NaN:x?j:1/0);if((A=(D=Math.sqrt(+Ae(j)))==0||D==1/0?(((E=C(x)).length+F)%2==0&&(E+="0"),D=Math.sqrt(+E),F=S((F+1)/2)-(F<0||F%2),new G(E=D==1/0?"1e"+F:(E=D.toExponential()).slice(0,E.indexOf("e")+1)+F)):new G(D+"")).c[0]){for((D=(F=A.e)+L)<3&&(D=0);;)if(M=A,A=U.times(M.plus(Q(j,M,L,1))),C(M.c).slice(0,D)===(E=C(A.c)).slice(0,D)){if(A.e<F&&--D,(E=E.slice(D-3,D+1))!="9999"&&(H||E!="4999")){+E&&(+E.slice(1)||E.charAt(0)!="5")||(Ie(A,A.e+T+2,1),O=!A.times(A).eq(j));break}if(!H&&(Ie(M,M.e+T+2,0),M.times(M).eq(j))){A=M;break}L+=4,D+=4,H=1}}return Ie(A,A.e+T+1,I,O)},b.toExponential=function(O,E){return O!=null&&(R(O,0,w),O++),De(this,O,E,1)},b.toFixed=function(O,E){return O!=null&&(R(O,0,w),O=O+this.e+1),De(this,O,E)},b.toFormat=function(O,E,A){var H;if(A==null)O!=null&&E&&typeof E=="object"?(A=E,E=null):O&&typeof O=="object"?(A=O,O=E=null):A=de;else if(typeof A!="object")throw Error(f+"Argument not an object: "+A);if(H=this.toFixed(O,E),this.c){var M,j=H.split("."),x=+A.groupSize,D=+A.secondaryGroupSize,F=A.groupSeparator||"",L=j[0],U=j[1],ie=this.s<0,me=ie?L.slice(1):L,Re=me.length;if(D&&(M=x,x=D,Re-=D=M),0<x&&0<Re){for(M=Re%x||x,L=me.substr(0,M);M<Re;M+=x)L+=F+me.substr(M,x);0<D&&(L+=F+me.slice(M)),ie&&(L="-"+L)}H=U?L+(A.decimalSeparator||"")+((D=+A.fractionGroupSize)?U.replace(new RegExp("\\d{"+D+"}\\B","g"),"$&"+(A.fractionGroupSeparator||"")):U):L}return(A.prefix||"")+H+(A.suffix||"")},b.toFraction=function(O){var E,A,H,M,j,x,D,F,L,U,ie,me,Re=this,He=Re.c;if(O!=null&&(!(D=new G(O)).isInteger()&&(D.c||D.s!==1)||D.lt(_)))throw Error(f+"Argument "+(D.isInteger()?"out of range: ":"not an integer: ")+Ae(D));if(!He)return new G(Re);for(E=new G(_),L=A=new G(_),H=F=new G(_),me=C(He),j=E.e=me.length-Re.e-1,E.c[0]=p[(x=j%d)<0?d+x:x],O=!O||0<D.comparedTo(E)?0<j?E:L:D,x=J,J=1/0,D=new G(me),F.c[0]=0;U=Q(D,E,0,1),(M=A.plus(U.times(H))).comparedTo(O)!=1;)A=H,H=M,L=F.plus(U.times(M=L)),F=M,E=D.minus(U.times(M=E)),D=M;return M=Q(O.minus(A),H,0,1),F=F.plus(M.times(L)),A=A.plus(M.times(H)),F.s=L.s=Re.s,ie=Q(L,H,j*=2,I).minus(Re).abs().comparedTo(Q(F,A,j,I).minus(Re).abs())<1?[L,H]:[F,A],J=x,ie},b.toNumber=function(){return+Ae(this)},b.toPrecision=function(O,E){return O!=null&&R(O,1,w),De(this,O,E,2)},b.toString=function(O){var E,A=this,H=A.s,M=A.e;return M===null?H?(E="Infinity",H<0&&(E="-"+E)):E="NaN":(E=O==null?M<=B||V<=M?z(C(A.c),M):q(C(A.c),M,"0"):O===10?q(C((A=Ie(new G(A),T+M+1,I)).c),A.e,"0"):(R(O,2,ve.length,"Base"),ae(q(C(A.c),M,"0"),10,O,H,!0)),H<0&&A.c[0]&&(E="-"+E)),E},b.valueOf=b.toJSON=function(){return Ae(this)},b._isBigNumber=!0,typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"&&(b[Symbol.toStringTag]="BigNumber",b[Symbol.for("nodejs.util.inspect.custom")]=b.valueOf),X!=null&&G.set(X),G}()).default=a.BigNumber=a,n!==void 0&&n.exports?n.exports=a:(i||(i=typeof self<"u"&&self?self:window),i.BigNumber=a)})(this)},{}],2:[function(r,n,o){n.exports={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(i){var a=i%10;return~~(i%100/10)==1?"th":a===1?"st":a===2?"nd":a===3?"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(r,n,o){function i(S,C){return function(P){if(Array.isArray(P))return P}(S)||function(P,R){var W=[],z=!0,q=!1,K=void 0;try{for(var X,Q=P[Symbol.iterator]();!(z=(X=Q.next()).done)&&(W.push(X.value),!R||W.length!==R);z=!0);}catch(ae){q=!0,K=ae}finally{try{z||Q.return==null||Q.return()}finally{if(q)throw K}}return W}(S,C)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var a=r("./globalState"),l=r("./validating"),s=r("./parsing"),u=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],f={general:{scale:1024,suffixes:u,marker:"bd"},binary:{scale:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],marker:"b"},decimal:{scale:1e3,suffixes:u,marker:"d"}},c={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1};function h(S){var C=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},P=2<arguments.length?arguments[2]:void 0;if(typeof C=="string"&&(C=s.parseFormat(C)),!l.validateFormat(C))return"ERROR: invalid format";var R=C.prefix||"",W=C.postfix||"",z=function(q,K,X){switch(K.output){case"currency":return K=w(K,a.currentCurrencyDefaultFormat()),function(ve,G,De){var Xe=De.currentCurrency(),$e=Object.assign({},c,G),Ie=void 0,Ae="",O=!!$e.totalLength||!!$e.forceAverage||$e.average,E=G.currencyPosition||Xe.position,A=G.currencySymbol||Xe.symbol;$e.spaceSeparated&&(Ae=" "),E==="infix"&&(Ie=Ae+A+Ae);var H=m({instance:ve,providedFormat:G,state:De,decimalSeparator:Ie});return E==="prefix"&&(H=ve._value<0&&$e.negative==="sign"?"-".concat(Ae).concat(A).concat(H.slice(1)):A+Ae+H),E&&E!=="postfix"||(H=H+(Ae=O?"":Ae)+A),H}(q,K,a);case"percent":return K=w(K,a.currentPercentageDefaultFormat()),function(ve,G,De,Xe){var $e=G.prefixSymbol,Ie=m({instance:Xe(100*ve._value),providedFormat:G,state:De}),Ae=Object.assign({},c,G);return $e?"%".concat(Ae.spaceSeparated?" ":"").concat(Ie):"".concat(Ie).concat(Ae.spaceSeparated?" ":"","%")}(q,K,a,X);case"byte":return K=w(K,a.currentByteDefaultFormat()),_=q,I=a,B=X,V=(T=K).base||"binary",Y=f[V],J=d(_._value,Y.suffixes,Y.scale),ee=J.value,le=J.suffix,Te=m({instance:B(ee),providedFormat:T,state:I,defaults:I.currentByteDefaultFormat()}),de=I.currentAbbreviations(),"".concat(Te).concat(de.spaced?" ":"").concat(le);case"time":return K=w(K,a.currentTimeDefaultFormat()),k=q,y=Math.floor(k._value/60/60),g=Math.floor((k._value-60*y*60)/60),b=Math.round(k._value-60*y*60-60*g),"".concat(y,":").concat(g<10?"0":"").concat(g,":").concat(b<10?"0":"").concat(b);case"ordinal":return K=w(K,a.currentOrdinalDefaultFormat()),Q=q,ae=K,he=(Z=a).currentOrdinal(),Ee=Object.assign({},c,ae),_e=m({instance:Q,providedFormat:ae,state:Z}),Oe=he(Q._value),"".concat(_e).concat(Ee.spaceSeparated?" ":"").concat(Oe);case"number":default:return m({instance:q,providedFormat:K,numbro:X})}var Q,ae,Z,he,Ee,_e,Oe,k,y,g,b,_,T,I,B,V,Y,J,ee,le,Te,de}(S,C,P);return z=(z=R+z)+W}function d(S,C,P){var R=C[0],W=Math.abs(S);if(P<=W){for(var z=1;z<C.length;++z){var q=Math.pow(P,z),K=Math.pow(P,z+1);if(q<=W&&W<K){R=C[z],S/=q;break}}R===C[0]&&(S/=Math.pow(P,C.length-1),R=C[C.length-1])}return{value:S,suffix:R}}function v(S){for(var C="",P=0;P<S;P++)C+="0";return C}function p(S,C){return S.toString().indexOf("e")!==-1?function(P,R){var W=P.toString(),z=i(W.split("e"),2),q=z[0],K=z[1],X=i(q.split("."),2),Q=X[0],ae=X[1],Z=ae===void 0?"":ae;if(0<+K)W=Q+Z+v(K-Z.length);else{var he=".";he=+Q<0?"-0".concat(he):"0".concat(he);var Ee=(v(-K-1)+Math.abs(Q)+Z).substr(0,R);Ee.length<R&&(Ee+=v(R-Ee.length)),W=he+Ee}return 0<+K&&0<R&&(W+=".".concat(v(R))),W}(S,C):(Math.round(+"".concat(S,"e+").concat(C))/Math.pow(10,C)).toFixed(C)}function m(S){var C=S.instance,P=S.providedFormat,R=S.state,W=R===void 0?a:R,z=S.decimalSeparator,q=S.defaults,K=q===void 0?W.currentDefaults():q,X=C._value;if(X===0&&W.hasZeroFormat())return W.getZeroFormat();if(!isFinite(X))return X.toString();var Q,ae,Z,he,Ee,_e,Oe,k,y=Object.assign({},c,K,P),g=y.totalLength,b=g?0:y.characteristic,_=y.optionalCharacteristic,T=y.forceAverage,I=!!g||!!T||y.average,B=g?-1:I&&P.mantissa===void 0?0:y.mantissa,V=!g&&(P.optionalMantissa===void 0?B===-1:y.optionalMantissa),Y=y.trimMantissa,J=y.thousandSeparated,ee=y.spaceSeparated,le=y.negative,Te=y.forceSign,de=y.exponential,ve="";if(I){var G=function(O){var E=O.value,A=O.forceAverage,H=O.abbreviations,M=O.spaceSeparated,j=M!==void 0&&M,x=O.totalLength,D=x===void 0?0:x,F="",L=Math.abs(E),U=-1;if(L>=Math.pow(10,12)&&!A||A==="trillion"?(F=H.trillion,E/=Math.pow(10,12)):L<Math.pow(10,12)&&L>=Math.pow(10,9)&&!A||A==="billion"?(F=H.billion,E/=Math.pow(10,9)):L<Math.pow(10,9)&&L>=Math.pow(10,6)&&!A||A==="million"?(F=H.million,E/=Math.pow(10,6)):(L<Math.pow(10,6)&&L>=Math.pow(10,3)&&!A||A==="thousand")&&(F=H.thousand,E/=Math.pow(10,3)),F&&(F=(j?" ":"")+F),D){var ie=E.toString().split(".")[0];U=Math.max(D-ie.length,0)}return{value:E,abbreviation:F,mantissaPrecision:U}}({value:X,forceAverage:T,abbreviations:W.currentAbbreviations(),spaceSeparated:ee,totalLength:g});X=G.value,ve+=G.abbreviation,g&&(B=G.mantissaPrecision)}if(de){var De=(ae=(Q={value:X,characteristicPrecision:b}).value,Z=Q.characteristicPrecision,he=Z===void 0?0:Z,Ee=i(ae.toExponential().split("e"),2),_e=Ee[0],Oe=Ee[1],k=+_e,he&&1<he&&(k*=Math.pow(10,he-1),Oe=0<=(Oe=+Oe-(he-1))?"+".concat(Oe):Oe),{value:k,abbreviation:"e".concat(Oe)});X=De.value,ve=De.abbreviation+ve}var Xe,$e,Ie,Ae=function(O,E,A,H,M){if(H===-1)return O;var j=p(E,H),x=i(j.toString().split("."),2),D=x[0],F=x[1],L=F===void 0?"":F;if(L.match(/^0+$/)&&(A||M))return D;var U=L.match(/0+$/);return M&&U?"".concat(D,".").concat(L.toString().slice(0,U.index)):j.toString()}(X.toString(),X,V,B,Y);return Ae=function(O,E,A,H,M){var j=H.currentDelimiters(),x=j.thousands;M=M||j.decimal;var D=j.thousandsSize||3,F=O.toString(),L=F.split(".")[0],U=F.split(".")[1];return A&&(E<0&&(L=L.slice(1)),function(ie,me){for(var Re=[],He=0,Ze=ie;0<Ze;Ze--)He===me&&(Re.unshift(Ze),He=0),He++;return Re}(L.length,D).forEach(function(ie,me){L=L.slice(0,ie+me)+x+L.slice(ie+me)}),E<0&&(L="-".concat(L))),F=U?L+M+U:L}(Ae=function(O,E,A,H){var M=O,j=i(M.toString().split("."),2),x=j[0],D=j[1];if(x.match(/^-?0$/)&&A)return D?"".concat(x.replace("0",""),".").concat(D):x.replace("0","");if(x.length<H)for(var F=H-x.length,L=0;L<F;L++)M="0".concat(M);return M.toString()}(Ae,0,_,b),X,J,W,z),(I||de)&&(Ae=Ae+ve),(Te||X<0)&&(Xe=Ae,Ie=le,Ae=($e=X)===0?Xe:+Xe==0?Xe.replace("-",""):0<$e?"+".concat(Xe):Ie==="sign"?Xe:"(".concat(Xe.replace("-",""),")")),Ae}function w(S,C){if(!S)return C;var P=Object.keys(S);return P.length===1&&P[0]==="output"?C:S}n.exports=function(S){return{format:function(){for(var C=arguments.length,P=new Array(C),R=0;R<C;R++)P[R]=arguments[R];return h.apply(void 0,P.concat([S]))},getByteUnit:function(){for(var C=arguments.length,P=new Array(C),R=0;R<C;R++)P[R]=arguments[R];return function(W){var z=f.general;return d(W._value,z.suffixes,z.scale).suffix}.apply(void 0,P.concat([S]))},getBinaryByteUnit:function(){for(var C=arguments.length,P=new Array(C),R=0;R<C;R++)P[R]=arguments[R];return function(W){var z=f.binary;return d(W._value,z.suffixes,z.scale).suffix}.apply(void 0,P.concat([S]))},getDecimalByteUnit:function(){for(var C=arguments.length,P=new Array(C),R=0;R<C;R++)P[R]=arguments[R];return function(W){var z=f.decimal;return d(W._value,z.suffixes,z.scale).suffix}.apply(void 0,P.concat([S]))},formatOrDefault:w}}},{"./globalState":4,"./parsing":8,"./validating":10}],4:[function(r,n,o){var i=r("./en-US"),a=r("./validating"),l=r("./parsing"),s={},u=void 0,f={},c=null,h={};function d(p){u=p}function v(){return f[u]}s.languages=function(){return Object.assign({},f)},s.currentLanguage=function(){return u},s.currentCurrency=function(){return v().currency},s.currentAbbreviations=function(){return v().abbreviations},s.currentDelimiters=function(){return v().delimiters},s.currentOrdinal=function(){return v().ordinal},s.currentDefaults=function(){return Object.assign({},v().defaults,h)},s.currentOrdinalDefaultFormat=function(){return Object.assign({},s.currentDefaults(),v().ordinalFormat)},s.currentByteDefaultFormat=function(){return Object.assign({},s.currentDefaults(),v().byteFormat)},s.currentPercentageDefaultFormat=function(){return Object.assign({},s.currentDefaults(),v().percentageFormat)},s.currentCurrencyDefaultFormat=function(){return Object.assign({},s.currentDefaults(),v().currencyFormat)},s.currentTimeDefaultFormat=function(){return Object.assign({},s.currentDefaults(),v().timeFormat)},s.setDefaults=function(p){p=l.parseFormat(p),a.validateFormat(p)&&(h=p)},s.getZeroFormat=function(){return c},s.setZeroFormat=function(p){return c=typeof p=="string"?p:null},s.hasZeroFormat=function(){return c!==null},s.languageData=function(p){if(p){if(f[p])return f[p];throw new Error('Unknown tag "'.concat(p,'"'))}return v()},s.registerLanguage=function(p){var m=1<arguments.length&&arguments[1]!==void 0&&arguments[1];if(!a.validateLanguage(p))throw new Error("Invalid language data");f[p.languageTag]=p,m&&d(p.languageTag)},s.setLanguage=function(p){var m=1<arguments.length&&arguments[1]!==void 0?arguments[1]:i.languageTag;if(!f[p]){var w=p.split("-")[0],S=Object.keys(f).find(function(C){return C.split("-")[0]===w});return f[S]?void d(S):void d(m)}d(p)},s.registerLanguage(i),u=i.languageTag,n.exports=s},{"./en-US":2,"./parsing":8,"./validating":10}],5:[function(r,n,o){n.exports=function(i){return{loadLanguagesInNode:function(a){return l=i,void a.forEach(function(s){var u=void 0;try{u=r("../languages/".concat(s))}catch{console.error('Unable to load "'.concat(s,'". No matching language file found.'))}u&&l.registerLanguage(u)});var l}}}},{}],6:[function(r,n,o){var i=r("bignumber.js");function a(l,s,u){var f=new i(l._value),c=s;return u.isNumbro(s)&&(c=s._value),c=new i(c),l._value=f.minus(c).toNumber(),l}n.exports=function(l){return{add:function(s,u){return c=u,h=l,d=new i((f=s)._value),v=c,h.isNumbro(c)&&(v=c._value),v=new i(v),f._value=d.plus(v).toNumber(),f;var f,c,h,d,v},subtract:function(s,u){return a(s,u,l)},multiply:function(s,u){return c=u,h=l,d=new i((f=s)._value),v=c,h.isNumbro(c)&&(v=c._value),v=new i(v),f._value=d.times(v).toNumber(),f;var f,c,h,d,v},divide:function(s,u){return c=u,h=l,d=new i((f=s)._value),v=c,h.isNumbro(c)&&(v=c._value),v=new i(v),f._value=d.dividedBy(v).toNumber(),f;var f,c,h,d,v},set:function(s,u){return f=s,h=c=u,l.isNumbro(c)&&(h=c._value),f._value=h,f;var f,c,h},difference:function(s,u){return f=u,a(h=(c=l)(s._value),f,c),Math.abs(h._value);var f,c,h}}}},{"bignumber.js":1}],7:[function(r,n,o){function i(m,w){for(var S=0;S<w.length;S++){var C=w[S];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(m,C.key,C)}}var a=r("./globalState"),l=r("./validating"),s=r("./loading")(p),u=r("./unformatting"),f=r("./formatting")(p),c=r("./manipulating")(p),h=r("./parsing"),d=function(){function m(C){(function(P,R){if(!(P instanceof R))throw new TypeError("Cannot call a class as a function")})(this,m),this._value=C}var w,S;return w=m,(S=[{key:"clone",value:function(){return p(this._value)}},{key:"format",value:function(){var C=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return f.format(this,C)}},{key:"formatCurrency",value:function(C){return typeof C=="string"&&(C=h.parseFormat(C)),(C=f.formatOrDefault(C,a.currentCurrencyDefaultFormat())).output="currency",f.format(this,C)}},{key:"formatTime",value:function(){var C=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return C.output="time",f.format(this,C)}},{key:"binaryByteUnits",value:function(){return f.getBinaryByteUnit(this)}},{key:"decimalByteUnits",value:function(){return f.getDecimalByteUnit(this)}},{key:"byteUnits",value:function(){return f.getByteUnit(this)}},{key:"difference",value:function(C){return c.difference(this,C)}},{key:"add",value:function(C){return c.add(this,C)}},{key:"subtract",value:function(C){return c.subtract(this,C)}},{key:"multiply",value:function(C){return c.multiply(this,C)}},{key:"divide",value:function(C){return c.divide(this,C)}},{key:"set",value:function(C){return c.set(this,v(C))}},{key:"value",value:function(){return this._value}},{key:"valueOf",value:function(){return this._value}}])&&i(w.prototype,S),m}();function v(m){var w=m;return p.isNumbro(m)?w=m._value:typeof m=="string"?w=p.unformat(m):isNaN(m)&&(w=NaN),w}function p(m){return new d(v(m))}p.version="2.1.2",p.isNumbro=function(m){return m instanceof d},p.language=a.currentLanguage,p.registerLanguage=a.registerLanguage,p.setLanguage=a.setLanguage,p.languages=a.languages,p.languageData=a.languageData,p.zeroFormat=a.setZeroFormat,p.defaultFormat=a.currentDefaults,p.setDefaults=a.setDefaults,p.defaultCurrencyFormat=a.currentCurrencyDefaultFormat,p.validate=l.validate,p.loadLanguagesInNode=s.loadLanguagesInNode,p.unformat=u.unformat,n.exports=p},{"./formatting":3,"./globalState":4,"./loading":5,"./manipulating":6,"./parsing":8,"./unformatting":9,"./validating":10}],8:[function(r,n,o){n.exports={parseFormat:function(i){var a,l,s,u,f,c,h,d,v,p,m,w,S,C,P,R,W,z,q,K,X=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};return typeof i!="string"?i:(l=X,i=(s=(a=i).match(/^{([^}]*)}/))?(l.prefix=s[1],a.slice(s[0].length)):a,f=X,function(Q,ae){if(Q.indexOf("$")===-1){if(Q.indexOf("%")===-1)return Q.indexOf("bd")!==-1?(ae.output="byte",ae.base="general"):Q.indexOf("b")!==-1?(ae.output="byte",ae.base="binary"):Q.indexOf("d")!==-1?(ae.output="byte",ae.base="decimal"):Q.indexOf(":")===-1?Q.indexOf("o")!==-1&&(ae.output="ordinal"):ae.output="time";ae.output="percent"}else ae.output="currency"}(i=(c=(u=i).match(/{([^}]*)}$/))?(f.postfix=c[1],u.slice(0,-c[0].length)):u,X),h=X,(d=i.match(/[1-9]+[0-9]*/))&&(h.totalLength=+d[0]),v=X,(p=i.split(".")[0].match(/0+/))&&(v.characteristic=p[0].length),function(Q,ae){if(Q.indexOf(".")!==-1){var Z=Q.split(".")[0];ae.optionalCharacteristic=Z.indexOf("0")===-1}}(i,X),m=X,i.indexOf("a")!==-1&&(m.average=!0),S=X,(w=i).indexOf("K")!==-1?S.forceAverage="thousand":w.indexOf("M")!==-1?S.forceAverage="million":w.indexOf("B")!==-1?S.forceAverage="billion":w.indexOf("T")!==-1&&(S.forceAverage="trillion"),function(Q,ae){var Z=Q.split(".")[1];if(Z){var he=Z.match(/0+/);he&&(ae.mantissa=he[0].length)}}(i,X),P=X,(C=i).match(/\[\.]/)?P.optionalMantissa=!0:C.match(/\./)&&(P.optionalMantissa=!1),R=X,i.indexOf(",")!==-1&&(R.thousandSeparated=!0),W=X,i.indexOf(" ")!==-1&&(W.spaceSeparated=!0),q=X,(z=i).match(/^\+?\([^)]*\)$/)&&(q.negative="parenthesis"),z.match(/^\+?-/)&&(q.negative="sign"),K=X,i.match(/^\+/)&&(K.forceSign=!0),X)}}},{}],9:[function(r,n,o){var i=[{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 a(s){return s.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function l(s,u){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"",c=3<arguments.length?arguments[3]:void 0,h=4<arguments.length?arguments[4]:void 0,d=5<arguments.length?arguments[5]:void 0,v=6<arguments.length?arguments[6]:void 0;if(s!=="")return s===h?0:function p(m,w){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"",C=3<arguments.length?arguments[3]:void 0,P=4<arguments.length?arguments[4]:void 0,R=5<arguments.length?arguments[5]:void 0,W=6<arguments.length?arguments[6]:void 0;if(!isNaN(+m))return+m;var z="",q=m.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(q!==m)return-1*p(q,w,S,C,P,R,W);for(var K=0;K<i.length;K++){var X=i[K];if((z=m.replace(X.key,""))!==m)return p(z,w,S,C,P,R,W)*X.factor}if((z=m.replace("%",""))!==m)return p(z,w,S,C,P,R,W)/100;var Q=parseFloat(m);if(!isNaN(Q)){var ae=C(Q);if(ae&&ae!=="."&&(z=m.replace(new RegExp("".concat(a(ae),"$")),""))!==m)return p(z,w,S,C,P,R,W);var Z={};Object.keys(R).forEach(function(g){Z[R[g]]=g});for(var he=Object.keys(Z).sort().reverse(),Ee=he.length,_e=0;_e<Ee;_e++){var Oe=he[_e],k=Z[Oe];if((z=m.replace(Oe,""))!==m){var y=void 0;switch(k){case"thousand":y=Math.pow(10,3);break;case"million":y=Math.pow(10,6);break;case"billion":y=Math.pow(10,9);break;case"trillion":y=Math.pow(10,12)}return p(z,w,S,C,P,R,W)*y}}}}(function(p,m){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"",S=p.replace(w,"");return S=(S=S.replace(new RegExp("([0-9])".concat(a(m.thousands),"([0-9])"),"g"),"$1$2")).replace(m.decimal,".")}(s,u,f),u,f,c,h,d,v)}n.exports={unformat:function(s,u){var f,c,h,d=r("./globalState"),v=d.currentDelimiters(),p=d.currentCurrency().symbol,m=d.currentOrdinal(),w=d.getZeroFormat(),S=d.currentAbbreviations(),C=void 0;if(typeof s=="string")C=function(P,R){if(!P.indexOf(":")||R.thousands===":")return!1;var W=P.split(":");if(W.length!==3)return!1;var z=+W[0],q=+W[1],K=+W[2];return!isNaN(z)&&!isNaN(q)&&!isNaN(K)}(s,v)?(f=s.split(":"),c=+f[0],h=+f[1],+f[2]+60*h+3600*c):l(s,v,p,m,w,S,u);else{if(typeof s!="number")return;C=s}if(C!==void 0)return C}}},{"./globalState":4}],10:[function(r,n,o){function i(v){return function(p){if(Array.isArray(p)){for(var m=0,w=new Array(p.length);m<p.length;m++)w[m]=p[m];return w}}(v)||function(p){if(Symbol.iterator in Object(p)||Object.prototype.toString.call(p)==="[object Arguments]")return Array.from(p)}(v)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function a(v){return(a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(v)}var l=r("./unformatting"),s=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,u={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:function(v,p){return p.output==="byte"},message:"`base` must be provided only when the output is `byte`",mandatory:function(v){return v.output==="byte"}},characteristic:{type:"number",restriction:function(v){return 0<=v},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(v){return 0<=v},message:"value must be positive"},{restriction:function(v,p){return!p.exponential},message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:function(v){return 0<=v},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(v,p){return p.output==="percent"},message:"`prefixSymbol` can be provided only when the output is `percent`"}},f={languageTag:{type:"string",mandatory:!0,restriction:function(v){return v.match(s)},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 c(v){return!!l.unformat(v)}function h(v,p,m){var w=3<arguments.length&&arguments[3]!==void 0&&arguments[3],S=Object.keys(v).map(function(C){if(!p[C])return console.error("".concat(m," Invalid key: ").concat(C)),!1;var P=v[C],R=p[C];if(typeof R=="string"&&(R={type:R}),R.type==="format"){if(!h(P,u,"[Validate ".concat(C,"]"),!0))return!1}else if(a(P)!==R.type)return console.error("".concat(m," ").concat(C,' type mismatched: "').concat(R.type,'" expected, "').concat(a(P),'" provided')),!1;if(R.restrictions&&R.restrictions.length)for(var W=R.restrictions.length,z=0;z<W;z++){var q=R.restrictions[z],K=q.restriction,X=q.message;if(!K(P,v))return console.error("".concat(m," ").concat(C," invalid value: ").concat(X)),!1}return R.restriction&&!R.restriction(P,v)?(console.error("".concat(m," ").concat(C," invalid value: ").concat(R.message)),!1):R.validValues&&R.validValues.indexOf(P)===-1?(console.error("".concat(m," ").concat(C," invalid value: must be among ").concat(JSON.stringify(R.validValues),', "').concat(P,'" provided')),!1):!(R.children&&!h(P,R.children,"[Validate ".concat(C,"]")))});return w||S.push.apply(S,i(Object.keys(p).map(function(C){var P=p[C];if(typeof P=="string"&&(P={type:P}),P.mandatory){var R=P.mandatory;if(typeof R=="function"&&(R=R(v)),R&&v[C]===void 0)return console.error("".concat(m,' Missing mandatory key "').concat(C,'"')),!1}return!0}))),S.reduce(function(C,P){return C&&P},!0)}function d(v){return h(v,u,"[Validate format]")}n.exports={validate:function(v,p){var m=c(v),w=d(p);return m&&w},validateFormat:d,validateInput:c,validateLanguage:function(v){return h(v,f,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7)})})($Re);const Ni=hR;var ARe="numeric";function hP(e,t,r,n,o,i,a){var l=i;if(Hr(l)){var s=a.numericFormat,u=s&&s.culture||"-",f=s&&s.pattern,c=a.className||"",h=c.length?c.split(" "):[];if(typeof u<"u"&&!Ni.languages()[u]){var d=u.replace("-",""),v=Ni.allLanguages?Ni.allLanguages[u]:Ni[d];v&&Ni.registerLanguage(v)}Ni.setLanguage(u),l=Ni(l).format(f||"0"),h.indexOf("htLeft")<0&&h.indexOf("htCenter")<0&&h.indexOf("htRight")<0&&h.indexOf("htJustify")<0&&h.push("htRight"),h.indexOf("htNumeric")<0&&h.push("htNumeric"),a.className=h.join(" "),t.dir="ltr"}Ti(e,t,r,n,o,l,a)}hP.RENDERER_TYPE=ARe;var IRe="password";function dP(e,t,r,n,o,i,a){Ti.apply(this,[e,t,r,n,o,i,a]);var l=a.hashLength||t.innerHTML.length,s=a.hashSymbol||"*",u="";Ce(l-1,function(){u+=s}),Ka(t,u)}dP.RENDERER_TYPE=IRe;var MRe="time";function vP(e,t,r,n,o,i,a){Ti.apply(this,[e,t,r,n,o,i,a]),t.dir="ltr"}vP.RENDERER_TYPE=MRe;function xRe(){$n(Cf),$n(wv),$n(fP),$n(uP),$n(hP),$n(dP),$n(Ti),$n(vP)}var DRe="autocomplete";function rw(e,t){var r=e;if(r==null&&(r=""),this.allowEmpty&&r===""){t(!0);return}this.strict&&this.source?typeof this.source=="function"?this.source(r,hx(r,t)):hx(r,t)(this.source):t(!0)}rw.VALIDATOR_TYPE=DRe;function hx(e,t){var r=e;return function(n){for(var o=!1,i=0,a=n.length;i<a;i++)if(r===n[i]){o=!0;break}t(o)}}var NRe=Object.is||function(t,r){return t===r?t!==0||1/t===1/r:t!=t&&r!=r},HRe=Xt,LRe=am,jRe=Ht,BRe=mn,FRe=Tr,dx=NRe,vx=Yt,VRe=Fa,WRe=lm;LRe("search",function(e,t,r){return[function(o){var i=FRe(this),a=BRe(o)?void 0:VRe(o,e);return a?HRe(a,o,i):new RegExp(o)[e](vx(i))},function(n){var o=jRe(this),i=vx(n),a=r(t,o,i);if(a.done)return a.value;var l=o.lastIndex;dx(l,0)||(o.lastIndex=0);var s=WRe(o,i);return dx(o.lastIndex,l)||(o.lastIndex=l),s===null?-1:s.index}]});function A2(e){var t=new Date(e);return isNaN(new Date("".concat(e,"T00:00")).getDate())?t:new Date(t.getTime()+t.getTimezoneOffset()*6e4)}const URe=Object.freeze(Object.defineProperty({__proto__:null,getNormalizedDate:A2},Symbol.toStringTag,{value:"Module"}));var zRe="date";function yP(e,t){var r=TV(R2,this.instance),n=e,o=!0;n==null&&(n="");var i=re(n,this.dateFormat||r.defaultDateFormat,!0).isValid(),a=re(new Date(n)).isValid()||i;if(this.allowEmpty&&n===""&&(a=!0,i=!0),a||(o=!1),!a&&i&&(o=!0),a&&!i)if(this.correctFormat===!0){var l=YRe(n,this.dateFormat),s=this.instance.toVisualRow(this.row),u=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(s,u,l,"dateValidator"),o=!0}else o=!1;t(o)}yP.VALIDATOR_TYPE=zRe;function YRe(e,t){var r=re(A2(e)),n=re(e,t),o=e.search(/[A-z]/g)>-1,i;return r.isValid()&&r.format("x")===n.format("x")||!n.isValid()||o?i=r:i=n,i.format(t)}var GRe="numeric";function pP(e,t){var r=e;r==null&&(r=""),this.allowEmpty&&r===""?t(!0):t(r===""?!1:Hr(e))}pP.VALIDATOR_TYPE=GRe;var KRe=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],XRe="time";function gP(e,t){var r=this.timeFormat||"h:mm:ss a",n=!0,o=e;o===null&&(o=""),o=/^\d{3,}$/.test(o)?parseInt(o,10):o;var i=/^\d{1,2}$/.test(o);i&&(o+=":00");var a=re(o,KRe,!0).isValid()?re(o):re(o,r),l=a.isValid(),s=re(o,r,!0).isValid()&&!i;if(this.allowEmpty&&o===""&&(l=!0,s=!0),l||(n=!1),!l&&s&&(n=!0),l&&!s)if(this.correctFormat===!0){var u=a.format(r),f=this.instance.toVisualRow(this.row),c=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(f,c,u,"timeValidator"),n=!0}else n=!1;t(n)}gP.VALIDATOR_TYPE=XRe;function qRe(){Hl(rw),Hl(yP),Hl(pP),Hl(gP)}var ZRe="autocomplete",QRe={CELL_TYPE:ZRe,editor:lP,renderer:Cf,validator:rw},JRe="checkbox",e0e={CELL_TYPE:JRe,editor:O2,renderer:fP},t0e="date",r0e={CELL_TYPE:t0e,editor:E2,renderer:Cf,validator:yP},n0e="dropdown",o0e={CELL_TYPE:n0e,editor:sP,renderer:Cf,validator:rw},i0e="handsontable",a0e={CELL_TYPE:i0e,editor:aP,renderer:Cf},l0e="numeric",s0e={CELL_TYPE:l0e,editor:T2,renderer:hP,validator:pP,dataType:"number"},u0e="password",f0e={CELL_TYPE:u0e,editor:P2,renderer:dP,copyable:!1},c0e="time",h0e={CELL_TYPE:c0e,editor:k2,renderer:vP,validator:gP};function d0e(){an(QRe),an(e0e),an(r0e),an(o0e),an(a0e),an(s0e),an(f0e),an(w2),an(h0e)}var v0e=tm,y0e=pV;v0e("WeakSet",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},y0e);function Wh(e){return Wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wh(e)}function p0e(e,t){return w0e(e)||b0e(e,t)||m0e(e,t)||g0e()}function g0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m0e(e,t){if(e){if(typeof e=="string")return yx(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yx(e,t)}}function yx(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b0e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function w0e(e){if(Array.isArray(e))return e}function S0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function px(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,_0e(n.key),n)}}function C0e(e,t,r){return t&&px(e.prototype,t),r&&px(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _0e(e){var t=O0e(e,"string");return Wh(t)==="symbol"?t:String(t)}function O0e(e,t){if(Wh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function R0e(e,t){E0e(e,t),t.add(e)}function E0e(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function T0e(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var gx=new Map([["plugin",Use],["cell-type",f2],["editor",EV],["renderer",BV],["validator",FV]]),P0e="base",Hi=new WeakMap,GS=[],On=null,mx=new WeakSet,at=function(){function e(t){var r=this;S0e(this,e),R0e(this,mx),jn(this,"hot",t,{writable:!1}),Hi.set(this,{hooks:{}}),On=null,this.pluginName=null,this.pluginsInitializedCallbacks=[],this.isPluginsReady=!1,this.enabled=!1,this.initialized=!1,this.hot.addHook("afterPluginsInitialized",function(){return r.onAfterPluginsInitialized()}),this.hot.addHook("afterUpdateSettings",function(n){return r.onUpdateSettings(n)}),this.hot.addHook("beforeInit",function(){return r.init()})}return C0e(e,[{key:"init",value:function(){var r=this;this.pluginName=this.hot.getPluginName(this);var n=this.constructor.PLUGIN_DEPS,o=Array.isArray(n)?n:[];if(o.length>0){var i=[];if(o.forEach(function(u){var f=u.split(":"),c=p0e(f,2),h=c[0],d=c[1];if(!gx.has(h))throw new Error('Unknown plugin dependency type "'.concat(h,'" was found.'));gx.get(h)(d)||i.push(" - ".concat(d," (").concat(h,")"))}),i.length>0){var a=["The ".concat(this.pluginName,` plugin requires the following modules:
`),"".concat(i.join(`
`),`
`)].join("");GS.push(a)}}On||(On=kT()),On.indexOf("UndoRedo")>=0&&On.splice(On.indexOf("UndoRedo"),1),On.indexOf(this.pluginName)>=0&&On.splice(On.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",function(){r.isEnabled&&r.isEnabled()&&r.enablePlugin()});var l=On.length===0;if(l){if(GS.length>0){var s=["".concat(GS.join(`
`),`
`),"You have to import and register them manually."].join("");throw new Error(s)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}},{key:"enablePlugin",value:function(){this.enabled=!0}},{key:"disablePlugin",value:function(){this.eventManager&&this.eventManager.clear(),this.clearHooks(),this.enabled=!1}},{key:"addHook",value:function(r,n){Hi.get(this).hooks[r]=Hi.get(this).hooks[r]||[];var o=Hi.get(this).hooks[r];this.hot.addHook(r,n),o.push(n),Hi.get(this).hooks[r]=o}},{key:"removeHooks",value:function(r){var n=this;$(Hi.get(this).hooks[r]||[],function(o){n.hot.removeHook(r,o)})}},{key:"clearHooks",value:function(){var r=this,n=Hi.get(this).hooks;ze(n,function(o,i){return r.removeHooks(i)}),n.length=0}},{key:"callOnPluginsReady",value:function(r){this.isPluginsReady?r():this.pluginsInitializedCallbacks.push(r)}},{key:"onAfterPluginsInitialized",value:function(){$(this.pluginsInitializedCallbacks,function(r){return r()}),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}},{key:"onUpdateSettings",value:function(r){var n=T0e(this,mx,k0e).call(this,r);this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&n&&this.updatePlugin(r))}},{key:"updatePlugin",value:function(){}},{key:"destroy",value:function(){var r=this;this.eventManager&&this.eventManager.destroy(),this.clearHooks(),ze(this,function(n,o){o!=="hot"&&(r[o]=null)}),delete this.t,delete this.hot}}],[{key:"PLUGIN_KEY",get:function(){return P0e}},{key:"SETTING_KEYS",get:function(){return[this.PLUGIN_KEY]}}]),e}();function k0e(e){if(!e)return!1;var t=this.constructor.SETTING_KEYS;if(typeof t=="boolean")return t;for(var r=0;r<t.length;r++)if(e[t[r]]!==void 0)return!0;return!1}function Uh(e){return Uh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uh(e)}function $0e(e,t){return x0e(e)||M0e(e,t)||I0e(e,t)||A0e()}function A0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I0e(e,t){if(e){if(typeof e=="string")return bx(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bx(e,t)}}function bx(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function M0e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function x0e(e){if(Array.isArray(e))return e}function D0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wx(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,H0e(n.key),n)}}function N0e(e,t,r){return t&&wx(e.prototype,t),r&&wx(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function H0e(e){var t=L0e(e,"string");return Uh(t)==="symbol"?t:String(t)}function L0e(e,t){if(Uh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Uh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var j0e=function(){function e(t){D0e(this,e),this.hot=t,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null,this.settings={useHeaders:!0}}return N0e(e,[{key:"addRow",value:function(r,n){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));var o={row:r};this.rows.push(o),this.samples=n,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tr.appendChild(this.createRow(r)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}},{key:"addColumnHeadersRow",value:function(r){var n=this.hot.getColHeader(0);if(n!=null){var o={row:-1};this.rows.push(o),this.container=this.createContainer(this.hot.rootElement.className),this.samples=r,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}}},{key:"addColumn",value:function(r,n){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));var o={col:r};this.columns.push(o),this.samples=n,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&this.hot.getColHeader(r)!==null&&this.hot.view.appendColHeader(r,this.table.th),this.table.tBody.appendChild(this.createCol(r)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}},{key:"getHeights",value:function(r){this.injected||this.injectTable(),$(this.rows,function(n){r(n.row,Tt(n.table)-1)})}},{key:"getWidths",value:function(r){this.injected||this.injectTable(),$(this.columns,function(n){var o=n.table.getBoundingClientRect(),i=o.width;r(n.col,Math.ceil(i))})}},{key:"setSettings",value:function(r){this.settings=r}},{key:"setSetting",value:function(r,n){this.settings||(this.settings={}),this.settings[r]=n}},{key:"getSettings",value:function(){return this.settings}},{key:"getSetting",value:function(r){return this.settings?this.settings[r]:null}},{key:"createColGroupsCol",value:function(){var r=this,n=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&n.appendChild(this.createColElement(-1)),this.samples.forEach(function(o){$(o.strings,function(i){n.appendChild(r.createColElement(i.col))})}),n}},{key:"createRow",value:function(r){var n=this,o=this.hot.rootDocument,i=o.createDocumentFragment(),a=o.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(r,a),i.appendChild(a)),this.samples.forEach(function(l){$(l.strings,function(s){var u=s.col,f=n.hot.getCellMeta(r,u);f.col=u,f.row=r;var c=n.hot.getCellRenderer(f),h=o.createElement("td");h.setAttribute("ghost-table",1),c(n.hot,h,r,u,n.hot.colToProp(u),s.value,f),i.appendChild(h)})}),i}},{key:"appendColumnHeadersRow",value:function(){var r=this,n=this.hot.rootDocument,o=n.createDocumentFragment(),i=[];if(this.hot.hasRowHeaders()){var a=n.createElement("th");i.push([-1,a]),o.appendChild(a)}this.samples.forEach(function(l){$(l.strings,function(s){var u=s.col,f=n.createElement("th");i.push([u,f]),o.appendChild(f)})}),this.table.tHead.appendChild(o),$(i,function(l){var s=$0e(l,2),u=s[0],f=s[1];r.hot.view.appendColHeader(u,f)})}},{key:"createCol",value:function(r){var n=this,o=this.hot.rootDocument,i=o.createDocumentFragment();return this.samples.forEach(function(a){$(a.strings,function(l){var s=l.row,u=n.hot.getCellMeta(s,r);u.col=r,u.row=s;var f=n.hot.getCellRenderer(u),c=o.createElement("td"),h=o.createElement("tr");c.setAttribute("ghost-table",1),f(n.hot,c,s,r,n.hot.colToProp(r),l.value,u),h.appendChild(c),i.appendChild(h)})}),i}},{key:"clean",value:function(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}},{key:"injectTable",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;this.injected||((r||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}},{key:"removeTable",value:function(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}},{key:"createColElement",value:function(r){var n=this.hot.rootDocument.createElement("col");return n.style.width="".concat(this.hot.view._wt.wtTable.getStretchedColumnWidth(r),"px"),n}},{key:"createTable",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=this.hot.rootDocument,o=n.createDocumentFragment(),i=n.createElement("table"),a=n.createElement("thead"),l=n.createElement("tbody"),s=n.createElement("colgroup"),u=n.createElement("tr"),f=n.createElement("th");return this.isVertical()&&i.appendChild(s),this.isHorizontal()&&(u.appendChild(f),a.appendChild(u),i.style.tableLayout="auto",i.style.width="auto"),i.appendChild(a),this.isVertical()&&l.appendChild(u),i.appendChild(l),te(i,r),o.appendChild(i),{fragment:o,table:i,tHead:a,tBody:l,colGroup:s,tr:u,th:f}}},{key:"createContainer",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=this.hot.rootDocument,o=n.createDocumentFragment(),i=n.createElement("div"),a="htGhostTable htAutoSize ".concat(r.trim());return te(i,a),o.appendChild(i),{fragment:o,container:i}}},{key:"isVertical",value:function(){return!!(this.rows.length&&!this.columns.length)}},{key:"isHorizontal",value:function(){return!!(this.columns.length&&!this.rows.length)}}]),e}();const mP=j0e;function zh(e){return zh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zh(e)}function B0e(e,t,r){return t=I2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sx(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,I2(n.key),n)}}function V0e(e,t,r){return t&&Sx(e.prototype,t),r&&Sx(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function I2(e){var t=W0e(e,"string");return zh(t)==="symbol"?t:String(t)}function W0e(e,t){if(zh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(zh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var U0e=function(){function e(t){F0e(this,e),this.samples=null,this.dataFactory=t,this.customSampleCount=null,this.allowDuplicates=!1}return V0e(e,[{key:"getSampleCount",value:function(){return this.customSampleCount?this.customSampleCount:e.SAMPLE_COUNT}},{key:"setSampleCount",value:function(r){this.customSampleCount=r}},{key:"setAllowDuplicates",value:function(r){this.allowDuplicates=r}},{key:"generateRowSamples",value:function(r,n){return this.generateSamples("row",n,r)}},{key:"generateColumnSamples",value:function(r,n){return this.generateSamples("col",n,r)}},{key:"generateSamples",value:function(r,n,o){var i=this,a=new Map,l=typeof o=="number"?{from:o,to:o}:o,s=l.from,u=l.to;return Ce(s,u,function(f){var c=i.generateSample(r,n,f);a.set(f,c)}),a}},{key:"generateSample",value:function(r,n,o){var i=this;if(r!=="row"&&r!=="col")throw new Error("Unsupported sample type");var a=new Map,l=r==="row"?"col":"row",s=[];return Ce(n.from,n.to,function(u){var f=r==="row"?i.dataFactory(o,u):i.dataFactory(u,o),c=f.value,h=f.bundleSeed,d=typeof h=="string"&&h.length>0,v;d?v=h:Ue(c)?v="".concat(Object.keys(c).length):Array.isArray(c)?v="".concat(c.length):v="".concat(Mt(c).length),a.has(v)||a.set(v,{needed:i.getSampleCount(),strings:[]});var p=a.get(v);if(p.needed){var m=s.indexOf(c)>-1;(!m||i.allowDuplicates||d)&&(p.strings.push(B0e({value:c},l,u)),s.push(c),p.needed-=1)}}),a}}],[{key:"SAMPLE_COUNT",get:function(){return 3}}]),e}();const M2=U0e;function eu(e){return eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eu(e)}function Cx(e,t){return K0e(e)||G0e(e,t)||Y0e(e,t)||z0e()}function z0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y0e(e,t){if(e){if(typeof e=="string")return _x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _x(e,t)}}function _x(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function G0e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function K0e(e){if(Array.isArray(e))return e}function X0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ox(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,Z0e(n.key),n)}}function q0e(e,t,r){return t&&Ox(e.prototype,t),r&&Ox(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z0e(e){var t=Q0e(e,"string");return eu(t)==="symbol"?t:String(t)}function Q0e(e,t){if(eu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(eu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zi(){return typeof Reflect<"u"&&Reflect.get?Zi=Reflect.get.bind():Zi=function(t,r,n){var o=J0e(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Zi.apply(this,arguments)}function J0e(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=io(e),e!==null););return e}function eEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dR(e,t)}function dR(e,t){return dR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},dR(e,t)}function tEe(e){var t=nEe();return function(){var n=io(e),o;if(t){var i=io(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return rEe(this,o)}}function rEe(e,t){if(t&&(eu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x2(e)}function x2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nEe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function io(e){return io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},io(e)}be.getSingleton().register("modifyAutoColumnSizeSeed");var Ff="autoColumnSize",oEe=10,KS=new WeakMap,iEe="autoColumnSize",aEe=function(e){eEe(r,e);var t=tEe(r);function r(n){var o;return X0e(this,r),o=t.call(this,n),KS.set(x2(o),{cachedColumnHeaders:[]}),o.ghostTable=new mP(o.hot),o.samplesGenerator=new M2(function(i,a){var l=o.hot.getCellMeta(i,a),s="";l.spanned||(s=o.hot.getDataAtCell(i,a));var u="";return o.hot.hasHook("modifyAutoColumnSizeSeed")&&(u=o.hot.runHooks("modifyAutoColumnSizeSeed",u,l,s)),{value:s,bundleSeed:u}}),o.firstCalculation=!0,o.inProgress=!1,o.measuredColumns=0,o.columnWidthsMap=new Ei,o.hot.columnIndexMapper.registerMap(iEe,o.columnWidthsMap),o.addHook("beforeColumnResize",function(i,a,l){return o.onBeforeColumnResize(i,a,l)}),o}return q0e(r,[{key:"isEnabled",value:function(){return this.hot.getSettings()[Ff]!==!1&&!this.hot.getSettings().colWidths}},{key:"enablePlugin",value:function(){var o=this;if(!this.enabled){var i=this.hot.getSettings()[Ff];i&&i.useHeaders!==null&&i.useHeaders!==void 0&&this.ghostTable.setSetting("useHeaders",i.useHeaders),this.setSamplingOptions(),this.addHook("afterLoadData",function(){return o.onAfterLoadData.apply(o,arguments)}),this.addHook("beforeChangeRender",function(a){return o.onBeforeChange(a)}),this.addHook("afterFormulasValuesUpdate",function(a){return o.onAfterFormulasValuesUpdate(a)}),this.addHook("beforeViewRender",function(a){return o.onBeforeViewRender(a)}),this.addHook("modifyColWidth",function(a,l){return o.getColumnWidth(l,a)}),this.addHook("afterInit",function(){return o.onAfterInit()}),Zi(io(r.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){var o=this.findColumnsWhereHeaderWasChanged();o.length&&(this.clearCache(o),this.calculateVisibleColumnsWidth()),Zi(io(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){var o=this;Zi(io(r.prototype),"disablePlugin",this).call(this),this.addHook("beforeColumnResize",function(i,a,l){return o.onBeforeColumnResize(i,a,l)})}},{key:"calculateVisibleColumnsWidth",value:function(){var o=this.hot.countRows();if(o){var i=this.hot.renderCall,a=this.getFirstVisibleColumn(),l=this.getLastVisibleColumn();a===-1||l===-1||this.calculateColumnsWidth({from:a,to:l},void 0,i)}}},{key:"calculateColumnsWidth",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{from:0,to:this.hot.countCols()-1},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{from:0,to:this.hot.countRows()-1},l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=typeof i=="number"?{from:i,to:i}:i,u=typeof a=="number"?{from:a,to:a}:a;Ce(s.from,s.to,function(f){var c=o.hot.toPhysicalColumn(f);if(c===null&&(c=f),l||o.columnWidthsMap.getValueAtIndex(c)===null&&!o.hot._getColWidthFromSettings(c)){var h=o.samplesGenerator.generateColumnSamples(f,u);$(h,function(d){var v=Cx(d,2),p=v[0],m=v[1];return o.ghostTable.addColumn(p,m)})}}),this.ghostTable.columns.length&&(this.hot.batchExecution(function(){o.ghostTable.getWidths(function(f,c){var h=o.hot.toPhysicalColumn(f);o.columnWidthsMap.setValueAtIndex(h,c)})},!0),this.measuredColumns=s.to+1,this.ghostTable.clean())}},{key:"calculateAllColumnsWidth",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{from:0,to:this.hot.countRows()-1},a=0,l=this.hot.countCols()-1,s=null;this.inProgress=!0;var u=function c(){if(!o.hot){$c(s),o.inProgress=!1;return}o.calculateColumnsWidth({from:a,to:Math.min(a+r.CALCULATION_STEP,l)},i),a=a+r.CALCULATION_STEP+1,a<l?s=um(c):($c(s),o.inProgress=!1,o.hot.view.adjustElementsSize())},f=this.getSyncCalculationLimit();this.firstCalculation&&f>=0&&(this.calculateColumnsWidth({from:0,to:f},i),this.firstCalculation=!1,a=f+1),a<l?u():this.inProgress=!1}},{key:"setSamplingOptions",value:function(){var o=this.hot.getSettings()[Ff],i=o&&It(o,"samplingRatio")?o.samplingRatio:void 0,a=o&&It(o,"allowSampleDuplicates")?o.allowSampleDuplicates:void 0;i&&!isNaN(i)&&this.samplesGenerator.setSampleCount(parseInt(i,10)),a&&this.samplesGenerator.setAllowDuplicates(a)}},{key:"recalculateAllColumnsWidth",value:function(){this.hot.view&&this.hot.view._wt.wtTable.isVisible()&&(this.clearCache(),this.calculateAllColumnsWidth())}},{key:"getSyncCalculationLimit",value:function(){var o=this.hot.getSettings()[Ff],i=r.SYNC_CALCULATION_LIMIT,a=this.hot.countCols()-1;return Ue(o)&&(i=o.syncLimit,mT(i)?i=TT(a,i):i>>=0),Math.min(i,a)}},{key:"getColumnWidth",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=i;return l===void 0&&(l=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(o)),a&&typeof l=="number"&&(l=Math.max(l,AT.DEFAULT_WIDTH))),l}},{key:"getFirstVisibleColumn",value:function(){var o=this.hot.view._wt;if(o.wtViewport.columnsVisibleCalculator){var i=o.wtTable.getFirstVisibleColumn();if(i!==-1)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(i)}if(o.wtViewport.columnsRenderCalculator){var a=o.wtTable.getFirstRenderedColumn();if(a!==-1)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(a)}return-1}},{key:"getLastVisibleColumn",value:function(){var o=this.hot.view._wt;if(o.wtViewport.columnsVisibleCalculator){var i=o.wtTable.getLastVisibleColumn();if(i!==-1)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(i)}if(o.wtViewport.columnsRenderCalculator){var a=o.wtTable.getLastRenderedColumn();if(a!==-1)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(a)}return-1}},{key:"findColumnsWhereHeaderWasChanged",value:function(){var o=this.hot.getColHeader(),i=KS.get(this),a=i.cachedColumnHeaders,l=Lt(o,function(s,u,f){var c=a.length;return(c-1<f||a[f]!==u)&&s.push(f),c-1<f?a.push(u):a[f]=u,s},[]);return l}},{key:"clearCache",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];i.length?this.hot.batchExecution(function(){$(i,function(a){o.columnWidthsMap.setValueAtIndex(a,null)})},!0):this.columnWidthsMap.clear()}},{key:"isNeedRecalculate",value:function(){return!!jr(this.columnWidthsMap.getValues().slice(0,this.measuredColumns),function(o){return o===null}).length}},{key:"onBeforeViewRender",value:function(){this.calculateVisibleColumnsWidth(),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth()}},{key:"onAfterLoadData",value:function(){var o=this;this.hot.view?this.recalculateAllColumnsWidth():setTimeout(function(){o.hot&&o.recalculateAllColumnsWidth()},0)}},{key:"onBeforeChange",value:function(o){var i=this,a=We(o,function(l){var s=Cx(l,2),u=s[1];return i.hot.toPhysicalColumn(i.hot.propToCol(u))});this.clearCache(Array.from(new Set(a)))}},{key:"onBeforeColumnResize",value:function(o,i,a){var l=o;return a&&(this.calculateColumnsWidth(i,void 0,!0),l=this.getColumnWidth(i,void 0,!1)),l}},{key:"onAfterInit",value:function(){KS.get(this).cachedColumnHeaders=this.hot.getColHeader()}},{key:"onAfterFormulasValuesUpdate",value:function(o){var i=jr(o,function(l){var s;return pe((s=l.address)===null||s===void 0?void 0:s.col)}),a=We(i,function(l){return l.address.col});this.clearCache(Array.from(new Set(a)))}},{key:"destroy",value:function(){this.ghostTable.clean(),Zi(io(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return Ff}},{key:"PLUGIN_PRIORITY",get:function(){return oEe}},{key:"SETTING_KEYS",get:function(){return!0}},{key:"CALCULATION_STEP",get:function(){return 50}},{key:"SYNC_CALCULATION_LIMIT",get:function(){return 50}}]),r}(at),Qi={horizontal:"horizontal",vertical:"vertical"};function lEe(e,t,r,n){var o=r.length,i=r?r[0].length:0,a=[],l=t.row-e.row,s=t.col-e.col;if(["down","up"].indexOf(n)!==-1){for(var u=[],f=0;f<s;f++){var c=parseInt(r[0][f],10),h=parseInt(r[o-1][f],10),d=(n==="down"?h-c:c-h)/(o-1)||0;u.push(d)}a.push(u)}if(["right","left"].indexOf(n)!==-1)for(var v=0;v<l;v++){var p=parseInt(r[v][0],10),m=parseInt(r[v][i-1],10),w=(n==="right"?m-p:p-m)/(i-1)||0;a.push([w])}return a}function sEe(e,t,r){var n,o,i;return t[0]===e[0]&&t[1]<e[1]?(i="left",n=r(t[0],t[1]),o=r(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(i="right",n=r(t[0],e[3]+1),o=r(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(i="up",n=r(t[0],t[1]),o=r(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(i="down",n=r(e[2]+1,t[1]),o=r(t[2],t[3])),n&&n.normalize(),o&&o.normalize(),{directionOfDrag:i,startOfDragCoords:n,endOfDragCoords:o}}function uEe(e){var t={};return e===!0?(t.directions=Object.keys(Qi),t.autoInsertRow=!0):Ue(e)?(pe(e.autoInsertRow)?e.direction===Qi.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,pe(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(Qi)):typeof e=="string"?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1),t}function tu(e){return tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tu(e)}function fEe(e){return dEe(e)||hEe(e)||D2(e)||cEe()}function cEe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hEe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dEe(e){if(Array.isArray(e))return vR(e)}function vEe(e,t){return gEe(e)||pEe(e,t)||D2(e,t)||yEe()}function yEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D2(e,t){if(e){if(typeof e=="string")return vR(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vR(e,t)}}function vR(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function pEe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function gEe(e){if(Array.isArray(e))return e}function mEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rx(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,wEe(n.key),n)}}function bEe(e,t,r){return t&&Rx(e.prototype,t),r&&Rx(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function wEe(e){var t=SEe(e,"string");return tu(t)==="symbol"?t:String(t)}function SEe(e,t){if(tu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ji(){return typeof Reflect<"u"&&Reflect.get?Ji=Reflect.get.bind():Ji=function(t,r,n){var o=CEe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Ji.apply(this,arguments)}function CEe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=ao(e),e!==null););return e}function _Ee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yR(e,t)}function yR(e,t){return yR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},yR(e,t)}function OEe(e){var t=EEe();return function(){var n=ao(e),o;if(t){var i=ao(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return REe(this,o)}}function REe(e,t){if(t&&(tu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N2(e)}function N2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EEe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ao(e){return ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ao(e)}be.getSingleton().register("modifyAutofillRange");be.getSingleton().register("beforeAutofill");be.getSingleton().register("afterAutofill");var Ex="autofill",TEe=20,PEe=["fillHandle"],kEe="insert_row_below",$Ee=200,AEe=function(e){_Ee(r,e);var t=OEe(r);function r(n){var o;return mEe(this,r),o=t.call(this,n),o.eventManager=new Pt(N2(o)),o.addingStarted=!1,o.mouseDownOnCellCorner=!1,o.mouseDragOutside=!1,o.handleDraggedCells=0,o.directions=[],o.autoInsertRow=!1,o}return bEe(r,[{key:"isEnabled",value:function(){return this.hot.getSettings().fillHandle}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",function(i){return o.onAfterCellCornerMouseDown(i)}),this.addHook("afterOnCellCornerDblClick",function(i){return o.onCellCornerDblClick(i)}),this.addHook("beforeOnCellMouseOver",function(i,a){return o.onBeforeCellMouseOver(a)}),Ji(ao(r.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),Ji(ao(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.clearMappedSettings(),Ji(ao(r.prototype),"disablePlugin",this).call(this)}},{key:"getSelectionData",value:function(){var o=this,i=this.hot.getSelectedRangeLast(),a=i.getTopStartCorner(),l=a.row,s=a.col,u=i.getBottomEndCorner(),f=u.row,c=u.col,h=this.hot.runHooks("modifyCopyableRange",[{startRow:l,startCol:s,endRow:f,endCol:c}]),d=[],v=[],p=[];return $(h,function(m){for(var w=m.startRow;w<=m.endRow;w+=1)d.indexOf(w)===-1&&d.push(w);for(var S=m.startCol;S<=m.endCol;S+=1)v.indexOf(S)===-1&&v.push(S)}),$(d,function(m){var w=[];$(v,function(S){w.push(o.hot.getCopyableData(m,S))}),p.push(w)}),p}},{key:"fillIn",value:function(){var o=this;if(this.hot.selection.highlight.getFill().isEmpty())return!1;var i=this.hot.selection.highlight.getFill().getVisualCorners(),a=vEe(i,4),l=a[0],s=a[1],u=a[2],f=a[3],c=this.hot.getSelectedRangeLast(),h=c.getTopStartCorner(),d=c.getBottomEndCorner();this.resetSelectionOfDraggedArea();var v=[h.row,h.col,d.row,d.col],p=this.hot.runHooks("modifyAutofillRange",[Math.min(h.row,l),Math.min(h.col,s),Math.max(d.row,u),Math.max(d.col,f)],v),m=sEe(v,p,function(k,y){return o.hot._createCellCoords(k,y)}),w=m.directionOfDrag,S=m.startOfDragCoords,C=m.endOfDragCoords;if(S&&S.row>-1&&S.col>-1){var P=this.getSelectionData(),R=c.clone(),W=this.hot._createCellRange(S,S,C),z=this.hot.runHooks("beforeAutofill",P,R,W,w);if(z===!1)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;var q=lEe(S,C,P,w),K=z,X=z;if(["up","left"].indexOf(w)>-1&&!(X.length===1&&X[0].length===0))if(K=[],w==="up")for(var Q=C.row-S.row+1,ae=Q%X.length,Z=0;Z<Q;Z++)K.push(X[(Z+(X.length-ae))%X.length]);else for(var he=C.col-S.col+1,Ee=he%X[0].length,_e=0;_e<X.length;_e++){K.push([]);for(var Oe=0;Oe<he;Oe++)K[_e].push(X[_e][(Oe+(X[_e].length-Ee))%X[_e].length])}this.hot.populateFromArray(S.row,S.col,K,C.row,C.col,"".concat(this.pluginName,".fill"),null,w,q),this.setSelection(p),this.hot.runHooks("afterAutofill",K,R,W,w),this.hot.render()}else this.hot._refreshBorders();return!0}},{key:"reduceSelectionAreaIfNeeded",value:function(o){return o.row<0&&(o.row=0),o.col<0&&(o.col=0),o}},{key:"getCoordsOfDragAndDropBorders",value:function(o){var i=this.hot.getSelectedRangeLast(),a=i.getBottomEndCorner(),l=o;if(this.directions.includes(Qi.vertical)&&this.directions.includes(Qi.horizontal)){var s=i.getTopStartCorner();(a.col<=o.col||s.col>=o.col)&&(l=this.hot._createCellCoords(a.row,o.col)),(a.row<o.row||s.row>o.row)&&(l=this.hot._createCellCoords(o.row,a.col))}else if(this.directions.includes(Qi.vertical))l=this.hot._createCellCoords(o.row,a.col);else if(this.directions.includes(Qi.horizontal))l=this.hot._createCellCoords(a.row,o.col);else return;return this.reduceSelectionAreaIfNeeded(l)}},{key:"showBorder",value:function(o){var i=this.getCoordsOfDragAndDropBorders(o);i&&this.redrawBorders(i)}},{key:"addRow",value:function(){var o=this;this.hot._registerTimeout(function(){o.hot.alter(kEe,void 0,1,"".concat(o.pluginName,".fill")),o.addingStarted=!1},$Ee)}},{key:"addNewRowIfNeeded",value:function(){if(!this.hot.selection.highlight.getFill().isEmpty()&&this.addingStarted===!1&&this.autoInsertRow){var o=this.hot.getSelectedLast(),i=this.hot.selection.highlight.getFill().getVisualCorners(),a=this.hot.countRows();o[2]<a-1&&i[2]===a-1&&(this.addingStarted=!0,this.addRow())}}},{key:"getIndexOfLastAdjacentFilledInRow",value:function(o){for(var i=this.hot.getData(),a=this.hot.countRows(),l,s=o[2]+1;s<a;s++){for(var u=o[1];u<=o[3];u++){var f=i[s][u];if(f)return-1}var c=i[s][o[1]-1],h=i[s][o[3]+1];(c||h)&&(l=s)}return l}},{key:"addSelectionFromStartAreaToSpecificRowIndex",value:function(o,i){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(o[0],o[1])).add(this.hot._createCellCoords(i,o[3])).commit()}},{key:"setSelection",value:function(o){var i;(i=this.hot).selectCell.apply(i,fEe(We(o,function(a){return Math.max(a,0)})).concat([!1,!1]))}},{key:"selectAdjacent",value:function(){var o=this.hot.getSelectedLast(),i=this.getIndexOfLastAdjacentFilledInRow(o);return i===-1||i===void 0?!1:(this.addSelectionFromStartAreaToSpecificRowIndex(o,i),!0)}},{key:"resetSelectionOfDraggedArea",value:function(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}},{key:"redrawBorders",value:function(o){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(o).commit(),this.hot.view.render()}},{key:"getIfMouseWasDraggedOutside",value:function(o){var i=this.hot.rootDocument.documentElement,a=Vt(this.hot.table).top-(this.hot.rootWindow.pageYOffset||i.scrollTop)+Tt(this.hot.table),l=Vt(this.hot.table).left-(this.hot.rootWindow.pageXOffset||i.scrollLeft)+vt(this.hot.table);return o.clientY>a&&o.clientX<=l}},{key:"registerEvents",value:function(){var o=this,i=this.hot.rootDocument.documentElement;this.eventManager.addEventListener(i,"mouseup",function(){return o.onMouseUp()}),this.eventManager.addEventListener(i,"mousemove",function(a){return o.onMouseMove(a)})}},{key:"onCellCornerDblClick",value:function(){var o=this.selectAdjacent();o&&this.fillIn()}},{key:"onAfterCellCornerMouseDown",value:function(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}},{key:"onBeforeCellMouseOver",value:function(o){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(o),this.addNewRowIfNeeded())}},{key:"onMouseUp",value:function(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}},{key:"onMouseMove",value:function(o){var i=this.getIfMouseWasDraggedOutside(o);this.addingStarted===!1&&this.handleDraggedCells>0&&i?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}},{key:"clearMappedSettings",value:function(){this.directions.length=0,this.autoInsertRow=!1}},{key:"mapSettings",value:function(){var o=uEe(this.hot.getSettings().fillHandle);this.directions=o.directions,this.autoInsertRow=o.autoInsertRow}},{key:"destroy",value:function(){Ji(ao(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return Ex}},{key:"PLUGIN_PRIORITY",get:function(){return TEe}},{key:"SETTING_KEYS",get:function(){return[Ex].concat(PEe)}}]),r}(at);function ru(e){return ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ru(e)}function IEe(e,t){return NEe(e)||DEe(e,t)||xEe(e,t)||MEe()}function MEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xEe(e,t){if(e){if(typeof e=="string")return Tx(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tx(e,t)}}function Tx(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function DEe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function NEe(e){if(Array.isArray(e))return e}function HEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Px(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,jEe(n.key),n)}}function LEe(e,t,r){return t&&Px(e.prototype,t),r&&Px(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function jEe(e){var t=BEe(e,"string");return ru(t)==="symbol"?t:String(t)}function BEe(e,t){if(ru(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ru(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zl(){return typeof Reflect<"u"&&Reflect.get?zl=Reflect.get.bind():zl=function(t,r,n){var o=FEe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},zl.apply(this,arguments)}function FEe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=si(e),e!==null););return e}function VEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pR(e,t)}function pR(e,t){return pR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},pR(e,t)}function WEe(e){var t=YEe();return function(){var n=si(e),o;if(t){var i=si(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return UEe(this,o)}}function UEe(e,t){if(t&&(ru(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zEe(e)}function zEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YEe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function si(e){return si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},si(e)}var ly="autoRowSize",GEe=40,KEe="autoRowSize",XEe=function(e){VEe(r,e);var t=WEe(r);function r(n){var o;return HEe(this,r),o=t.call(this,n),o.rowHeightsMap=void 0,o.headerHeight=null,o.ghostTable=new mP(o.hot),o.samplesGenerator=new M2(function(i,a){var l;return i>=0?l=o.hot.getDataAtCell(i,a):i===-1&&(l=o.hot.getColHeader(a)),{value:l}}),o.firstCalculation=!0,o.inProgress=!1,o.measuredRows=0,o.rowHeightsMap=new Ei,o.hot.rowIndexMapper.registerMap(KEe,o.rowHeightsMap),o.addHook("beforeRowResize",function(i,a,l){return o.onBeforeRowResize(i,a,l)}),o}return LEe(r,[{key:"isEnabled",value:function(){var o=this.hot.getSettings()[ly];return o===!0||Ue(o)}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",function(){return o.onAfterLoadData.apply(o,arguments)}),this.addHook("beforeChangeRender",function(i){return o.onBeforeChange(i)}),this.addHook("beforeColumnResize",function(){return o.recalculateAllRowsHeight()}),this.addHook("beforeViewRender",function(i){return o.onBeforeViewRender(i)}),this.addHook("modifyRowHeight",function(i,a){return o.getRowHeight(a,i)}),this.addHook("modifyColumnHeaderHeight",function(){return o.getColumnHeaderHeight()}),zl(si(r.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){var o=this;this.headerHeight=null,zl(si(r.prototype),"disablePlugin",this).call(this),this.addHook("beforeRowResize",function(i,a,l){return o.onBeforeRowResize(i,a,l)})}},{key:"calculateRowsHeight",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{from:0,to:this.hot.countRows()-1},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{from:0,to:this.hot.countCols()-1},l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=typeof i=="number"?{from:i,to:i}:i,u=typeof a=="number"?{from:a,to:a}:a;if(this.hot.getColHeader(0)!==null){var f=this.samplesGenerator.generateRowSamples(-1,u);this.ghostTable.addColumnHeadersRow(f.get(-1))}Ce(s.from,s.to,function(c){if(l||o.rowHeightsMap.getValueAtIndex(c)===null){var h=o.samplesGenerator.generateRowSamples(c,u);$(h,function(d){var v=IEe(d,2),p=v[0],m=v[1];return o.ghostTable.addRow(p,m)})}}),this.ghostTable.rows.length&&(this.hot.batchExecution(function(){o.ghostTable.getHeights(function(c,h){c<0?o.headerHeight=h:o.rowHeightsMap.setValueAtIndex(o.hot.toPhysicalRow(c),h)})},!0),this.measuredRows=s.to+1,this.ghostTable.clean())}},{key:"calculateAllRowsHeight",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{from:0,to:this.hot.countCols()-1},a=0,l=this.hot.countRows()-1,s=null;this.inProgress=!0;var u=function c(){if(!o.hot){$c(s),o.inProgress=!1;return}o.calculateRowsHeight({from:a,to:Math.min(a+r.CALCULATION_STEP,l)},i),a=a+r.CALCULATION_STEP+1,a<l?s=um(c):($c(s),o.inProgress=!1,o.hot.view.adjustElementsSize(!0),o.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender&&o.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw())},f=this.getSyncCalculationLimit();this.firstCalculation&&f>=0&&(this.calculateRowsHeight({from:0,to:f},i),this.firstCalculation=!1,a=f+1),a<l?u():(this.inProgress=!1,this.hot.view.adjustElementsSize(!1))}},{key:"setSamplingOptions",value:function(){var o=this.hot.getSettings()[ly],i=o&&It(o,"samplingRatio")?o.samplingRatio:void 0,a=o&&It(o,"allowSampleDuplicates")?o.allowSampleDuplicates:void 0;i&&!isNaN(i)&&this.samplesGenerator.setSampleCount(parseInt(i,10)),a&&this.samplesGenerator.setAllowDuplicates(a)}},{key:"recalculateAllRowsHeight",value:function(){ns(this.hot.view._wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllRowsHeight())}},{key:"getSyncCalculationLimit",value:function(){var o=this.hot.getSettings()[ly],i=r.SYNC_CALCULATION_LIMIT,a=this.hot.countRows()-1;return Ue(o)&&(i=o.syncLimit,mT(i)?i=TT(a,i):i>>=0),Math.min(i,a)}},{key:"getRowHeight",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,a=o<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(o)),l=i;return a!==null&&a>(i||0)&&(l=a),l}},{key:"getColumnHeaderHeight",value:function(){return this.headerHeight}},{key:"getFirstVisibleRow",value:function(){var o=this.hot.view._wt;return o.wtViewport.rowsVisibleCalculator?o.wtTable.getFirstVisibleRow():o.wtViewport.rowsRenderCalculator?o.wtTable.getFirstRenderedRow():-1}},{key:"getLastVisibleRow",value:function(){var o=this.hot.view._wt;return o.wtViewport.rowsVisibleCalculator?o.wtTable.getLastVisibleRow():o.wtViewport.rowsRenderCalculator?o.wtTable.getLastRenderedRow():-1}},{key:"clearCache",value:function(){this.headerHeight=null,this.rowHeightsMap.init()}},{key:"clearCacheByRange",value:function(o){var i=this,a=typeof o=="number"?{from:o,to:o}:o,l=a.from,s=a.to;this.hot.batchExecution(function(){Ce(Math.min(l,s),Math.max(l,s),function(u){i.rowHeightsMap.setValueAtIndex(u,null)})},!0)}},{key:"isNeedRecalculate",value:function(){return!!jr(this.rowHeightsMap.getValues().slice(0,this.measuredRows),function(o){return o===null}).length}},{key:"onBeforeViewRender",value:function(){var o=this.hot.renderCall,i=this.hot.getSettings().fixedRowsBottom,a=this.getFirstVisibleRow(),l=this.getLastVisibleRow();if(!(a===-1||l===-1)){if(this.calculateRowsHeight({from:a,to:l},void 0,o),i){var s=this.hot.countRows()-1;this.calculateRowsHeight({from:s-i,to:s})}this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()}}},{key:"onBeforeRowMove",value:function(o,i){this.clearCacheByRange({from:o,to:i}),this.calculateAllRowsHeight()}},{key:"onBeforeRowResize",value:function(o,i,a){var l=o;return a&&(this.calculateRowsHeight(i,void 0,!0),l=this.getRowHeight(i)),l}},{key:"onAfterLoadData",value:function(){var o=this;this.hot.view?this.recalculateAllRowsHeight():setTimeout(function(){o.hot&&o.recalculateAllRowsHeight()},0)}},{key:"onBeforeChange",value:function(o){var i=null;o.length===1?i=o[0][0]:o.length>1&&(i={from:o[0][0],to:o[o.length-1][0]}),i!==null&&this.clearCacheByRange(i)}},{key:"destroy",value:function(){this.ghostTable.clean(),zl(si(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return ly}},{key:"PLUGIN_PRIORITY",get:function(){return GEe}},{key:"SETTING_KEYS",get:function(){return!0}},{key:"CALCULATION_STEP",get:function(){return 50}},{key:"SYNC_CALCULATION_LIMIT",get:function(){return 500}}]),r}(at);function nu(e){return nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nu(e)}function qEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kx(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,QEe(n.key),n)}}function ZEe(e,t,r){return t&&kx(e.prototype,t),r&&kx(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function QEe(e){var t=JEe(e,"string");return nu(t)==="symbol"?t:String(t)}function JEe(e,t){if(nu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sc(){return typeof Reflect<"u"&&Reflect.get?Sc=Reflect.get.bind():Sc=function(t,r,n){var o=eTe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Sc.apply(this,arguments)}function eTe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Na(e),e!==null););return e}function tTe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gR(e,t)}function gR(e,t){return gR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},gR(e,t)}function rTe(e){var t=iTe();return function(){var n=Na(e),o;if(t){var i=Na(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return nTe(this,o)}}function nTe(e,t){if(t&&(nu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oTe(e)}function oTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iTe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Na(e){return Na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Na(e)}var H2=FW("physicallyIndexed"),aTe=H2.getListWithInsertedItems,lTe=H2.getListWithRemovedItems,sTe=function(e){tTe(r,e);var t=rTe(r);function r(){return qEe(this,r),t.call(this,function(n){return n})}return ZEe(r,[{key:"insert",value:function(o,i){var a=XT(this.indexedValues,i);this.indexedValues=aTe(a,o,i,this.initValueOrFn),Sc(Na(r.prototype),"insert",this).call(this,o,i)}},{key:"remove",value:function(o){var i=lTe(this.indexedValues,o);this.indexedValues=KT(i,o),Sc(Na(r.prototype),"remove",this).call(this,o)}}]),r}(Xa);const uTe=sTe;function ou(e){return ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ou(e)}function fTe(e){return vTe(e)||dTe(e)||hTe(e)||cTe()}function cTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hTe(e,t){if(e){if(typeof e=="string")return mR(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mR(e,t)}}function dTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vTe(e){if(Array.isArray(e))return mR(e)}function mR(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $x(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,gTe(n.key),n)}}function pTe(e,t,r){return t&&$x(e.prototype,t),r&&$x(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function gTe(e){var t=mTe(e,"string");return ou(t)==="symbol"?t:String(t)}function mTe(e,t){if(ou(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ou(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cc(){return typeof Reflect<"u"&&Reflect.get?Cc=Reflect.get.bind():Cc=function(t,r,n){var o=bTe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Cc.apply(this,arguments)}function bTe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ha(e),e!==null););return e}function wTe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bR(e,t)}function bR(e,t){return bR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},bR(e,t)}function STe(e){var t=OTe();return function(){var n=Ha(e),o;if(t){var i=Ha(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return CTe(this,o)}}function CTe(e,t){if(t&&(ou(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _Te(e)}function _Te(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OTe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ha(e){return Ha=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ha(e)}var L2=FW("physicallyIndexed"),RTe=L2.getListWithInsertedItems,ETe=L2.getListWithRemovedItems,TTe=function(e){wTe(r,e);var t=STe(r);function r(){return yTe(this,r),t.call(this,function(n){return n})}return pTe(r,[{key:"insert",value:function(o,i){var a=this;this.indexedValues=RTe(this.indexedValues,o,i,function(l,s){return a.getNextValue(s)}),Cc(Ha(r.prototype),"insert",this).call(this,o,i)}},{key:"remove",value:function(o){this.indexedValues=ETe(this.indexedValues,o),Cc(Ha(r.prototype),"remove",this).call(this,o)}},{key:"getNextValue",value:function(o){return Math.max.apply(Math,fTe(this.getValues()))+1+o}}]),r}(Xa);const PTe=TTe;function iu(e){return iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iu(e)}function kTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ax(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,ATe(n.key),n)}}function $Te(e,t,r){return t&&Ax(e.prototype,t),r&&Ax(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ATe(e){var t=ITe(e,"string");return iu(t)==="symbol"?t:String(t)}function ITe(e,t){if(iu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(iu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yl(){return typeof Reflect<"u"&&Reflect.get?Yl=Reflect.get.bind():Yl=function(t,r,n){var o=MTe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Yl.apply(this,arguments)}function MTe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=ui(e),e!==null););return e}function xTe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wR(e,t)}function wR(e,t){return wR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},wR(e,t)}function DTe(e){var t=LTe();return function(){var n=ui(e),o;if(t){var i=ui(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return NTe(this,o)}}function NTe(e,t){if(t&&(iu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return HTe(e)}function HTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LTe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ui(e){return ui=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ui(e)}var XS="bindRowsWithHeaders",jTe=210,BTe="loose",FTe=new Map([["loose",uTe],["strict",PTe]]),VTe=function(e){xTe(r,e);var t=DTe(r);function r(n){var o;return kTe(this,r),o=t.call(this,n),o.headerIndexes=null,o}return $Te(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[XS]}},{key:"enablePlugin",value:function(){var o=this;if(!this.enabled){var i=this.hot.getSettings()[XS];typeof i!="string"&&(i=BTe);var a=FTe.get(i);this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new a),this.addHook("modifyRowHeader",function(l){return o.onModifyRowHeader(l)}),Yl(ui(r.prototype),"enablePlugin",this).call(this)}}},{key:"disablePlugin",value:function(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),Yl(ui(r.prototype),"disablePlugin",this).call(this)}},{key:"onModifyRowHeader",value:function(o){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(o))}},{key:"destroy",value:function(){Yl(ui(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return XS}},{key:"PLUGIN_PRIORITY",get:function(){return jTe}}]),r}(at);function au(e){return au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},au(e)}function Ix(e){return YTe(e)||zTe(e)||UTe(e)||WTe()}function WTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UTe(e,t){if(e){if(typeof e=="string")return SR(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return SR(e,t)}}function zTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function YTe(e){if(Array.isArray(e))return SR(e)}function SR(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function GTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mx(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,j2(n.key),n)}}function KTe(e,t,r){return t&&Mx(e.prototype,t),r&&Mx(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ea(){return typeof Reflect<"u"&&Reflect.get?ea=Reflect.get.bind():ea=function(t,r,n){var o=XTe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ea.apply(this,arguments)}function XTe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=lo(e),e!==null););return e}function qTe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&CR(e,t)}function CR(e,t){return CR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},CR(e,t)}function ZTe(e){var t=JTe();return function(){var n=lo(e),o;if(t){var i=lo(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return QTe(this,o)}}function QTe(e,t){if(t&&(au(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Il(e)}function Il(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JTe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function lo(e){return lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lo(e)}function ePe(e,t,r){tPe(e,t),t.set(e,r)}function tPe(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function qS(e,t,r){return t=j2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j2(e){var t=rPe(e,"string");return au(t)==="symbol"?t:String(t)}function rPe(e,t){if(au(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(au(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xx(e,t){var r=B2(e,t,"get");return nPe(e,r)}function nPe(e,t){return t.get?t.get.call(e):t.value}function ZS(e,t,r){var n=B2(e,t,"set");return oPe(e,n,r),r}function B2(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function oPe(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}var QS="collapsibleColumns",iPe=290,aPe=["nestedHeaders"],cl="collapsibleIndicator",Dx=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]),hl=new WeakMap,lPe=function(e){qTe(r,e);var t=ZTe(r);function r(){var n;GTe(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),qS(Il(n),"nestedHeadersPlugin",null),qS(Il(n),"eventManager",new Pt(Il(n))),qS(Il(n),"headerStateManager",null),ePe(Il(n),hl,{writable:!0,value:null}),n}return KTe(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[QS]}},{key:"enablePlugin",value:function(){var o=this;if(!this.enabled){var i=this.hot.getSettings(),a=i.nestedHeaders;a||gt("You need to configure the Nested Headers plugin in order to use collapsible headers."),ZS(this,hl,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",function(){return o.onInit()}),this.addHook("afterLoadData",function(){return o.onAfterLoadData.apply(o,arguments)}),this.addHook("afterGetColHeader",function(){return o.onAfterGetColHeader.apply(o,arguments)}),this.addHook("beforeOnCellMouseDown",function(l,s,u){return o.onBeforeOnCellMouseDown(l,s,u)}),ea(lo(r.prototype),"enablePlugin",this).call(this),this.updatePlugin()}}},{key:"updatePlugin",value:function(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){var o=this.hot.getSettings(),i=o.collapsibleColumns;typeof i=="boolean"?this.headerStateManager.mapState(function(a){return{collapsible:a.origColspan>1}}):Array.isArray(i)&&(this.headerStateManager.mapState(function(){return{collapsible:!1}}),this.headerStateManager.mergeStateWith(i))}ea(lo(r.prototype),"updatePlugin",this).call(this)}}},{key:"disablePlugin",value:function(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),ZS(this,hl,null),this.nestedHeadersPlugin=null,this.clearButtons(),ea(lo(r.prototype),"disablePlugin",this).call(this)}},{key:"clearButtons",value:function(){if(this.hot.view){var o=this.hot.view._wt.getSetting("columnHeaders").length,i=this.hot.view._wt.wtTable.THEAD,a=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,l=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,s=function(f){f&&f.parentNode.removeChild(f)};Ce(0,o-1,function(u){var f=i.childNodes[u],c=a.childNodes[u],h=l?l.childNodes[u]:null;Ce(0,f.childNodes.length-1,function(d){var v=f.childNodes[d].querySelector(".".concat(cl));s(v),c&&c.childNodes[d]&&(v=c.childNodes[d].querySelector(".".concat(cl)),s(v)),l&&h&&h.childNodes[d]&&(v=h.childNodes[d].querySelector(".".concat(cl)),s(v))})})}}},{key:"expandSection",value:function(o){this.toggleCollapsibleSection([o],"expand")}},{key:"collapseSection",value:function(o){this.toggleCollapsibleSection([o],"collapse")}},{key:"toggleAllCollapsibleSections",value:function(o){var i=this,a=this.headerStateManager.mapNodes(function(l){var s=l.collapsible,u=l.origColspan,f=l.headerLevel,c=l.columnIndex,h=l.isCollapsed;if(s===!0&&u>1&&(h&&o==="expand"||!h&&o==="collapse"))return{row:i.headerStateManager.levelToRowCoords(f),col:c}});this.toggleCollapsibleSection(a,o)}},{key:"collapseAll",value:function(){this.toggleAllCollapsibleSections("collapse")}},{key:"expandAll",value:function(){this.toggleAllCollapsibleSections("expand")}},{key:"toggleCollapsibleSection",value:function(o,i){var a=this;if(!Dx.has(i))throw new Error("Unsupported action is passed (".concat(i,")."));if(Array.isArray(o)){var l=jr(o,function(m){var w=m.row;return w<0}),s=l.length>0;$(l,function(m){var w,S=m.row,C=m.col,P=(w=a.headerStateManager.getHeaderSettings(S,C))!==null&&w!==void 0?w:{},R=P.collapsible,W=P.isCollapsed;if(!R||W&&i==="collapse"||!W&&i==="expand")return s=!1,!1});var u=[],f=[];s&&$(l,function(m){var w=m.row,S=m.col,C=a.headerStateManager.triggerNodeModification(i,w,S),P=C.colspanCompensation,R=C.affectedColumns,W=C.rollbackModification;P>0&&(f.push.apply(f,Ix(R)),u.push(W))});var c=this.getCollapsedColumns(),h=[];i==="collapse"?h=YE([].concat(Ix(c),f)):i==="expand"&&(h=jr(c,function(m){return!f.includes(m)}));var d=Dx.get(i),v=this.hot.runHooks(d.beforeHook,c,h,s);if(v===!1){$(u,function(m){m()});return}this.hot.batchExecution(function(){$(f,function(m){xx(a,hl).setValueAtIndex(a.hot.toPhysicalColumn(m),d.hideColumn)})},!0);var p=this.getCollapsedColumns().length!==c.length;this.hot.runHooks(d.afterHook,c,h,s,p),this.hot.render(),this.hot.view.adjustElementsSize(!0)}}},{key:"getCollapsedColumns",value:function(){return xx(this,hl).getHiddenIndexes()}},{key:"onAfterGetColHeader",value:function(o,i,a){var l,s=(l=this.headerStateManager.getHeaderSettings(a,o))!==null&&l!==void 0?l:{},u=s.collapsible,f=s.origColspan,c=s.isCollapsed,h=u&&f>1&&o>=this.hot.getSettings().fixedColumnsStart,d=i.querySelector(".".concat(cl));if(h)d||(d=this.hot.rootDocument.createElement("div"),te(d,cl),i.querySelector("div:first-child").appendChild(d)),Be(d,["collapsed","expanded"]),c?(te(d,"collapsed"),bi(d,"+")):(te(d,"expanded"),bi(d,"-"));else{var v;(v=d)===null||v===void 0||v.remove()}}},{key:"onBeforeOnCellMouseDown",value:function(o,i){Ne(o.target,cl)&&(Ne(o.target,"expanded")?(this.eventManager.fireEvent(o.target,"mouseup"),this.toggleCollapsibleSection([i],"collapse")):Ne(o.target,"collapsed")&&(this.eventManager.fireEvent(o.target,"mouseup"),this.toggleCollapsibleSection([i],"expand")),gn(o))}},{key:"onInit",value:function(){this.updatePlugin()}},{key:"onAfterLoadData",value:function(o,i){i||this.updatePlugin()}},{key:"destroy",value:function(){ZS(this,hl,null),ea(lo(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return QS}},{key:"PLUGIN_PRIORITY",get:function(){return iPe}},{key:"PLUGIN_DEPS",get:function(){return["plugin:NestedHeaders"]}},{key:"SETTING_KEYS",get:function(){return[QS].concat(aPe)}}]),r}(at);function Yh(e){return Yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yh(e)}function Nx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function sPe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nx(Object(r),!0).forEach(function(n){uPe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uPe(e,t,r){return t=F2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hx(e,t){return dPe(e)||hPe(e,t)||cPe(e,t)||fPe()}function fPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cPe(e,t){if(e){if(typeof e=="string")return Lx(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lx(e,t)}}function Lx(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hPe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function dPe(e){if(Array.isArray(e))return e}function vPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jx(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,F2(n.key),n)}}function yPe(e,t,r){return t&&jx(e.prototype,t),r&&jx(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function F2(e){var t=pPe(e,"string");return Yh(t)==="symbol"?t:String(t)}function pPe(e,t){if(Yh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Yh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gPe=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"],mPe=!1,bPe=!0,wPe=!0,SPe=function(){function e(t,r){vPe(this,e),this.hot=t,this.sortingStates=new Am,this.sortEmptyCells=mPe,this.indicator=bPe,this.headerAction=wPe,this.compareFunctionFactory=void 0,this.mapName=r,this.hot.columnIndexMapper.registerMap(r,this.sortingStates)}return yPe(e,[{key:"updateAllColumnsProperties",value:function(r){var n=this;Ue(r)&&ze(r,function(o,i){gPe.includes(i)&&(n[i]=o)})}},{key:"getAllColumnsProperties",value:function(){var r={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return typeof this.compareFunctionFactory=="function"&&(r.compareFunctionFactory=this.compareFunctionFactory),r}},{key:"getSortOrderOfColumn",value:function(r){var n;return(n=this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(r)))===null||n===void 0?void 0:n.sortOrder}},{key:"getIndexOfColumnInSortQueue",value:function(r){return r=this.hot.toPhysicalColumn(r),this.sortingStates.getEntries().findIndex(function(n){var o=Hx(n,1),i=o[0];return i===r})}},{key:"getNumberOfSortedColumns",value:function(){return this.sortingStates.getLength()}},{key:"isListOfSortedColumnsEmpty",value:function(){return this.getNumberOfSortedColumns()===0}},{key:"isColumnSorted",value:function(r){return Ue(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(r)))}},{key:"getSortStates",value:function(){var r=this;if(this.sortingStates===null)return[];var n=this.sortingStates.getEntries();return n.map(function(o){var i=Hx(o,2),a=i[0],l=i[1];return sPe({column:r.hot.toVisualColumn(a)},l)})}},{key:"getColumnSortState",value:function(r){var n=this.getSortOrderOfColumn(r);if(pe(n))return{column:r,sortOrder:n}}},{key:"setSortStates",value:function(r){this.sortingStates.clear();for(var n=0;n<r.length;n+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(r[n].column),{sortOrder:r[n].sortOrder})}},{key:"destroy",value:function(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}}]),e}(),Og="asc",Rg="desc",CPe="colHeader";function _Pe(e){if(Ue(e)===!1)return!1;var t=e.column,r=e.sortOrder;return Number.isInteger(t)&&[Og,Rg].includes(r)}function OPe(e){if(e.some(function(r){return _Pe(r)===!1}))return!1;var t=e.map(function(r){var n=r.column;return n});return new Set(t).size===t.length}function Bx(e){if(e!==Rg)return e===Og?Rg:Og}function Fx(e){var t=e.querySelector(".".concat(CPe));return t}function Vx(e,t){if(e<0||!t.parentNode)return!1;var r=t.parentNode.parentNode.childNodes,n=Array.from(r).indexOf(t.parentNode)-r.length;return n===-1}function _R(e,t,r){return e===-1&&t>=0&&Si(r)===!1}var RPe="ascending",EPe="descending",V2="indicatorDisabled",W2="columnSorting",U2="sortAction",z2=new Map([[Og,RPe],[Rg,EPe]]);function TPe(e,t,r,n){var o=[W2];if(n&&o.push(U2),r===!1)return o.push(V2),o;var i=e.getSortOrderOfColumn(t);return pe(i)&&o.push(z2.get(i)),o}function PPe(){return Array.from(z2.values()).concat(U2,V2,W2)}function Y2(e,t,r){var n=t.locale;return function(o,i){var a=r.sortEmptyCells;return typeof o=="string"&&(o=o.toLocaleLowerCase(n)),typeof i=="string"&&(i=i.toLocaleLowerCase(n)),o===i?Dn:Kt(o)?Kt(i)?Dn:a&&e==="asc"?$t:At:Kt(i)?a&&e==="asc"?At:$t:isNaN(o)&&!isNaN(i)?e==="asc"?At:$t:!isNaN(o)&&isNaN(i)||(isNaN(o)||isNaN(i)||(o=parseFloat(o),i=parseFloat(i)),o<i)?e==="asc"?$t:At:o>i?e==="asc"?At:$t:Dn}}var G2="default";function kPe(e,t,r){return function(n,o){var i=parseFloat(n),a=parseFloat(o),l=r.sortEmptyCells;if(i===a||isNaN(i)&&isNaN(a))return Dn;if(l){if(Kt(n))return e==="asc"?$t:At;if(Kt(o))return e==="asc"?At:$t}return isNaN(i)?At:isNaN(a)?$t:i<a?e==="asc"?$t:At:i>a?e==="asc"?At:$t:Dn}}var $Pe="numeric";function APe(e,t,r){var n=t.checkedTemplate,o=t.uncheckedTemplate,i=r.sortEmptyCells;return function(a,l){var s=Kt(a),u=Kt(l),f=s?o:a,c=u?o:l,h=f===o||f===n,d=c===o||c===n;if(i===!1){if(s&&u===!1)return At;if(s===!1&&u)return $t}return h===!1&&d?e==="asc"?$t:At:h&&d===!1?e==="asc"?At:$t:h===!1&&d===!1?Y2(e,t,r)(a,l):f===o&&c===n?e==="asc"?$t:At:f===n&&c===o?e==="asc"?At:$t:Dn}}var IPe="checkbox";function MPe(e,t,r){return function(n,o){var i=r.sortEmptyCells;if(n===o)return Dn;if(Kt(n))return Kt(o)?Dn:i&&e==="asc"?$t:At;if(Kt(o))return i&&e==="asc"?At:$t;var a=t.dateFormat,l=re(n,a),s=re(o,a);return l.isValid()?s.isValid()?s.isAfter(l)?e==="asc"?$t:At:s.isBefore(l)?e==="asc"?At:$t:Dn:$t:At}}var xPe="date",bP=en("sorting.compareFunctionFactory"),nw=bP.register,Wx=bP.getItem,DPe=bP.hasItem,K2=en("sorting.mainSortComparator"),X2=K2.register,NPe=K2.getItem;function q2(e){return DPe(e)?Wx(e):Wx(G2)}nw($Pe,kPe);nw(IPe,APe);nw(xPe,MPe);nw(G2,Y2);var Dn=0,$t=-1,At=1;function HPe(e,t){for(var r=NPe(t),n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];e.sort(r.apply(void 0,o))}function Ux(e){return FPe(e)||BPe(e)||jPe(e)||LPe()}function LPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jPe(e,t){if(e){if(typeof e=="string")return zx(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zx(e,t)}}function zx(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function BPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function FPe(e){if(Array.isArray(e))return e}function VPe(e,t){return function(r,n){var o=Ux(r),i=o.slice(1),a=Ux(n),l=a.slice(1);return function(u){var f=e[u],c=t[u],h=i[u],d=l[u],v=c.columnSorting,p=v.compareFunctionFactory?v.compareFunctionFactory:q2(c.type),m=p(f,c,v)(h,d);return m}(0)}}function lu(e){return lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lu(e)}var WPe=["column"],UPe=["column"];function dl(e){return KPe(e)||GPe(e)||YPe(e)||zPe()}function zPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YPe(e,t){if(e){if(typeof e=="string")return OR(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return OR(e,t)}}function GPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KPe(e){if(Array.isArray(e))return OR(e)}function OR(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Yx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Gx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yx(Object(r),!0).forEach(function(n){XPe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XPe(e,t,r){return t=Z2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kx(e,t){if(e==null)return{};var r=qPe(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function qPe(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function ZPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xx(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,Z2(n.key),n)}}function QPe(e,t,r){return t&&Xx(e.prototype,t),r&&Xx(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z2(e){var t=JPe(e,"string");return lu(t)==="symbol"?t:String(t)}function JPe(e,t){if(lu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(lu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ta(){return typeof Reflect<"u"&&Reflect.get?ta=Reflect.get.bind():ta=function(t,r,n){var o=eke(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ta.apply(this,arguments)}function eke(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=so(e),e!==null););return e}function tke(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&RR(e,t)}function RR(e,t){return RR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},RR(e,t)}function rke(e){var t=ike();return function(){var n=so(e),o;if(t){var i=so(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return nke(this,o)}}function nke(e,t){if(t&&(lu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oke(e)}function oke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ike(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function so(e){return so=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},so(e)}var ER="columnSorting",ake=50,qx="append",lke="replace";X2(ER,VPe);be.getSingleton().register("beforeColumnSort");be.getSingleton().register("afterColumnSort");var Q2=function(e){tke(r,e);var t=rke(r);function r(n){var o;return ZPe(this,r),o=t.call(this,n),o.columnStatesManager=null,o.columnMetaCache=null,o.pluginKey=ER,o.indexesSequenceCache=null,o}return QPe(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[this.pluginKey]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.columnStatesManager=new SPe(this.hot,"".concat(this.pluginKey,".sortingStates")),this.columnMetaCache=new Ei(function(i){var a=o.hot.toVisualColumn(i);return a===null&&(a=i),o.getMergedPluginSettings(a)}),this.hot.columnIndexMapper.registerMap("".concat(this.pluginKey,".columnMeta"),this.columnMetaCache),this.addHook("afterGetColHeader",function(i,a){return o.onAfterGetColHeader(i,a)}),this.addHook("beforeOnCellMouseDown",function(){return o.onBeforeOnCellMouseDown.apply(o,arguments)}),this.addHook("afterOnCellMouseDown",function(i,a){return o.onAfterOnCellMouseDown(i,a)}),this.addHook("afterInit",function(){return o.loadOrSortBySettings()}),this.addHook("afterLoadData",function(){return o.onAfterLoadData.apply(o,arguments)}),this.hot.view&&this.loadOrSortBySettings(),ta(so(r.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){var o=this,i=function(l,s){var u=Fx(s);Vx(l,s)===!1||u===null||o.updateHeaderClasses(u)};this.hot.addHook("afterGetColHeader",i),this.hot.addHookOnce("afterViewRender",function(){o.hot.removeHook("afterGetColHeader",i)}),this.hot.batchExecution(function(){o.indexesSequenceCache!==null&&(o.hot.rowIndexMapper.setIndexesSequence(o.indexesSequenceCache.getValues()),o.hot.rowIndexMapper.unregisterMap(o.pluginKey))},!0),this.hot.columnIndexMapper.unregisterMap("".concat(this.pluginKey,".columnMeta")),this.columnStatesManager.destroy(),this.columnMetaCache=null,this.columnStatesManager=null,ta(so(r.prototype),"disablePlugin",this).call(this)}},{key:"sort",value:function(o){var i=this.getSortConfig(),a=this.getNormalizedSortConfigs(o),l=this.areValidSortConfigs(a),s=this.hot.runHooks("beforeColumnSort",i,a,l);s!==!1&&(i.length===0&&this.indexesSequenceCache===null&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new VW),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),l&&(this.columnStatesManager.setSortStates(a),this.sortByPresetSortStates(a),this.saveAllSortSettings(a)),this.hot.runHooks("afterColumnSort",i,l?a:i,l),l&&(this.hot.render(),this.hot.forceFullRender=!1,this.hot.view.render()))}},{key:"clearSort",value:function(){this.sort([])}},{key:"isSorted",value:function(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}},{key:"getSortConfig",value:function(o){return pe(o)?this.columnStatesManager.getColumnSortState(o):this.columnStatesManager.getSortStates()}},{key:"setSortConfig",value:function(o){var i=this.getNormalizedSortConfigs(o);this.areValidSortConfigs(i)&&this.columnStatesManager.setSortStates(i)}},{key:"getNormalizedSortConfigs",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Array.isArray(o)?o.slice(0,1):[o]}},{key:"areValidSortConfigs",value:function(o){var i=this.hot.countCols();return OPe(o)&&o.every(function(a){var l=a.column;return l<=i&&l>=0})}},{key:"saveAllSortSettings",value:function(o){var i=this,a=this.columnStatesManager.getAllColumnsProperties(),l=function(u){var f=u.column,c=Kx(u,WPe);return Gx({column:i.hot.toPhysicalColumn(f)},c)};a.initialConfig=We(o,l),this.hot.runHooks("persistentStateSave","columnSorting",a)}},{key:"getAllSavedSortSettings",value:function(){var o=this,i={};this.hot.runHooks("persistentStateLoad","columnSorting",i);var a=i.value,l=function(u){var f=u.column,c=Kx(u,UPe);return Gx({column:o.hot.toVisualColumn(f)},c)};return pe(a)&&Array.isArray(a.initialConfig)&&(a.initialConfig=We(a.initialConfig,l)),a}},{key:"getColumnNextConfig",value:function(o){var i=this.columnStatesManager.getSortOrderOfColumn(o);if(pe(i)){var a=Bx(i);return pe(a)?{column:o,sortOrder:a}:void 0}var l=this.hot.countCols();if(Number.isInteger(o)&&o>=0&&o<l)return{column:o,sortOrder:Bx()}}},{key:"getNextSortConfig",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qx,a=this.columnStatesManager.getIndexOfColumnInSortQueue(o),l=a!==-1,s=this.getSortConfig(),u=this.getColumnNextConfig(o);if(l){if(pt(u))return[].concat(dl(s.slice(0,a)),dl(s.slice(a+1)));if(i===qx)return[].concat(dl(s.slice(0,a)),dl(s.slice(a+1)),[u]);if(i===lke)return[].concat(dl(s.slice(0,a)),[u],dl(s.slice(a+1)))}return pe(u)?s.concat(u):s}},{key:"getPluginColumnConfig",value:function(o){if(Ue(o)){var i=o[this.pluginKey];if(Ue(i))return i}return{}}},{key:"getMergedPluginSettings",value:function(o){var i=this.hot.getSettings()[this.pluginKey],a=this.columnStatesManager.getAllColumnsProperties(),l=this.hot.getCellMeta(0,o),s=Object.getPrototypeOf(l);return Array.isArray(s.columns)?Object.assign(a,i,this.getPluginColumnConfig(s.columns[o])):wt(s.columns)?Object.assign(a,i,this.getPluginColumnConfig(s.columns(o))):Object.assign(a,i)}},{key:"getFirstCellSettings",value:function(o){var i=this.hot.getCellMeta(0,o),a=Object.create(i);return a[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(o)),a}},{key:"getNumberOfRowsToSort",value:function(o){var i=this.hot.getSettings();return i.maxRows<=o?i.maxRows:o-i.minSpareRows}},{key:"sortByPresetSortStates",value:function(o){var i=this;if(o.length===0){this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues());return}for(var a=[],l=this.hot.countRows(),s=function(m){return We(o,function(w){return i.hot.getDataAtCell(m,w.column)})},u=0;u<this.getNumberOfRowsToSort(l);u+=1)a.push([this.hot.toPhysicalRow(u)].concat(s(u)));var f=We(a,function(p){return p[0]});HPe(a,this.pluginKey,We(o,function(p){return p.sortOrder}),We(o,function(p){return i.getFirstCellSettings(p.column)}));for(var c=a.length;c<l;c+=1)a.push([c].concat(s(c)));var h=We(a,function(p){return p[0]}),d=new Map(We(f,function(p,m){return[p,h[m]]})),v=We(this.hot.rowIndexMapper.getIndexesSequence(),function(p){return d.has(p)?d.get(p):p});this.hot.rowIndexMapper.setIndexesSequence(v)}},{key:"loadOrSortBySettings",value:function(){var o=this.getAllSavedSortSettings();if(Ue(o))this.sortBySettings(o);else{var i=this.hot.getSettings()[this.pluginKey];this.sortBySettings(i)}}},{key:"sortBySettings",value:function(o){if(Ue(o)){this.columnStatesManager.updateAllColumnsProperties(o);var i=o.initialConfig;(Array.isArray(i)||Ue(i))&&this.sort(i)}else this.hot.render()}},{key:"onAfterGetColHeader",value:function(o,i){var a=Fx(i);if(!(Vx(o,i)===!1||a===null)){var l=this.getFirstCellSettings(o)[this.pluginKey],s=l.indicator,u=l.headerAction;this.updateHeaderClasses(a,this.columnStatesManager,o,s,u)}}},{key:"updateHeaderClasses",value:function(o){if(Be(o,PPe()),this.enabled!==!1){for(var i=arguments.length,a=new Array(i>1?i-1:0),l=1;l<i;l++)a[l-1]=arguments[l];te(o,TPe.apply(void 0,a))}}},{key:"onUpdateSettings",value:function(o){ta(so(r.prototype),"onUpdateSettings",this).call(this),this.columnMetaCache!==null&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),pe(o[this.pluginKey])&&this.sortBySettings(o[this.pluginKey])}},{key:"onAfterLoadData",value:function(o){o===!0&&this.hot.view&&this.loadOrSortBySettings()}},{key:"wasClickableHeaderClicked",value:function(o,i){var a=this.getFirstCellSettings(i)[this.pluginKey],l=a.headerAction;return l&&o.target.nodeName==="SPAN"}},{key:"onBeforeOnCellMouseDown",value:function(o,i,a,l){_R(i.row,i.col,o)!==!1&&this.wasClickableHeaderClicked(o,i.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(l.column=!0)}},{key:"onAfterOnCellMouseDown",value:function(o,i){_R(i.row,i.col,o)!==!1&&this.wasClickableHeaderClicked(o,i.col)&&(this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(i.col)),this.sort(this.getColumnNextConfig(i.col)))}},{key:"destroy",value:function(){var o;(o=this.columnStatesManager)===null||o===void 0||o.destroy(),ta(so(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return ER}},{key:"PLUGIN_PRIORITY",get:function(){return ake}}]),r}(at),ske=xe,wP=Ye,uke=Ri,fke=sB,cke=aF,Zx=Fe,hke=RangeError,J2=String,eU=Math.floor,TR=wP(cke),Qx=wP("".slice),Vf=wP(1 .toFixed),Ll=function(e,t,r){return t===0?r:t%2===1?Ll(e,t-1,r*e):Ll(e*e,t/2,r)},dke=function(e){for(var t=0,r=e;r>=4096;)t+=12,r/=4096;for(;r>=2;)t+=1,r/=2;return t},vl=function(e,t,r){for(var n=-1,o=r;++n<6;)o+=t*e[n],e[n]=o%1e7,o=eU(o/1e7)},JS=function(e,t){for(var r=6,n=0;--r>=0;)n+=e[r],e[r]=eU(n/t),n=n%t*1e7},Jx=function(e){for(var t=6,r="";--t>=0;)if(r!==""||t===0||e[t]!==0){var n=J2(e[t]);r=r===""?n:r+TR("0",7-n.length)+n}return r},vke=Zx(function(){return Vf(8e-5,3)!=="0.000"||Vf(.9,0)!=="1"||Vf(1.255,2)!=="1.25"||Vf(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!Zx(function(){Vf({})});ske({target:"Number",proto:!0,forced:vke},{toFixed:function(t){var r=fke(this),n=uke(t),o=[0,0,0,0,0,0],i="",a="0",l,s,u,f;if(n<0||n>20)throw hke("Incorrect fraction digits");if(r!=r)return"NaN";if(r<=-1e21||r>=1e21)return J2(r);if(r<0&&(i="-",r=-r),r>1e-21)if(l=dke(r*Ll(2,69,1))-69,s=l<0?r*Ll(2,-l,1):r/Ll(2,l,1),s*=4503599627370496,l=52-l,l>0){for(vl(o,0,s),u=n;u>=7;)vl(o,1e7,0),u-=7;for(vl(o,Ll(10,u,1),0),u=l-1;u>=23;)JS(o,1<<23),u-=23;JS(o,1<<u),vl(o,1,1),JS(o,2),a=Jx(o)}else vl(o,0,s),vl(o,1<<-l,0),a=Jx(o)+TR("0",n);return n>0?(f=a.length,a=i+(f<=n?"0."+TR("0",n-f)+a:Qx(a,0,f-n)+"."+Qx(a,f-n))):a=i+a,a}});function Gh(e){return Gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gh(e)}function yke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eD(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,gke(n.key),n)}}function pke(e,t,r){return t&&eD(e.prototype,t),r&&eD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function gke(e){var t=mke(e,"string");return Gh(t)==="symbol"?t:String(t)}function mke(e,t){if(Gh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Gh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bke=function(){function e(t,r){yke(this,e),this.plugin=t,this.hot=this.plugin.hot,this.endpoints=[],this.settings=r,this.settingsType="array",this.currentEndpoint=null,this.cellsToSetCache=[]}return pke(e,[{key:"getEndpoint",value:function(r){return this.settingsType==="function"?this.fillMissingEndpointData(this.settings)[r]:this.endpoints[r]}},{key:"getAllEndpoints",value:function(){return this.settingsType==="function"?this.fillMissingEndpointData(this.settings):this.endpoints}},{key:"fillMissingEndpointData",value:function(r){return this.parseSettings(r.call(this))}},{key:"parseSettings",value:function(r){var n=this,o=[],i=r;if(!i&&typeof this.settings=="function"){this.settingsType="function";return}return i||(i=this.settings),$(i,function(a){var l={};n.assignSetting(a,l,"ranges",[[0,n.hot.countRows()-1]]),n.assignSetting(a,l,"reversedRowCoords",!1),n.assignSetting(a,l,"destinationRow",new Error(`
You must provide a destination row for the Column Summary plugin in order to work properly!
`)),n.assignSetting(a,l,"destinationColumn",new Error(`
You must provide a destination column for the Column Summary plugin in order to work properly!
`)),n.assignSetting(a,l,"sourceColumn",a.destinationColumn),n.assignSetting(a,l,"type","sum"),n.assignSetting(a,l,"forceNumeric",!1),n.assignSetting(a,l,"suppressDataTypeErrors",!0),n.assignSetting(a,l,"suppressDataTypeErrors",!0),n.assignSetting(a,l,"customFunction",null),n.assignSetting(a,l,"readOnly",!0),n.assignSetting(a,l,"roundFloat",!1),o.push(l)}),o}},{key:"assignSetting",value:function(r,n,o,i){if(o==="ranges"&&r[o]===void 0){n[o]=i;return}else if(o==="ranges"&&r[o].length===0)return;if(r[o]===void 0){if(i instanceof Error)throw i;n[o]=i}else o==="destinationRow"&&n.reversedRowCoords?n[o]=this.hot.countRows()-r[o]-1:n[o]=r[o]}},{key:"resetSetupBeforeStructureAlteration",value:function(r,n,o){if(this.settingsType==="function"){var i=r.indexOf("row")>-1?"row":"col",a=this.getAllEndpoints();$(a,function(l){i==="row"&&l.destinationRow>=n&&(r==="insert_row"?l.alterRowOffset=o:r==="remove_row"&&(l.alterRowOffset=-1*o)),i==="col"&&l.destinationColumn>=n&&(r==="insert_col"?l.alterColumnOffset=o:r==="remove_col"&&(l.alterColumnOffset=-1*o))}),this.resetAllEndpoints(a,!1)}}},{key:"resetSetupAfterStructureAlteration",value:function(r,n,o,i,a){var l=this,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(this.settingsType==="function"){var u=function p(){return l.hot.removeHook("beforeViewRender",p),l.refreshAllEndpoints()};this.hot.addHookOnce("beforeViewRender",u);return}var f=r.indexOf("row")>-1?"row":"col",c=r.indexOf("remove")>-1?-1:1,h=this.getAllEndpoints(),d=r.indexOf("move_row")===0,v=n;$(h,function(p){f==="row"&&p.destinationRow>=v&&(p.alterRowOffset=c*o),f==="col"&&p.destinationColumn>=v&&(p.alterColumnOffset=c*o)}),this.resetAllEndpoints(h,!d),d?$(h,function(p){l.extendEndpointRanges(p,v,i[0],i.length),l.recreatePhysicalRanges(p),l.clearOffsetInformation(p)}):$(h,function(p){l.shiftEndpointCoordinates(p,v)}),s&&this.refreshAllEndpoints()}},{key:"clearOffsetInformation",value:function(r){r.alterRowOffset=void 0,r.alterColumnOffset=void 0}},{key:"extendEndpointRanges",value:function(r,n,o,i){$(r.ranges,function(a){a[1]&&(n>=a[0]&&n<=a[1]?o>a[1]?a[1]+=i:o<a[0]&&(a[0]-=i):o>=a[0]&&o<=a[1]&&(a[1]-=i,n<=a[0]&&(a[0]+=1,a[1]+=1)))})}},{key:"recreatePhysicalRanges",value:function(r){var n=this,o=r.ranges,i=[],a=[];$(o,function(l){var s=[];if(l[1])for(var u=l[0];u<=l[1];u++)s.push(n.hot.toPhysicalRow(u));else s.push(n.hot.toPhysicalRow(l[0]));a.push(s)}),$(a,function(l){var s=[];$(l,function(u,f){f===0?s.push(u):l[f]!==l[f-1]+1&&(s.push(l[f-1]),i.push(s),s=[],s.push(u)),f===l.length-1&&(s.push(u),i.push(s))})}),r.ranges=i}},{key:"shiftEndpointCoordinates",value:function(r,n){r.alterRowOffset&&r.alterRowOffset!==0?(r.destinationRow+=r.alterRowOffset||0,$(r.ranges,function(o){$(o,function(i,a){i>=n&&(o[a]+=r.alterRowOffset||0)})})):r.alterColumnOffset&&r.alterColumnOffset!==0&&(r.destinationColumn+=r.alterColumnOffset||0,r.sourceColumn+=r.alterColumnOffset||0)}},{key:"resetAllEndpoints",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getAllEndpoints(),o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=n.some(function(a){var l=a.alterRowOffset||0,s=a.alterColumnOffset||0;return a.destinationRow+l>=r.hot.countRows()||a.destinationColumn+s>=r.hot.countCols()});i||(this.cellsToSetCache=[],$(n,function(a){r.resetEndpointValue(a,o)}),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}},{key:"refreshAllEndpoints",value:function(){var r=this;this.cellsToSetCache=[],$(this.getAllEndpoints(),function(n){r.currentEndpoint=n,r.plugin.calculate(n),r.setEndpointValue(n,"init")}),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}},{key:"refreshChangedEndpoints",value:function(r){var n=this,o=[];this.cellsToSetCache=[],$(r,function(i,a,l){"".concat(i[2]||"")!=="".concat(i[3])&&$(n.getAllEndpoints(),function(s,u){n.hot.propToCol(l[a][1])===s.sourceColumn&&o.indexOf(u)===-1&&o.push(u)})}),$(o,function(i){n.refreshEndpoint(n.getEndpoint(i))}),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}},{key:"refreshEndpoint",value:function(r){this.currentEndpoint=r,this.plugin.calculate(r),this.setEndpointValue(r),this.currentEndpoint=null}},{key:"resetEndpointValue",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,o=r.alterRowOffset||0,i=r.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(r.destinationRow+(n?o:0)),this.hot.toVisualColumn(r.destinationColumn+(n?i:0)),""])}},{key:"setEndpointValue",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.hot.toVisualRow(r.destinationRow);if(r.destinationRow>=this.hot.countRows()||r.destinationColumn>=this.hot.countCols()){this.throwOutOfBoundsWarning();return}var a=this.hot.toVisualRow(r.destinationRow);if(a!==null){var l=this.hot.getCellMeta(a,r.destinationColumn);(n==="init"||l.readOnly!==r.readOnly)&&(l.readOnly=r.readOnly,l.className="columnSummaryResult")}r.roundFloat&&!isNaN(r.result)&&(r.result=r.result.toFixed(r.roundFloat)),o?this.hot.setDataAtCell(i,r.destinationColumn,r.result,"ColumnSummary.set"):this.cellsToSetCache.push([i,r.destinationColumn,r.result]),r.alterRowOffset=void 0,r.alterColumnOffset=void 0}},{key:"throwOutOfBoundsWarning",value:function(){gt("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}]),e}();const wke=bke;function eC(e){return e==null||isNaN(e)}function su(e){return su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},su(e)}var tD;function Ske(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Cke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rD(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,Oke(n.key),n)}}function _ke(e,t,r){return t&&rD(e.prototype,t),r&&rD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oke(e){var t=Rke(e,"string");return su(t)==="symbol"?t:String(t)}function Rke(e,t){if(su(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(su(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lp(){return typeof Reflect<"u"&&Reflect.get?lp=Reflect.get.bind():lp=function(t,r,n){var o=Eke(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},lp.apply(this,arguments)}function Eke(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=uu(e),e!==null););return e}function Tke(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PR(e,t)}function PR(e,t){return PR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},PR(e,t)}function Pke(e){var t=Ake();return function(){var n=uu(e),o;if(t){var i=uu(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return kke(this,o)}}function kke(e,t){if(t&&(su(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $ke(e)}function $ke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ake(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function uu(e){return uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},uu(e)}var tC="columnSummary",Ike=220,Mke=function(e){Tke(r,e);var t=Pke(r);function r(n){var o;return Cke(this,r),o=t.call(this,n),o.endpoints=null,o}return _ke(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[tC]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.settings=this.hot.getSettings()[tC],this.endpoints=new wke(this,this.settings),this.addHook("afterInit",function(){return o.onAfterInit.apply(o,arguments)}),this.addHook("afterChange",function(){return o.onAfterChange.apply(o,arguments)}),this.addHook("beforeCreateRow",function(i,a,l){return o.endpoints.resetSetupBeforeStructureAlteration("insert_row",i,a,null,l)}),this.addHook("beforeCreateCol",function(i,a,l){return o.endpoints.resetSetupBeforeStructureAlteration("insert_col",i,a,null,l)}),this.addHook("beforeRemoveRow",function(){for(var i,a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return(i=o.endpoints).resetSetupBeforeStructureAlteration.apply(i,["remove_row"].concat(l))}),this.addHook("beforeRemoveCol",function(){for(var i,a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return(i=o.endpoints).resetSetupBeforeStructureAlteration.apply(i,["remove_col"].concat(l))}),this.addHook("afterCreateRow",function(i,a,l){return o.endpoints.resetSetupAfterStructureAlteration("insert_row",i,a,null,l)}),this.addHook("afterCreateCol",function(i,a,l){return o.endpoints.resetSetupAfterStructureAlteration("insert_col",i,a,null,l)}),this.addHook("afterRemoveRow",function(){for(var i,a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return(i=o.endpoints).resetSetupAfterStructureAlteration.apply(i,["remove_row"].concat(l))}),this.addHook("afterRemoveCol",function(){for(var i,a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return(i=o.endpoints).resetSetupAfterStructureAlteration.apply(i,["remove_col"].concat(l))}),this.addHook("afterRowMove",function(){return o.onAfterRowMove.apply(o,arguments)}),lp(uu(r.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.endpoints=null,this.settings=null,this.currentEndpoint=null}},{key:"calculate",value:function(o){switch(o.type.toLowerCase()){case"sum":o.result=this.calculateSum(o);break;case"min":o.result=this.calculateMinMax(o,o.type);break;case"max":o.result=this.calculateMinMax(o,o.type);break;case"count":o.result=this.countEntries(o);break;case"average":o.result=this.calculateAverage(o);break;case"custom":o.result=o.customFunction.call(this,o);break}}},{key:"calculateSum",value:function(o){var i=this,a=0;return ze(o.ranges,function(l){a+=i.getPartialSum(l,o.sourceColumn)}),a}},{key:"getPartialSum",value:function(o,i){var a=0,l=o[1]||o[0],s=null,u=0;do{if(s=this.getCellValue(l,i),s=eC(s)?null:s,s!==null){var f=("".concat(s).split(".")[1]||[]).length||1;f>u&&(u=f)}a+=s||0,l-=1}while(l>=o[0]);return Math.round(a*Math.pow(10,u))/Math.pow(10,u)}},{key:"calculateMinMax",value:function(o,i){var a=this,l=null;return ze(o.ranges,function(s){var u=a.getPartialMinMax(s,o.sourceColumn,i);if(l===null&&u!==null&&(l=u),u!==null)switch(i){case"min":l=Math.min(l,u);break;case"max":l=Math.max(l,u);break}}),l===null?"Not enough data":l}},{key:"getPartialMinMax",value:function(o,i,a){var l=null,s=o[1]||o[0],u;do{if(u=this.getCellValue(s,i),u=eC(u)?null:u,l===null)l=u;else if(u!==null)switch(a){case"min":l=Math.min(l,u);break;case"max":l=Math.max(l,u);break}s-=1}while(s>=o[0]);return l}},{key:"countEmpty",value:function(o,i){var a,l=0,s=o[1]||o[0];do a=this.getCellValue(s,i),a=eC(a)?null:a,a===null&&(l+=1),s-=1;while(s>=o[0]);return l}},{key:"countEntries",value:function(o){var i=this,a=0,l=o.ranges;return ze(l,function(s){var u=s[1]===void 0?1:s[1]-s[0]+1,f=i.countEmpty(s,o.sourceColumn);a+=u,a-=f}),a}},{key:"calculateAverage",value:function(o){var i=this.calculateSum(o),a=this.countEntries(o);return i/a}},{key:"getCellValue",value:function(o,i){var a=this.hot.toVisualRow(o),l=this.hot.toVisualColumn(i),s=this.hot.getSourceDataAtCell(o,i),u="";if(a!==null&&l!==null&&(u=this.hot.getCellMeta(a,l).className||""),u.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&(typeof s=="string"&&(s=s.replace(/,/,".")),s=parseFloat(s)),isNaN(s)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(dt(tD||(tD=Ske(["ColumnSummary plugin: cell at (",", ",`) is not in a
numeric format. Cannot do the calculation.`],["ColumnSummary plugin: cell at (",", ",`) is not in a\\x20
numeric format. Cannot do the calculation.`])),o,i));return s}},{key:"onAfterInit",value:function(){this.endpoints.endpoints=this.endpoints.parseSettings(),this.endpoints.refreshAllEndpoints(!0)}},{key:"onAfterChange",value:function(o,i){o&&i!=="ColumnSummary.reset"&&i!=="ColumnSummary.set"&&i!=="loadData"&&this.endpoints.refreshChangedEndpoints(o)}},{key:"onAfterRowMove",value:function(o,i){this.endpoints.resetSetupBeforeStructureAlteration("move_row",o[0],o.length,o,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",i,o.length,o,this.pluginName)}}],[{key:"PLUGIN_KEY",get:function(){return tC}},{key:"PLUGIN_PRIORITY",get:function(){return Ike}}]),r}(at);function Kh(e){return Kh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kh(e)}function xke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nD(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,Nke(n.key),n)}}function Dke(e,t,r){return t&&nD(e.prototype,t),r&&nD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nke(e){var t=Hke(e,"string");return Kh(t)==="symbol"?t:String(t)}function Hke(e,t){if(Kh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lke=function(){function e(t,r){xke(this,e),this.rootDocument=t,this.isRtl=r,this.container=null,this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.hidden=!0,this.hide()}return Dke(e,[{key:"setPosition",value:function(r,n){this.editorStyle.left="".concat(r,"px"),this.editorStyle.top="".concat(n,"px")}},{key:"setSize",value:function(r,n){if(r&&n){var o=this.getInputElement();o.style.width="".concat(r,"px"),o.style.height="".concat(n,"px")}}},{key:"getSize",value:function(){return{width:vt(this.getInputElement()),height:Tt(this.getInputElement())}}},{key:"resetSize",value:function(){var r=this.getInputElement();r.style.width="",r.style.height=""}},{key:"setReadOnlyState",value:function(r){var n=this.getInputElement();n.readOnly=r}},{key:"show",value:function(){this.editorStyle.display="block",this.hidden=!1}},{key:"hide",value:function(){this.hidden||(this.editorStyle.display="none"),this.hidden=!0}},{key:"isVisible",value:function(){return this.editorStyle.display==="block"}},{key:"setValue",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=r||"";this.getInputElement().value=n}},{key:"getValue",value:function(){return this.getInputElement().value}},{key:"isFocused",value:function(){return this.rootDocument.activeElement===this.getInputElement()}},{key:"focus",value:function(){this.getInputElement().focus()}},{key:"createEditor",value:function(){var r=this.rootDocument.createElement("div"),n=this.rootDocument.createElement("textarea");return r.style.display="none",this.container=this.rootDocument.createElement("div"),this.container.setAttribute("dir",this.isRtl?"rtl":"ltr"),te(this.container,e.CLASS_EDITOR_CONTAINER),this.rootDocument.body.appendChild(this.container),te(r,e.CLASS_EDITOR),te(n,e.CLASS_INPUT),r.appendChild(n),this.container.appendChild(r),r}},{key:"getInputElement",value:function(){return this.editor.querySelector(".".concat(e.CLASS_INPUT))}},{key:"destroy",value:function(){var r=this.container?this.container.parentNode:null;this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null,r&&r.removeChild(this.container)}}],[{key:"CLASS_EDITOR_CONTAINER",get:function(){return"htCommentsContainer"}},{key:"CLASS_EDITOR",get:function(){return"htComments"}},{key:"CLASS_INPUT",get:function(){return"htCommentTextArea"}},{key:"CLASS_CELL",get:function(){return"htCommentCell"}}]),e}();const jke=Lke;var Ke="---------";function Bke(){return{name:Ke}}function Fke(e){return We(e,function(t){return{start:t.getTopStartCorner(),end:t.getBottomEndCorner()}})}function sy(e){return Ne(e,"htSeparator")}function Vke(e){return Ne(e,"htSubmenu")}function uy(e){return Ne(e,"htDisabled")}function fy(e){return Ne(e,"htSelectionDisabled")}function Za(e){var t=e.getSelected();return!t||t[0]<0?null:t}function Wke(e,t){if(e.indexOf(t)!==-1)return e;var r=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","");return"".concat(r," ").concat(t)}function Uke(e,t){if(e.indexOf(t)!==-1)return e;var r=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","");return"".concat(r," ").concat(t)}function Li(e,t){var r={};return $(e,function(n){n.forAll(function(o,i){o>=0&&i>=0&&(r[o]||(r[o]=[]),r[o][i]=t(o,i))})}),r}function qo(e,t,r,n,o){$(e,function(i){i.forAll(function(a,l){a>=0&&l>=0&&zke(a,l,t,r,n,o)})})}function zke(e,t,r,n,o,i){var a=o(e,t),l=n;a.className&&(r==="vertical"?l=Wke(a.className,n):l=Uke(a.className,n)),i(e,t,"className",l)}function In(e,t){var r=!1;return Array.isArray(e)&&$(e,function(n){return n.forAll(function(o,i){if(o>=0&&i>=0&&t(o,i))return r=!0,!1}),r}),r}function Qn(e){return'<span class="selected">'.concat(String.fromCharCode(10003),"</span>").concat(e)}function Yke(e,t){return!e.hidden||!(typeof e.hidden=="function"&&e.hidden.call(t))}function tU(e,t){for(var r=e.slice(0),n=0;n<r.length&&r[n].name===t;)r.shift();return r}function Gke(e,t){var r=e.slice(0);return r.reverse(),r=tU(r,t),r.reverse(),r}function Kke(e){var t=[];return $(e,function(r,n){n>0?t[t.length-1].name!==r.name&&t.push(r):t.push(r)}),t}function Xke(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ke,r=e.slice(0);return r=tU(r,t),r=Gke(r,t),r=Kke(r),r}function Xh(e){return Xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xh(e)}function qke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oD(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,Qke(n.key),n)}}function Zke(e,t,r){return t&&oD(e.prototype,t),r&&oD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qke(e){var t=Jke(e,"string");return Xh(t)==="symbol"?t:String(t)}function Jke(e,t){if(Xh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var e$e=250,t$e=250,rU=function(){function e(t){qke(this,e),this.wasLastActionShow=!0,this.showDebounced=null,this.hidingTimer=null,this.updateDelay(t)}return Zke(e,[{key:"hide",value:function(){var r=this;this.wasLastActionShow=!1,this.hidingTimer=setTimeout(function(){r.wasLastActionShow===!1&&r.runLocalHooks("hide")},t$e)}},{key:"show",value:function(r){this.wasLastActionShow=!0,this.showDebounced(r)}},{key:"cancelHiding",value:function(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}},{key:"updateDelay",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e$e;this.showDebounced=_T(function(o){r.wasLastActionShow&&r.runLocalHooks("show",o.from.row,o.from.col)},n)}},{key:"destroy",value:function(){this.clearLocalHooks()}}]),e}();mt(rU,kr);const r$e=rU;function fu(e){return fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fu(e)}function rC(e,t,r){return t=nU(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iD(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,nU(n.key),n)}}function o$e(e,t,r){return t&&iD(e.prototype,t),r&&iD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function nU(e){var t=i$e(e,"string");return fu(t)==="symbol"?t:String(t)}function i$e(e,t){if(fu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(fu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ra(){return typeof Reflect<"u"&&Reflect.get?ra=Reflect.get.bind():ra=function(t,r,n){var o=a$e(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ra.apply(this,arguments)}function a$e(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=uo(e),e!==null););return e}function l$e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kR(e,t)}function kR(e,t){return kR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},kR(e,t)}function s$e(e){var t=f$e();return function(){var n=uo(e),o;if(t){var i=uo(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return u$e(this,o)}}function u$e(e,t){if(t&&(fu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oU(e)}function oU(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f$e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function uo(e){return uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},uo(e)}var nC="comments",c$e=60,cy=new WeakMap,Rn="comment",yl="value",aD="style",hy="readOnly",h$e=function(e){l$e(r,e);var t=s$e(r);function r(n){var o;return n$e(this,r),o=t.call(this,n),o.editor=null,o.displaySwitch=null,o.eventManager=null,o.range={},o.preventEditorAutoSwitch=!1,cy.set(oU(o),{tempEditorDimensions:{},cellBelowCursor:null}),o}return o$e(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[nC]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.editor||(this.editor=new jke(this.hot.rootDocument,this.hot.isRtl())),this.eventManager||(this.eventManager=new Pt(this)),this.displaySwitch||(this.displaySwitch=new r$e(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",function(i){return o.addToContextMenu(i)}),this.addHook("afterRenderer",function(i,a,l,s,u,f){return o.onAfterRenderer(i,f)}),this.addHook("afterScrollHorizontally",function(){return o.hide()}),this.addHook("afterScrollVertically",function(){return o.hide()}),this.addHook("afterBeginEditing",function(){return o.hide()}),this.displaySwitch.addLocalHook("hide",function(){return o.hide()}),this.displaySwitch.addLocalHook("show",function(i,a){return o.showAtCell(i,a)}),this.registerListeners(),ra(uo(r.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),ra(uo(r.prototype),"updatePlugin",this).call(this),this.displaySwitch.updateDelay(this.getDisplayDelaySetting())}},{key:"disablePlugin",value:function(){ra(uo(r.prototype),"disablePlugin",this).call(this)}},{key:"registerListeners",value:function(){var o=this,i=this.hot.rootDocument;this.eventManager.addEventListener(i,"mouseover",function(a){return o.onMouseOver(a)}),this.eventManager.addEventListener(i,"mousedown",function(a){return o.onMouseDown(a)}),this.eventManager.addEventListener(i,"mouseup",function(){return o.onMouseUp()}),this.eventManager.addEventListener(this.editor.getInputElement(),"blur",function(){return o.onEditorBlur()}),this.eventManager.addEventListener(this.editor.getInputElement(),"mousedown",function(a){return o.onEditorMouseDown(a)}),this.eventManager.addEventListener(this.editor.getInputElement(),"mouseup",function(a){return o.onEditorMouseUp(a)})}},{key:"setRange",value:function(o){this.range=o}},{key:"clearRange",value:function(){this.range={}}},{key:"targetIsCellWithComment",value:function(o){var i=ii(o.target,"TD","TBODY");return!!(i&&Ne(i,"htCommentCell")&&ii(i,[this.hot.rootElement]))}},{key:"targetIsCommentTextArea",value:function(o){return this.editor.getInputElement()===o.target}},{key:"setComment",value:function(o){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var i=this.editor.getValue(),a="";o!=null?a=o:i!=null&&(a=i);var l=this.range.from.row,s=this.range.from.col;this.updateCommentMeta(l,s,rC({},yl,a)),this.hot.render()}},{key:"setCommentAtCell",value:function(o,i,a){this.setRange({from:this.hot._createCellCoords(o,i)}),this.setComment(a)}},{key:"removeComment",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!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,Rn),o&&this.hot.render(),this.hide()}},{key:"removeCommentAtCell",value:function(o,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;this.setRange({from:this.hot._createCellCoords(o,i)}),this.removeComment(a)}},{key:"getComment",value:function(){var o=this.range.from.row,i=this.range.from.col;return this.getCommentMeta(o,i,yl)}},{key:"getCommentAtCell",value:function(o,i){return this.getCommentMeta(o,i,yl)}},{key:"show",value:function(){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var o=this.range.from,i=o.row,a=o.col;if(i<0||i>this.hot.countSourceRows()-1||a<0||a>this.hot.countSourceCols()-1)return!1;var l=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return this.editor.setValue(l[Rn]?l[Rn][yl]:""),this.editor.show(),this.refreshEditor(!0),!0}},{key:"showAtCell",value:function(o,i){return this.setRange({from:this.hot._createCellCoords(o,i)}),this.show()}},{key:"hide",value:function(){this.editor.hide()}},{key:"refreshEditor",value:function(){var o,i,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!a&&(!this.range.from||!this.editor.isVisible()))){var l=this.hot,s=l.rowIndexMapper,u=l.columnIndexMapper,f=this.range.from,c=f.row,h=f.col,d=s.getRenderableFromVisualIndex(c),v=u.getRenderableFromVisualIndex(h),p=d===null;this.editor.setPosition(0,0),d===null&&(d=s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(c,-1))),v===null&&(v=u.getRenderableFromVisualIndex(u.getNearestNotHiddenIndex(h,-1)));var m=d===null,w=v===null;d=(o=d)!==null&&o!==void 0?o:0,v=(i=v)!==null&&i!==void 0?i:0;var S=this.hot,C=S.rootWindow,P=S.view._wt,R=P.wtTable,W=P.getCell({row:d,col:v},!0),z=this.getCommentMeta(c,h,aD);z?this.editor.setSize(z.width,z.height):this.editor.resetSize();var q=w?0:R.getStretchedColumnWidth(v),K=p&&!m?Tt(W):0,X=W.getBoundingClientRect(),Q=X.left,ae=X.top,Z=X.width,he=X.height,Ee=this.editor.getSize(),_e=Ee.width,Oe=Ee.height,k=this.hot.rootWindow,y=k.innerWidth,g=k.innerHeight,b=this.hot.rootDocument.documentElement,_=Q+C.scrollX+q,T=ae+C.scrollY+K;this.hot.isRtl()&&(_-=_e+q),this.hot.isLtr()&&Q+Z+_e>y?_=Q+C.scrollX-_e-1:this.hot.isRtl()&&_<-(b.scrollWidth-b.clientWidth)&&(_=Q+C.scrollX+q+1),ae+Oe>g&&(T-=Oe-he+1),this.editor.setPosition(_,T),this.editor.setReadOnlyState(this.getCommentMeta(c,h,hy))}}},{key:"checkSelectionCommentsConsistency",value:function(){var o=this.hot.getSelectedRangeLast();if(!o)return!1;var i=!1,a=o.getTopStartCorner();return this.getCommentMeta(a.row,a.col,yl)&&(i=!0),i}},{key:"updateCommentMeta",value:function(o,i,a){var l=this.hot.getCellMeta(o,i)[Rn],s;l?(s=ar(l),tv(s,a)):s=a,this.hot.setCellMeta(o,i,Rn,s)}},{key:"getCommentMeta",value:function(o,i,a){var l=this.hot.getCellMeta(o,i);if(l[Rn])return l[Rn][a]}},{key:"onMouseDown",value:function(o){if(!(!this.hot.view||!this.hot.view._wt)&&!this.preventEditorAutoSwitch&&!this.targetIsCommentTextArea(o)){var i=ii(o.target,"TD","TBODY"),a=null;i&&(a=this.hot.getCoords(i)),(!i||this.range.from&&a&&(this.range.from.row!==a.row||this.range.from.col!==a.col))&&this.hide()}}},{key:"onMouseOver",value:function(o){var i=cy.get(this),a=this.hot.rootDocument;if(!(this.preventEditorAutoSwitch||this.editor.isFocused()||Ne(o.target,"wtBorder")||i.cellBelowCursor===o.target||!this.editor))if(i.cellBelowCursor=a.elementFromPoint(o.clientX,o.clientY),this.targetIsCellWithComment(o)){var l=this.hot._createCellRange(this.hot.getCoords(o.target));this.displaySwitch.show(l)}else ai(o.target,a)&&!this.targetIsCommentTextArea(o)&&this.displaySwitch.hide()}},{key:"onMouseUp",value:function(){this.preventEditorAutoSwitch=!1}},{key:"onAfterRenderer",value:function(o,i){i[Rn]&&i[Rn][yl]&&te(o,i.commentedCellClassName)}},{key:"onEditorBlur",value:function(){this.setComment()}},{key:"onEditorMouseDown",value:function(o){var i=cy.get(this);i.tempEditorDimensions={width:vt(o.target),height:Tt(o.target)}}},{key:"onEditorMouseUp",value:function(o){var i=cy.get(this),a=vt(o.target),l=Tt(o.target);(a!==i.tempEditorDimensions.width+1||l!==i.tempEditorDimensions.height+2)&&this.updateCommentMeta(this.range.from.row,this.range.from.col,rC({},aD,{width:a,height:l}))}},{key:"onContextMenuAddComment",value:function(){var o=this.hot.getSelectedRangeLast();this.preventEditorAutoSwitch=!0,this.displaySwitch.cancelHiding(),this.setRange({from:o.highlight}),this.show(),this.hot.deselectCell(),this.editor.focus()}},{key:"onContextMenuRemoveComment",value:function(){var o=this,i=this.hot.getSelectedRangeLast();this.preventEditorAutoSwitch=!0,i.forAll(function(a,l){a>=0&&l>=0&&o.removeCommentAtCell(a,l,!1)}),this.hot.render()}},{key:"onContextMenuMakeReadOnly",value:function(){var o=this,i=this.hot.getSelectedRangeLast();this.preventEditorAutoSwitch=!0,i.forAll(function(a,l){if(a>=0&&l>=0){var s=!!o.getCommentMeta(a,l,hy);o.updateCommentMeta(a,l,rC({},hy,!s))}})}},{key:"addToContextMenu",value:function(o){var i=this,a=function(){return i.hot.rowIndexMapper.getRenderableIndexesLength()>0&&i.hot.columnIndexMapper.getRenderableIndexesLength()>0};o.items.push({name:"---------"},{key:"commentsAddEdit",name:function(){return i.checkSelectionCommentsConsistency()?i.hot.getTranslatedPhrase(Qm):i.hot.getTranslatedPhrase(Zm)},callback:function(){return i.onContextMenuAddComment()},disabled:function(){return a()?!(i.hot.getSelectedLast()&&!i.hot.selection.isSelectedByCorner()):!0}},{key:"commentsRemove",name:function(){return this.getTranslatedPhrase(Jm)},callback:function(){return i.onContextMenuRemoveComment()},disabled:function(){return a()?!(i.hot.getSelectedLast()&&!i.hot.selection.isSelectedByCorner()):!0}},{key:"commentsReadOnly",name:function(){var s=this,u=this.getTranslatedPhrase(eb),f=In(this.getSelectedRangeLast(),function(c,h){var d=s.getCellMeta(c,h)[Rn];if(d&&(d=d[hy]),d)return!0});return f&&(u=Qn(u)),u},callback:function(){return i.onContextMenuMakeReadOnly()},disabled:function(){return a()?!(i.hot.getSelectedLast()&&!i.hot.selection.isSelectedByCorner())||!i.checkSelectionCommentsConsistency():!0}})}},{key:"getDisplayDelaySetting",value:function(){var o=this.hot.getSettings()[nC];if(Ue(o))return o.displayDelay}},{key:"destroy",value:function(){this.editor&&this.editor.destroy(),this.displaySwitch&&this.displaySwitch.destroy(),ra(uo(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return nC}},{key:"PLUGIN_PRIORITY",get:function(){return c$e}}]),r}(at);function qh(e){return qh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qh(e)}function d$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lD(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,y$e(n.key),n)}}function v$e(e,t,r){return t&&lD(e.prototype,t),r&&lD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y$e(e){var t=p$e(e,"string");return qh(t)==="symbol"?t:String(t)}function p$e(e,t){if(qh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var g$e=function(){function e(t){d$e(this,e),this.hot=t,this.commands={},this.commonCallback=null}return v$e(e,[{key:"registerCommand",value:function(r,n){this.commands[r]=n}},{key:"setCommonCallback",value:function(r){this.commonCallback=r}},{key:"execute",value:function(r){for(var n=this,o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];var l=r.split(":"),s=l[0],u=l.length===2?l[1]:null,f=this.commands[s];if(!f)throw new Error("Menu command '".concat(s,"' not exists."));if(u&&f.submenu&&(f=m$e(u,f.submenu.items)),f.disabled!==!0&&!(typeof f.disabled=="function"&&f.disabled.call(this.hot)===!0)&&!It(f,"submenu")){var c=[];typeof f.callback=="function"&&c.push(f.callback),typeof this.commonCallback=="function"&&c.push(this.commonCallback),i.unshift(l.join(":")),$(c,function(h){return h.apply(n.hot,i)})}}}]),e}();function m$e(e,t){var r;return $(t,function(n){var o=n.key?n.key.split(":"):null;if(Array.isArray(o)&&o[1]===e)return r=n,!1}),r}const iU=g$e;var Yr="alignment";function b$e(){return{key:Yr,name:function(){return this.getTranslatedPhrase(tb)},disabled:function(){return this.countRows()===0||this.countCols()===0?!0:!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())},submenu:{items:[{key:"".concat(Yr,":left"),name:function(){var t=this,r=this.getTranslatedPhrase(rb),n=In(this.getSelectedRange(),function(o,i){var a=t.getCellMeta(o,i).className;if(a&&a.indexOf("htLeft")!==-1)return!0});return n&&(r=Qn(r)),r},callback:function(){var t=this,r=this.getSelectedRange(),n=Li(r,function(a,l){return t.getCellMeta(a,l).className}),o="horizontal",i="htLeft";this.runHooks("beforeCellAlignment",n,r,o,i),qo(r,o,i,function(a,l){return t.getCellMeta(a,l)},function(a,l,s,u){return t.setCellMeta(a,l,s,u)}),this.render()},disabled:!1},{key:"".concat(Yr,":center"),name:function(){var t=this,r=this.getTranslatedPhrase(nb),n=In(this.getSelectedRange(),function(o,i){var a=t.getCellMeta(o,i).className;if(a&&a.indexOf("htCenter")!==-1)return!0});return n&&(r=Qn(r)),r},callback:function(){var t=this,r=this.getSelectedRange(),n=Li(r,function(a,l){return t.getCellMeta(a,l).className}),o="horizontal",i="htCenter";this.runHooks("beforeCellAlignment",n,r,o,i),qo(r,o,i,function(a,l){return t.getCellMeta(a,l)},function(a,l,s,u){return t.setCellMeta(a,l,s,u)}),this.render()},disabled:!1},{key:"".concat(Yr,":right"),name:function(){var t=this,r=this.getTranslatedPhrase(ob),n=In(this.getSelectedRange(),function(o,i){var a=t.getCellMeta(o,i).className;if(a&&a.indexOf("htRight")!==-1)return!0});return n&&(r=Qn(r)),r},callback:function(){var t=this,r=this.getSelectedRange(),n=Li(r,function(a,l){return t.getCellMeta(a,l).className}),o="horizontal",i="htRight";this.runHooks("beforeCellAlignment",n,r,o,i),qo(r,o,i,function(a,l){return t.getCellMeta(a,l)},function(a,l,s,u){return t.setCellMeta(a,l,s,u)}),this.render()},disabled:!1},{key:"".concat(Yr,":justify"),name:function(){var t=this,r=this.getTranslatedPhrase(ib),n=In(this.getSelectedRange(),function(o,i){var a=t.getCellMeta(o,i).className;if(a&&a.indexOf("htJustify")!==-1)return!0});return n&&(r=Qn(r)),r},callback:function(){var t=this,r=this.getSelectedRange(),n=Li(r,function(a,l){return t.getCellMeta(a,l).className}),o="horizontal",i="htJustify";this.runHooks("beforeCellAlignment",n,r,o,i),qo(r,o,i,function(a,l){return t.getCellMeta(a,l)},function(a,l,s,u){return t.setCellMeta(a,l,s,u)}),this.render()},disabled:!1},{name:Ke},{key:"".concat(Yr,":top"),name:function(){var t=this,r=this.getTranslatedPhrase(ab),n=In(this.getSelectedRange(),function(o,i){var a=t.getCellMeta(o,i).className;if(a&&a.indexOf("htTop")!==-1)return!0});return n&&(r=Qn(r)),r},callback:function(){var t=this,r=this.getSelectedRange(),n=Li(r,function(a,l){return t.getCellMeta(a,l).className}),o="vertical",i="htTop";this.runHooks("beforeCellAlignment",n,r,o,i),qo(r,o,i,function(a,l){return t.getCellMeta(a,l)},function(a,l,s,u){return t.setCellMeta(a,l,s,u)}),this.render()},disabled:!1},{key:"".concat(Yr,":middle"),name:function(){var t=this,r=this.getTranslatedPhrase(lb),n=In(this.getSelectedRange(),function(o,i){var a=t.getCellMeta(o,i).className;if(a&&a.indexOf("htMiddle")!==-1)return!0});return n&&(r=Qn(r)),r},callback:function(){var t=this,r=this.getSelectedRange(),n=Li(r,function(a,l){return t.getCellMeta(a,l).className}),o="vertical",i="htMiddle";this.runHooks("beforeCellAlignment",n,r,o,i),qo(r,o,i,function(a,l){return t.getCellMeta(a,l)},function(a,l,s,u){return t.setCellMeta(a,l,s,u)}),this.render()},disabled:!1},{key:"".concat(Yr,":bottom"),name:function(){var t=this,r=this.getTranslatedPhrase(sb),n=In(this.getSelectedRange(),function(o,i){var a=t.getCellMeta(o,i).className;if(a&&a.indexOf("htBottom")!==-1)return!0});return n&&(r=Qn(r)),r},callback:function(){var t=this,r=this.getSelectedRange(),n=Li(r,function(a,l){return t.getCellMeta(a,l).className}),o="vertical",i="htBottom";this.runHooks("beforeCellAlignment",n,r,o,i),qo(r,o,i,function(a,l){return t.getCellMeta(a,l)},function(a,l,s,u){return t.setCellMeta(a,l,s,u)}),this.render()},disabled:!1}]}}}var ow="clear_column";function w$e(){return{key:ow,name:function(){return this.getTranslatedPhrase(Fm)},callback:function(t,r){var n=r[0].start.col,o=r[0].end.col;this.countRows()&&this.populateFromArray(0,n,[[null]],Math.max(r[0].start.row,r[0].end.row),o,"ContextMenu.clearColumn")},disabled:function(){var t=Za(this);return t?!this.selection.isSelectedByColumnHeader():!0}}}var Sv="col_left";function S$e(){return{key:Sv,name:function(){return this.getTranslatedPhrase(xm)},callback:function(){var t=this.getSelectedRangeLast().getTopLeftCorner(),r=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(r,t.col,1,"ContextMenu.columnLeft")},disabled:function(){if(!this.isColumnModificationAllowed())return!0;var t=Za(this);if(!t)return!0;if(this.selection.isSelectedByCorner()){var r=this.countCols();return r===0}return this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols},hidden:function(){return!this.getSettings().allowInsertColumn}}}var Cv="col_right";function C$e(){return{key:Cv,name:function(){return this.getTranslatedPhrase(Dm)},callback:function(){var t=this.getSelectedRangeLast().getTopRightCorner(),r=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(r,t.col,1,"ContextMenu.columnRight")},disabled:function(){if(!this.isColumnModificationAllowed())return!0;var t=Za(this);return t?this.selection.isSelectedByCorner()?!1:this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols:!0},hidden:function(){return!this.getSettings().allowInsertColumn}}}var _v="make_read_only";function _$e(){return{key:_v,name:function(){var t=this,r=this.getTranslatedPhrase(Bm),n=In(this.getSelectedRange(),function(o,i){return t.getCellMeta(o,i).readOnly});return n&&(r=Qn(r)),r},callback:function(){var t=this,r=this.getSelectedRange(),n=In(r,function(o,i){return t.getCellMeta(o,i).readOnly});$(r,function(o){o.forAll(function(i,a){i>=0&&a>=0&&t.setCellMeta(i,a,"readOnly",!n)})}),this.render()},disabled:function(){return!!(this.selection.isSelectedByCorner()||this.countRows()===0||this.countCols()===0||!this.getSelectedRange()||this.getSelectedRange().length===0)}}}var iw="redo";function O$e(){return{key:iw,name:function(){return this.getTranslatedPhrase(jm)},callback:function(){this.redo()},hidden:function(){var t=this.getPlugin("undoRedo");return!t||!t.isEnabled()},disabled:function(){return!this.getPlugin("undoRedo").isRedoAvailable()}}}function R$e(e,t){return k$e(e)||P$e(e,t)||T$e(e,t)||E$e()}function E$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T$e(e,t){if(e){if(typeof e=="string")return sD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sD(e,t)}}function sD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function P$e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function k$e(e){if(Array.isArray(e))return e}var Ov="remove_col";function $$e(){return{key:Ov,name:function(){var t=this.getSelected(),r=0;if(t)if(t.length>1)r=1;else{var n=R$e(t[0],4),o=n[1],i=n[3];o-i!==0&&(r=1)}return this.getTranslatedPhrase(Hm,r)},callback:function(){this.alter("remove_col",Dwe(this.getSelected()),null,"ContextMenu.removeColumn")},disabled:function(){if(!this.isColumnModificationAllowed())return!0;var t=Za(this);if(!t)return!0;var r=this.countCols();return this.selection.isSelectedByCorner()?r===0:this.selection.isSelectedByRowHeader()||r===0},hidden:function(){return!this.getSettings().allowRemoveColumn}}}function A$e(e,t){return D$e(e)||x$e(e,t)||M$e(e,t)||I$e()}function I$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M$e(e,t){if(e){if(typeof e=="string")return uD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uD(e,t)}}function uD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function x$e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function D$e(e){if(Array.isArray(e))return e}var aw="remove_row";function N$e(){return{key:aw,name:function(){var t=this.getSelected(),r=0;if(t)if(t.length>1)r=1;else{var n=A$e(t[0],3),o=n[0],i=n[2];o-i!==0&&(r=1)}return this.getTranslatedPhrase(Nm,r)},callback:function(){this.alter("remove_row",Nwe(this.getSelected()),1,"ContextMenu.removeRow")},disabled:function(){var t=Za(this);if(!t)return!0;var r=this.countRows();return this.selection.isSelectedByCorner()?r===0:this.selection.isSelectedByColumnHeader()||r===0},hidden:function(){return!this.getSettings().allowRemoveRow}}}var lw="row_above";function H$e(){return{key:lw,name:function(){return this.getTranslatedPhrase(Im)},callback:function(){var t=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",t.row,1,"ContextMenu.rowAbove")},disabled:function(){var t=Za(this);if(!t)return!0;if(this.selection.isSelectedByCorner()){var r=this.countRows();return r===0}return this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden:function(){return!this.getSettings().allowInsertRow}}}var sw="row_below";function L$e(){return{key:sw,name:function(){return this.getTranslatedPhrase(Mm)},callback:function(){var t=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",t.row,1,"ContextMenu.rowBelow")},disabled:function(){var t=Za(this);return t?this.selection.isSelectedByCorner()?!1:this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows:!0},hidden:function(){return!this.getSettings().allowInsertRow}}}var Zh="no_items";function j$e(){return{key:Zh,name:function(){return this.getTranslatedPhrase(ZT)},disabled:!0,isCommand:!1}}var uw="undo";function B$e(){return{key:uw,name:function(){return this.getTranslatedPhrase(Lm)},callback:function(){this.undo()},hidden:function(){var t=this.getPlugin("undoRedo");return!t||!t.isEnabled()},disabled:function(){return!this.getPlugin("undoRedo").isUndoAvailable()}}}function Qh(e){return Qh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qh(e)}var fr;function $r(e,t,r){return t=F$e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F$e(e){var t=V$e(e,"string");return Qh(t)==="symbol"?t:String(t)}function V$e(e,t){if(Qh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var W$e=[lw,sw,Sv,Cv,ow,aw,Ov,uw,iw,_v,Yr,Ke,Zh],U$e=(fr={},$r(fr,Ke,Bke),$r(fr,Zh,j$e),$r(fr,lw,H$e),$r(fr,sw,L$e),$r(fr,Sv,S$e),$r(fr,Cv,C$e),$r(fr,ow,w$e),$r(fr,aw,N$e),$r(fr,Ov,$$e),$r(fr,uw,B$e),$r(fr,iw,O$e),$r(fr,_v,_$e),$r(fr,Yr,b$e),fr);function aU(){var e={};return ze(U$e,function(t,r){e[r]=t()}),e}function Jh(e){return Jh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jh(e)}function z$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fD(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,G$e(n.key),n)}}function Y$e(e,t,r){return t&&fD(e.prototype,t),r&&fD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function G$e(e){var t=K$e(e,"string");return Jh(t)==="symbol"?t:String(t)}function K$e(e,t){if(Jh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Jh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var X$e=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;z$e(this,e),this.hot=t,this.predefinedItems=aU(),this.defaultOrderPattern=r}return Y$e(e,[{key:"setPredefinedItems",value:function(r){var n=this,o={};this.defaultOrderPattern.length=0,ze(r,function(i,a){var l="";i.name===Ke?(o[Ke]=i,l=Ke):isNaN(parseInt(a,10))?(i.key=i.key===void 0?a:i.key,o[a]=i,l=i.key):(o[i.key]=i,l=i.key),n.defaultOrderPattern.push(l)}),this.predefinedItems=o}},{key:"getItems",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return q$e(r,this.defaultOrderPattern,this.predefinedItems)}}]),e}();function q$e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=[],o=e;return o&&o.items?o=o.items:Array.isArray(o)||(o=t),Ue(o)?ze(o,function(i,a){var l=r[typeof i=="string"?i:a];l||(l=i),Ue(i)?Wt(l,i):typeof l=="string"&&(l={name:l}),l.key===void 0&&(l.key=a),n.push(l)}):$(o,function(i,a){var l=r[i];!l&&W$e.indexOf(i)>=0||(l||(l={name:i,key:"".concat(a)}),Ue(i)&&Wt(l,i),l.key===void 0&&(l.key=a),n.push(l))}),n}const lU=X$e;function ed(e){return ed=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ed(e)}function Z$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cD(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,J$e(n.key),n)}}function Q$e(e,t,r){return t&&cD(e.prototype,t),r&&cD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function J$e(e){var t=e1e(e,"string");return ed(t)==="symbol"?t:String(t)}function e1e(e,t){if(ed(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ed(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var t1e=function(){function e(t,r){Z$e(this,e);var n=os(r),o=Pa(r),i,a,l,s,u,f;this.rootWindow=r,this.type=this.getSourceType(t),this.type==="literal"?(i=parseInt(t.top,10),l=parseInt(t.left,10),u=t.height||0,f=t.width||0,a=i,s=l,i+=n,l+=o):this.type==="event"&&(i=parseInt(t.pageY,10),l=parseInt(t.pageX,10),u=t.target.clientHeight,f=t.target.clientWidth,a=i-n,s=l-o),this.top=i,this.topRelative=a,this.left=l,this.leftRelative=s,this.scrollTop=n,this.scrollLeft=o,this.cellHeight=u,this.cellWidth=f}return Q$e(e,[{key:"getSourceType",value:function(r){var n="literal";return r instanceof Event&&(n="event"),n}},{key:"fitsAbove",value:function(r){return this.topRelative>=r.offsetHeight}},{key:"fitsBelow",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+r.offsetHeight<=n}},{key:"fitsOnRight",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+r.offsetWidth<=n}},{key:"fitsOnLeft",value:function(r){return this.leftRelative>=r.offsetWidth}}]),e}();const r1e=t1e;function td(e){return td=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},td(e)}function hD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function dD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hD(Object(r),!0).forEach(function(n){n1e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function n1e(e,t,r){return t=sU(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vD(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,sU(n.key),n)}}function i1e(e,t,r){return t&&vD(e.prototype,t),r&&vD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function sU(e){var t=a1e(e,"string");return td(t)==="symbol"?t:String(t)}function a1e(e,t){if(td(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(td(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yD=215,uU="menu",l1e=uU,fU=function(){function e(t,r){o1e(this,e),this.hot=t,this.options=r||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:yD,container:this.hot.rootDocument.documentElement},this.eventManager=new Pt(this),this.container=this.createContainer(this.options.name),this.hotMenu=null,this.hotSubMenus={},this.parentMenu=this.options.parent||null,this.menuItems=null,this.origOutsideClickDeselects=null,this.keyEvent=!1,this.offset={above:0,below:0,left:0,right:0},this._afterScrollCallback=null,this.registerEvents()}return i1e(e,[{key:"registerEvents",value:function(){for(var r=this,n=this.hot.rootWindow;n;)this.eventManager.addEventListener(n.document,"mousedown",function(o){return r.onDocumentMouseDown(o)}),this.eventManager.addEventListener(n.document,"contextmenu",function(o){return r.onDocumentContextMenu(o)}),n=xc(n)}},{key:"setMenuItems",value:function(r){this.menuItems=r}},{key:"getSelectedItem",value:function(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}},{key:"hasSelectedItem",value:function(){return Array.isArray(this.hotMenu.getSelectedLast())}},{key:"setOffset",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.offset[r]=n}},{key:"isSubMenu",value:function(){return this.parentMenu!==null}},{key:"open",value:function(){var r=this;this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";var n=_T(function(d){return r.openSubMenu(d)},300),o=this.options.minWidth||yD,i=!1,a=jr(this.menuItems,function(d){return d.key===Zh&&(i=!0),Yke(d,r.hot)});if(a.length<1&&!i)a.push(aU()[Zh]);else if(a.length===0)return;a=Xke(a,Ke);var l=!1,s={data:a,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:function(v){return pe(v)&&v<o?o:v},autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,maxCols:1,columns:[{data:"name",renderer:function(v,p,m,w,S,C){return r.menuItemRenderer(v,p,m,w,S,C)}}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",afterOnCellMouseOver:function(v,p){r.isAllSubMenusClosed()?n(p.row):r.openSubMenu(p.row)},rowHeights:function(v){return a[v].name===Ke?1:23},afterOnCellContextMenu:function(v){v.preventDefault(),O_()&&l&&r.hasSelectedItem()&&r.close(!0)},beforeOnCellMouseUp:function(v){r.hasSelectedItem()&&(l=!r.isCommandPassive(r.getSelectedItem()),r.executeCommand(v))},afterOnCellMouseUp:function(v){(!O_()||!Si(v))&&l&&r.hasSelectedItem()&&(cn()||qE()?setTimeout(function(){return r.close(!0)},325):r.close(!0))},afterUnlisten:function(){!r.hasSelectedItem()&&r.isOpened()&&r.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new oP(this.container,s),this.hotMenu.addHook("afterInit",function(){return r.onAfterInit()}),this.hotMenu.addHook("afterSelection",function(){return r.onAfterSelection.apply(r,arguments)}),this.hotMenu.init(),this.hotMenu.listen();var u=this.hotMenu.getShortcutManager(),f=u.addContext(l1e),c={group:uU},h=dD(dD({},c),{},{runOnlyIf:function(v){return Hc(v.target)===!1||r.container.contains(v.target)===!1}});u.setActiveContextName("menu"),f.addShortcuts([{keys:[["Escape"]],callback:function(){r.keyEvent=!0,r.close(),r.keyEvent=!1}},{keys:[["ArrowDown"]],callback:function(){var v=r.hotMenu.getSelectedLast();r.keyEvent=!0,v?r.selectNextCell(v[0],v[1]):r.selectFirstCell(),r.keyEvent=!1}},{keys:[["ArrowUp"]],callback:function(){var v=r.hotMenu.getSelectedLast();r.keyEvent=!0,v?r.selectPrevCell(v[0],v[1]):r.selectLastCell(),r.keyEvent=!1}},{keys:[["ArrowRight"]],callback:function(){var v=r.hotMenu.getSelectedLast();if(r.keyEvent=!0,v){var p=r.openSubMenu(v[0]);p&&p.selectFirstCell()}r.keyEvent=!1}},{keys:[["ArrowLeft"]],callback:function(){var v=r.hotMenu.getSelectedLast();r.keyEvent=!0,v&&r.isSubMenu()&&(r.close(),r.parentMenu&&r.parentMenu.hotMenu.listen()),r.keyEvent=!1}},{keys:[["Enter"]],callback:function(v){var p=r.hotMenu.getSelectedLast();r.keyEvent=!0,r.hotMenu.getSourceDataAtRow(p[0]).submenu||(r.executeCommand(v),r.close(!0)),r.keyEvent=!1}},{keys:[["PageUp"]],callback:function(){var v=r.hotMenu.getSelectedLast();r.keyEvent=!0,v?r.hotMenu.selection.transformStart(-r.hotMenu.countVisibleRows(),0):r.selectFirstCell(),r.keyEvent=!1}},{keys:[["PageDown"]],callback:function(){var v=r.hotMenu.getSelectedLast();r.keyEvent=!0,v?r.hotMenu.selection.transformStart(r.hotMenu.countVisibleRows(),0):r.selectLastCell(),r.keyEvent=!1}}],h),this.blockMainTableCallbacks(),this.runLocalHooks("afterOpen")}},{key:"close",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.isOpened()&&(r&&this.parentMenu?this.parentMenu.close():(this.closeAllSubMenus(),this.container.style.display="none",this.releaseMainTableCallbacks(),this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.parentMenu&&this.parentMenu.hotMenu.listen()))}},{key:"openSubMenu",value:function(r){if(!this.hotMenu)return!1;var n=this.hotMenu.getCell(r,0);if(this.closeAllSubMenus(),!n||!Vke(n))return!1;var o=this.hotMenu.getSourceDataAtRow(r),i=new e(this.hot,{parent:this,name:o.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return i.setMenuItems(o.submenu.items),i.open(),i.setPosition(n.getBoundingClientRect()),this.hotSubMenus[o.key]=i,i}},{key:"closeSubMenu",value:function(r){var n=this.hotMenu.getSourceDataAtRow(r),o=this.hotSubMenus[n.key];o&&(o.destroy(),delete this.hotSubMenus[n.key])}},{key:"closeAllSubMenus",value:function(){var r=this;$(this.hotMenu.getData(),function(n,o){return r.closeSubMenu(o)})}},{key:"isAllSubMenusClosed",value:function(){return Object.keys(this.hotSubMenus).length===0}},{key:"destroy",value:function(){var r=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),r&&r.removeChild(this.container)}},{key:"isOpened",value:function(){return this.hotMenu!==null}},{key:"executeCommand",value:function(r){if(!(!this.isOpened()||!this.hasSelectedItem())){var n=this.getSelectedItem();if(this.runLocalHooks("select",n,r),!this.isCommandPassive(n)){var o=this.hot.getSelectedRange(),i=o?Fke(o):[];this.runLocalHooks("executeCommand",n.key,i,r),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",n.key,i,r)}}}},{key:"isCommandPassive",value:function(r){var n=r.isCommand,o=r.name,i=r.disabled,a=r.submenu,l=i===!0||typeof i=="function"&&i.call(this.hot)===!0;return n===!1||o===Ke||l===!0||a}},{key:"setPosition",value:function(r){var n=new r1e(r,this.container.ownerDocument.defaultView);this.options.keepInViewport?(n.fitsBelow(this.container)?this.setPositionBelowCursor(n):n.fitsAbove(this.container)?this.setPositionAboveCursor(n):this.setPositionBelowCursor(n),this.hot.isLtr()?this.setHorizontalPositionForLtr(n):this.setHorizontalPositionForRtl(n)):(this.setPositionBelowCursor(n),this.setPositionOnRightOfCursor(n))}},{key:"setHorizontalPositionForRtl",value:function(r){r.fitsOnLeft(this.container)?this.setPositionOnLeftOfCursor(r):this.setPositionOnRightOfCursor(r)}},{key:"setHorizontalPositionForLtr",value:function(r){r.fitsOnRight(this.container)?this.setPositionOnRightOfCursor(r):this.setPositionOnLeftOfCursor(r)}},{key:"setPositionAboveCursor",value:function(r){var n=this.offset.above+r.top-this.container.offsetHeight;this.isSubMenu()&&(n=r.top+r.cellHeight-this.container.offsetHeight+3),this.container.style.top="".concat(n,"px")}},{key:"setPositionBelowCursor",value:function(r){var n=this.offset.below+r.top+1;this.isSubMenu()&&(n=r.top-1),this.container.style.top="".concat(n,"px")}},{key:"setPositionOnRightOfCursor",value:function(r){var n=r.left;if(this.isSubMenu()){var o=this.parentMenu.container.getBoundingClientRect(),i=o.right;n+=r.cellWidth+i-(r.left+r.cellWidth)}else n+=this.offset.right;this.container.style.left="".concat(n,"px")}},{key:"setPositionOnLeftOfCursor",value:function(r){var n=this.offset.left+r.left-this.container.offsetWidth;if(this.isSubMenu()){var o=this.parentMenu.container.getBoundingClientRect(),i=o.left;n-=r.left-i}this.container.style.left="".concat(n,"px")}},{key:"selectFirstCell",value:function(){var r=this.hotMenu.getCell(0,0);sy(r)||uy(r)||fy(r)?this.selectNextCell(0,0):this.hotMenu.selectCell(0,0)}},{key:"selectLastCell",value:function(){var r=this.hotMenu.countRows()-1,n=this.hotMenu.getCell(r,0);sy(n)||uy(n)||fy(n)?this.selectPrevCell(r,0):(this.hotMenu.selectCell(r,0,void 0,void 0,!1),this.hotMenu.scrollViewportTo(r,0,!0,!1))}},{key:"selectNextCell",value:function(r,n){var o=r+1,i=o<this.hotMenu.countRows()?this.hotMenu.getCell(o,n):null;i&&(sy(i)||uy(i)||fy(i)?this.selectNextCell(o,n):this.hotMenu.selectCell(o,n))}},{key:"selectPrevCell",value:function(r,n){var o=r-1,i=o>=0?this.hotMenu.getCell(o,n):null;i&&(sy(i)||uy(i)||fy(i)?this.selectPrevCell(o,n):this.hotMenu.selectCell(o,n))}},{key:"menuItemRenderer",value:function(r,n,o,i,a,l){var s=this,u=r.getSourceDataAtRow(o),f=this.hot.rootDocument.createElement("div"),c=function(w){return It(w,"submenu")},h=function(w){return new RegExp(Ke,"i").test(w.name)},d=function(w){return w.disabled===!0||typeof w.disabled=="function"&&w.disabled.call(s.hot)===!0},v=function(w){return w.disableSelection},p=l;typeof p=="function"&&(p=p.call(this.hot)),pn(n),te(f,"htItemWrapper"),n.appendChild(f),h(u)?te(n,"htSeparator"):typeof u.renderer=="function"?(te(n,"htCustomMenuRenderer"),n.appendChild(u.renderer(r,f,o,i,a,p))):Ka(f,p),d(u)?(te(n,"htDisabled"),this.eventManager.addEventListener(n,"mouseenter",function(){return r.deselectCell()})):v(u)?(te(n,"htSelectionDisabled"),this.eventManager.addEventListener(n,"mouseenter",function(){return r.deselectCell()})):c(u)?(te(n,"htSubmenu"),v(u)?this.eventManager.addEventListener(n,"mouseenter",function(){return r.deselectCell()}):this.eventManager.addEventListener(n,"mouseenter",function(){return r.selectCell(o,i,void 0,void 0,!1,!1)})):(Be(n,["htSubmenu","htDisabled"]),v(u)?this.eventManager.addEventListener(n,"mouseenter",function(){return r.deselectCell()}):this.eventManager.addEventListener(n,"mouseenter",function(){return r.selectCell(o,i,void 0,void 0,!1,!1)}))}},{key:"createContainer",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this.options.container.ownerDocument,o=r,i;return o&&(wt(o)&&(o=o.call(this.hot),o===null||pt(o)?o="":o=o.toString()),o=o.replace(/[^A-z0-9]/g,"_"),o="".concat(this.options.className,"Sub_").concat(o),i=n.querySelector(".".concat(this.options.className,".").concat(o))),i||(i=n.createElement("div"),te(i,"htMenu ".concat(this.options.className)),o&&te(i,o),this.options.container.appendChild(i)),i}},{key:"blockMainTableCallbacks",value:function(){this._afterScrollCallback=function(){},this.hot.addHook("afterScrollVertically",this._afterScrollCallback),this.hot.addHook("afterScrollHorizontally",this._afterScrollCallback)}},{key:"releaseMainTableCallbacks",value:function(){this._afterScrollCallback&&(this.hot.removeHook("afterScrollVertically",this._afterScrollCallback),this.hot.removeHook("afterScrollHorizontally",this._afterScrollCallback),this._afterScrollCallback=null)}},{key:"onAfterInit",value:function(){var r=this.hotMenu.view._wt.wtTable,n=this.hotMenu.getSettings().data,o=r.hider.style,i=r.holder.style,a=parseInt(o.width,10),l=Lt(n,function(s,u){return s+(u.name===Ke?1:26)},0);i.width="".concat(a+3,"px"),i.height="".concat(l+3,"px"),o.height=i.height}},{key:"onAfterSelection",value:function(r,n,o,i,a){this.keyEvent===!1&&(a.value=!0)}},{key:"onDocumentMouseDown",value:function(r){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!ai(r.target,this.hotMenu.rootElement)?this.close(!0):(this.isAllSubMenusClosed()||this.isSubMenu())&&!ai(r.target,".htMenu")&&this.close(!0))}},{key:"onDocumentContextMenu",value:function(r){this.isOpened()&&Ne(r.target,"htCore")&&ai(r.target,this.hotMenu.rootElement)&&r.preventDefault()}}]),e}();mt(fU,kr);const SP=fU;function cu(e){return cu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cu(e)}function s1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pD(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,f1e(n.key),n)}}function u1e(e,t,r){return t&&pD(e.prototype,t),r&&pD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f1e(e){var t=c1e(e,"string");return cu(t)==="symbol"?t:String(t)}function c1e(e,t){if(cu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(cu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function na(){return typeof Reflect<"u"&&Reflect.get?na=Reflect.get.bind():na=function(t,r,n){var o=h1e(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},na.apply(this,arguments)}function h1e(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=fo(e),e!==null););return e}function d1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$R(e,t)}function $R(e,t){return $R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},$R(e,t)}function v1e(e){var t=p1e();return function(){var n=fo(e),o;if(t){var i=fo(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return y1e(this,o)}}function y1e(e,t){if(t&&(cu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cU(e)}function cU(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p1e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fo(e){return fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fo(e)}var dy="contextMenu",g1e=70;be.getSingleton().register("afterContextMenuDefaultOptions");be.getSingleton().register("beforeContextMenuShow");be.getSingleton().register("afterContextMenuShow");be.getSingleton().register("afterContextMenuHide");be.getSingleton().register("afterContextMenuExecute");var hU=function(e){d1e(r,e);var t=v1e(r);function r(n){var o;return s1e(this,r),o=t.call(this,n),o.eventManager=new Pt(cU(o)),o.commandExecutor=new iU(o.hot),o.itemsFactory=null,o.menu=null,o}return u1e(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[dy]}},{key:"enablePlugin",value:function(){var o=this;if(!this.enabled){var i=this.hot.getSettings()[dy];typeof i.callback=="function"&&this.commandExecutor.setCommonCallback(i.callback),this.menu=new SP(this.hot,{className:"htContextMenu",keepInViewport:!0,container:i.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",function(){return o.onMenuBeforeOpen()}),this.menu.addLocalHook("afterOpen",function(){return o.onMenuAfterOpen()}),this.menu.addLocalHook("afterClose",function(){return o.onMenuAfterClose()}),this.menu.addLocalHook("executeCommand",function(){for(var a,l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];return(a=o.executeCommand).call.apply(a,[o].concat(s))}),this.addHook("afterOnCellContextMenu",function(a){return o.onAfterOnCellContextMenu(a)}),na(fo(r.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),na(fo(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),na(fo(r.prototype),"disablePlugin",this).call(this)}},{key:"open",value:function(o){if(this.menu&&(this.prepareMenuItems(),this.menu.open(),!!this.menu.isOpened())){var i=0,a=0;if(this.hot.rootDocument!==this.menu.container.ownerDocument){var l=this.hot.rootWindow.frameElement,s=l.getBoundingClientRect(),u=s.top,f=s.left;i=u-os(o.view),a=f-Pa(o.view)}else i=-1*os(this.menu.hotMenu.rootWindow),a=-1*Pa(this.menu.hotMenu.rootWindow);this.menu.setPosition({top:parseInt(o.pageY,10)+i,left:parseInt(o.pageX,10)+a})}}},{key:"close",value:function(){this.menu&&(this.menu.close(),this.itemsFactory=null)}},{key:"executeCommand",value:function(o){var i;this.itemsFactory===null&&this.prepareMenuItems();for(var a=arguments.length,l=new Array(a>1?a-1:0),s=1;s<a;s++)l[s-1]=arguments[s];(i=this.commandExecutor).execute.apply(i,[o].concat(l))}},{key:"prepareMenuItems",value:function(){var o=this;this.itemsFactory=new lU(this.hot,r.DEFAULT_ITEMS);var i=this.hot.getSettings()[dy],a={items:this.itemsFactory.getItems(i)};this.hot.runHooks("afterContextMenuDefaultOptions",a),this.itemsFactory.setPredefinedItems(a.items);var l=this.itemsFactory.getItems(i);this.hot.runHooks("beforeContextMenuSetItems",l),this.menu.setMenuItems(l),$(l,function(s){return o.commandExecutor.registerCommand(s.key,s)})}},{key:"onAfterOnCellContextMenu",value:function(o){var i=this.hot.getSettings(),a=i.rowHeaders,l=i.colHeaders;function s(f){return f.nodeName==="TD"||f.parentNode.nodeName==="TD"}var u=o.target;this.close(),!Ne(u,"handsontableInput")&&(o.preventDefault(),o.stopPropagation(),!(!(a||l)&&!s(u)&&!(Ne(u,"current")&&Ne(u,"wtBorder")))&&this.open(o))}},{key:"onMenuBeforeOpen",value:function(){this.hot.runHooks("beforeContextMenuShow",this)}},{key:"onMenuAfterOpen",value:function(){this.hot.runHooks("afterContextMenuShow",this)}},{key:"onMenuAfterClose",value:function(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}},{key:"destroy",value:function(){this.close(),this.menu&&this.menu.destroy(),na(fo(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return dy}},{key:"PLUGIN_PRIORITY",get:function(){return g1e}},{key:"PLUGIN_DEPS",get:function(){return["plugin:AutoColumnSize"]}},{key:"DEFAULT_ITEMS",get:function(){return[lw,sw,Ke,Sv,Cv,Ke,aw,Ov,Ke,uw,iw,Ke,_v,Ke,Yr]}}]),r}(at);hU.SEPARATOR={name:Ke};function m1e(e){return{key:"copy",name:function(){return this.getTranslatedPhrase(Vm)},callback:function(){e.copyCellsOnly()},disabled:function(){if(this.countRows()===0||this.countCols()===0)return!0;var r=this.getSelected();return!r||r.length>1},hidden:!1}}function b1e(e){return{key:"copy_column_headers_only",name:function(){var r=this.getSelectedRangeLast(),n=r?Math.min(r.getWidth()-1,1):0;return this.getTranslatedPhrase(zm,n)},callback:function(){e.copyColumnHeadersOnly()},disabled:function(){if(!this.hasColHeaders())return!0;var r=this.getSelected();return!r||r.length>1},hidden:!1}}function w1e(e){return{key:"copy_with_column_group_headers",name:function(){var r=this.getSelectedRangeLast(),n=r?Math.min(r.getWidth()-1,1):0;return this.getTranslatedPhrase(Um,n)},callback:function(){e.copyWithAllColumnHeaders()},disabled:function(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;var r=this.getSelected();return!r||r.length>1},hidden:!1}}function S1e(e){return{key:"copy_with_column_headers",name:function(){var r=this.getSelectedRangeLast(),n=r?Math.min(r.getWidth()-1,1):0;return this.getTranslatedPhrase(Wm,n)},callback:function(){e.copyWithColumnHeaders()},disabled:function(){if(!this.hasColHeaders())return!0;var r=this.getSelected();return!r||r.length>1},hidden:!1}}function C1e(e){return{key:"cut",name:function(){return this.getTranslatedPhrase(Ym)},callback:function(){e.cut()},disabled:function(){if(this.countRows()===0||this.countCols()===0)return!0;var r=this.getSelected();return!r||r.length>1},hidden:!1}}function rd(e){return rd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rd(e)}function _1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gD(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,R1e(n.key),n)}}function O1e(e,t,r){return t&&gD(e.prototype,t),r&&gD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function R1e(e){var t=E1e(e,"string");return rd(t)==="symbol"?t:String(t)}function E1e(e,t){if(rd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(rd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var T1e=function(){function e(){_1e(this,e),this.data={}}return O1e(e,[{key:"setData",value:function(r,n){this.data[r]=n}},{key:"getData",value:function(r){return this.data[r]||void 0}}]),e}();function nd(e){return nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nd(e)}function mD(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,k1e(n.key),n)}}function P1e(e,t,r){return t&&mD(e.prototype,t),r&&mD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function k1e(e){var t=$1e(e,"string");return nd(t)==="symbol"?t:String(t)}function $1e(e,t){if(nd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var I1e=P1e(function e(){A1e(this,e),this.clipboardData=new T1e});function od(e){return od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},od(e)}function M1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bD(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,D1e(n.key),n)}}function x1e(e,t,r){return t&&bD(e.prototype,t),r&&bD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function D1e(e){var t=N1e(e,"string");return od(t)==="symbol"?t:String(t)}function N1e(e,t){if(od(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(od(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var CP=function(){function e(t){M1e(this,e),this.rootDocument=t.defaultView?t:t.ownerDocument,this.mainElement=null,this.eventManager=new Pt(this),this.listenersCount=new WeakSet,this.container=t}return x1e(e,[{key:"useSecondaryElement",value:function(){var r=j1e(this.container);this.listenersCount.has(r)||(this.listenersCount.add(r),wD(this.eventManager,r,this)),this.mainElement=r}},{key:"setFocusableElement",value:function(r){this.listenersCount.has(r)||(this.listenersCount.add(r),wD(this.eventManager,r,this)),this.mainElement=r}},{key:"getFocusableElement",value:function(){return this.mainElement}},{key:"focus",value:function(){this.mainElement.value=" ",cn()||uV(this.mainElement)}}]),e}();mt(CP,kr);var Eg=new WeakMap;function H1e(e){var t=new CP(e),r=Eg.get(e);return r=isNaN(r)?0:r,Eg.set(e,r+1),t}function L1e(e){e.eventManager.clear()}var oC=function(t,r){return function(n){return r.runLocalHooks(t,n)}};function wD(e,t,r){e.addEventListener(t,"copy",oC("copy",r)),e.addEventListener(t,"cut",oC("cut",r)),e.addEventListener(t,"paste",oC("paste",r))}var Tg=new WeakMap;function j1e(e){var t=Tg.get(e);if(t)return t.parentElement||e.appendChild(t),t;var r=e.defaultView?e:e.ownerDocument,n=r.createElement("textarea");return Tg.set(e,n),n.setAttribute("data-hot-input",""),n.className="HandsontableCopyPaste",n.tabIndex=-1,n.autocomplete="off",n.wrap="hard",n.value=" ",e.appendChild(n),n}function SD(e){if(e instanceof CP){var t=Eg.get(e.container);if(t=isNaN(t)?0:t,t>0&&(t-=1),L1e(e),t<=0){t=0;var r=Tg.get(e.container);r&&r.parentNode&&(r.parentNode.removeChild(r),Tg.delete(e.container)),e.mainElement=null}Eg.set(e.container,t)}}function id(e){return id=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},id(e)}function B1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CD(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,V1e(n.key),n)}}function F1e(e,t,r){return t&&CD(e.prototype,t),r&&CD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function V1e(e){var t=W1e(e,"string");return id(t)==="symbol"?t:String(t)}function W1e(e,t){if(id(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(id(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _D(e,t){dU(e,t),t.add(e)}function pl(e,t,r){dU(e,t),t.set(e,r)}function dU(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function vy(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function dr(e,t){var r=vU(e,t,"get");return U1e(e,r)}function U1e(e,t){return t.get?t.get.call(e):t.value}function gl(e,t,r){var n=vU(e,t,"set");return z1e(e,n,r),r}function vU(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function z1e(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}var zo=new WeakMap,iC=new WeakMap,Wf=new WeakMap,AR=new WeakMap,IR=new WeakMap,Uf=new WeakMap,yy=new WeakSet,OD=new WeakSet,Y1e=function(){function e(t){var r=t.countRows,n=t.countColumns,o=t.rowsLimit,i=t.columnsLimit,a=t.countColumnHeaders;B1e(this,e),_D(this,OD),_D(this,yy),pl(this,zo,{writable:!0,value:void 0}),pl(this,iC,{writable:!0,value:void 0}),pl(this,Wf,{writable:!0,value:void 0}),pl(this,AR,{writable:!0,value:void 0}),pl(this,IR,{writable:!0,value:void 0}),pl(this,Uf,{writable:!0,value:void 0}),gl(this,iC,r),gl(this,Wf,n),gl(this,AR,o),gl(this,IR,i),gl(this,Uf,a)}return F1e(e,[{key:"setSelectedRange",value:function(r){gl(this,zo,r)}},{key:"getCellsRange",value:function(){if(dr(this,iC).call(this)===0||dr(this,Wf).call(this)===0)return null;var r=dr(this,zo).getTopStartCorner(),n=r.row,o=r.col,i=dr(this,zo).getBottomEndCorner(),a=i.row,l=i.col,s=vy(this,OD,G1e).call(this,n,a),u=vy(this,yy,aC).call(this,o,l),f=a!==s||l!==u;return{isRangeTrimmed:f,startRow:n,startCol:o,endRow:s,endCol:u}}},{key:"getMostBottomColumnHeadersRange",value:function(){if(dr(this,Wf).call(this)===0||dr(this,Uf).call(this)===0)return null;var r=dr(this,zo).getTopStartCorner(),n=r.col,o=dr(this,zo).getBottomEndCorner(),i=o.col,a=vy(this,yy,aC).call(this,n,i),l=i!==a;return{isRangeTrimmed:l,startRow:-1,startCol:n,endRow:-1,endCol:a}}},{key:"getAllColumnHeadersRange",value:function(){if(dr(this,Wf).call(this)===0||dr(this,Uf).call(this)===0)return null;var r=dr(this,zo).getTopStartCorner(),n=r.col,o=dr(this,zo).getBottomEndCorner(),i=o.col,a=vy(this,yy,aC).call(this,n,i),l=i!==a;return{isRangeTrimmed:l,startRow:-dr(this,Uf).call(this),startCol:n,endRow:-1,endCol:a}}}]),e}();function aC(e,t){return Math.min(t,Math.max(e+dr(this,IR).call(this)-1,e))}function G1e(e,t){return Math.min(t,Math.max(e+dr(this,AR).call(this)-1,e))}function yU(e){var t=[],r=[];return $(e,function(n){var o=Math.min(n.startRow,n.endRow),i=Math.max(n.startRow,n.endRow);Ce(o,i,function(s){t.indexOf(s)===-1&&t.push(s)});var a=Math.min(n.startCol,n.endCol),l=Math.max(n.startCol,n.endCol);Ce(a,l,function(s){r.indexOf(s)===-1&&r.push(s)})}),{rows:t,columns:r}}function K1e(e,t){return Q1e(e)||Z1e(e,t)||q1e(e,t)||X1e()}function X1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q1e(e,t){if(e){if(typeof e=="string")return RD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return RD(e,t)}}function RD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Z1e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function Q1e(e){if(Array.isArray(e))return e}function La(e){return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},La(e)}function J1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ED(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,gU(n.key),n)}}function eAe(e,t,r){return t&&ED(e.prototype,t),r&&ED(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function oa(){return typeof Reflect<"u"&&Reflect.get?oa=Reflect.get.bind():oa=function(t,r,n){var o=tAe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},oa.apply(this,arguments)}function tAe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=co(e),e!==null););return e}function rAe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&MR(e,t)}function MR(e,t){return MR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},MR(e,t)}function nAe(e){var t=iAe();return function(){var n=co(e),o;if(t){var i=co(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return oAe(this,o)}}function oAe(e,t){if(t&&(La(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hr(e)}function hr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iAe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function co(e){return co=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},co(e)}function aAe(e,t){pU(e,t),t.add(e)}function ji(e,t,r){pU(e,t),t.set(e,r)}function pU(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ml(e,t,r){return t=gU(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gU(e){var t=lAe(e,"string");return La(t)==="symbol"?t:String(t)}function lAe(e,t){if(La(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(La(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sAe(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function Ar(e,t){var r=mU(e,t,"get");return uAe(e,r)}function uAe(e,t){return t.get?t.get.call(e):t.value}function Yn(e,t,r){var n=mU(e,t,"set");return fAe(e,n,r),r}function mU(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function fAe(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}be.getSingleton().register("afterCopyLimit");be.getSingleton().register("modifyCopyableRange");be.getSingleton().register("beforeCut");be.getSingleton().register("afterCut");be.getSingleton().register("beforePaste");be.getSingleton().register("afterPaste");be.getSingleton().register("beforeCopy");be.getSingleton().register("afterCopy");var py="copyPaste",cAe=80,hAe=["fragmentSelection"],TD=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join(""),lC=new WeakMap,sC=new WeakMap,uC=new WeakMap,bl=new WeakMap,gy=new WeakMap,my=new WeakMap,wl=new WeakMap,PD=new WeakSet,dAe=function(e){rAe(r,e);var t=nAe(r);function r(){var n;J1e(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),aAe(hr(n),PD),ml(hr(n),"columnsLimit",1/0),ml(hr(n),"rowsLimit",1/0),ml(hr(n),"pasteMode","overwrite"),ml(hr(n),"uiContainer",n.hot.rootDocument.body),ji(hr(n),lC,{writable:!0,value:!1}),ji(hr(n),sC,{writable:!0,value:!1}),ji(hr(n),uC,{writable:!0,value:!1}),ji(hr(n),bl,{writable:!0,value:"cells-only"}),ji(hr(n),gy,{writable:!0,value:!1}),ji(hr(n),my,{writable:!0,value:!1}),ji(hr(n),wl,{writable:!0,value:new Y1e({countRows:function(){return n.hot.countRows()},countColumns:function(){return n.hot.countCols()},rowsLimit:function(){return n.rowsLimit},columnsLimit:function(){return n.columnsLimit},countColumnHeaders:function(){return n.hot.view.getColumnHeadersCount()}})}),ml(hr(n),"copyableRanges",[]),ml(hr(n),"focusableElement",void 0),n}return eAe(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[py]}},{key:"enablePlugin",value:function(){var o=this;if(!this.enabled){var i=this.hot.getSettings(),a=i[py];if(La(a)==="object"){var l,s;this.pasteMode=(l=a.pasteMode)!==null&&l!==void 0?l:this.pasteMode,this.rowsLimit=isNaN(a.rowsLimit)?this.rowsLimit:a.rowsLimit,this.columnsLimit=isNaN(a.columnsLimit)?this.columnsLimit:a.columnsLimit,Yn(this,lC,!!a.copyColumnHeaders),Yn(this,sC,!!a.copyColumnGroupHeaders),Yn(this,uC,!!a.copyColumnHeadersOnly),this.uiContainer=(s=a.uiContainer)!==null&&s!==void 0?s:this.uiContainer}this.addHook("afterContextMenuDefaultOptions",function(u){return o.onAfterContextMenuDefaultOptions(u)}),this.addHook("afterOnCellMouseUp",function(){return o.onAfterOnCellMouseUp()}),this.addHook("afterSelectionEnd",function(){return o.onAfterSelectionEnd()}),this.addHook("beforeKeyDown",function(){return o.onBeforeKeyDown()}),this.focusableElement=H1e(this.uiContainer),this.focusableElement.addLocalHook("copy",function(u){return o.onCopy(u)}).addLocalHook("cut",function(u){return o.onCut(u)}).addLocalHook("paste",function(u){return o.onPaste(u)}),oa(co(r.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.getOrCreateFocusableElement(),oa(co(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.focusableElement&&SD(this.focusableElement),oa(co(r.prototype),"disablePlugin",this).call(this)}},{key:"copy",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"cells-only";Yn(this,bl,o),Yn(this,gy,!0),this.getOrCreateFocusableElement(),this.focusableElement.focus(),this.hot.rootDocument.execCommand("copy")}},{key:"copyCellsOnly",value:function(){this.copy("cells-only")}},{key:"copyColumnHeadersOnly",value:function(){this.copy("column-headers-only")}},{key:"copyWithAllColumnHeaders",value:function(){this.copy("with-column-group-headers")}},{key:"copyWithColumnHeaders",value:function(){this.copy("with-column-headers")}},{key:"cut",value:function(){Yn(this,my,!0),this.getOrCreateFocusableElement(),this.focusableElement.focus(),this.hot.rootDocument.execCommand("cut")}},{key:"getRangedCopyableData",value:function(o){return bc(this.getRangedData(o))}},{key:"getRangedData",value:function(o){var i=this,a=[],l=yU(o),s=l.rows,u=l.columns;return $(s,function(f){var c=[];$(u,function(h){f<0?c.push(i.hot.getColHeader(h,f)):c.push(i.hot.getCopyableData(f,h))}),a.push(c)}),a}},{key:"paste",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o;if(!(!o&&!i)){var a=new I1e;o&&a.clipboardData.setData("text/plain",o),i&&a.clipboardData.setData("text/html",i),this.getOrCreateFocusableElement(),this.onPaste(a)}}},{key:"setCopyableText",value:function(){var o=this.hot.getSelectedRangeLast();if(o){Ar(this,wl).setSelectedRange(o);var i=new Map([["headers",null],["cells",null]]);Ar(this,bl)==="column-headers-only"?i.set("headers",Ar(this,wl).getMostBottomColumnHeadersRange()):(Ar(this,bl)==="with-column-headers"?i.set("headers",Ar(this,wl).getMostBottomColumnHeadersRange()):Ar(this,bl)==="with-column-group-headers"&&i.set("headers",Ar(this,wl).getAllColumnHeadersRange()),i.set("cells",Ar(this,wl).getCellsRange())),this.copyableRanges=Array.from(i.values()).filter(function(c){return c!==null}).map(function(c){var h=c.startRow,d=c.startCol,v=c.endRow,p=c.endCol;return{startRow:h,startCol:d,endRow:v,endCol:p}}),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);var a=i.get("cells");if(a!==null&&a.isRangeTrimmed){var l=a.startRow,s=a.startCol,u=a.endRow,f=a.endCol;this.hot.runHooks("afterCopyLimit",u-l+1,f-s+1,this.rowsLimit,this.columnsLimit)}}}},{key:"getOrCreateFocusableElement",value:function(){var o,i=(o=this.hot.getActiveEditor())===null||o===void 0?void 0:o.TEXTAREA;i?this.focusableElement.setFocusableElement(i):this.focusableElement.useSecondaryElement()}},{key:"isEditorOpened",value:function(){var o;return(o=this.hot.getActiveEditor())===null||o===void 0?void 0:o.isOpened()}},{key:"populateValues",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.hot.getSelectedRangeLast();if(o.length){for(var a=o.length,l=o[0].length,s=[],u=i.getTopStartCorner(),f=u.row,c=u.col,h=i.getBottomEndCorner(),d=h.row,v=h.col,p=f,m=c,w=f,S=c;s.length<a||p<=d;){var C=this.hot.getCellMeta(p,c),P=C.skipRowOnPaste,R=C.visualRow;if(p=R+1,P!==!0){w=R,m=c;for(var W=[],z=s.length%a;W.length<l||m<=v;){var q=this.hot.getCellMeta(f,m),K=q.skipColumnOnPaste,X=q.visualCol;if(m=X+1,K!==!0){S=X;var Q=W.length%l;W.push(o[z][Q])}}s.push(W)}}return this.hot.populateFromArray(f,c,s,void 0,void 0,"CopyPaste.paste",this.pasteMode),[f,c,w,S]}}},{key:"onCopy",value:function(o){if(!(!this.hot.isListening()&&!Ar(this,gy)||this.isEditorOpened())){this.setCopyableText(),Yn(this,gy,!1);var i=this.getRangedData(this.copyableRanges),a=sAe(this,PD,vAe).call(this,this.copyableRanges),l=!!this.hot.runHooks("beforeCopy",i,this.copyableRanges,a);if(l){var s=bc(i);if(o&&o.clipboardData){var u=q_(i,this.hot.rootDocument);o.clipboardData.setData("text/plain",s),o.clipboardData.setData("text/html",[TD,u].join(""))}else typeof ClipboardEvent>"u"&&this.hot.rootWindow.clipboardData.setData("Text",s);this.hot.runHooks("afterCopy",i,this.copyableRanges,a)}Yn(this,bl,"cells-only"),o.preventDefault()}}},{key:"onCut",value:function(o){if(!(!this.hot.isListening()&&!Ar(this,my)||this.isEditorOpened())){this.setCopyableText(),Yn(this,my,!1);var i=this.getRangedData(this.copyableRanges),a=!!this.hot.runHooks("beforeCut",i,this.copyableRanges);if(a){var l=bc(i);if(o&&o.clipboardData){var s=q_(i,this.hot.rootDocument);o.clipboardData.setData("text/plain",l),o.clipboardData.setData("text/html",[TD,s].join(""))}else typeof ClipboardEvent>"u"&&this.hot.rootWindow.clipboardData.setData("Text",l);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",i,this.copyableRanges)}o.preventDefault()}}},{key:"onPaste",value:function(o){if(!(!this.hot.isListening()||this.isEditorOpened())){o&&o.preventDefault&&o.preventDefault();var i;if(o&&typeof o.clipboardData<"u"){var a=_m(o.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});if(a&&/(<table)|(<TABLE)/g.test(a)){var l=IV(a,this.hot.rootDocument);i=l.data}else i=o.clipboardData.getData("text/plain")}else typeof ClipboardEvent>"u"&&typeof this.hot.rootWindow.clipboardData<"u"&&(i=this.hot.rootWindow.clipboardData.getData("Text"));if(typeof i=="string"&&(i=nSe(i)),!(i&&i.length===0)&&this.hot.runHooks("beforePaste",i,this.copyableRanges)!==!1){var s=this.populateValues(i),u=K1e(s,4),f=u[0],c=u[1],h=u[2],d=u[3];this.hot.selectCell(f,c,Math.min(this.hot.countRows()-1,h),Math.min(this.hot.countCols()-1,d)),this.hot.runHooks("afterPaste",i,this.copyableRanges)}}}},{key:"onAfterContextMenuDefaultOptions",value:function(o){o.items.push({name:"---------"},m1e(this)),Ar(this,lC)&&o.items.push(S1e(this)),Ar(this,sC)&&o.items.push(w1e(this)),Ar(this,uC)&&o.items.push(b1e(this)),o.items.push(C1e(this))}},{key:"onAfterOnCellMouseUp",value:function(){!this.hot.isListening()||this.isEditorOpened()||this.hot.getSettings().fragmentSelection||(this.getOrCreateFocusableElement(),this.focusableElement.focus())}},{key:"onAfterSelectionEnd",value:function(){this.isEditorOpened()||(this.getOrCreateFocusableElement(),!(this.hot.getSettings().fragmentSelection&&this.focusableElement.getFocusableElement()!==this.hot.rootDocument.activeElement&&aV())&&(this.setCopyableText(),this.focusableElement.focus()))}},{key:"onBeforeKeyDown",value:function(){if(!(!this.hot.isListening()||this.isEditorOpened())){var o=this.hot.rootDocument.activeElement,i=this.hot.getActiveEditor();!i||o!==this.focusableElement.getFocusableElement()&&o!==i.select||(this.getOrCreateFocusableElement(),this.focusableElement.focus())}}},{key:"destroy",value:function(){this.focusableElement&&(SD(this.focusableElement),this.focusableElement=null),oa(co(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return py}},{key:"SETTING_KEYS",get:function(){return[py].concat(hAe)}},{key:"PLUGIN_PRIORITY",get:function(){return cAe}}]),r}(at);function vAe(e){for(var t=yU(e),r=t.rows,n=0,o=0;o<r.length&&!(r[o]>=0);o++)n+=1;return{columnHeadersCount:n}}function bU(e,t){return"border_row".concat(e,"col").concat(t)}function ac(){return{width:1,color:"#000"}}function ho(){return{hide:!0}}function yAe(){return{width:1,color:"#000",cornerVisible:!1}}function fC(e){if(pe(e.start)||pe(e.left)){var t;e.start=(t=e.start)!==null&&t!==void 0?t:e.left}if(pe(e.end)||pe(e.right)){var r;e.end=(r=e.end)!==null&&r!==void 0?r:e.right}return delete e.left,delete e.right,e}function zf(e){return pe(e.start)&&(e.left=e.start),pe(e.end)&&(e.right=e.end),e}function cC(e,t){return{id:bU(e,t),border:yAe(),row:e,col:t,top:ho(),bottom:ho(),start:ho(),end:ho()}}function pAe(e,t){return It(t,"border")&&t.border&&(e.border=t.border),It(t,"top")&&pe(t.top)&&(t.top?(Ue(t.top)||(t.top=ac()),e.top=t.top):(t.top=ho(),e.top=t.top)),It(t,"bottom")&&pe(t.bottom)&&(t.bottom?(Ue(t.bottom)||(t.bottom=ac()),e.bottom=t.bottom):(t.bottom=ho(),e.bottom=t.bottom)),It(t,"start")&&pe(t.start)&&(t.start?(Ue(t.start)||(t.start=ac()),e.start=t.start):(t.start=ho(),e.start=t.start)),It(t,"end")&&pe(t.end)&&(t.end?(Ue(t.end)||(t.end=ac()),e.end=t.end):(t.end=ho(),e.end=t.end)),e}function xo(e,t){var r=!1;return $(e.getSelectedRange(),function(n){n.forAll(function(o,i){if(!(o<0||i<0)){var a=e.getCellMeta(o,i).borders;if(a)if(t){if(!It(a[t],"hide")||a[t].hide===!1)return r=!0,!1}else return r=!0,!1}})}),r}function fw(e){return'<span class="selected">'.concat(String.fromCharCode(10003),"</span>").concat(e)}function gAe(e){return e.some(function(t){return pe(t.left)||pe(t.right)})}function mAe(e){return e.some(function(t){return pe(t.start)||pe(t.end)})}var bAe=new Map([["left","start"],["right","end"]]);function wAe(e){var t;return(t=bAe.get(e))!==null&&t!==void 0?t:e}function SAe(e){return{key:"borders:bottom",name:function(){var r=this.getTranslatedPhrase(hb),n=xo(this,"bottom");return n&&(r=fw(r)),r},callback:function(r,n){var o=xo(this,"bottom");e.prepareBorder(n,"bottom",o)}}}function CAe(e){var t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name:function(){var n=this.getTranslatedPhrase(db),o=xo(this,t);return o&&(n=fw(n)),n},callback:function(n,o){var i=xo(this,t);e.prepareBorder(o,t,i)}}}function _Ae(e){return{key:"borders:no_borders",name:function(){return this.getTranslatedPhrase(vb)},callback:function(r,n){e.prepareBorder(n,"noBorders")},disabled:function(){return!xo(this)}}}function OAe(e){var t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name:function(){var n=this.getTranslatedPhrase(cb),o=xo(this,t);return o&&(n=fw(n)),n},callback:function(n,o){var i=xo(this,t);e.prepareBorder(o,t,i)}}}function RAe(e){return{key:"borders:top",name:function(){var r=this.getTranslatedPhrase(fb),n=xo(this,"top");return n&&(r=fw(r)),r},callback:function(r,n){var o=xo(this,"top");e.prepareBorder(n,"top",o)}}}function hu(e){return hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hu(e)}function kD(e,t){return kAe(e)||PAe(e,t)||TAe(e,t)||EAe()}function EAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TAe(e,t){if(e){if(typeof e=="string")return $D(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $D(e,t)}}function $D(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function PAe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function kAe(e){if(Array.isArray(e))return e}function $Ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AD(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,SU(n.key),n)}}function AAe(e,t,r){return t&&AD(e.prototype,t),r&&AD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ia(){return typeof Reflect<"u"&&Reflect.get?ia=Reflect.get.bind():ia=function(t,r,n){var o=IAe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ia.apply(this,arguments)}function IAe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=vo(e),e!==null););return e}function MAe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xR(e,t)}function xR(e,t){return xR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},xR(e,t)}function xAe(e){var t=NAe();return function(){var n=vo(e),o;if(t){var i=vo(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return DAe(this,o)}}function DAe(e,t){if(t&&(hu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wU(e)}function wU(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NAe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vo(e){return vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vo(e)}function HAe(e,t,r){return t=SU(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SU(e){var t=LAe(e,"string");return hu(t)==="symbol"?t:String(t)}function LAe(e,t){if(hu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var by="customBorders",jAe=90,BAe=function(e){MAe(r,e);var t=xAe(r);function r(){var n;$Ae(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),HAe(wU(n),"savedBorders",[]),n}return AAe(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[by]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.addHook("afterContextMenuDefaultOptions",function(i){return o.onAfterContextMenuDefaultOptions(i)}),this.addHook("init",function(){return o.onAfterInit()}),ia(vo(r.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.hideBorders(),ia(vo(r.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),ia(vo(r.prototype),"updatePlugin",this).call(this)}},{key:"setBorders",value:function(o,i){var a=this,l=["top","bottom","start","end"],s=null;i&&(this.checkSettingsCohesion([i]),l=Object.keys(i),s=fC(i));var u=Ns(o),f=Mh(u);$(o,function(c){for(var h=f(c),d=kD(h,4),v=d[0],p=d[1],m=d[2],w=d[3],S=function(R){for(var W=function(K){$(l,function(X){a.prepareBorderFromCustomAdded(R,K,s,wAe(X))})},z=p;z<=w;z+=1)W(z)},C=v;C<=m;C+=1)S(C)}),this.hot.view.render()}},{key:"getBorders",value:function(o){var i=this;if(!Array.isArray(o))return this.savedBorders;var a=Ns(o),l=Mh(a),s=[];return $(o,function(u){for(var f=l(u),c=kD(f,4),h=c[0],d=c[1],v=c[2],p=c[3],m=function(C){for(var P=function(z){$(i.savedBorders,function(q){q.row===C&&q.col===z&&s.push(zf(q))})},R=d;R<=p;R+=1)P(R)},w=h;w<=v;w+=1)m(w)}),s}},{key:"clearBorders",value:function(o){var i=this;o?this.setBorders(o):($(this.savedBorders,function(a){i.clearBordersFromSelectionSettings(a.id),i.clearNullCellRange(),i.hot.removeCellMeta(a.row,a.col,"borders")}),this.savedBorders.length=0)}},{key:"insertBorderIntoSettings",value:function(o,i){var a=this.checkSavedBorders(o);a||this.savedBorders.push(o);var l=this.hot._createCellRange(this.hot._createCellCoords(o.row,o.col)),s=this.checkCustomSelections(o,l,i);s||this.hot.selection.highlight.addCustomSelection({border:o,visualCellRange:l})}},{key:"prepareBorderFromCustomAdded",value:function(o,i,a,l){var s=this.hot.countRows(),u=this.hot.countCols();if(!(o>=s||i>=u)){var f=cC(o,i);a&&(f=pAe(f,a),$(this.hot.selection.highlight.customSelections,function(c){if(f.id===c.settings.id)return Object.assign(c.settings,a),f.id=c.settings.id,f.top=c.settings.top,f.bottom=c.settings.bottom,f.start=c.settings.start,f.end=c.settings.end,!1})),this.hot.setCellMeta(o,i,"borders",zf(f)),this.insertBorderIntoSettings(f,l)}}},{key:"prepareBorderFromCustomAddedRange",value:function(o,i){var a=this,l=Math.min(o.to.row,this.hot.countRows()-1),s=Math.min(o.to.col,this.hot.countCols()-1);Ce(o.from.row,l,function(u){Ce(o.from.col,s,function(f){var c=cC(u,f),h=0;u===o.from.row&&It(i,"top")&&(h+=1,c.top=i.top),u===o.to.row&&It(i,"bottom")&&(h+=1,c.bottom=i.bottom),f===o.from.col&&It(i,"start")&&(h+=1,c.start=i.start),f===o.to.col&&It(i,"end")&&(h+=1,c.end=i.end),h>0&&(a.hot.setCellMeta(u,f,"borders",zf(c)),a.insertBorderIntoSettings(c))})})}},{key:"removeAllBorders",value:function(o,i){var a=bU(o,i);this.spliceBorder(a),this.clearBordersFromSelectionSettings(a),this.clearNullCellRange(),this.hot.removeCellMeta(o,i,"borders")}},{key:"setBorder",value:function(o,i,a,l){var s=this.hot.getCellMeta(o,i).borders;if(!s||s.border===void 0?s=cC(o,i):s=fC(s),l){s[a]=ho();var u=this.countHide(s);if(u===4)this.removeAllBorders(o,i);else{var f=this.checkCustomSelectionsFromContextMenu(s,a,l);f||this.insertBorderIntoSettings(s),this.hot.setCellMeta(o,i,"borders",zf(s))}}else{s[a]=ac();var c=this.checkCustomSelectionsFromContextMenu(s,a,l);c||this.insertBorderIntoSettings(s),this.hot.setCellMeta(o,i,"borders",zf(s))}}},{key:"prepareBorder",value:function(o,i,a){var l=this;$(o,function(s){var u=s.start,f=s.end;if(u.row===f.row&&u.col===f.col)i==="noBorders"?l.removeAllBorders(u.row,u.col):l.setBorder(u.row,u.col,i,a);else switch(i){case"noBorders":Ce(u.col,f.col,function(c){Ce(u.row,f.row,function(h){l.removeAllBorders(h,c)})});break;case"top":Ce(u.col,f.col,function(c){l.setBorder(u.row,c,i,a)});break;case"bottom":Ce(u.col,f.col,function(c){l.setBorder(f.row,c,i,a)});break;case"start":Ce(u.row,f.row,function(c){l.setBorder(c,u.col,i,a)});break;case"end":Ce(u.row,f.row,function(c){l.setBorder(c,f.col,i,a)});break}})}},{key:"createCustomBorders",value:function(o){var i=this;$(o,function(a){var l=fC(a);a.range?i.prepareBorderFromCustomAddedRange(a.range,l):i.prepareBorderFromCustomAdded(a.row,a.col,l)})}},{key:"countHide",value:function(o){var i=o.top,a=o.bottom,l=o.start,s=o.end,u=[i,a,l,s];return Lt(u,function(f,c){var h=f;return c&&c.hide&&(h+=1),h},0)}},{key:"clearBordersFromSelectionSettings",value:function(o){var i=We(this.hot.selection.highlight.customSelections,function(a){return a.settings.id}).indexOf(o);i>-1&&this.hot.selection.highlight.customSelections[i].clear()}},{key:"clearNullCellRange",value:function(){var o=this;$(this.hot.selection.highlight.customSelections,function(i,a){if(i.cellRange===null)return o.hot.selection.highlight.customSelections[a].destroy(),o.hot.selection.highlight.customSelections.splice(a,1),!1})}},{key:"hideBorders",value:function(){var o=this;$(this.savedBorders,function(i){o.clearBordersFromSelectionSettings(i.id),o.clearNullCellRange()})}},{key:"spliceBorder",value:function(o){var i=We(this.savedBorders,function(a){return a.id}).indexOf(o);i>-1&&this.savedBorders.splice(i,1)}},{key:"checkSavedBorders",value:function(o){var i=this,a=!1,l=this.countHide(o);return l===4?(this.spliceBorder(o.id),a=!0):$(this.savedBorders,function(s,u){if(o.id===s.id)return i.savedBorders[u]=o,a=!0,!1}),a}},{key:"checkCustomSelectionsFromContextMenu",value:function(o,i,a){var l=!1;return $(this.hot.selection.highlight.customSelections,function(s){if(o.id===s.settings.id)return ze(s.instanceBorders,function(u){u.toggleHiddenClass(i,a)}),l=!0,!1}),l}},{key:"checkCustomSelections",value:function(o,i,a){var l=this.countHide(o),s=!1;return l===4?(this.removeAllBorders(o.row,o.col),s=!0):$(this.hot.selection.highlight.customSelections,function(u){if(o.id===u.settings.id)return u.visualCellRange=i,u.commit(),a&&ze(u.instanceBorders,function(f){f.changeBorderStyle(a,o)}),s=!0,!1}),s}},{key:"changeBorderSettings",value:function(){var o=this.hot.getSettings()[by];if(Array.isArray(o)){var i=ar(o);this.checkSettingsCohesion(i),i.length||(this.savedBorders=i),this.createCustomBorders(i)}else o!==void 0&&this.createCustomBorders(this.savedBorders)}},{key:"checkSettingsCohesion",value:function(o){var i=gAe(o),a=mAe(o);if(i&&a)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()&&i)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}},{key:"onAfterContextMenuDefaultOptions",value:function(o){this.hot.getSettings()[by]&&o.items.push({name:"---------"},{key:"borders",name:function(){return this.getTranslatedPhrase(ub)},disabled:function(){return this.selection.isSelectedByCorner()},submenu:{items:[RAe(this),OAe(this),SAe(this),CAe(this),_Ae(this)]}})}},{key:"onAfterInit",value:function(){this.changeBorderSettings()}},{key:"destroy",value:function(){ia(vo(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return by}},{key:"PLUGIN_PRIORITY",get:function(){return jAe}}]),r}(at);function du(e){return du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},du(e)}function FAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ID(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,WAe(n.key),n)}}function VAe(e,t,r){return t&&ID(e.prototype,t),r&&ID(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function WAe(e){var t=UAe(e,"string");return du(t)==="symbol"?t:String(t)}function UAe(e,t){if(du(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(du(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aa(){return typeof Reflect<"u"&&Reflect.get?aa=Reflect.get.bind():aa=function(t,r,n){var o=zAe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},aa.apply(this,arguments)}function zAe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=yo(e),e!==null););return e}function YAe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DR(e,t)}function DR(e,t){return DR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},DR(e,t)}function GAe(e){var t=XAe();return function(){var n=yo(e),o;if(t){var i=yo(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return KAe(this,o)}}function KAe(e,t){if(t&&(du(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CU(e)}function CU(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XAe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yo(e){return yo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yo(e)}var MD="dragToScroll",qAe=100,ZAe=function(e){YAe(r,e);var t=GAe(r);function r(n){var o;return FAe(this,r),o=t.call(this,n),o.eventManager=new Pt(CU(o)),o.boundaries=null,o.callback=null,o.listening=!1,o}return VAe(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[MD]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.addHook("afterOnCellMouseDown",function(i){return o.setupListening(i)}),this.addHook("afterOnCellCornerMouseDown",function(i){return o.setupListening(i)}),this.registerEvents(),aa(yo(r.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),aa(yo(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.unregisterEvents(),aa(yo(r.prototype),"disablePlugin",this).call(this)}},{key:"setBoundaries",value:function(o){this.boundaries=o}},{key:"setCallback",value:function(o){this.callback=o}},{key:"check",value:function(o,i){var a=0,l=0;i<this.boundaries.top?l=i-this.boundaries.top:i>this.boundaries.bottom&&(l=i-this.boundaries.bottom),o<this.boundaries.left?a=o-this.boundaries.left:o>this.boundaries.right&&(a=o-this.boundaries.right),this.callback(a,l)}},{key:"listen",value:function(){this.listening=!0}},{key:"unlisten",value:function(){this.listening=!1}},{key:"isListening",value:function(){return this.listening}},{key:"registerEvents",value:function(){for(var o=this,i=this.hot.rootWindow,a=i;a;)this.eventManager.addEventListener(a.document,"contextmenu",function(){return o.unlisten()}),this.eventManager.addEventListener(a.document,"mouseup",function(){return o.unlisten()}),this.eventManager.addEventListener(a.document,"mousemove",function(l){return o.onMouseMove(l)}),a=xc(a)}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"setupListening",value:function(o){if(!Si(o)){var i=this.hot.view._wt.wtTable.holder;i!==this.hot.rootWindow&&(this.setBoundaries(i.getBoundingClientRect()),this.setCallback(function(a,l){a<0?i.scrollLeft-=50:a>0&&(i.scrollLeft+=50),l<0?i.scrollTop-=20:l>0&&(i.scrollTop+=20)}),this.listen())}}},{key:"onMouseMove",value:function(o){this.isListening()&&this.check(o.clientX,o.clientY)}},{key:"destroy",value:function(){aa(yo(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return MD}},{key:"PLUGIN_PRIORITY",get:function(){return qAe}}]),r}(at);function vu(e){return vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vu(e)}function QAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xD(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,eIe(n.key),n)}}function JAe(e,t,r){return t&&xD(e.prototype,t),r&&xD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function eIe(e){var t=tIe(e,"string");return vu(t)==="symbol"?t:String(t)}function tIe(e,t){if(vu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function la(){return typeof Reflect<"u"&&Reflect.get?la=Reflect.get.bind():la=function(t,r,n){var o=rIe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},la.apply(this,arguments)}function rIe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=po(e),e!==null););return e}function nIe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&NR(e,t)}function NR(e,t){return NR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},NR(e,t)}function oIe(e){var t=aIe();return function(){var n=po(e),o;if(t){var i=po(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return iIe(this,o)}}function iIe(e,t){if(t&&(vu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _U(e)}function _U(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aIe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function po(e){return po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},po(e)}be.getSingleton().register("afterDropdownMenuDefaultOptions");be.getSingleton().register("beforeDropdownMenuShow");be.getSingleton().register("afterDropdownMenuShow");be.getSingleton().register("afterDropdownMenuHide");be.getSingleton().register("afterDropdownMenuExecute");var hC="dropdownMenu",lIe=230,dC="changeType",OU=function(e){nIe(r,e);var t=oIe(r);function r(n){var o;return QAe(this,r),o=t.call(this,n),o.eventManager=new Pt(_U(o)),o.commandExecutor=new iU(o.hot),o.itemsFactory=null,o.menu=null,o.hot.addHook("afterGetColHeader",function(i,a){return o.onAfterGetColHeader(i,a)}),o}return JAe(r,[{key:"isEnabled",value:function(){return this.hot.getSettings()[hC]}},{key:"enablePlugin",value:function(){var o=this;if(!this.enabled){this.itemsFactory=new lU(this.hot,r.DEFAULT_ITEMS);var i=this.hot.getSettings()[hC],a={items:this.itemsFactory.getItems(i)};this.registerEvents(),typeof i.callback=="function"&&this.commandExecutor.setCommonCallback(i.callback),la(po(r.prototype),"enablePlugin",this).call(this),this.callOnPluginsReady(function(){o.hot.runHooks("afterDropdownMenuDefaultOptions",a),o.itemsFactory.setPredefinedItems(a.items);var l=o.itemsFactory.getItems(i);o.menu&&o.menu.destroy(),o.menu=new SP(o.hot,{className:"htDropdownMenu",keepInViewport:!0,container:i.uiContainer||o.hot.rootDocument.body}),o.hot.runHooks("beforeDropdownMenuSetItems",l),o.menu.setMenuItems(l),o.menu.addLocalHook("beforeOpen",function(){return o.onMenuBeforeOpen()}),o.menu.addLocalHook("afterOpen",function(){return o.onMenuAfterOpen()}),o.menu.addLocalHook("afterClose",function(){return o.onMenuAfterClose()}),o.menu.addLocalHook("executeCommand",function(){for(var s,u=arguments.length,f=new Array(u),c=0;c<u;c++)f[c]=arguments[c];return(s=o.executeCommand).call.apply(s,[o].concat(f))}),$(l,function(s){return o.commandExecutor.registerCommand(s.key,s)})})}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),la(po(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.close(),this.menu&&this.menu.destroy(),la(po(r.prototype),"disablePlugin",this).call(this)}},{key:"registerEvents",value:function(){var o=this;this.eventManager.addEventListener(this.hot.rootElement,"click",function(i){return o.onTableClick(i)})}},{key:"open",value:function(o){this.menu&&(this.menu.open(),o.width&&this.menu.setOffset("left",o.width),this.menu.setPosition(o))}},{key:"close",value:function(){this.menu&&this.menu.close()}},{key:"executeCommand",value:function(o){for(var i,a=arguments.length,l=new Array(a>1?a-1:0),s=1;s<a;s++)l[s-1]=arguments[s];(i=this.commandExecutor).execute.apply(i,[o].concat(l))}},{key:"setListening",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.menu.isOpened()&&(o?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}},{key:"onTableClick",value:function(o){if(o.stopPropagation(),Ne(o.target,dC)&&!this.menu.isOpened()){var i=0,a=0;if(this.hot.rootDocument!==this.menu.container.ownerDocument){var l=this.hot.rootWindow.frameElement,s=l.getBoundingClientRect(),u=s.top,f=s.left;i=u,a=f}var c=o.target.getBoundingClientRect();this.open({left:c.left+a,top:c.top+o.target.offsetHeight+3+i,width:c.width,height:c.height})}}},{key:"onAfterGetColHeader",value:function(o,i){var a=i.parentNode;if(a){var l=a.parentNode.childNodes,s=Array.prototype.indexOf.call(l,a);if(!(o<0||s!==l.length-1)){var u=i.querySelector(".".concat(dC));if(!(this.enabled&&u)){if(!this.enabled){u&&u.parentNode.removeChild(u);return}var f=this.hot.rootDocument.createElement("button");f.className=dC,f.type="button",f.onclick=function(){return!1},i.firstChild.insertBefore(f,i.firstChild.firstChild)}}}}},{key:"onMenuBeforeOpen",value:function(){this.hot.runHooks("beforeDropdownMenuShow",this)}},{key:"onMenuAfterOpen",value:function(){this.hot.runHooks("afterDropdownMenuShow",this)}},{key:"onMenuAfterClose",value:function(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}},{key:"destroy",value:function(){this.close(),this.menu&&this.menu.destroy(),la(po(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return hC}},{key:"PLUGIN_PRIORITY",get:function(){return lIe}},{key:"PLUGIN_DEPS",get:function(){return["plugin:AutoColumnSize"]}},{key:"DEFAULT_ITEMS",get:function(){return[Sv,Cv,Ke,Ov,Ke,ow,Ke,_v,Ke,Yr]}}]),r}(at);OU.SEPARATOR={name:Ke};function ad(e){return ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ad(e)}function sIe(e,t){return hIe(e)||cIe(e,t)||fIe(e,t)||uIe()}function uIe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fIe(e,t){if(e){if(typeof e=="string")return DD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return DD(e,t)}}function DD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function cIe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function hIe(e){if(Array.isArray(e))return e}function dIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ND(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,yIe(n.key),n)}}function vIe(e,t,r){return t&&ND(e.prototype,t),r&&ND(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function yIe(e){var t=pIe(e,"string");return ad(t)==="symbol"?t:String(t)}function pIe(e,t){if(ad(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ad(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gIe=function(){function e(t){dIe(this,e),this.hot=t,this.options={}}return vIe(e,[{key:"setOptions",value:function(r){this.options=r}},{key:"getData",value:function(){var r=this,n=this._getDataRange(),o=n.startRow,i=n.startCol,a=n.endRow,l=n.endCol,s=this.options,u=[];return Ce(o,a,function(f){var c=[];!s.exportHiddenRows&&r._isHiddenRow(f)||(Ce(i,l,function(h){!s.exportHiddenColumns&&r._isHiddenColumn(h)||c.push(r.hot.getDataAtCell(f,h))}),u.push(c))}),u}},{key:"getRowHeaders",value:function(){var r=this,n=[];if(this.options.rowHeaders){var o=this._getDataRange(),i=o.startRow,a=o.endRow,l=this.hot.getRowHeader();Ce(i,a,function(s){!r.options.exportHiddenRows&&r._isHiddenRow(s)||n.push(l[s])})}return n}},{key:"getColumnHeaders",value:function(){var r=this,n=[];if(this.options.columnHeaders){var o=this._getDataRange(),i=o.startCol,a=o.endCol,l=this.hot.getColHeader();Ce(i,a,function(s){!r.options.exportHiddenColumns&&r._isHiddenColumn(s)||n.push(l[s])})}return n}},{key:"_getDataRange",value:function(){var r=this.hot.countCols()-1,n=this.hot.countRows()-1,o=sIe(this.options.range,4),i=o[0],a=i===void 0?0:i,l=o[1],s=l===void 0?0:l,u=o[2],f=u===void 0?n:u,c=o[3],h=c===void 0?r:c;return a=Math.max(a,0),s=Math.max(s,0),f=Math.min(f,n),h=Math.min(h,r),{startRow:a,startCol:s,endRow:f,endCol:h}}},{key:"_isHiddenRow",value:function(r){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(r))}},{key:"_isHiddenColumn",value:function(r){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(r))}}]),e}();const mIe=gIe;function ld(e){return ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ld(e)}function bIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HD(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,SIe(n.key),n)}}function wIe(e,t,r){return t&&HD(e.prototype,t),r&&HD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function SIe(e){var t=CIe(e,"string");return ld(t)==="symbol"?t:String(t)}function CIe(e,t){if(ld(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ld(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _Ie=function(){function e(t,r){bIe(this,e),this.dataProvider=t,this.options=this._mergeOptions(r),this.dataProvider.setOptions(this.options)}return wIe(e,[{key:"_mergeOptions",value:function(r){var n=pr(this.constructor.DEFAULT_OPTIONS),o=new Date;return n=Wt(pr(e.DEFAULT_OPTIONS),n),n=Wt(n,r),n.filename=bT(n.filename,{YYYY:o.getFullYear(),MM:"".concat(o.getMonth()+1).padStart(2,"0"),DD:"".concat(o.getDate()).padStart(2,"0")}),n}}],[{key:"DEFAULT_OPTIONS",get:function(){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:[]}}}]),e}();const OIe=_Ie;function yu(e){return yu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yu(e)}function RIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LD(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,TIe(n.key),n)}}function EIe(e,t,r){return t&&LD(e.prototype,t),r&&LD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function TIe(e){var t=PIe(e,"string");return yu(t)==="symbol"?t:String(t)}function PIe(e,t){if(yu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(yu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kIe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HR(e,t)}function HR(e,t){return HR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},HR(e,t)}function $Ie(e){var t=MIe();return function(){var n=Pg(e),o;if(t){var i=Pg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return AIe(this,o)}}function AIe(e,t){if(t&&(yu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IIe(e)}function IIe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MIe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pg(e){return Pg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pg(e)}var xIe=String.fromCharCode(13),DIe=String.fromCharCode(34),NIe=String.fromCharCode(10),HIe=function(e){kIe(r,e);var t=$Ie(r);function r(){return RIe(this,r),t.apply(this,arguments)}return EIe(r,[{key:"export",value:function(){var o=this,i=this.options,a=this.dataProvider.getData(),l=this.dataProvider.getColumnHeaders(),s=l.length>0,u=this.dataProvider.getRowHeaders(),f=u.length>0,c=i.bom?String.fromCharCode(65279):"";return s&&(l=We(l,function(h){return o._escapeCell(h,!0)}),f&&(c+=i.columnDelimiter),c+=l.join(i.columnDelimiter),c+=i.rowDelimiter),$(a,function(h,d){d>0&&(c+=i.rowDelimiter),f&&(c+=o._escapeCell(u[d])+i.columnDelimiter),c+=h.map(function(v){return o._escapeCell(v)}).join(i.columnDelimiter)}),c}},{key:"_escapeCell",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=Mt(o);return a!==""&&(i||a.indexOf(xIe)>=0||a.indexOf(DIe)>=0||a.indexOf(NIe)>=0||a.indexOf(this.options.columnDelimiter)>=0)&&(a=a.replace(new RegExp('"',"g"),'""'),a='"'.concat(a,'"')),a}}],[{key:"DEFAULT_OPTIONS",get:function(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:`\r
`}}}]),r}(OIe);const LIe=HIe;function sd(e){return sd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sd(e)}function jIe(e,t,r){return t=BIe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BIe(e){var t=FIe(e,"string");return sd(t)==="symbol"?t:String(t)}function FIe(e,t){if(sd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(sd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var VIe="csv",LR=jIe({},VIe,LIe);function WIe(e,t,r){return typeof LR[e]=="function"?new LR[e](t,r):null}function pu(e){return pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pu(e)}function UIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jD(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,YIe(n.key),n)}}function zIe(e,t,r){return t&&jD(e.prototype,t),r&&jD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function YIe(e){var t=GIe(e,"string");return pu(t)==="symbol"?t:String(t)}function GIe(e,t){if(pu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(pu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KIe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jR(e,t)}function jR(e,t){return jR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},jR(e,t)}function XIe(e){var t=QIe();return function(){var n=kg(e),o;if(t){var i=kg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return qIe(this,o)}}function qIe(e,t){if(t&&(pu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ZIe(e)}function ZIe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QIe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kg(e){return kg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kg(e)}var JIe="exportFile",eMe=240,tMe=function(e){KIe(r,e);var t=XIe(r);function r(){return UIe(this,r),t.apply(this,arguments)}return zIe(r,[{key:"isEnabled",value:function(){return!0}},{key:"exportAsString",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this._createTypeFormatter(o,i).export()}},{key:"exportAsBlob",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this._createBlob(this._createTypeFormatter(o,i))}},{key:"downloadFile",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.hot,l=a.rootDocument,s=a.rootWindow,u=this._createTypeFormatter(o,i),f=this._createBlob(u),c=s.URL||s.webkitURL,h=l.createElement("a"),d="".concat(u.options.filename,".").concat(u.options.fileExtension);if(h.download!==void 0){var v=c.createObjectURL(f);h.style.display="none",h.setAttribute("href",v),h.setAttribute("download",d),l.body.appendChild(h),h.dispatchEvent(new MouseEvent("click")),l.body.removeChild(h),setTimeout(function(){c.revokeObjectURL(v)},100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(f,d)}},{key:"_createTypeFormatter",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!LR[o])throw new Error('Export format type "'.concat(o,'" is not supported.'));return WIe(o,new mIe(this.hot),i)}},{key:"_createBlob",value:function(o){var i=null;return typeof Blob<"u"&&(i=new Blob([o.export()],{type:"".concat(o.options.mimeType,";charset=").concat(o.options.encoding)})),i}}],[{key:"PLUGIN_KEY",get:function(){return JIe}},{key:"PLUGIN_PRIORITY",get:function(){return eMe}}]),r}(at);function ud(e){return ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ud(e)}function rMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BD(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,oMe(n.key),n)}}function nMe(e,t,r){return t&&BD(e.prototype,t),r&&BD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function oMe(e){var t=iMe(e,"string");return ud(t)==="symbol"?t:String(t)}function iMe(e,t){if(ud(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ud(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var RU=function(){function e(t,r){var n=r.id,o=r.stateless,i=o===void 0?!0:o;rMe(this,e),this.hot=t,this.id=n,this.elements=[],this.hidden=!1,this.stateId="Filters.component.".concat(this.id),this.state=i?null:this.hot.columnIndexMapper.registerMap(this.stateId,new Am)}return nMe(e,[{key:"reset",value:function(){$(this.elements,function(r){return r.reset()})}},{key:"hide",value:function(){this.hidden=!0}},{key:"show",value:function(){this.hidden=!1}},{key:"isHidden",value:function(){return this.hot===null||this.hidden}},{key:"restoreState",value:function(r){this.state&&this.setState(this.state.getValueAtIndex(r))}},{key:"setState",value:function(){throw new Error("The state setting logic is not implemented")}},{key:"saveState",value:function(r){this.state&&this.state.setValueAtIndex(r,this.getState())}},{key:"getState",value:function(){throw new Error("The state gathering logic is not implemented")}},{key:"destroy",value:function(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),$(this.elements,function(r){return r.destroy()}),this.state=null,this.elements=null,this.hot=null}}]),e}();mt(RU,kr);const cw=RU;var fd={};function Ci(e,t){if(!fd[e])throw Error('Filter condition "'.concat(e,'" does not exist.'));var r=fd[e],n=r.condition,o=r.descriptor,i=t;return o.inputValuesDecorator&&(i=o.inputValuesDecorator(i)),function(a){return n.apply(a.meta.instance,[].concat([a],[i]))}}function sa(e){if(!fd[e])throw Error('Filter condition "'.concat(e,'" does not exist.'));return fd[e].descriptor}function Gt(e,t,r){r.key=e,fd[e]={condition:t,descriptor:r}}var er="none";function aMe(){return!0}Gt(er,aMe,{name:pv,inputsCount:0,showOperators:!1});var _c="empty";function lMe(e){return Kt(e.value)}Gt(_c,lMe,{name:Sb,inputsCount:0,showOperators:!0});var sp="not_empty";function sMe(e,t){return!Ci(_c,t)(e)}Gt(sp,sMe,{name:Cb,inputsCount:0,showOperators:!0});function uMe(e,t){return dMe(e)||hMe(e,t)||cMe(e,t)||fMe()}function fMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cMe(e,t){if(e){if(typeof e=="string")return FD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return FD(e,t)}}function FD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hMe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function dMe(e){if(Array.isArray(e))return e}var Oc="eq";function vMe(e,t){var r=uMe(t,1),n=r[0];return Mt(e.value).toLocaleLowerCase(e.meta.locale)===Mt(n)}Gt(Oc,vMe,{name:_b,inputsCount:1,showOperators:!0});var up="neq";function yMe(e,t){return!Ci(Oc,t)(e)}Gt(up,yMe,{name:Ob,inputsCount:1,showOperators:!0});function pMe(e,t){return wMe(e)||bMe(e,t)||mMe(e,t)||gMe()}function gMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mMe(e,t){if(e){if(typeof e=="string")return VD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return VD(e,t)}}function VD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bMe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function wMe(e){if(Array.isArray(e))return e}var EU="gt";function SMe(e,t){var r=pMe(t,1),n=r[0],o=n;return e.meta.type==="numeric"&&(o=parseFloat(o,10)),e.value>o}Gt(EU,SMe,{name:kb,inputsCount:1,showOperators:!0});function CMe(e,t){return EMe(e)||RMe(e,t)||OMe(e,t)||_Me()}function _Me(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OMe(e,t){if(e){if(typeof e=="string")return WD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return WD(e,t)}}function WD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function RMe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function EMe(e){if(Array.isArray(e))return e}var TU="gte";function TMe(e,t){var r=CMe(t,1),n=r[0],o=n;return e.meta.type==="numeric"&&(o=parseFloat(o,10)),e.value>=o}Gt(TU,TMe,{name:$b,inputsCount:1,showOperators:!0});function PMe(e,t){return IMe(e)||AMe(e,t)||$Me(e,t)||kMe()}function kMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $Me(e,t){if(e){if(typeof e=="string")return UD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return UD(e,t)}}function UD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function AMe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function IMe(e){if(Array.isArray(e))return e}var PU="lt";function MMe(e,t){var r=PMe(t,1),n=r[0],o=n;return e.meta.type==="numeric"&&(o=parseFloat(o,10)),e.value<o}Gt(PU,MMe,{name:Ab,inputsCount:1,showOperators:!0});function xMe(e,t){return LMe(e)||HMe(e,t)||NMe(e,t)||DMe()}function DMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NMe(e,t){if(e){if(typeof e=="string")return zD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zD(e,t)}}function zD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function HMe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function LMe(e){if(Array.isArray(e))return e}var kU="lte";function jMe(e,t){var r=xMe(t,1),n=r[0],o=n;return e.meta.type==="numeric"&&(o=parseFloat(o,10)),e.value<=o}Gt(kU,jMe,{name:Ib,inputsCount:1,showOperators:!0});function BMe(e,t){return UMe(e)||WMe(e,t)||VMe(e,t)||FMe()}function FMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VMe(e,t){if(e){if(typeof e=="string")return YD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return YD(e,t)}}function YD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function WMe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function UMe(e){if(Array.isArray(e))return e}var _P="date_after";function zMe(e,t){var r=BMe(t,1),n=r[0],o=re(e.value,e.meta.dateFormat),i=re(n,e.meta.dateFormat);return!o.isValid()||!i.isValid()?!1:o.diff(i)>=0}Gt(_P,zMe,{name:Db,inputsCount:1,showOperators:!0});function YMe(e,t){return qMe(e)||XMe(e,t)||KMe(e,t)||GMe()}function GMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KMe(e,t){if(e){if(typeof e=="string")return GD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return GD(e,t)}}function GD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function XMe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function qMe(e){if(Array.isArray(e))return e}var OP="date_before";function ZMe(e,t){var r=YMe(t,1),n=r[0],o=re(e.value,e.meta.dateFormat),i=re(n,e.meta.dateFormat);return!o.isValid()||!i.isValid()?!1:o.diff(i)<=0}Gt(OP,ZMe,{name:Nb,inputsCount:1,showOperators:!0});function QMe(e,t){return rxe(e)||txe(e,t)||exe(e,t)||JMe()}function JMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function exe(e,t){if(e){if(typeof e=="string")return KD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return KD(e,t)}}function KD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function txe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function rxe(e){if(Array.isArray(e))return e}var $g="between";function nxe(e,t){var r=QMe(t,2),n=r[0],o=r[1],i=n,a=o;if(e.meta.type==="numeric"){var l=parseFloat(i,10),s=parseFloat(a,10);i=Math.min(l,s),a=Math.max(l,s)}else if(e.meta.type==="date"){var u=Ci(OP,[a]),f=Ci(_P,[i]);return u(e)&&f(e)}return e.value>=i&&e.value<=a}Gt($g,nxe,{name:Mb,inputsCount:2,showOperators:!0});var $U="not_between";function oxe(e,t){return!Ci($g,t)(e)}Gt($U,oxe,{name:xb,inputsCount:2,showOperators:!0});function ixe(e,t){return uxe(e)||sxe(e,t)||lxe(e,t)||axe()}function axe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lxe(e,t){if(e){if(typeof e=="string")return XD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return XD(e,t)}}function XD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function sxe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function uxe(e){if(Array.isArray(e))return e}var AU="begins_with";function fxe(e,t){var r=ixe(t,1),n=r[0];return Mt(e.value).toLocaleLowerCase(e.meta.locale).startsWith(Mt(n))}Gt(AU,fxe,{name:Rb,inputsCount:1,showOperators:!0});var cxe=xe,IU=Yd,hxe=Hn.f,dxe=Ua,qD=Yt,vxe=jE,yxe=Tr,pxe=BE,ZD=IU("".endsWith),gxe=IU("".slice),mxe=Math.min,MU=pxe("endsWith"),bxe=!MU&&!!function(){var e=hxe(String.prototype,"endsWith");return e&&!e.writable}();cxe({target:"String",proto:!0,forced:!bxe&&!MU},{endsWith:function(t){var r=qD(yxe(this));vxe(t);var n=arguments.length>1?arguments[1]:void 0,o=r.length,i=n===void 0?o:mxe(dxe(n),o),a=qD(t);return ZD?ZD(r,a,i):gxe(r,i-a.length,i)===a}});function wxe(e,t){return Oxe(e)||_xe(e,t)||Cxe(e,t)||Sxe()}function Sxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cxe(e,t){if(e){if(typeof e=="string")return QD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return QD(e,t)}}function QD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _xe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function Oxe(e){if(Array.isArray(e))return e}var xU="ends_with";function Rxe(e,t){var r=wxe(t,1),n=r[0];return Mt(e.value).toLocaleLowerCase(e.meta.locale).endsWith(Mt(n))}Gt(xU,Rxe,{name:Eb,inputsCount:1,showOperators:!0});function Exe(e,t){return $xe(e)||kxe(e,t)||Pxe(e,t)||Txe()}function Txe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pxe(e,t){if(e){if(typeof e=="string")return JD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return JD(e,t)}}function JD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function kxe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function $xe(e){if(Array.isArray(e))return e}var RP="contains";function Axe(e,t){var r=Exe(t,1),n=r[0];return Mt(e.value).toLocaleLowerCase(e.meta.locale).indexOf(Mt(n))>=0}Gt(RP,Axe,{name:Tb,inputsCount:1,showOperators:!0});var DU="not_contains";function Ixe(e,t){return!Ci(RP,t)(e)}Gt(DU,Ixe,{name:Pb,inputsCount:1,showOperators:!0});var NU="date_tomorrow";function Mxe(e){var t=re(e.value,e.meta.dateFormat);return t.isValid()?t.isSame(re().subtract(-1,"days").startOf("day"),"d"):!1}Gt(NU,Mxe,{name:Lb,inputsCount:0});var HU="date_today";function xxe(e){var t=re(e.value,e.meta.dateFormat);return t.isValid()?t.isSame(re().startOf("day"),"d"):!1}Gt(HU,xxe,{name:Hb,inputsCount:0});var LU="date_yesterday";function Dxe(e){var t=re(e.value,e.meta.dateFormat);return t.isValid()?t.isSame(re().subtract(1,"days").startOf("day"),"d"):!1}Gt(LU,Dxe,{name:jb,inputsCount:0});VB();function Nxe(e,t){var r=e;return r===""&&(r="(".concat(t,")")),r}var BR=new Set([1]).has(1),Hxe=BR&&typeof Array.from=="function";function Rv(e){var t=e;return BR&&(t=new Set(t)),function(r){var n;return BR?n=t.has(r):n=!!~t.indexOf(r),n}}function jU(e){return e??""}function FR(e){var t=e;return Hxe?t=Array.from(new Set(t)):t=YE(t),t=t.sort(function(r,n){return typeof r=="number"&&typeof n=="number"?r-n:r===n?0:r>n?1:-1}),t}function eN(e,t,r,n){var o=[],i=e===t,a;return i||(a=Rv(t)),$(e,function(l){var s=!1;(i||a(l))&&(s=!0);var u={checked:s,value:l,visualValue:Nxe(l,r)};n&&n(u),o.push(u)}),o}function BU(e,t){return Fxe(e)||Bxe(e,t)||jxe(e,t)||Lxe()}function Lxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jxe(e,t){if(e){if(typeof e=="string")return tN(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tN(e,t)}}function tN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Bxe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function Fxe(e){if(Array.isArray(e))return e}var ua="by_value";function Vxe(e,t){var r=BU(t,1),n=r[0];return n(e.value)}Gt(ua,Vxe,{name:"By value",inputsCount:0,inputValuesDecorator:function(t){var r=BU(t,1),n=r[0];return[Rv(n)]},showOperators:!1});var cd={};function Wxe(e){if(!cd[e])throw Error('Operation with id "'.concat(e,'" does not exist.'));var t=cd[e].func;return function(r,n){return t(r,n)}}function Uxe(e){return cd[e].name}function EP(e,t,r){cd[e]={name:t,func:r}}var fi="conjunction",zxe=Vb;function Yxe(e,t){return e.every(function(r){return r.func(t)})}EP(fi,zxe,Yxe);var Ag="disjunction",Gxe=gv;function Kxe(e,t){return e.some(function(r){return r.func(t)})}EP(Ag,Gxe,Kxe);var TP="disjunctionWithExtraCondition",Xxe=gv;function qxe(e,t){if(e.length<3)throw Error("Operation doesn't work on less then three conditions.");return e.slice(0,e.length-1).some(function(r){return r.func(t)})&&e[e.length-1].func(t)}EP(TP,Xxe,qxe);function hd(e){return hd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hd(e)}var Yf;function vC(e,t,r){return t=Zxe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zxe(e){var t=Qxe(e,"string");return hd(t)==="symbol"?t:String(t)}function Qxe(e,t){if(hd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jxe="numeric",FU="text",eDe="date",rN=(Yf={},vC(Yf,Jxe,[er,Ke,_c,sp,Ke,Oc,up,Ke,EU,TU,PU,kU,$g,$U]),vC(Yf,FU,[er,Ke,_c,sp,Ke,Oc,up,Ke,AU,xU,Ke,RP,DU]),vC(Yf,eDe,[er,Ke,_c,sp,Ke,Oc,up,Ke,OP,_P,$g,Ke,NU,HU,LU]),Yf);function tDe(e){var t=[],r=e;return rN[r]||(r=FU),$(rN[r],function(n){var o;n===Ke?o={name:Ke}:o=pr(sa(n)),t.push(o)}),t}function dd(e){return dd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dd(e)}function rDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nN(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,oDe(n.key),n)}}function nDe(e,t,r){return t&&nN(e.prototype,t),r&&nN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function oDe(e){var t=iDe(e,"string");return dd(t)==="symbol"?t:String(t)}function iDe(e,t){if(dd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(dd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yC="built",pC="building",oN=["click","input","keydown","keypress","keyup","focus","blur","change"],VU=function(){function e(t,r){rDe(this,e),this.hot=t,this.eventManager=new Pt(this),this.options=Wt(e.DEFAULTS,r),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName),this.buildState=null}return nDe(e,[{key:"setValue",value:function(r){this.options.value=r,this.update()}},{key:"getValue",value:function(){return this.options.value}},{key:"element",get:function(){return this.buildState===pC?this._element:this.buildState===yC?(this.update(),this._element):(this.buildState=pC,this.build(),this.buildState=yC,this._element)}},{key:"isBuilt",value:function(){return this.buildState===yC}},{key:"translateIfPossible",value:function(r){return typeof r=="string"&&r.startsWith(br)?this.hot.getTranslatedPhrase(r):r}},{key:"build",value:function(){var r=this,n=function(a,l){r.eventManager.addEventListener(a,l,function(s){return r.runLocalHooks(l,s,r)})};if(this.buildState||(this.buildState=pC),this.options.className&&te(this._element,this.options.className),this.options.children.length)$(this.options.children,function(i){return r._element.appendChild(i.element)});else if(this.options.wrapIt){var o=this.hot.rootDocument.createElement(this.options.tagName);ze(this.options,function(i,a){o[a]!==void 0&&a!=="className"&&a!=="tagName"&&a!=="children"&&(o[a]=r.translateIfPossible(i))}),this._element.appendChild(o),$(oN,function(i){return n(o,i)})}else $(oN,function(i){return n(r._element,i)})}},{key:"update",value:function(){}},{key:"reset",value:function(){this.options.value="",this.update()}},{key:"show",value:function(){this.element.style.display=""}},{key:"hide",value:function(){this.element.style.display="none"}},{key:"focus",value:function(){}},{key:"destroy",value:function(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}}],[{key:"DEFAULTS",get:function(){return pr({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}}]),e}();mt(VU,kr);const ci=VU;function gu(e){return gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gu(e)}function aDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iN(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,sDe(n.key),n)}}function lDe(e,t,r){return t&&iN(e.prototype,t),r&&iN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function sDe(e){var t=uDe(e,"string");return gu(t)==="symbol"?t:String(t)}function uDe(e,t){if(gu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fp(){return typeof Reflect<"u"&&Reflect.get?fp=Reflect.get.bind():fp=function(t,r,n){var o=fDe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},fp.apply(this,arguments)}function fDe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=mu(e),e!==null););return e}function cDe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&VR(e,t)}function VR(e,t){return VR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},VR(e,t)}function hDe(e){var t=vDe();return function(){var n=mu(e),o;if(t){var i=mu(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return dDe(this,o)}}function dDe(e,t){if(t&&(gu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return WU(e)}function WU(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vDe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mu(e){return mu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mu(e)}var wy=new WeakMap,yDe=function(e){cDe(r,e);var t=hDe(r);function r(n,o){var i;return aDe(this,r),i=t.call(this,n,Wt(r.DEFAULTS,o)),wy.set(WU(i),{}),i.registerHooks(),i}return lDe(r,[{key:"registerHooks",value:function(){var o=this;this.addLocalHook("click",function(){return o.onClick()}),this.addLocalHook("keyup",function(i){return o.onKeyup(i)})}},{key:"build",value:function(){fp(mu(r.prototype),"build",this).call(this);var o=wy.get(this),i=this.hot.rootDocument.createElement("div");o.input=this._element.firstChild,te(this._element,"htUIInput"),te(i,"htUIInputIcon"),this._element.appendChild(i),this.update()}},{key:"update",value:function(){if(this.isBuilt()){var o=wy.get(this).input;o.type=this.options.type,o.placeholder=this.translateIfPossible(this.options.placeholder),o.value=this.translateIfPossible(this.options.value)}}},{key:"focus",value:function(){this.isBuilt()&&wy.get(this).input.focus()}},{key:"onClick",value:function(){}},{key:"onKeyup",value:function(o){this.options.value=o.target.value}}],[{key:"DEFAULTS",get:function(){return pr({placeholder:"",type:"text",tagName:"input"})}}]),r}(ci);const Gl=yDe;function bu(e){return bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bu(e)}function pDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aN(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,mDe(n.key),n)}}function gDe(e,t,r){return t&&aN(e.prototype,t),r&&aN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function mDe(e){var t=bDe(e,"string");return bu(t)==="symbol"?t:String(t)}function bDe(e,t){if(bu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(bu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kl(){return typeof Reflect<"u"&&Reflect.get?Kl=Reflect.get.bind():Kl=function(t,r,n){var o=wDe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Kl.apply(this,arguments)}function wDe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=hi(e),e!==null););return e}function SDe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&WR(e,t)}function WR(e,t){return WR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},WR(e,t)}function CDe(e){var t=ODe();return function(){var n=hi(e),o;if(t){var i=hi(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return _De(this,o)}}function _De(e,t){if(t&&(bu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UU(e)}function UU(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ODe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hi(e){return hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hi(e)}var Sy=new WeakMap,RDe=function(e){SDe(r,e);var t=CDe(r);function r(n,o){var i;return pDe(this,r),i=t.call(this,n,Wt(r.DEFAULTS,o)),Sy.set(UU(i),{}),i.menu=null,i.items=[],i.registerHooks(),i}return gDe(r,[{key:"registerHooks",value:function(){var o=this;this.addLocalHook("click",function(){return o.onClick()})}},{key:"setItems",value:function(o){this.items=this.translateNames(o),this.menu&&this.menu.setMenuItems(this.items)}},{key:"translateNames",value:function(o){var i=this;return $(o,function(a){a.name=i.translateIfPossible(a.name)}),o}},{key:"build",value:function(){var o=this;Kl(hi(r.prototype),"build",this).call(this),this.menu=new SP(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer}),this.menu.setMenuItems(this.items);var i=new ci(this.hot,{className:"htUISelectCaption"}),a=new ci(this.hot,{className:"htUISelectDropdown"}),l=Sy.get(this);l.caption=i,l.captionElement=i.element,l.dropdown=a,$([i,a],function(s){return o._element.appendChild(s.element)}),this.menu.addLocalHook("select",function(s){return o.onMenuSelect(s)}),this.menu.addLocalHook("afterClose",function(){return o.onMenuClosed()}),this.update()}},{key:"update",value:function(){if(this.isBuilt()){var o;this.options.value?o=this.options.value.name:o=this.menu.hot.getTranslatedPhrase(pv),Sy.get(this).captionElement.textContent=o,Kl(hi(r.prototype),"update",this).call(this)}}},{key:"openOptions",value:function(){var o=this.element.getBoundingClientRect();this.menu&&(this.menu.open(),this.menu.setPosition({left:this.hot.isLtr()?o.left-5:o.left-31,top:o.top-1,width:o.width,height:o.height}))}},{key:"closeOptions",value:function(){this.menu&&this.menu.close()}},{key:"onMenuSelect",value:function(o){o.name!==Ke&&(this.options.value=o,this.update(),this.runLocalHooks("select",this.options.value))}},{key:"onMenuClosed",value:function(){this.runLocalHooks("afterClose")}},{key:"onClick",value:function(){this.openOptions()}},{key:"destroy",value:function(){this.menu&&(this.menu.destroy(),this.menu=null);var o=Sy.get(this),i=o.caption,a=o.dropdown;i&&i.destroy(),a&&a.destroy(),Kl(hi(r.prototype),"destroy",this).call(this)}}],[{key:"DEFAULTS",get:function(){return pr({className:"htUISelect",wrapIt:!1})}}]),r}(ci);const lN=RDe;function wu(e){return wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wu(e)}function EDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sN(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,PDe(n.key),n)}}function TDe(e,t,r){return t&&sN(e.prototype,t),r&&sN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function PDe(e){var t=kDe(e,"string");return wu(t)==="symbol"?t:String(t)}function kDe(e,t){if(wu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(wu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cp(){return typeof Reflect<"u"&&Reflect.get?cp=Reflect.get.bind():cp=function(t,r,n){var o=$De(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},cp.apply(this,arguments)}function $De(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Su(e),e!==null););return e}function ADe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&UR(e,t)}function UR(e,t){return UR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},UR(e,t)}function IDe(e){var t=DDe();return function(){var n=Su(e),o;if(t){var i=Su(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return MDe(this,o)}}function MDe(e,t){if(t&&(wu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xDe(e)}function xDe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DDe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Su(e){return Su=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Su(e)}var NDe=function(e){ADe(r,e);var t=IDe(r);function r(n,o){var i;return EDe(this,r),i=t.call(this,n,{id:o.id,stateless:!1}),i.name=o.name,i.addSeparator=o.addSeparator,i.elements.push(new lN(i.hot,{menuContainer:o.menuContainer})),i.elements.push(new Gl(i.hot,{placeholder:Kb})),i.elements.push(new Gl(i.hot,{placeholder:Xb})),i.registerHooks(),i}return TDe(r,[{key:"registerHooks",value:function(){var o=this;this.getSelectElement().addLocalHook("select",function(i){return o.onConditionSelect(i)}),this.getSelectElement().addLocalHook("afterClose",function(){return o.onSelectUIClosed()}),$(this.getInputElements(),function(i){i.addLocalHook("keydown",function(a){return o.onInputKeyDown(a)})})}},{key:"setState",value:function(o){var i=this;if(this.reset(),!!o){var a=pr(o.command);a.name.startsWith(Dt)&&(a.name=this.hot.getTranslatedPhrase(a.name)),this.getSelectElement().setValue(a),$(o.args,function(l,s){if(s>a.inputsCount-1)return!1;var u=i.getInputElement(s);u.setValue(l),u[a.inputsCount>s?"show":"hide"](),s||setTimeout(function(){return u.focus()},10)})}}},{key:"getState",value:function(){var o=this.getSelectElement().getValue()||sa(er),i=[];return $(this.getInputElements(),function(a,l){o.inputsCount>l&&i.push(a.getValue())}),{command:o,args:i}}},{key:"updateState",value:function(o,i){var a=sa(o?o.name:er);this.state.setValueAtIndex(i,{command:a,args:o?o.args:[]}),o||$(this.getInputElements(),function(l){return l.setValue(null)})}},{key:"getSelectElement",value:function(){return this.elements.filter(function(o){return o instanceof lN})[0]}},{key:"getInputElement",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.getInputElements()[o]}},{key:"getInputElements",value:function(){return this.elements.filter(function(o){return o instanceof Gl})}},{key:"getMenuItemDescriptor",value:function(){var o=this;return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:function(){return o.isHidden()},renderer:function(a,l,s,u,f,c){te(l.parentNode,"htFiltersMenuCondition"),o.addSeparator&&te(l.parentNode,"border");var h=o.hot.rootDocument.createElement("div");return te(h,"htFiltersMenuLabel"),h.textContent=c,l.appendChild(h),l.parentNode.hasAttribute("ghost-table")||$(o.elements,function(d){return l.appendChild(d.element)}),l}}}},{key:"reset",value:function(){var o=this.hot.getPlugin("filters").getSelectedColumn(),i=[sa(er)];if(o!==null){var a=o.visualIndex;i=tDe(this.hot.getDataType(0,a,this.hot.countRows(),a))}$(this.getInputElements(),function(l){return l.hide()}),this.getSelectElement().setItems(i),cp(Su(r.prototype),"reset",this).call(this),this.getSelectElement().setValue(i[0])}},{key:"onConditionSelect",value:function(o){$(this.getInputElements(),function(i,a){i[o.inputsCount>a?"show":"hide"](),a===0&&setTimeout(function(){return i.focus()},10)}),this.runLocalHooks("change",o)}},{key:"onSelectUIClosed",value:function(){this.runLocalHooks("afterClose")}},{key:"onInputKeyDown",value:function(o){ls(o.keyCode,"ENTER")?(this.runLocalHooks("accept"),gn(o)):ls(o.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),gn(o))}}]),r}(cw);const gC=NDe;function Cu(e){return Cu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cu(e)}function HDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uN(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,jDe(n.key),n)}}function LDe(e,t,r){return t&&uN(e.prototype,t),r&&uN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function jDe(e){var t=BDe(e,"string");return Cu(t)==="symbol"?t:String(t)}function BDe(e,t){if(Cu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Cu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hp(){return typeof Reflect<"u"&&Reflect.get?hp=Reflect.get.bind():hp=function(t,r,n){var o=FDe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},hp.apply(this,arguments)}function FDe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=_u(e),e!==null););return e}function VDe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zR(e,t)}function zR(e,t){return zR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},zR(e,t)}function WDe(e){var t=zDe();return function(){var n=_u(e),o;if(t){var i=_u(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return UDe(this,o)}}function UDe(e,t){if(t&&(Cu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zU(e)}function zU(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zDe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _u(e){return _u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_u(e)}var Cy=new WeakMap,YDe=function(e){VDe(r,e);var t=WDe(r);function r(n,o){var i;return HDe(this,r),i=t.call(this,n,Wt(r.DEFAULTS,o)),Cy.set(zU(i),{}),i}return LDe(r,[{key:"build",value:function(){hp(_u(r.prototype),"build",this).call(this);var o=Cy.get(this);o.input=this._element.firstChild;var i=this.hot.rootDocument.createElement("label");i.textContent=this.translateIfPossible(this.options.label.textContent),i.htmlFor=this.translateIfPossible(this.options.label.htmlFor),o.label=i,this._element.appendChild(i),this.update()}},{key:"update",value:function(){if(this.isBuilt()){var o=Cy.get(this);o.input.checked=this.options.checked,o.label.textContent=this.translateIfPossible(this.options.label.textContent)}}},{key:"isChecked",value:function(){return this.options.checked}},{key:"setChecked",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.options.checked=o,this.update()}},{key:"focus",value:function(){this.isBuilt()&&Cy.get(this).input.focus()}}],[{key:"DEFAULTS",get:function(){return pr({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}}]),r}(ci);const fN=YDe;function Ou(e){return Ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ou(e)}var cN;function GDe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function KDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hN(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,qDe(n.key),n)}}function XDe(e,t,r){return t&&hN(e.prototype,t),r&&hN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qDe(e){var t=ZDe(e,"string");return Ou(t)==="symbol"?t:String(t)}function ZDe(e,t){if(Ou(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ou(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QDe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YR(e,t)}function YR(e,t){return YR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},YR(e,t)}function JDe(e){var t=rNe();return function(){var n=Ig(e),o;if(t){var i=Ig(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return eNe(this,o)}}function eNe(e,t){if(t&&(Ou(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tNe(e)}function tNe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rNe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ig(e){return Ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ig(e)}var dN=0,nNe=function(e){QDe(r,e);var t=JDe(r);function r(n,o){var i;return KDe(this,r),i=t.call(this,n,{id:o.id,stateless:!1}),i.name=o.name,i.buildOperatorsElement(),i}return XDe(r,[{key:"getMenuItemDescriptor",value:function(){var o=this;return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:function(){return o.isHidden()},renderer:function(a,l){return te(l.parentNode,"htFiltersMenuOperators"),l.parentNode.hasAttribute("ghost-table")||$(o.elements,function(s){return l.appendChild(s.element)}),l}}}},{key:"buildOperatorsElement",value:function(){var o=this,i=[fi,Ag];$(i,function(a){var l=new fN(o.hot,{name:"operator",label:{htmlFor:a,textContent:Uxe(a)},value:a,checked:a===i[dN],id:a});l.addLocalHook("change",function(s){return o.onRadioInputChange(s)}),o.elements.push(l)})}},{key:"setChecked",value:function(o){if(this.elements.length<o)throw Error(dt(cN||(cN=GDe(["Radio button with index "," doesn't exist."])),o));$(this.elements,function(i,a){i.setChecked(a===o)})}},{key:"getActiveOperationId",value:function(){var o=this.elements.find(function(i){return i instanceof fN&&i.isChecked()});return o?o.getValue():fi}},{key:"getState",value:function(){return this.getActiveOperationId()}},{key:"setState",value:function(o){this.reset(),o&&this.getActiveOperationId()!==o&&$(this.elements,function(i){i.setChecked(i.getValue()===o)})}},{key:"updateState",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fi,i=arguments.length>1?arguments[1]:void 0,a=o;a===TP&&(a=Ag),this.state.setValueAtIndex(i,a)}},{key:"reset",value:function(){this.setChecked(dN)}},{key:"onRadioInputChange",value:function(o){this.setState(o.target.value)}}]),r}(cw);const oNe=nNe;var iNe=Ye,aNe=Tr,vN=Yt,lNe=/"/g,sNe=iNe("".replace),uNe=function(e,t,r,n){var o=vN(aNe(e)),i="<"+t;return r!==""&&(i+=" "+r+'="'+sNe(vN(n),lNe,"&quot;")+'"'),i+">"+o+"</"+t+">"},fNe=Fe,cNe=function(e){return fNe(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})},hNe=xe,dNe=uNe,vNe=cNe;hNe({target:"String",proto:!0,forced:vNe("link")},{link:function(t){return dNe(this,"a","href",t)}});function Ru(e){return Ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ru(e)}function yNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yN(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,gNe(n.key),n)}}function pNe(e,t,r){return t&&yN(e.prototype,t),r&&yN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function gNe(e){var t=mNe(e,"string");return Ru(t)==="symbol"?t:String(t)}function mNe(e,t){if(Ru(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ru(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dp(){return typeof Reflect<"u"&&Reflect.get?dp=Reflect.get.bind():dp=function(t,r,n){var o=bNe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},dp.apply(this,arguments)}function bNe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Eu(e),e!==null););return e}function wNe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&GR(e,t)}function GR(e,t){return GR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},GR(e,t)}function SNe(e){var t=_Ne();return function(){var n=Eu(e),o;if(t){var i=Eu(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return CNe(this,o)}}function CNe(e,t){if(t&&(Ru(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return YU(e)}function YU(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _Ne(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Eu(e){return Eu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Eu(e)}var mC=new WeakMap,ONe=function(e){wNe(r,e);var t=SNe(r);function r(n,o){var i;return yNe(this,r),i=t.call(this,n,Wt(r.DEFAULTS,o)),mC.set(YU(i),{}),i}return pNe(r,[{key:"build",value:function(){dp(Eu(r.prototype),"build",this).call(this);var o=mC.get(this);o.link=this._element.firstChild}},{key:"update",value:function(){this.isBuilt()&&(mC.get(this).link.textContent=this.translateIfPossible(this.options.textContent))}}],[{key:"DEFAULTS",get:function(){return pr({href:"#",tagName:"a"})}}]),r}(ci);const pN=ONe;function Tu(e){return Tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tu(e)}function gN(e){return PNe(e)||TNe(e)||ENe(e)||RNe()}function RNe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ENe(e,t){if(e){if(typeof e=="string")return KR(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return KR(e,t)}}function TNe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PNe(e){if(Array.isArray(e))return KR(e)}function KR(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function kNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mN(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,ANe(n.key),n)}}function $Ne(e,t,r){return t&&mN(e.prototype,t),r&&mN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ANe(e){var t=INe(e,"string");return Tu(t)==="symbol"?t:String(t)}function INe(e,t){if(Tu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Tu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xl(){return typeof Reflect<"u"&&Reflect.get?Xl=Reflect.get.bind():Xl=function(t,r,n){var o=MNe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Xl.apply(this,arguments)}function MNe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=di(e),e!==null););return e}function xNe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&XR(e,t)}function XR(e,t){return XR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},XR(e,t)}function DNe(e){var t=HNe();return function(){var n=di(e),o;if(t){var i=di(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return NNe(this,o)}}function NNe(e,t){if(t&&(Tu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GU(e)}function GU(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HNe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function di(e){return di=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},di(e)}var LNe=new WeakMap,jNe="multipleSelect.itemBox",BNe=function(e){xNe(r,e);var t=DNe(r);function r(n,o){var i;return kNe(this,r),i=t.call(this,n,Wt(r.DEFAULTS,o)),LNe.set(GU(i),{}),i.searchInput=new Gl(i.hot,{placeholder:Gb,className:"htUIMultipleSelectSearch"}),i.selectAllUI=new pN(i.hot,{textContent:Wb,className:"htUISelectAll"}),i.clearAllUI=new pN(i.hot,{textContent:Ub,className:"htUIClearAll"}),i.items=[],i.itemsBox=null,i.registerHooks(),i}return $Ne(r,[{key:"registerHooks",value:function(){var o=this;this.searchInput.addLocalHook("keydown",function(i){return o.onInputKeyDown(i)}),this.searchInput.addLocalHook("input",function(i){return o.onInput(i)}),this.selectAllUI.addLocalHook("click",function(i){return o.onSelectAllClick(i)}),this.clearAllUI.addLocalHook("click",function(i){return o.onClearAllClick(i)})}},{key:"setItems",value:function(o){this.items=o,this.itemsBox&&this.itemsBox.loadData(this.items)}},{key:"setLocale",value:function(o){this.locale=o}},{key:"getLocale",value:function(){return this.locale}},{key:"getItems",value:function(){return gN(this.items)}},{key:"getValue",value:function(){return VNe(this.items)}},{key:"isSelectedAllValues",value:function(){return this.items.length===this.getValue().length}},{key:"build",value:function(){var o=this;Xl(di(r.prototype),"build",this).call(this);var i=this.hot.rootDocument,a=i.createElement("div"),l=new ci(this.hot,{className:"htUISelectionControls",children:[this.selectAllUI,this.clearAllUI]});this._element.appendChild(this.searchInput.element),this._element.appendChild(l.element),this._element.appendChild(a);var s=function(f){if(o._element){o.itemsBox&&o.itemsBox.destroy(),te(f,"htUIMultipleSelectHot"),o.itemsBox=new o.hot.constructor(f,{data:o.items,columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:function(v,p,m,w,S,C){v.title=C.instance.getDataAtRowProp(p,C.label.property)},maxCols:1,autoWrapCol:!0,height:110,colWidths:function(){return o.itemsBox.container.scrollWidth-Zt(i)},copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},layoutDirection:o.hot.isRtl()?"rtl":"ltr"}),o.itemsBox.init();var c=o.itemsBox.getShortcutManager(),h=c.getContext("grid");h.addShortcut({keys:[["Escape"]],callback:function(v){o.runLocalHooks("keydown",v,o)},group:jNe})}};s(a),setTimeout(function(){return s(a)},100)}},{key:"reset",value:function(){this.searchInput.reset(),this.selectAllUI.reset(),this.clearAllUI.reset()}},{key:"update",value:function(){this.isBuilt()&&(this.itemsBox.loadData(FNe(this.items,this.options.value)),Xl(di(r.prototype),"update",this).call(this))}},{key:"destroy",value:function(){this.itemsBox&&this.itemsBox.destroy(),this.searchInput.destroy(),this.clearAllUI.destroy(),this.selectAllUI.destroy(),this.searchInput=null,this.clearAllUI=null,this.selectAllUI=null,this.itemsBox=null,this.items=null,Xl(di(r.prototype),"destroy",this).call(this)}},{key:"onInput",value:function(o){var i=this,a=o.target.value.toLocaleLowerCase(this.getLocale()),l;a===""?l=gN(this.items):l=jr(this.items,function(s){return"".concat(s.value).toLocaleLowerCase(i.getLocale()).indexOf(a)>=0}),this.itemsBox.loadData(l)}},{key:"onInputKeyDown",value:function(o){this.runLocalHooks("keydown",o,this);var i=OT(ls,o.keyCode);i("ARROW_DOWN|TAB")&&!this.itemsBox.isListening()&&(gn(o),this.itemsBox.listen(),this.itemsBox.selectCell(0,0))}},{key:"onSelectAllClick",value:function(o){var i=[];o.preventDefault(),$(this.itemsBox.getSourceData(),function(a,l){a.checked=!0,i.push(PO(a,l)[0])}),this.itemsBox.setSourceDataAtCell(i)}},{key:"onClearAllClick",value:function(o){var i=[];o.preventDefault(),$(this.itemsBox.getSourceData(),function(a,l){a.checked=!1,i.push(PO(a,l)[0])}),this.itemsBox.setSourceDataAtCell(i)}}],[{key:"DEFAULTS",get:function(){return pr({className:"htUIMultipleSelect",value:[]})}}]),r}(ci);const bN=BNe;function FNe(e,t){var r=Rv(t);return We(e,function(n){return n.checked=r(n.value),n})}function VNe(e){var t=[];return $(e,function(r){r.checked&&t.push(r.value)}),t}function Pu(e){return Pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pu(e)}function WNe(e,t){return GNe(e)||YNe(e,t)||zNe(e,t)||UNe()}function UNe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zNe(e,t){if(e){if(typeof e=="string")return wN(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wN(e,t)}}function wN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function YNe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function GNe(e){if(Array.isArray(e))return e}function KNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SN(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,qNe(n.key),n)}}function XNe(e,t,r){return t&&SN(e.prototype,t),r&&SN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qNe(e){var t=ZNe(e,"string");return Pu(t)==="symbol"?t:String(t)}function ZNe(e,t){if(Pu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Pu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vp(){return typeof Reflect<"u"&&Reflect.get?vp=Reflect.get.bind():vp=function(t,r,n){var o=QNe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},vp.apply(this,arguments)}function QNe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=ku(e),e!==null););return e}function JNe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qR(e,t)}function qR(e,t){return qR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},qR(e,t)}function eHe(e){var t=nHe();return function(){var n=ku(e),o;if(t){var i=ku(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return tHe(this,o)}}function tHe(e,t){if(t&&(Pu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rHe(e)}function rHe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nHe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ku(e){return ku=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ku(e)}var oHe=function(e){JNe(r,e);var t=eHe(r);function r(n,o){var i;return KNe(this,r),i=t.call(this,n,{id:o.id,stateless:!1}),i.name=o.name,i.elements.push(new bN(i.hot)),i.registerHooks(),i}return XNe(r,[{key:"registerHooks",value:function(){var o=this;this.getMultipleSelectElement().addLocalHook("keydown",function(i){return o.onInputKeyDown(i)})}},{key:"setState",value:function(o){if(this.reset(),o&&o.command.key===ua){var i=this.getMultipleSelectElement();i.setItems(o.itemsSnapshot),i.setValue(o.args[0]),i.setLocale(o.locale)}}},{key:"getState",value:function(){var o=this.getMultipleSelectElement(),i=o.getItems();return{command:{key:o.isSelectedAllValues()||!i.length?er:ua},args:[o.getValue()],itemsSnapshot:i}}},{key:"updateState",value:function(o){var i=this,a=function(s,u,f,c,h){var d=jr(u,function(W){return W.name===ua}),v=WNe(d,1),p=v[0],m={},w=i.hot.getTranslatedPhrase(wh);if(p){var S=FR(We(c(s,h),function(W){return W.value}));f&&(p.args[0]=f);var C=[],P=eN(S,p.args[0],w,function(W){W.checked&&C.push(W.value)}),R=o.editedConditionStack.column;m.locale=i.hot.getCellMeta(0,R).locale,m.args=[C],m.command=sa(ua),m.itemsSnapshot=P}else m.args=[],m.command=sa(er);i.state.setValueAtIndex(s,m)};a(o.editedConditionStack.column,o.editedConditionStack.conditions,o.conditionArgsChange,o.filteredRowsFactory),o.dependentConditionStacks.length&&a(o.dependentConditionStacks[0].column,o.dependentConditionStacks[0].conditions,o.conditionArgsChange,o.filteredRowsFactory,o.editedConditionStack)}},{key:"getMultipleSelectElement",value:function(){return this.elements.filter(function(o){return o instanceof bN})[0]}},{key:"getMenuItemDescriptor",value:function(){var o=this;return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:function(){return o.isHidden()},renderer:function(a,l,s,u,f,c){te(l.parentNode,"htFiltersMenuValue");var h=o.hot.rootDocument.createElement("div");return te(h,"htFiltersMenuLabel"),h.textContent=c,l.appendChild(h),l.parentNode.hasAttribute("ghost-table")||$(o.elements,function(d){return l.appendChild(d.element)}),l}}}},{key:"reset",value:function(){var o=this.hot.getTranslatedPhrase(wh),i=FR(this._getColumnVisibleValues()),a=eN(i,i,o);this.getMultipleSelectElement().setItems(a),vp(ku(r.prototype),"reset",this).call(this),this.getMultipleSelectElement().setValue(i);var l=this.hot.getPlugin("filters").getSelectedColumn();l!==null&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,l.visualIndex).locale)}},{key:"onInputKeyDown",value:function(o){ls(o.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),gn(o))}},{key:"_getColumnVisibleValues",value:function(){var o=this.hot.getPlugin("filters").getSelectedColumn();return o===null?[]:We(this.hot.getDataAtCol(o.visualIndex),function(i){return jU(i)})}}]),r}(cw);const iHe=oHe;function $u(e){return $u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(e)}function aHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CN(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,sHe(n.key),n)}}function lHe(e,t,r){return t&&CN(e.prototype,t),r&&CN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function sHe(e){var t=uHe(e,"string");return $u(t)==="symbol"?t:String(t)}function uHe(e,t){if($u(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if($u(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fHe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ZR(e,t)}function ZR(e,t){return ZR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},ZR(e,t)}function cHe(e){var t=vHe();return function(){var n=Mg(e),o;if(t){var i=Mg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return hHe(this,o)}}function hHe(e,t){if(t&&($u(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dHe(e)}function dHe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vHe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mg(e){return Mg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Mg(e)}var yHe=function(e){fHe(r,e);var t=cHe(r);function r(n,o){var i;return aHe(this,r),i=t.call(this,n,{id:o.id,stateless:!0}),i.name=o.name,i.elements.push(new Gl(i.hot,{type:"button",value:zb,className:"htUIButton htUIButtonOK",identifier:r.BUTTON_OK})),i.elements.push(new Gl(i.hot,{type:"button",value:Yb,className:"htUIButton htUIButtonCancel",identifier:r.BUTTON_CANCEL})),i.registerHooks(),i}return lHe(r,[{key:"registerHooks",value:function(){var o=this;$(this.elements,function(i){i.addLocalHook("click",function(a,l){return o.onButtonClick(a,l)})})}},{key:"getMenuItemDescriptor",value:function(){var o=this;return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:function(){return o.isHidden()},renderer:function(a,l){return te(l.parentNode,"htFiltersMenuActionBar"),l.parentNode.hasAttribute("ghost-table")||$(o.elements,function(s){return l.appendChild(s.element)}),l}}}},{key:"accept",value:function(){this.runLocalHooks("accept")}},{key:"cancel",value:function(){this.runLocalHooks("cancel")}},{key:"onButtonClick",value:function(o,i){i.options.identifier===r.BUTTON_OK?this.accept():this.cancel()}}],[{key:"BUTTON_OK",get:function(){return"ok"}},{key:"BUTTON_CANCEL",get:function(){return"cancel"}}]),r}(cw);const pHe=yHe;function vd(e){return vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vd(e)}var _N,ON;function RN(e,t){return wHe(e)||bHe(e,t)||mHe(e,t)||gHe()}function gHe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mHe(e,t){if(e){if(typeof e=="string")return EN(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return EN(e,t)}}function EN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bHe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function wHe(e){if(Array.isArray(e))return e}function TN(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function SHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PN(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,_He(n.key),n)}}function CHe(e,t,r){return t&&PN(e.prototype,t),r&&PN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _He(e){var t=OHe(e,"string");return vd(t)==="symbol"?t:String(t)}function OHe(e,t){if(vd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kN="ConditionCollection.filteringStates",KU=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;SHe(this,e),this.hot=t,this.isMapRegistrable=r,this.filteringStates=new Am,this.isMapRegistrable===!0?this.hot.columnIndexMapper.registerMap(kN,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}return CHe(e,[{key:"isEmpty",value:function(){return this.getFilteredColumns().length===0}},{key:"isMatch",value:function(r,n){var o,i=this.filteringStates.getValueAtIndex(n),a=(o=i==null?void 0:i.conditions)!==null&&o!==void 0?o:[],l=i==null?void 0:i.operation;return this.isMatchInConditions(a,r,l)}},{key:"isMatchInConditions",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fi;return r.length?Wxe(o)(r,n):!0}},{key:"addCondition",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fi,i=arguments.length>3?arguments[3]:void 0,a=this.hot.getCellMeta(0,r).locale,l=We(n.args,function(c){return typeof c=="string"?c.toLocaleLowerCase(a):c}),s=n.name||n.command.key;this.runLocalHooks("beforeAdd",r);var u=this.getOperation(r);if(u){if(u!==o)throw Error(dt(_N||(_N=TN(["The column of index "," has been already applied with a `","` \n filter operation. Use `removeConditions` to clear the current conditions and then add new ones. \n Mind that you cannot mix different types of operations (for instance, if you use `conjunction`, \n use it consequently for a particular column)."],["The column of index "," has been already applied with a \\`","\\`\\x20\n filter operation. Use \\`removeConditions\\` to clear the current conditions and then add new ones.\\x20\n Mind that you cannot mix different types of operations (for instance, if you use \\`conjunction\\`,\\x20\n use it consequently for a particular column)."])),r,u))}else if(pt(cd[o]))throw new Error(dt(ON||(ON=TN(["Unexpected operation named `","`. Possible ones are \n `disjunction` and `conjunction`."],["Unexpected operation named \\`","\\`. Possible ones are\\x20\n \\`disjunction\\` and \\`conjunction\\`."])),o));var f=this.getConditions(r);f.length===0?this.filteringStates.setValueAtIndex(r,{operation:o,conditions:[{name:s,args:l,func:Ci(s,l)}]},i):f.push({name:s,args:l,func:Ci(s,l)}),this.runLocalHooks("afterAdd",r)}},{key:"getConditions",value:function(r){var n,o;return(n=(o=this.filteringStates.getValueAtIndex(r))===null||o===void 0?void 0:o.conditions)!==null&&n!==void 0?n:[]}},{key:"getOperation",value:function(r){var n;return(n=this.filteringStates.getValueAtIndex(r))===null||n===void 0?void 0:n.operation}},{key:"getFilteredColumns",value:function(){return this.filteringStates.getEntries().map(function(r){var n=RN(r,1),o=n[0];return o})}},{key:"getColumnStackPosition",value:function(r){return this.getFilteredColumns().indexOf(r)}},{key:"exportAllConditions",value:function(){return Lt(this.filteringStates.getEntries(),function(r,n){var o=RN(n,2),i=o[0],a=o[1],l=a.operation,s=a.conditions;return r.push({column:i,operation:l,conditions:We(s,function(u){var f=u.name,c=u.args;return{name:f,args:c}})}),r},[])}},{key:"importAllConditions",value:function(r){var n=this;this.clean(),$(r,function(o){$(o.conditions,function(i){return n.addCondition(o.column,i)})})}},{key:"removeConditions",value:function(r){this.runLocalHooks("beforeRemove",r),this.filteringStates.clearValue(r),this.runLocalHooks("afterRemove",r)}},{key:"clean",value:function(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}},{key:"hasConditions",value:function(r,n){var o=this.getConditions(r);return n?o.some(function(i){return i.name===n}):o.length>0}},{key:"destroy",value:function(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(kN),this.filteringStates=null,this.clearLocalHooks()}}]),e}();mt(KU,kr);const XU=KU;function yd(e){return yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yd(e)}function RHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,THe(n.key),n)}}function EHe(e,t,r){return t&&$N(e.prototype,t),r&&$N(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function THe(e){var t=PHe(e,"string");return yd(t)==="symbol"?t:String(t)}function PHe(e,t){if(yd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(yd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kHe=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return[]};RHe(this,e),this.conditionCollection=t,this.columnDataFactory=r}return EHe(e,[{key:"filter",value:function(){var r=this,n=[];return $(this.conditionCollection.getFilteredColumns(),function(o,i){var a=r.columnDataFactory(o);i&&(a=r._getIntersectData(a,n)),n=r.filterByColumn(o,a)}),n}},{key:"filterByColumn",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=[];return $(o,function(a){a!==void 0&&n.conditionCollection.isMatch(a,r)&&i.push(a)}),i}},{key:"_getIntersectData",value:function(r,n){var o=[];return $(n,function(i){var a=i.meta.visualRow;r[a]!==void 0&&(o[a]=r[a])}),o}}]),e}();const qU=kHe;function pd(e){return pd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pd(e)}function $He(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AN(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,IHe(n.key),n)}}function AHe(e,t,r){return t&&AN(e.prototype,t),r&&AN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function IHe(e){var t=MHe(e,"string");return pd(t)==="symbol"?t:String(t)}function MHe(e,t){if(pd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(pd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ZU=function(){function e(t,r){var n=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};$He(this,e),this.hot=t,this.conditionCollection=r,this.columnDataFactory=o,this.changes=[],this.grouping=!1,this.latestEditedColumnPosition=-1,this.latestOrderStack=[],this.conditionCollection.addLocalHook("beforeRemove",function(i){return n._onConditionBeforeModify(i)}),this.conditionCollection.addLocalHook("afterRemove",function(i){return n.updateStatesAtColumn(i)}),this.conditionCollection.addLocalHook("afterAdd",function(i){return n.updateStatesAtColumn(i)}),this.conditionCollection.addLocalHook("beforeClean",function(){return n._onConditionBeforeClean()}),this.conditionCollection.addLocalHook("afterClean",function(){return n._onConditionAfterClean()})}return AHe(e,[{key:"groupChanges",value:function(){this.grouping=!0}},{key:"flush",value:function(){var r=this;this.grouping=!1,$(this.changes,function(n){r.updateStatesAtColumn(n)}),this.changes.length=0}},{key:"_onConditionBeforeModify",value:function(r){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(r)}},{key:"updateStatesAtColumn",value:function(r,n){var o=this;if(this.grouping){this.changes.indexOf(r)===-1&&this.changes.push(r);return}var i=this.conditionCollection.exportAllConditions(),a=this.conditionCollection.getColumnStackPosition(r);a===-1&&(a=this.latestEditedColumnPosition);var l=i.slice(0,a),s=i.slice(a);s.length&&s[0].column===r&&s.shift();var u=hV(function(c,h){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],v=new XU(o.hot,!1),p=[].concat(c,d);v.importAllConditions(p);var m=o.columnDataFactory(h),w;v.isEmpty()?w=m:w=new qU(v,function(C){return o.columnDataFactory(C)}).filter(),w=We(w,function(C){return C.meta.visualRow});var S=Rv(w);return v.destroy(),jr(m,function(C){return S(C.meta.visualRow)})})(l),f=[].concat(this.conditionCollection.getConditions(r));this.runLocalHooks("update",{editedConditionStack:{column:r,conditions:f},dependentConditionStacks:s,filteredRowsFactory:u,conditionArgsChange:n})}},{key:"_onConditionBeforeClean",value:function(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}},{key:"_onConditionAfterClean",value:function(){var r=this;$(this.latestOrderStack,function(n){r.updateStatesAtColumn(n)})}},{key:"destroy",value:function(){var r=this;this.clearLocalHooks(),ze(this,function(n,o){r[o]=null})}}]),e}();mt(ZU,kr);const xHe=ZU;function Au(e){return Au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Au(e)}var IN;function DHe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function NHe(e,t){return BHe(e)||jHe(e,t)||LHe(e,t)||HHe()}function HHe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LHe(e,t){if(e){if(typeof e=="string")return MN(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return MN(e,t)}}function MN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jHe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function BHe(e){if(Array.isArray(e))return e}function FHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xN(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,WHe(n.key),n)}}function VHe(e,t,r){return t&&xN(e.prototype,t),r&&xN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function WHe(e){var t=UHe(e,"string");return Au(t)==="symbol"?t:String(t)}function UHe(e,t){if(Au(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Au(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ql(){return typeof Reflect<"u"&&Reflect.get?ql=Reflect.get.bind():ql=function(t,r,n){var o=zHe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ql.apply(this,arguments)}function zHe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=vi(e),e!==null););return e}function YHe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&QR(e,t)}function QR(e,t){return QR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},QR(e,t)}function GHe(e){var t=XHe();return function(){var n=vi(e),o;if(t){var i=vi(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return KHe(this,o)}}function KHe(e,t){if(t&&(Au(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QU(e)}function QU(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XHe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vi(e){return vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vi(e)}var DN="filters",qHe=250,ZHe=function(e){YHe(r,e);var t=GHe(r);function r(n){var o;return FHe(this,r),o=t.call(this,n),o.eventManager=new Pt(QU(o)),o.dropdownMenuPlugin=null,o.conditionCollection=null,o.conditionUpdateObserver=null,o.components=new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]]),o.filtersRowsMap=null,o.hot.addHook("afterGetColHeader",function(i,a){return o.onAfterGetColHeader(i,a)}),o}return VHe(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[DN]}},{key:"enablePlugin",value:function(){var o=this;if(!this.enabled){this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new yv),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");var i=this.hot.getSettings().dropdownMenu,a=i&&i.uiContainer||this.hot.rootDocument.body,l=function(d){return d.addLocalHook("accept",function(){return o.onActionBarSubmit("accept")}),d.addLocalHook("cancel",function(){return o.onActionBarSubmit("cancel")}),d.addLocalHook("change",function(v){return o.onComponentChange(d,v)}),d},s=function(){return"".concat(o.hot.getTranslatedPhrase(Bb),":")},u=function(){return"".concat(o.hot.getTranslatedPhrase(Fb),":")};if(!this.components.get("filter_by_condition")){var f=new gC(this.hot,{id:"filter_by_condition",name:s,addSeparator:!1,menuContainer:a});f.addLocalHook("afterClose",function(){return o.onSelectUIClosed()}),this.components.set("filter_by_condition",l(f))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new oNe(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){var c=new gC(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:a});c.addLocalHook("afterClose",function(){return o.onSelectUIClosed()}),this.components.set("filter_by_condition2",l(c))}this.components.get("filter_by_value")||this.components.set("filter_by_value",l(new iHe(this.hot,{id:"filter_by_value",name:u}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",l(new pHe(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new XU(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new xHe(this.hot,this.conditionCollection,function(h){return o.getDataMapAtColumn(h)}),this.conditionUpdateObserver.addLocalHook("update",function(h){return o.updateComponents(h)})),this.components.forEach(function(h){return h.show()}),this.addHook("beforeDropdownMenuSetItems",function(h){return o.onBeforeDropdownMenuSetItems(h)}),this.addHook("afterDropdownMenuDefaultOptions",function(h){return o.onAfterDropdownMenuDefaultOptions(h)}),this.addHook("afterDropdownMenuShow",function(){return o.onAfterDropdownMenuShow()}),this.addHook("afterDropdownMenuHide",function(){return o.onAfterDropdownMenuHide()}),this.addHook("afterChange",function(h){return o.onAfterChange(h)}),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),ql(vi(r.prototype),"enablePlugin",this).call(this)}}},{key:"disablePlugin",value:function(){var o=this;if(this.enabled){var i;(i=this.dropdownMenuPlugin)!==null&&i!==void 0&&i.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach(function(a,l){a.destroy(),o.components.set(l,null)}),this.conditionCollection.destroy(),this.conditionCollection=null,this.hot.rowIndexMapper.unregisterMap(this.pluginName)}ql(vi(r.prototype),"disablePlugin",this).call(this)}},{key:"addCondition",value:function(o,i,a){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:fi,s=this.hot.toPhysicalColumn(o);this.conditionCollection.addCondition(s,{command:{key:i},args:a},l)}},{key:"removeConditions",value:function(o){var i=this.hot.toPhysicalColumn(o);this.conditionCollection.removeConditions(i)}},{key:"clearConditions",value:function(o){if(o===void 0)this.conditionCollection.clean();else{var i=this.hot.toPhysicalColumn(o);this.conditionCollection.removeConditions(i)}}},{key:"filter",value:function(){var o=this,i=this._createDataFilter(),a=!this.conditionCollection.isEmpty(),l=[],s=this.conditionCollection.exportAllConditions(),u=this.hot.runHooks("beforeFilter",s);if(u!==!1)if(a){var f=[];this.hot.batchExecution(function(){o.filtersRowsMap.clear(),l=We(i.filter(),function(h){return h.meta.visualRow});var c=Rv(l);Ce(o.hot.countSourceRows()-1,function(h){c(h)||f.push(h)}),$(f,function(h){o.filtersRowsMap.setValueAtIndex(h,!0)})},!0),l.length||this.hot.deselectCell()}else this.filtersRowsMap.clear();this.hot.runHooks("afterFilter",s),this.hot.view.adjustElementsSize(!0),this.hot.render(),this.clearColumnSelection()}},{key:"getSelectedColumn",value:function(){var o,i=(o=this.hot.getSelectedRangeLast())===null||o===void 0?void 0:o.highlight;return i?{visualIndex:i.col,physicalIndex:this.hot.toPhysicalColumn(i.col)}:null}},{key:"clearColumnSelection",value:function(){var o=this.getSelectedColumn();o!==null&&this.hot.selectCell(0,o.visualIndex)}},{key:"getDataMapAtColumn",value:function(o){var i=this,a=this.hot.toVisualColumn(o),l=[];return $(this.hot.getSourceDataAtCol(a),function(s,u){var f,c=i.hot.getCellMeta(u,a),h=c.row,d=c.col,v=c.visualCol,p=c.visualRow,m=c.type,w=c.instance,S=c.dateFormat,C=c.locale,P=(f=i.hot.getDataAtCell(i.hot.toVisualRow(u),a))!==null&&f!==void 0?f:s;l.push({meta:{row:h,col:d,visualCol:v,visualRow:p,type:m,instance:w,dateFormat:S,locale:C},value:jU(P)})}),l}},{key:"onAfterChange",value:function(o){var i=this;o&&$(o,function(a){var l=NHe(a,2),s=l[1],u=i.hot.propToCol(s);i.conditionCollection.hasConditions(u)&&i.updateValueComponentCondition(u)})}},{key:"updateValueComponentCondition",value:function(o){var i=this.hot.getDataAtCol(o),a=FR(i);this.conditionUpdateObserver.updateStatesAtColumn(o,a)}},{key:"restoreComponents",value:function(o){var i,a=(i=this.getSelectedColumn())===null||i===void 0?void 0:i.physicalIndex;o.forEach(function(l){l.isHidden()||l.restoreState(a)}),this.updateDependentComponentsVisibility()}},{key:"onAfterDropdownMenuShow",value:function(){this.restoreComponents(Array.from(this.components.values()))}},{key:"onAfterDropdownMenuHide",value:function(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}},{key:"onBeforeDropdownMenuSetItems",value:function(){var o=this;this.dropdownMenuPlugin&&this.dropdownMenuPlugin.menu.addLocalHook("afterOpen",function(){o.dropdownMenuPlugin.menu.hotMenu.updateSettings({hiddenRows:!0})})}},{key:"onAfterDropdownMenuDefaultOptions",value:function(o){o.items.push({name:Ke}),this.components.forEach(function(i){o.items.push(i.getMenuItemDescriptor())})}},{key:"getOperationBasedOnArguments",value:function(o,i,a,l){var s=o;return s===Ag&&i.command.key!==er&&a.command.key!==er&&l.command.key!==er?s=TP:l.command.key!==er&&(i.command.key===er||a.command.key===er)&&(s=fi),s}},{key:"onActionBarSubmit",value:function(o){var i;if(o==="accept"){var a=this.getSelectedColumn();if(a===null){var l;(l=this.dropdownMenuPlugin)===null||l===void 0||l.close();return}var s=a.physicalIndex,u=this.components.get("filter_by_condition").getState(),f=this.components.get("filter_by_condition2").getState(),c=this.components.get("filter_by_value").getState(),h=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),u,f,c);this.conditionUpdateObserver.groupChanges();var d=this.conditionCollection.getColumnStackPosition(s);d===-1&&(d=void 0),this.conditionCollection.removeConditions(s),u.command.key!==er&&(this.conditionCollection.addCondition(s,u,h,d),f.command.key!==er&&this.conditionCollection.addCondition(s,f,h,d)),c.command.key!==er&&this.conditionCollection.addCondition(s,c,h,d),this.conditionUpdateObserver.flush(),this.components.forEach(function(v){return v.saveState(s)}),this.filtersRowsMap.clear(),this.filter()}(i=this.dropdownMenuPlugin)===null||i===void 0||i.close()}},{key:"onComponentChange",value:function(o,i){this.updateDependentComponentsVisibility(),o.constructor===gC&&!i.inputsCount&&this.setListeningDropdownMenu()}},{key:"onSelectUIClosed",value:function(){this.setListeningDropdownMenu()}},{key:"setListeningDropdownMenu",value:function(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}},{key:"updateDependentComponentsVisibility",value:function(){var o=this.components.get("filter_by_condition"),i=o.getState(),a=i.command,l=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];a.showOperators?this.showComponents.apply(this,l):this.hideComponents.apply(this,l)}},{key:"onAfterGetColHeader",value:function(o,i){var a=this.hot.toPhysicalColumn(o);this.enabled&&this.conditionCollection.hasConditions(a)?te(i,"htFiltersActive"):Be(i,"htFiltersActive")}},{key:"_createDataFilter",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.conditionCollection;return new qU(i,function(a){return o.getDataMapAtColumn(a)})}},{key:"updateComponents",value:function(o){var i;if((i=this.dropdownMenuPlugin)!==null&&i!==void 0&&i.enabled){var a=o.editedConditionStack,l=a.conditions,s=a.column,u=l.filter(function(h){return h.name===ua}),f=l.filter(function(h){return h.name!==ua});if(u.length>=2||f.length>=3)gt(dt(IN||(IN=DHe([`The filter conditions have been applied properly, but couldnt be displayed visually.
The overall amount of conditions exceed the capability of the dropdown menu.
For more details see the documentation.`],[`The filter conditions have been applied properly, but couldnt be displayed visually.\\x20
The overall amount of conditions exceed the capability of the dropdown menu.\\x20
For more details see the documentation.`]))));else{var c=this.conditionCollection.getOperation(s);this.components.get("filter_by_condition").updateState(f[0],s),this.components.get("filter_by_condition2").updateState(f[1],s),this.components.get("filter_operators").updateState(c,s),this.components.get("filter_by_value").updateState(o)}}}},{key:"getIndexesOfComponents",value:function(){var o=[];if(!this.dropdownMenuPlugin)return o;for(var i=this.dropdownMenuPlugin.menu,a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return $(l,function(u){$(i.menuItems,function(f,c){f.key===u.getMenuItemDescriptor().key&&o.push(c)})}),o}},{key:"changeComponentsVisibility",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.dropdownMenuPlugin){for(var i=this.dropdownMenuPlugin.menu,a=i.hotMenu,l=a.getPlugin("hiddenRows"),s=arguments.length,u=new Array(s>1?s-1:0),f=1;f<s;f++)u[f-1]=arguments[f];var c=this.getIndexesOfComponents.apply(this,u);o?l.showRows(c):l.hideRows(c),a.render()}}},{key:"hideComponents",value:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.changeComponentsVisibility.apply(this,[!1].concat(i))}},{key:"showComponents",value:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.changeComponentsVisibility.apply(this,[!0].concat(i))}},{key:"destroy",value:function(){var o=this;this.enabled&&(this.components.forEach(function(i,a){i!==null&&(i.destroy(),o.components.set(a,null))}),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginName)),ql(vi(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return DN}},{key:"PLUGIN_PRIORITY",get:function(){return qHe}},{key:"PLUGIN_DEPS",get:function(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}}]),r}(at);function gd(e){return gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gd(e)}function NN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Rc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NN(Object(r),!0).forEach(function(n){QHe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QHe(e,t,r){return t=JHe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JHe(e){var t=eLe(e,"string");return gd(t)==="symbol"?t:String(t)}function eLe(e,t){if(gd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var JU="internal-use-in-handsontable",tLe={licenseKey:JU,useArrayArithmetic:!0,useColumnIndex:!1,useStats:!1,evaluateNullToZero:!0,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,leapYear1900:!0,nullDate:{year:1899,month:12,day:31},nullYear:30,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"};function ez(e){var t,r;return{maxColumns:e.maxColumns,maxRows:e.maxRows,language:(t=e[yr])===null||t===void 0||(r=t.language)===null||r===void 0?void 0:r.langCode}}function tz(e){return Object.keys(e).reduce(function(t,r){return r!=="hyperformula"&&(t[r]=e[r]),t},{})}function rLe(e){var t,r=e[yr],n=tz(r!=null&&(t=r.engine)!==null&&t!==void 0&&t.hyperformula?r.engine:{}),o=ez(e);return Rc(Rc(Rc({},tLe),n),o)}function nLe(e){var t,r=e[yr],n=tz(r!=null&&(t=r.engine)!==null&&t!==void 0&&t.hyperformula?r.engine:{}),o=ez(e);return Rc(Rc({},n),o)}function JR(e){return JR=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},JR(e)}function hw(){var e="engine_relationship",t=en(yr);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function PP(){var e="shared_engine_usage",t=en(yr);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function oLe(e){var t=e.getSettings(),r=t[yr],n=r==null?void 0:r.engine;if(r===!0||pt(n))return null;if(typeof n.hyperformula=="function"||typeof n=="function"){var o;return iLe((o=n.hyperformula)!==null&&o!==void 0?o:n,t,e)}else if(JR(n)==="object"&&pt(n.hyperformula)){var i=hw(),a=PP().get(n);return i.has(n)||i.set(n,[]),i.get(n).push(e),a&&a.push(e.guid),n.getConfig().licenseKey||n.updateConfig({licenseKey:JU}),n}return null}function iLe(e,t,r){var n=t[yr],o=rLe(t),i=hw(),a=PP();aLe(e,n.functions),lLe(e,n.language);var l=e.buildEmpty(o);return i.set(l,[r]),a.set(l,[r.guid]),sLe(l,n.namedExpressions),l.on("sheetAdded",function(){l.rebuildAndRecalculate()}),l.on("sheetRemoved",function(){l.rebuildAndRecalculate()}),l}function HN(e){var t,r=hw(),n=r.size===0?[]:Array.from((t=r.get(e))!==null&&t!==void 0?t:[]);return new Map(n.map(function(o){return[o.getPlugin("formulas").sheetId,o]}))}function LN(e,t){if(e){var r=hw(),n=r.get(e),o=PP(),i=o.get(e);n&&n.includes(t)&&(n.splice(n.indexOf(t),1),n.length===0&&r.delete(e)),i&&i.includes(t.guid)&&(i.splice(i.indexOf(t.guid),1),i.length===0&&(o.delete(e),e.destroy()))}}function aLe(e,t){t&&t.forEach(function(r){var n=r.name,o=r.plugin,i=r.translations;try{e.registerFunction(n,o,i)}catch(a){gt(a.message)}})}function lLe(e,t){if(t){var r=t.langCode;try{e.registerLanguage(r,t)}catch(n){gt(n.message)}}}function sLe(e,t){t&&(e.suspendEvaluation(),t.forEach(function(r){var n=r.name,o=r.expression,i=r.scope,a=r.options;try{e.addNamedExpression(n,o,i,a)}catch(l){gt(l.message)}}),e.resumeEvaluation())}function uLe(e,t){return(pt(t)||!e.doesSheetExist(t))&&(t=e.addSheet(t)),t}function rz(e){return typeof e=="string"&&e.charAt(0)==="'"&&e.charAt(1)==="="}function fLe(e){return rz(e)?e.substr(1):e}function cLe(e){return vLe(e)||dLe(e)||nz(e)||hLe()}function hLe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dLe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vLe(e){if(Array.isArray(e))return e0(e)}function jN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function BN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jN(Object(r),!0).forEach(function(n){yp(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _i(e){return _i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_i(e)}function Sl(e,t){return gLe(e)||pLe(e,t)||nz(e,t)||yLe()}function yLe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nz(e,t){if(e){if(typeof e=="string")return e0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e0(e,t)}}function e0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function pLe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function gLe(e){if(Array.isArray(e))return e}function mLe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FN(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,oz(n.key),n)}}function bLe(e,t,r){return t&&FN(e.prototype,t),r&&FN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function fa(){return typeof Reflect<"u"&&Reflect.get?fa=Reflect.get.bind():fa=function(t,r,n){var o=wLe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},fa.apply(this,arguments)}function wLe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=go(e),e!==null););return e}function SLe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&t0(e,t)}function t0(e,t){return t0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},t0(e,t)}function CLe(e){var t=OLe();return function(){var n=go(e),o;if(t){var i=go(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return _Le(this,o)}}function _Le(e,t){if(t&&(_i(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zi(e)}function zi(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OLe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function go(e){return go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},go(e)}function yp(e,t,r){return t=oz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oz(e){var t=RLe(e,"string");return _i(t)==="symbol"?t:String(t)}function RLe(e,t){if(_i(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_i(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bC(e,t,r){ELe(e,t),t.set(e,r)}function ELe(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Cl(e,t,r){var n=iz(e,t,"set");return TLe(e,n,r),r}function TLe(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}function _l(e,t){var r=iz(e,t,"get");return PLe(e,r)}function iz(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function PLe(e,t){return t.get?t.get.call(e):t.value}var yr="formulas",kLe=260,VN="row_move";be.getSingleton().register("afterNamedExpressionAdded");be.getSingleton().register("afterNamedExpressionRemoved");be.getSingleton().register("afterSheetAdded");be.getSingleton().register("afterSheetRemoved");be.getSingleton().register("afterSheetRenamed");be.getSingleton().register("afterFormulasValuesUpdate");var Ol=function(t){return t==="UndoRedo.undo"||t==="UndoRedo.redo"||t==="auto"},Bi=new WeakMap,wC=new WeakMap,Gf=new WeakMap,$Le=function(e){SLe(r,e);var t=CLe(r);function r(){var n;mLe(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),bC(zi(n),Bi,{writable:!0,value:!1}),bC(zi(n),wC,{writable:!0,value:!1}),bC(zi(n),Gf,{writable:!0,value:[["valuesUpdated",function(){var l;return(l=n).onEngineValuesUpdated.apply(l,arguments)}],["namedExpressionAdded",function(){var l;return(l=n).onEngineNamedExpressionsAdded.apply(l,arguments)}],["namedExpressionRemoved",function(){var l;return(l=n).onEngineNamedExpressionsRemoved.apply(l,arguments)}],["sheetAdded",function(){var l;return(l=n).onEngineSheetAdded.apply(l,arguments)}],["sheetRenamed",function(){var l;return(l=n).onEngineSheetRenamed.apply(l,arguments)}],["sheetRemoved",function(){var l;return(l=n).onEngineSheetRemoved.apply(l,arguments)}]]}),yp(zi(n),"staticRegister",en("formulas")),yp(zi(n),"engine",null),yp(zi(n),"sheetName",null),n}return bLe(r,[{key:"sheetId",get:function(){return this.sheetName===null?null:this.engine.getSheetId(this.sheetName)}},{key:"isEnabled",value:function(){return!!this.hot.getSettings()[yr]}},{key:"enablePlugin",value:function(){var o,i=this;if(!this.enabled){if(this.engine=(o=oLe(this.hot))!==null&&o!==void 0?o:this.engine,!this.engine){gt("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.");return}if(this.sheetName!==null&&!this.engine.doesSheetExist(this.sheetName)){var a=this.addSheet(this.sheetName,this.hot.getSourceDataArray());a!==!1&&(this.sheetName=a)}this.addHook("beforeLoadData",function(){return i.onBeforeLoadData.apply(i,arguments)}),this.addHook("afterLoadData",function(){return i.onAfterLoadData.apply(i,arguments)}),this.addHook("beforeUpdateData",function(){return i.onBeforeLoadData.apply(i,arguments)}),this.addHook("afterUpdateData",function(){return i.onAfterLoadData.apply(i,arguments)}),this.addHook("modifyData",function(){return i.onModifyData.apply(i,arguments)}),this.addHook("modifySourceData",function(){return i.onModifySourceData.apply(i,arguments)}),this.addHook("beforeValidate",function(){return i.onBeforeValidate.apply(i,arguments)}),this.addHook("afterSetSourceDataAtCell",function(){return i.onAfterSetSourceDataAtCell.apply(i,arguments)}),this.addHook("afterSetDataAtCell",function(){return i.onAfterSetDataAtCell.apply(i,arguments)}),this.addHook("afterSetDataAtRowProp",function(){return i.onAfterSetDataAtCell.apply(i,arguments)}),this.addHook("beforeCreateRow",function(){return i.onBeforeCreateRow.apply(i,arguments)}),this.addHook("beforeCreateCol",function(){return i.onBeforeCreateCol.apply(i,arguments)}),this.addHook("afterCreateRow",function(){return i.onAfterCreateRow.apply(i,arguments)}),this.addHook("afterCreateCol",function(){return i.onAfterCreateCol.apply(i,arguments)}),this.addHook("beforeRemoveRow",function(){return i.onBeforeRemoveRow.apply(i,arguments)}),this.addHook("beforeRemoveCol",function(){return i.onBeforeRemoveCol.apply(i,arguments)}),this.addHook("afterRemoveRow",function(){return i.onAfterRemoveRow.apply(i,arguments)}),this.addHook("afterRemoveCol",function(){return i.onAfterRemoveCol.apply(i,arguments)}),this.addHook("beforeUndo",function(l){(l==null?void 0:l.actionType)!==VN&&i.engine.undo()}),this.addHook("beforeRedo",function(l){(l==null?void 0:l.actionType)!==VN&&i.engine.redo()}),this.addHook("afterDetachChild",function(){return i.onAfterDetachChild.apply(i,arguments)}),this.addHook("beforeAutofill",function(){return i.onBeforeAutofill.apply(i,arguments)}),_l(this,Gf).forEach(function(l){var s=Sl(l,2),u=s[0],f=s[1];return i.engine.on(u,f)}),fa(go(r.prototype),"enablePlugin",this).call(this)}}},{key:"disablePlugin",value:function(){var o=this;_l(this,Gf).forEach(function(i){var a=Sl(i,2),l=a[0],s=a[1];return o.engine.off(l,s)}),LN(this.engine,this.hot),this.engine=null,fa(go(r.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(o){this.engine.updateConfig(nLe(this.hot.getSettings()));var i=this.hot.getSettings()[yr];if(pe(i)&&pe(i.sheetName)&&i.sheetName!==this.sheetName&&this.switchSheet(i.sheetName),!o.data&&this.sheetName===null){var a=this.hot.getSettings()[yr].sheetName;a&&this.engine.doesSheetExist(a)?this.switchSheet(this.sheetName):this.sheetName=this.addSheet(a??void 0,this.hot.getSourceDataArray())}fa(go(r.prototype),"updatePlugin",this).call(this,o)}},{key:"destroy",value:function(){var o=this;_l(this,Gf).forEach(function(i){var a,l=Sl(i,2),s=l[0],u=l[1];return(a=o.engine)===null||a===void 0?void 0:a.off(s,u)}),Cl(this,Gf,null),LN(this.engine,this.hot),this.engine=null,fa(go(r.prototype),"destroy",this).call(this)}},{key:"getPhysicalIndexPosition",value:function(o,i,a,l,s){return!s&&o>=a?l+(o-a):i}},{key:"toPhysicalRowPosition",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPhysicalIndexPosition(o,this.hot.toPhysicalRow(o),this.hot.countRows(),this.hot.countSourceRows(),i)}},{key:"toPhysicalColumnPosition",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPhysicalIndexPosition(o,this.hot.toPhysicalColumn(o),this.hot.countCols(),this.hot.countSourceCols(),i)}},{key:"addSheet",value:function(o,i){if(pe(i)&&!MW(i))return gt("The provided data should be an array of arrays."),!1;if(o!=null&&this.engine.doesSheetExist(o))return gt("Sheet with the provided name already exists."),!1;try{var a=this.engine.addSheet(o??void 0);return i&&this.engine.setSheetContent(this.engine.getSheetId(a),i),a}catch(l){return gt(l.message),!1}}},{key:"switchSheet",value:function(o){if(!this.engine.doesSheetExist(o)){RT("The sheet named `".concat(o,"` does not exist, switch aborted."));return}this.sheetName=o;var i=this.engine.getSheetSerialized(this.sheetId);i.length>0&&this.hot.loadData(i,"".concat(Er(yr),".switchSheet"))}},{key:"getCellType",value:function(o,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.sheetId,l=this.hot.toPhysicalRow(o),s=this.hot.toPhysicalColumn(i);return l!==null&&s!==null?this.engine.getCellType({sheet:a,row:l,col:s}):"EMPTY"}},{key:"isFormulaCellType",value:function(o,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.sheetId,l=this.hot.toPhysicalRow(o),s=this.hot.toPhysicalColumn(i);return l===null||s===null?!1:this.engine.doesCellHaveFormula({sheet:a,row:l,col:s})}},{key:"renderDependentSheets",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l=new Set;o.forEach(function(s){var u,f=s==null||(u=s.address)===null||u===void 0?void 0:u.sheet;f!==void 0&&(l.has(f)||l.add(f))}),HN(this.engine).forEach(function(s,u){if((a||u!==i.sheetId)&&l.has(u)){var f;s.render(),(f=s.view)===null||f===void 0||f.adjustElementsSize()}})}},{key:"validateDependentCells",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=function(f){var c,h=(c=f==null?void 0:f.address)!==null&&c!==void 0?c:{},d=h.row,v=h.col,p=h.sheet;return pe(p)?"".concat(p,":").concat(d,"x").concat(v):""},s=new Set(a.map(function(u){return l(u)}));o.forEach(function(u){var f,c,h=(f=u.address)!==null&&f!==void 0?f:{},d=h.row,v=h.col,p=pe(d)?i.hot.toVisualRow(d):null,m=pe(v)?i.hot.toVisualColumn(v):null;if(!(p===null||m===null)){var w=u==null||(c=u.address)===null||c===void 0?void 0:c.sheet,S=l(u);if(w!==void 0&&!s.has(S)){var C=HN(i.engine).get(w);if(!C)return;C.validateCell(C.getDataAtCell(p,m),C.getCellMeta(p,m),function(){})}}})}},{key:"syncChangeWithEngine",value:function(o,i,a){var l={row:this.toPhysicalRowPosition(o),col:this.toPhysicalColumnPosition(i),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(l)){gt("Not possible to set cell data at ".concat(JSON.stringify(l)));return}return this.engine.setCellContents(l,a)}},{key:"onBeforeValidate",value:function(o,i,a){var l=this.hot.propToCol(a);if(this.isFormulaCellType(i,l)){var s={row:this.hot.toPhysicalRow(i),col:this.hot.toPhysicalColumn(l),sheet:this.sheetId},u=this.engine.getCellValue(s);return _i(u)==="object"&&u!==null?u.value:u}return o}},{key:"onBeforeAutofill",value:function(o,i,a){var l=this,s=function(h){return BN(BN({},h),{},{sheet:l.sheetId})},u={start:s(i.getTopStartCorner()),end:s(i.getBottomEndCorner())},f={start:s(a.getTopStartCorner()),end:s(a.getBottomEndCorner())};return this.engine.isItPossibleToSetCellContents(f)===!1?!1:this.engine.getFillRangeData(u,f)}},{key:"onBeforeLoadData",value:function(o,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";a.includes(Er(yr))||Cl(this,wC,pt(this.hot.getSettings().data))}},{key:"onAfterLoadData",value:function(o,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";if(!a.includes(Er(yr)))if(this.sheetName=uLe(this.engine,this.hot.getSettings()[yr].sheetName),_l(this,wC))this.switchSheet(this.sheetName);else{var l=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,l)){Cl(this,Bi,!0);var s=this.engine.setSheetContent(this.sheetId,this.hot.getSourceDataArray());this.renderDependentSheets(s),Cl(this,Bi,!1)}}}},{key:"onModifyData",value:function(o,i,a,l){if(!(l!=="get"||_l(this,Bi)||this.sheetName===null||!this.engine.doesSheetExist(this.sheetName))){var s=this.hot.toVisualRow(o),u=this.isFormulaCellType(s,i);if(!u){var f=this.getCellType(s,i);if(f!=="ARRAY"){rz(a.value)&&(a.value=fLe(a.value));return}}var c={row:o,col:this.toPhysicalColumnPosition(i),sheet:this.sheetId},h=this.engine.getCellValue(c),d=_i(h)==="object"&&h!==null?h.value:h;a.value=d}}},{key:"onModifySourceData",value:function(o,i,a,l){if(!(l!=="get"||_l(this,Bi)||this.sheetName===null||!this.engine.doesSheetExist(this.sheetName))){var s=this.hot.toVisualRow(o),u=this.hot.propToCol(i),f=this.isFormulaCellType(s,u);if(!f){var c=this.getCellType(s,u);if(c!=="ARRAY")return}var h=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(!(h.width===0&&h.height===0)){var d={row:o,col:this.toPhysicalColumnPosition(u),sheet:this.sheetId};a.value=this.engine.getCellSerialized(d)}}}},{key:"onAfterSetDataAtCell",value:function(o,i){var a=this;if(!Ol(i)){var l=[],s=[],u=this.engine.batch(function(){o.forEach(function(f){var c=Sl(f,4),h=c[0],d=c[1],v=c[3],p=a.hot.propToCol(d),m=a.hot.toPhysicalRow(h),w=a.hot.toPhysicalColumn(p),S={row:m,col:w,sheet:a.sheetId};m!==null&&w!==null?a.syncChangeWithEngine(h,p,v):l.push([h,p,v]),s.push({address:S})})});l.length&&this.hot.addHookOnce("afterChange",function(){var f=a.engine.batch(function(){l.forEach(function(c){var h=Sl(c,3),d=h[0],v=h[1],p=h[2];a.syncChangeWithEngine(d,v,p)})});a.renderDependentSheets(f,!0)}),this.renderDependentSheets(u),this.validateDependentCells(u,s)}}},{key:"onAfterSetSourceDataAtCell",value:function(o,i){var a=this;if(!Ol(i)){var l=[],s=[];o.forEach(function(u){var f=Sl(u,4),c=f[0],h=f[1],d=f[3],v=a.hot.propToCol(h);if(Hr(v)){var p={row:c,col:a.toPhysicalColumnPosition(v),sheet:a.sheetId};if(!a.engine.isItPossibleToSetCellContents(p)){gt("Not possible to set source cell data at ".concat(JSON.stringify(p)));return}s.push({address:p}),l.push.apply(l,cLe(a.engine.setCellContents(p,d)))}}),this.renderDependentSheets(l),this.validateDependentCells(l,s)}}},{key:"onBeforeCreateRow",value:function(o,i){if(this.sheetId===null||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[this.toPhysicalRowPosition(o),i]))return!1}},{key:"onBeforeCreateCol",value:function(o,i){if(this.sheetId===null||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[this.toPhysicalColumnPosition(o),i]))return!1}},{key:"onBeforeRemoveRow",value:function(o,i,a){var l=this,s=a.every(function(u){return l.engine.isItPossibleToRemoveRows(l.sheetId,[u,1])});return s===!1?!1:void 0}},{key:"onBeforeRemoveCol",value:function(o,i,a){var l=this,s=a.every(function(u){return l.engine.isItPossibleToRemoveColumns(l.sheetId,[u,1])});return s===!1?!1:void 0}},{key:"onAfterCreateRow",value:function(o,i,a){if(!Ol(a)){var l=this.engine.addRows(this.sheetId,[this.toPhysicalRowPosition(o),i]);this.renderDependentSheets(l)}}},{key:"onAfterCreateCol",value:function(o,i,a){if(!Ol(a)){var l=this.engine.addColumns(this.sheetId,[this.toPhysicalColumnPosition(o),i]);this.renderDependentSheets(l)}}},{key:"onAfterRemoveRow",value:function(o,i,a,l){var s=this;if(!Ol(l)){var u=a.sort().reverse(),f=this.engine.batch(function(){u.forEach(function(c){s.engine.removeRows(s.sheetId,[c,1])})});this.renderDependentSheets(f)}}},{key:"onAfterRemoveCol",value:function(o,i,a,l){var s=this;if(!Ol(l)){var u=a.sort().reverse(),f=this.engine.batch(function(){u.forEach(function(c){s.engine.removeColumns(s.sheetId,[c,1])})});this.renderDependentSheets(f)}}},{key:"onAfterDetachChild",value:function(o,i,a){var l,s=this;Cl(this,Bi,!0);var u=this.hot.getSourceDataArray(a,0,a+(((l=i.__children)===null||l===void 0?void 0:l.length)||0),this.hot.countSourceCols());Cl(this,Bi,!1),u.forEach(function(f,c){f.forEach(function(h,d){s.engine.setCellContents({col:d,row:a+c,sheet:s.sheetId},[[h]])})})}},{key:"onEngineValuesUpdated",value:function(o){this.hot.runHooks("afterFormulasValuesUpdate",o)}},{key:"onEngineNamedExpressionsAdded",value:function(o,i){this.hot.runHooks("afterNamedExpressionAdded",o,i)}},{key:"onEngineNamedExpressionsRemoved",value:function(o,i){this.hot.runHooks("afterNamedExpressionRemoved",o,i)}},{key:"onEngineSheetAdded",value:function(o){this.hot.runHooks("afterSheetAdded",o)}},{key:"onEngineSheetRenamed",value:function(o,i){this.hot.runHooks("afterSheetRenamed",o,i)}},{key:"onEngineSheetRemoved",value:function(o,i){this.hot.runHooks("afterSheetRemoved",o,i)}}],[{key:"PLUGIN_KEY",get:function(){return yr}},{key:"PLUGIN_PRIORITY",get:function(){return kLe}}]),r}(at);function ALe(e,t){return DLe(e)||xLe(e,t)||MLe(e,t)||ILe()}function ILe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MLe(e,t){if(e){if(typeof e=="string")return WN(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return WN(e,t)}}function WN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function xLe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function DLe(e){if(Array.isArray(e))return e}function NLe(e){return{key:"hidden_columns_hide",name:function(){var r=this.getSelectedLast(),n=0;if(Array.isArray(r)){var o=ALe(r,4),i=o[1],a=o[3];i-a!==0&&(n=1)}return this.getTranslatedPhrase(gb,n)},callback:function(){for(var r=this.getSelectedRangeLast(),n=r.from,o=r.to,i=Math.max(Math.min(n.col,o.col),0),a=Math.max(n.col,o.col),l=[],s=i;s<=a;s+=1)l.push(s);e.hideColumns(l);var u=l[l.length-1],f=this.columnIndexMapper.getNearestNotHiddenIndex(u,1,!0);Number.isInteger(f)&&f>=0?this.selectColumns(f):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden:function(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}}function _y(e){return BLe(e)||jLe(e)||LLe(e)||HLe()}function HLe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LLe(e,t){if(e){if(typeof e=="string")return r0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return r0(e,t)}}function jLe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BLe(e){if(Array.isArray(e))return r0(e)}function r0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function FLe(e){var t=[];return{key:"hidden_columns_show",name:function(){var n=t.length>1?1:0;return this.getTranslatedPhrase(mb,n)},callback:function(){var n,o;if(t.length!==0){var i=t[0],a=t[t.length-1];i=(n=this.columnIndexMapper.getNearestNotHiddenIndex(i-1,-1))!==null&&n!==void 0?n:0,a=(o=this.columnIndexMapper.getNearestNotHiddenIndex(a+1,1))!==null&&o!==void 0?o:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize(!0);var l=a-i+1===this.countCols();l||this.selectColumns(i,a)}},disabled:!1,hidden:function(){var n=this,o=We(e.getHiddenColumns(),function(S){return n.toPhysicalColumn(S)});if(!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())||o.length<1)return!0;t.length=0;var i=this.getSelectedRangeLast(),a=i.getTopStartCorner().col,l=i.getBottomEndCorner().col,s=this.columnIndexMapper,u=s.getRenderableFromVisualIndex(a),f=s.getRenderableFromVisualIndex(l),c=s.getNotTrimmedIndexes(),h=[];if(a!==l){var d=l-a+1,v=f-u+1;if(d>v){var p=c.slice(a,l+1);h.push.apply(h,_y(p.filter(function(S){return o.includes(S)})))}}else if(u===0&&u<a)h.push.apply(h,_y(c.slice(0,a)));else if(u===null)h.push.apply(h,_y(c.slice(0,this.countCols())));else{var m=this.countCols()-1,w=s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(m,-1));f===w&&m>l&&h.push.apply(h,_y(c.slice(l+1)))}return $(h,function(S){t.push(n.toVisualColumn(S))}),t.length===0}}}function Iu(e){return Iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iu(e)}function VLe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UN(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,ULe(n.key),n)}}function WLe(e,t,r){return t&&UN(e.prototype,t),r&&UN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ULe(e){var t=zLe(e,"string");return Iu(t)==="symbol"?t:String(t)}function zLe(e,t){if(Iu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Iu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ca(){return typeof Reflect<"u"&&Reflect.get?ca=Reflect.get.bind():ca=function(t,r,n){var o=YLe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ca.apply(this,arguments)}function YLe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=mo(e),e!==null););return e}function GLe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n0(e,t)}function n0(e,t){return n0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},n0(e,t)}function KLe(e){var t=qLe();return function(){var n=mo(e),o;if(t){var i=mo(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return XLe(this,o)}}function XLe(e,t){if(t&&(Iu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o0(e)}function o0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qLe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mo(e){return mo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mo(e)}function zN(e,t,r){ZLe(e,t),t.set(e,r)}function ZLe(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ir(e,t){var r=az(e,t,"get");return QLe(e,r)}function QLe(e,t){return t.get?t.get.call(e):t.value}function Kf(e,t,r){var n=az(e,t,"set");return JLe(e,n,r),r}function az(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function JLe(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}be.getSingleton().register("beforeHideColumns");be.getSingleton().register("afterHideColumns");be.getSingleton().register("beforeUnhideColumns");be.getSingleton().register("afterUnhideColumns");var SC="hiddenColumns",eje=310,En=new WeakMap,Tn=new WeakMap,tje=function(e){GLe(r,e);var t=KLe(r);function r(){var n;VLe(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),zN(o0(n),En,{writable:!0,value:{}}),zN(o0(n),Tn,{writable:!0,value:null}),n}return WLe(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[SC]}},{key:"enablePlugin",value:function(){var o=this;if(!this.enabled){var i=this.hot.getSettings()[SC];Ue(i)&&(Kf(this,En,i),pt(i.copyPasteEnabled)&&(i.copyPasteEnabled=!0)),Kf(this,Tn,new $m),Ir(this,Tn).addLocalHook("init",function(){return o.onMapInit()}),this.hot.columnIndexMapper.registerMap(this.pluginName,Ir(this,Tn)),this.addHook("afterContextMenuDefaultOptions",function(){return o.onAfterContextMenuDefaultOptions.apply(o,arguments)}),this.addHook("afterGetCellMeta",function(a,l,s){return o.onAfterGetCellMeta(a,l,s)}),this.addHook("modifyColWidth",function(a,l){return o.onModifyColWidth(a,l)}),this.addHook("afterGetColHeader",function(){return o.onAfterGetColHeader.apply(o,arguments)}),this.addHook("modifyCopyableRange",function(a){return o.onModifyCopyableRange(a)}),ca(mo(r.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),ca(mo(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),Kf(this,En,{}),ca(mo(r.prototype),"disablePlugin",this).call(this),this.resetCellsMeta()}},{key:"showColumns",value:function(o){var i=this,a=this.getHiddenColumns(),l=this.isValidConfig(o),s=a,u=Ir(this,Tn).getValues().slice(),f=o.length>0;if(l&&f){var c=o.map(function(d){return i.hot.toPhysicalColumn(d)});$(c,function(d){u[d]=!1}),s=Lt(u,function(d,v,p){return v&&d.push(i.hot.toVisualColumn(p)),d},[])}var h=this.hot.runHooks("beforeUnhideColumns",a,s,l&&f);h!==!1&&(l&&f&&Ir(this,Tn).setValues(u),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",a,s,l&&f,l&&s.length<a.length))}},{key:"showColumn",value:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.showColumns(i)}},{key:"hideColumns",value:function(o){var i=this,a=this.getHiddenColumns(),l=this.isValidConfig(o),s=a;l&&(s=Array.from(new Set(a.concat(o))));var u=this.hot.runHooks("beforeHideColumns",a,s,l);u!==!1&&(l&&this.hot.batchExecution(function(){$(o,function(f){Ir(i,Tn).setValueAtIndex(i.hot.toPhysicalColumn(f),!0)})},!0),this.hot.runHooks("afterHideColumns",a,s,l,l&&s.length>a.length))}},{key:"hideColumn",value:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.hideColumns(i)}},{key:"getHiddenColumns",value:function(){var o=this;return We(Ir(this,Tn).getHiddenIndexes(),function(i){return o.hot.toVisualColumn(i)})}},{key:"isHidden",value:function(o){return Ir(this,Tn).getValueAtIndex(this.hot.toPhysicalColumn(o))||!1}},{key:"isValidConfig",value:function(o){var i=this.hot.countCols();return Array.isArray(o)&&o.length>0?o.every(function(a){return Number.isInteger(a)&&a>=0&&a<i}):!1}},{key:"resetCellsMeta",value:function(){$(this.hot.getCellsMeta(),function(o){o&&(o.skipColumnOnPaste=!1)})}},{key:"onModifyColWidth",value:function(o,i){if(this.isHidden(i))return 0;if(Ir(this,En).indicators&&(this.isHidden(i+1)||this.isHidden(i-1))&&typeof o=="number"&&this.hot.hasColHeaders())return o+15}},{key:"onAfterGetCellMeta",value:function(o,i,a){if(Ir(this,En).copyPasteEnabled===!1&&this.isHidden(i)&&(a.skipColumnOnPaste=!0),this.isHidden(i-1))a.className=a.className||"",a.className.indexOf("afterHiddenColumn")===-1&&(a.className+=" afterHiddenColumn");else if(a.className){var l=a.className.split(" ");if(l.length>0){var s=l.indexOf("afterHiddenColumn");s>-1&&l.splice(s,1),a.className=l.join(" ")}}}},{key:"onModifyCopyableRange",value:function(o){var i=this;if(Ir(this,En).copyPasteEnabled)return o;var a=[],l=function(u,f,c,h){a.push({startRow:u,endRow:f,startCol:c,endCol:h})};return $(o,function(s){var u=!0,f=0;Ce(s.startCol,s.endCol,function(c){i.isHidden(c)?(u||l(s.startRow,s.endRow,f,c-1),u=!0):(u&&(f=c),c===s.endCol&&l(s.startRow,s.endRow,f,c),u=!1)})}),a}},{key:"onAfterGetColHeader",value:function(o,i){if(!(!Ir(this,En).indicators||o<0)){var a=[];o>=1&&this.isHidden(o-1)&&a.push("afterHiddenColumn"),o<this.hot.countCols()-1&&this.isHidden(o+1)&&a.push("beforeHiddenColumn"),te(i,a)}}},{key:"onAfterContextMenuDefaultOptions",value:function(o){o.items.push({name:Ke},NLe(this),FLe(this))}},{key:"onMapInit",value:function(){Array.isArray(Ir(this,En).columns)&&this.hideColumns(Ir(this,En).columns)}},{key:"destroy",value:function(){Kf(this,En,null),Kf(this,Tn,null),ca(mo(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return SC}},{key:"PLUGIN_PRIORITY",get:function(){return eje}}]),r}(at);function rje(e,t){return aje(e)||ije(e,t)||oje(e,t)||nje()}function nje(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oje(e,t){if(e){if(typeof e=="string")return YN(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return YN(e,t)}}function YN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ije(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function aje(e){if(Array.isArray(e))return e}function lje(e){return{key:"hidden_rows_hide",name:function(){var r=this.getSelectedLast(),n=0;if(Array.isArray(r)){var o=rje(r,3),i=o[0],a=o[2];i-a!==0&&(n=1)}return this.getTranslatedPhrase(bb,n)},callback:function(){for(var r=this.getSelectedRangeLast(),n=r.from,o=r.to,i=Math.max(Math.min(n.row,o.row),0),a=Math.max(n.row,o.row),l=[],s=i;s<=a;s+=1)l.push(s);e.hideRows(l);var u=l[l.length-1],f=this.rowIndexMapper.getNearestNotHiddenIndex(u,1,!0);Number.isInteger(f)&&f>=0?this.selectRows(f):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden:function(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}}function Oy(e){return cje(e)||fje(e)||uje(e)||sje()}function sje(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uje(e,t){if(e){if(typeof e=="string")return i0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i0(e,t)}}function fje(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cje(e){if(Array.isArray(e))return i0(e)}function i0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hje(e){var t=[];return{key:"hidden_rows_show",name:function(){var n=t.length>1?1:0;return this.getTranslatedPhrase(wb,n)},callback:function(){var n,o;if(t.length!==0){var i=t[0],a=t[t.length-1];i=(n=this.rowIndexMapper.getNearestNotHiddenIndex(i-1,-1))!==null&&n!==void 0?n:0,a=(o=this.rowIndexMapper.getNearestNotHiddenIndex(a+1,1))!==null&&o!==void 0?o:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize(!0);var l=a-i+1===this.countRows();l||this.selectRows(i,a)}},disabled:!1,hidden:function(){var n=this,o=We(e.getHiddenRows(),function(S){return n.toPhysicalRow(S)});if(!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())||o.length<1)return!0;t.length=0;var i=this.getSelectedRangeLast(),a=i.getTopStartCorner().row,l=i.getBottomEndCorner().row,s=this.rowIndexMapper,u=s.getRenderableFromVisualIndex(a),f=s.getRenderableFromVisualIndex(l),c=s.getNotTrimmedIndexes(),h=[];if(a!==l){var d=l-a+1,v=f-u+1;if(d>v){var p=c.slice(a,l+1);h.push.apply(h,Oy(p.filter(function(S){return o.includes(S)})))}}else if(u===0&&u<a)h.push.apply(h,Oy(c.slice(0,a)));else if(u===null)h.push.apply(h,Oy(c.slice(0,this.countRows())));else{var m=this.countRows()-1,w=s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(m,-1));f===w&&m>l&&h.push.apply(h,Oy(c.slice(l+1)))}return $(h,function(S){t.push(n.toVisualRow(S))}),t.length===0}}}function Mu(e){return Mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mu(e)}function dje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GN(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,yje(n.key),n)}}function vje(e,t,r){return t&&GN(e.prototype,t),r&&GN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function yje(e){var t=pje(e,"string");return Mu(t)==="symbol"?t:String(t)}function pje(e,t){if(Mu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Mu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ha(){return typeof Reflect<"u"&&Reflect.get?ha=Reflect.get.bind():ha=function(t,r,n){var o=gje(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ha.apply(this,arguments)}function gje(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=bo(e),e!==null););return e}function mje(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a0(e,t)}function a0(e,t){return a0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},a0(e,t)}function bje(e){var t=Sje();return function(){var n=bo(e),o;if(t){var i=bo(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return wje(this,o)}}function wje(e,t){if(t&&(Mu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l0(e)}function l0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sje(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bo(e){return bo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bo(e)}function KN(e,t,r){Cje(e,t),t.set(e,r)}function Cje(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function zr(e,t){var r=lz(e,t,"get");return _je(e,r)}function _je(e,t){return t.get?t.get.call(e):t.value}function Xf(e,t,r){var n=lz(e,t,"set");return Oje(e,n,r),r}function lz(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function Oje(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}be.getSingleton().register("beforeHideRows");be.getSingleton().register("afterHideRows");be.getSingleton().register("beforeUnhideRows");be.getSingleton().register("afterUnhideRows");var CC="hiddenRows",Rje=320,Gn=new WeakMap,Pn=new WeakMap,Eje=function(e){mje(r,e);var t=bje(r);function r(){var n;dje(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),KN(l0(n),Gn,{writable:!0,value:{}}),KN(l0(n),Pn,{writable:!0,value:null}),n}return vje(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[CC]}},{key:"enablePlugin",value:function(){var o=this;if(!this.enabled){var i=this.hot.getSettings()[CC];Ue(i)&&(Xf(this,Gn,i),pt(i.copyPasteEnabled)&&(i.copyPasteEnabled=!0)),Xf(this,Pn,new $m),zr(this,Pn).addLocalHook("init",function(){return o.onMapInit()}),this.hot.rowIndexMapper.registerMap(this.pluginName,zr(this,Pn)),this.addHook("afterContextMenuDefaultOptions",function(){return o.onAfterContextMenuDefaultOptions.apply(o,arguments)}),this.addHook("afterGetCellMeta",function(a,l,s){return o.onAfterGetCellMeta(a,l,s)}),this.addHook("modifyRowHeight",function(a,l){return o.onModifyRowHeight(a,l)}),this.addHook("afterGetRowHeader",function(){return o.onAfterGetRowHeader.apply(o,arguments)}),this.addHook("modifyCopyableRange",function(a){return o.onModifyCopyableRange(a)}),ha(bo(r.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),ha(bo(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.hot.rowIndexMapper.unregisterMap(this.pluginName),Xf(this,Gn,{}),ha(bo(r.prototype),"disablePlugin",this).call(this),this.resetCellsMeta()}},{key:"showRows",value:function(o){var i=this,a=this.getHiddenRows(),l=this.isValidConfig(o),s=a,u=zr(this,Pn).getValues().slice(),f=o.length>0;if(l&&f){var c=o.map(function(d){return i.hot.toPhysicalRow(d)});$(c,function(d){u[d]=!1}),s=Lt(u,function(d,v,p){return v&&d.push(i.hot.toVisualRow(p)),d},[])}var h=this.hot.runHooks("beforeUnhideRows",a,s,l&&f);h!==!1&&(l&&f&&zr(this,Pn).setValues(u),this.hot.runHooks("afterUnhideRows",a,s,l&&f,l&&s.length<a.length))}},{key:"showRow",value:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.showRows(i)}},{key:"hideRows",value:function(o){var i=this,a=this.getHiddenRows(),l=this.isValidConfig(o),s=a;l&&(s=Array.from(new Set(a.concat(o))));var u=this.hot.runHooks("beforeHideRows",a,s,l);u!==!1&&(l&&this.hot.batchExecution(function(){$(o,function(f){zr(i,Pn).setValueAtIndex(i.hot.toPhysicalRow(f),!0)})},!0),this.hot.runHooks("afterHideRows",a,s,l,l&&s.length>a.length))}},{key:"hideRow",value:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.hideRows(i)}},{key:"getHiddenRows",value:function(){var o=this;return We(zr(this,Pn).getHiddenIndexes(),function(i){return o.hot.toVisualRow(i)})}},{key:"isHidden",value:function(o){return zr(this,Pn).getValueAtIndex(this.hot.toPhysicalRow(o))||!1}},{key:"isValidConfig",value:function(o){var i=this.hot.countRows();return Array.isArray(o)&&o.length>0?o.every(function(a){return Number.isInteger(a)&&a>=0&&a<i}):!1}},{key:"resetCellsMeta",value:function(){$(this.hot.getCellsMeta(),function(o){o&&(o.skipRowOnPaste=!1)})}},{key:"onModifyRowHeight",value:function(o,i){return this.isHidden(i)?0:o}},{key:"onAfterGetCellMeta",value:function(o,i,a){if(zr(this,Gn).copyPasteEnabled===!1&&this.isHidden(o)&&(a.skipRowOnPaste=!0),this.isHidden(o-1))a.className=a.className||"",a.className.indexOf("afterHiddenRow")===-1&&(a.className+=" afterHiddenRow");else if(a.className){var l=a.className.split(" ");if(l.length>0){var s=l.indexOf("afterHiddenRow");s>-1&&l.splice(s,1),a.className=l.join(" ")}}}},{key:"onModifyCopyableRange",value:function(o){var i=this;if(zr(this,Gn).copyPasteEnabled)return o;var a=[],l=function(u,f,c,h){a.push({startRow:u,endRow:f,startCol:c,endCol:h})};return $(o,function(s){var u=!0,f=0;Ce(s.startRow,s.endRow,function(c){i.isHidden(c)?(u||l(f,c-1,s.startCol,s.endCol),u=!0):(u&&(f=c),c===s.endRow&&l(f,c,s.startCol,s.endCol),u=!1)})}),a}},{key:"onAfterGetRowHeader",value:function(o,i){if(!(!zr(this,Gn).indicators||o<0)){var a=[];o>=1&&this.isHidden(o-1)&&a.push("afterHiddenRow"),o<this.hot.countRows()-1&&this.isHidden(o+1)&&a.push("beforeHiddenRow"),te(i,a)}}},{key:"onAfterContextMenuDefaultOptions",value:function(o){o.items.push({name:Ke},lje(this),hje(this))}},{key:"onMapInit",value:function(){Array.isArray(zr(this,Gn).rows)&&this.hideRows(zr(this,Gn).rows)}},{key:"destroy",value:function(){Xf(this,Gn,null),Xf(this,Pn,null),ha(bo(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return CC}},{key:"PLUGIN_PRIORITY",get:function(){return Rje}}]),r}(at);function Tje(e,t){return Aje(e)||$je(e,t)||kje(e,t)||Pje()}function Pje(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kje(e,t){if(e){if(typeof e=="string")return XN(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return XN(e,t)}}function XN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $je(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function Aje(e){if(Array.isArray(e))return e}function Ije(e){return{key:"freeze_column",name:function(){return this.getTranslatedPhrase(Gm)},callback:function(r,n){var o=Tje(n,1),i=o[0].start.col;e.freezeColumn(i),this.render(),this.view.adjustElementsSize(!0)},hidden:function(){var r=this.getSelectedRange(),n=!1;return(r===void 0||r.length>1||r[0].from.col!==r[0].to.col||r[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(n=!0),n}}}function Mje(e,t){return Hje(e)||Nje(e,t)||Dje(e,t)||xje()}function xje(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dje(e,t){if(e){if(typeof e=="string")return qN(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qN(e,t)}}function qN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Nje(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function Hje(e){if(Array.isArray(e))return e}function Lje(e){return{key:"unfreeze_column",name:function(){return this.getTranslatedPhrase(Km)},callback:function(r,n){var o=Mje(n,1),i=o[0].start.col;e.unfreezeColumn(i),this.render(),this.view.adjustElementsSize(!0)},hidden:function(){var r=this.getSelectedRange(),n=!1;return(r===void 0||r.length>1||r[0].from.col!==r[0].to.col||r[0].from.col>=this.getSettings().fixedColumnsStart)&&(n=!0),n}}}function xu(e){return xu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xu(e)}function jje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZN(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,Fje(n.key),n)}}function Bje(e,t,r){return t&&ZN(e.prototype,t),r&&ZN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fje(e){var t=Vje(e,"string");return xu(t)==="symbol"?t:String(t)}function Vje(e,t){if(xu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zl(){return typeof Reflect<"u"&&Reflect.get?Zl=Reflect.get.bind():Zl=function(t,r,n){var o=Wje(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Zl.apply(this,arguments)}function Wje(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=yi(e),e!==null););return e}function Uje(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s0(e,t)}function s0(e,t){return s0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},s0(e,t)}function zje(e){var t=Gje();return function(){var n=yi(e),o;if(t){var i=yi(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Yje(this,o)}}function Yje(e,t){if(t&&(xu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sz(e)}function sz(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gje(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yi(e){return yi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yi(e)}be.getSingleton().register("beforeColumnFreeze");be.getSingleton().register("afterColumnFreeze");be.getSingleton().register("beforeColumnUnfreeze");be.getSingleton().register("afterColumnUnfreeze");var QN="manualColumnFreeze",Kje=110,qf=new WeakMap,Xje=function(e){Uje(r,e);var t=zje(r);function r(n){var o;return jje(this,r),o=t.call(this,n),qf.set(sz(o),{afterFirstUse:!1}),o}return Bje(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[QN]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.addHook("afterContextMenuDefaultOptions",function(i){return o.addContextMenuEntry(i)}),this.addHook("beforeColumnMove",function(i,a){return o.onBeforeColumnMove(i,a)}),Zl(yi(r.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){var o=qf.get(this);o.afterFirstUse=!1,Zl(yi(r.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),Zl(yi(r.prototype),"updatePlugin",this).call(this)}},{key:"freezeColumn",value:function(o){var i=qf.get(this),a=this.hot.getSettings(),l=a.fixedColumnsStart<this.hot.countCols()&&o>a.fixedColumnsStart-1;i.afterFirstUse||(i.afterFirstUse=!0);var s=this.hot.runHooks("beforeColumnFreeze",o,l);s!==!1&&(l&&(this.hot.columnIndexMapper.moveIndexes(o,a.fixedColumnsStart),a._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",o,l))}},{key:"unfreezeColumn",value:function(o){var i=qf.get(this),a=this.hot.getSettings(),l=a.fixedColumnsStart>0&&o<=a.fixedColumnsStart-1;i.afterFirstUse||(i.afterFirstUse=!0);var s=this.hot.runHooks("beforeColumnUnfreeze",o,l);s!==!1&&(l&&(a._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(o,a.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",o,l))}},{key:"addContextMenuEntry",value:function(o){o.items.push({name:"---------"},Ije(this),Lje(this))}},{key:"onBeforeColumnMove",value:function(o,i){var a=qf.get(this);if(a.afterFirstUse){var l=this.hot.getSettings().fixedColumnsStart;if(i<l||o.some(function(s){return s<l}))return!1}}}],[{key:"PLUGIN_KEY",get:function(){return QN}},{key:"PLUGIN_PRIORITY",get:function(){return Kje}}]),r}(at);function md(e){return md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},md(e)}function qje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JN(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,Qje(n.key),n)}}function Zje(e,t,r){return t&&JN(e.prototype,t),r&&JN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qje(e){var t=Jje(e,"string");return md(t)==="symbol"?t:String(t)}function Jje(e,t){if(md(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(md(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _C=0,eH=1,tH=2,Rl="px",eBe=function(){function e(t){qje(this,e),this.hot=t,this._element=null,this.state=_C,this.inlineProperty=t.isRtl()?"right":"left"}return Zje(e,[{key:"appendTo",value:function(r){r.appendChild(this._element),this.state=tH}},{key:"build",value:function(){this.state===_C&&(this._element=this.hot.rootDocument.createElement("div"),this.state=eH)}},{key:"destroy",value:function(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=_C}},{key:"isAppended",value:function(){return this.state===tH}},{key:"isBuilt",value:function(){return this.state>=eH}},{key:"setPosition",value:function(r,n){Hr(r)&&(this._element.style.top=r+Rl),Hr(n)&&(this._element.style[this.inlineProperty]=n+Rl)}},{key:"getPosition",value:function(){var r=this._element.style;return{top:r.top?parseInt(r.top,10):0,start:r[this.inlineProperty]?parseInt(r[this.inlineProperty],10):0}}},{key:"setSize",value:function(r,n){Hr(r)&&(this._element.style.width=r+Rl),Hr(n)&&(this._element.style.height=n+Rl)}},{key:"getSize",value:function(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}},{key:"setOffset",value:function(r,n){Hr(r)&&(this._element.style.marginTop=r+Rl),Hr(n)&&(this._element.style["margin".concat(Er(this.inlineProperty))]=n+Rl)}},{key:"getOffset",value:function(){var r=this._element.style,n="margin".concat(Er(this.inlineProperty));return{top:r.marginTop?parseInt(r.marginTop,10):0,start:r[n]?parseInt(r[n],10):0}}}]),e}();const uz=eBe;function Du(e){return Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Du(e)}function tBe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rH(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,nBe(n.key),n)}}function rBe(e,t,r){return t&&rH(e.prototype,t),r&&rH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function nBe(e){var t=oBe(e,"string");return Du(t)==="symbol"?t:String(t)}function oBe(e,t){if(Du(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Du(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pp(){return typeof Reflect<"u"&&Reflect.get?pp=Reflect.get.bind():pp=function(t,r,n){var o=iBe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},pp.apply(this,arguments)}function iBe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Nu(e),e!==null););return e}function aBe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u0(e,t)}function u0(e,t){return u0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},u0(e,t)}function lBe(e){var t=fBe();return function(){var n=Nu(e),o;if(t){var i=Nu(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return sBe(this,o)}}function sBe(e,t){if(t&&(Du(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uBe(e)}function uBe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fBe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nu(e){return Nu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Nu(e)}var cBe="ht__manualColumnMove--backlight",hBe=function(e){aBe(r,e);var t=lBe(r);function r(){return tBe(this,r),t.apply(this,arguments)}return rBe(r,[{key:"build",value:function(){pp(Nu(r.prototype),"build",this).call(this),te(this._element,cBe)}}]),r}(uz);const dBe=hBe;function Hu(e){return Hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hu(e)}function vBe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nH(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,pBe(n.key),n)}}function yBe(e,t,r){return t&&nH(e.prototype,t),r&&nH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pBe(e){var t=gBe(e,"string");return Hu(t)==="symbol"?t:String(t)}function gBe(e,t){if(Hu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Hu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gp(){return typeof Reflect<"u"&&Reflect.get?gp=Reflect.get.bind():gp=function(t,r,n){var o=mBe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},gp.apply(this,arguments)}function mBe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Lu(e),e!==null););return e}function bBe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f0(e,t)}function f0(e,t){return f0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},f0(e,t)}function wBe(e){var t=_Be();return function(){var n=Lu(e),o;if(t){var i=Lu(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return SBe(this,o)}}function SBe(e,t){if(t&&(Hu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CBe(e)}function CBe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _Be(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Lu(e){return Lu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lu(e)}var OBe="ht__manualColumnMove--guideline",RBe=function(e){bBe(r,e);var t=wBe(r);function r(){return vBe(this,r),t.apply(this,arguments)}return yBe(r,[{key:"build",value:function(){gp(Lu(r.prototype),"build",this).call(this),te(this._element,OBe)}}]),r}(uz);const EBe=RBe;function ju(e){return ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ju(e)}function TBe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oH(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,kBe(n.key),n)}}function PBe(e,t,r){return t&&oH(e.prototype,t),r&&oH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function kBe(e){var t=$Be(e,"string");return ju(t)==="symbol"?t:String(t)}function $Be(e,t){if(ju(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ju(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function da(){return typeof Reflect<"u"&&Reflect.get?da=Reflect.get.bind():da=function(t,r,n){var o=ABe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},da.apply(this,arguments)}function ABe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=wo(e),e!==null););return e}function IBe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c0(e,t)}function c0(e,t){return c0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},c0(e,t)}function MBe(e){var t=DBe();return function(){var n=wo(e),o;if(t){var i=wo(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return xBe(this,o)}}function xBe(e,t){if(t&&(ju(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return h0(e)}function h0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DBe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wo(e){return wo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wo(e)}be.getSingleton().register("beforeColumnMove");be.getSingleton().register("afterColumnMove");var OC="manualColumnMove",NBe=120,Yo=new WeakMap,iH="ht__manualColumnMove",Ry="show-ui",RC="on-moving--columns",EC="after-selection--columns",HBe=function(e){IBe(r,e);var t=MBe(r);function r(n){var o;return TBe(this,r),o=t.call(this,n),Yo.set(h0(o),{columnsToMove:[],countCols:0,fixedColumns:0,pressed:void 0,target:{eventPageX:void 0,coords:void 0,TD:void 0,col:void 0},cachedDropIndex:void 0}),o.eventManager=new Pt(h0(o)),o.backlight=new dBe(n),o.guideline=new EBe(n),o}return PBe(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[OC]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.addHook("beforeOnCellMouseDown",function(){return o.onBeforeOnCellMouseDown.apply(o,arguments)}),this.addHook("beforeOnCellMouseOver",function(){return o.onBeforeOnCellMouseOver.apply(o,arguments)}),this.addHook("afterScrollVertically",function(){return o.onAfterScrollVertically()}),this.addHook("afterLoadData",function(){return o.onAfterLoadData.apply(o,arguments)}),this.buildPluginUI(),this.registerEvents(),te(this.hot.rootElement,iH),da(wo(r.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),da(wo(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){Be(this.hot.rootElement,iH),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),da(wo(r.prototype),"disablePlugin",this).call(this)}},{key:"moveColumn",value:function(o,i){return this.moveColumns([o],i)}},{key:"moveColumns",value:function(o,i){var a=Yo.get(this),l=a.cachedDropIndex,s=this.isMovePossible(o,i),u=this.hot.runHooks("beforeColumnMove",o,i,l,s);if(a.cachedDropIndex=void 0,u!==!1){s&&this.hot.columnIndexMapper.moveIndexes(o,i);var f=s&&this.isColumnOrderChanged(o,i);return this.hot.runHooks("afterColumnMove",o,i,l,s,f),f}}},{key:"dragColumn",value:function(o,i){return this.dragColumns([o],i)}},{key:"dragColumns",value:function(o,i){var a=this.countFinalIndex(o,i),l=Yo.get(this);return l.cachedDropIndex=i,this.moveColumns(o,a)}},{key:"isMovePossible",value:function(o,i){var a=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),l=o.length+i>a,s=i<0,u=o.some(function(c){return c<0}),f=o.some(function(c){return c>=a});return!(l||s||u||f)}},{key:"isColumnOrderChanged",value:function(o,i){return o.some(function(a,l){return a-l!==i})}},{key:"countFinalIndex",value:function(o,i){var a=Lt(o,function(l,s){return s<i&&(l+=1),l},0);return i-a}},{key:"getColumnsWidth",value:function(o,i){for(var a=this.hot.columnIndexMapper,l=0,s=o;s<=i;s+=1){var u=a.getRenderableFromVisualIndex(s);s<0?l+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:u!==null&&(l+=this.hot.view._wt.wtTable.getStretchedColumnWidth(u)||0)}return l}},{key:"moveBySettingsOrLoad",value:function(){var o=this.hot.getSettings()[OC];if(Array.isArray(o))this.moveColumns(o,0);else if(o!==void 0){var i=this.persistentStateLoad();i.length&&this.moveColumns(i,0)}}},{key:"isFixedColumnsStart",value:function(o){return o<this.hot.getSettings().fixedColumnsStart}},{key:"persistentStateSave",value:function(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.hot.columnIndexMapper.getIndexesSequence())}},{key:"persistentStateLoad",value:function(){var o={};return this.hot.runHooks("persistentStateLoad","manualColumnMove",o),o.value?o.value:[]}},{key:"prepareColumnsToMoving",value:function(o,i){var a=[];return Ce(o,i,function(l){a.push(l)}),a}},{key:"refreshPositions",value:function(){var o=Yo.get(this),i=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(o.hoveredColumn)&&i>0&&this.hot.scrollViewportTo(void 0,this.hot.columnIndexMapper.getNearestNotHiddenIndex(i-1,-1));var a=this.hot.view._wt.wtTable,l=this.hot.view._wt.wtOverlays.scrollableElement,s=typeof l.scrollX=="number"?l.scrollX:l.scrollLeft,u=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,o.hoveredColumn-1),f=a.hider.offsetWidth,c=a.TBODY.offsetLeft,h=this.backlight.getOffset().start,d=this.backlight.getSize().width,v=0,p=0;if(this.hot.isRtl()){var m=this.hot.rootWindow,w=vt(this.hot.rootElement),S=m.innerWidth-o.rootElementOffset-w;p=m.innerWidth-o.target.eventPageX-S-(l.scrollX===void 0?s:0)}else p=o.target.eventPageX-(o.rootElementOffset-(l.scrollX===void 0?s:0));if(o.hasRowHeaders&&(v=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(o.hoveredColumn)&&(u+=s),u+=v,o.hoveredColumn<0)o.fixedColumnsStart>0?o.target.col=0:o.target.col=i>0?i-1:i;else if(o.target.TD.offsetWidth/2+u<=p){var C=o.hoveredColumn>=o.countCols?o.countCols-1:o.hoveredColumn;o.target.col=C+1,u+=o.target.TD.offsetWidth}else o.target.col=o.hoveredColumn;var P=p,R=u;p+d+h>=f?P=f-d-h:p+h<c+v&&(P=c+v+Math.abs(h)),u>=f-1?R=f-1:R===0?R=1:l.scrollX!==void 0&&o.hoveredColumn<o.fixedColumnsStart&&(R-=o.rootElementOffset<=l.scrollX?o.rootElementOffset:0),this.backlight.setPosition(null,P),this.guideline.setPosition(null,R)}},{key:"registerEvents",value:function(){var o=this,i=this.hot.rootDocument.documentElement;this.eventManager.addEventListener(i,"mousemove",function(a){return o.onMouseMove(a)}),this.eventManager.addEventListener(i,"mouseup",function(){return o.onMouseUp()})}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"onBeforeOnCellMouseDown",value:function(o,i,a,l){var s=this.hot.view._wt.wtTable,u=this.hot.selection.isSelectedByColumnHeader(),f=this.hot.getSelectedRangeLast(),c=Yo.get(this),h=Ne(o.target,"sortAction");if(!f||!u||c.pressed||o.button!==0||h){c.pressed=!1,c.columnsToMove.length=0,Be(this.hot.rootElement,[RC,Ry]);return}var d=this.guideline.isBuilt()&&!this.guideline.isAppended(),v=this.backlight.isBuilt()&&!this.backlight.isAppended();d&&v&&(this.guideline.appendTo(s.hider),this.backlight.appendTo(s.hider));var p=f.from,m=f.to,w=Math.min(p.col,m.col),S=Math.max(p.col,m.col);if(i.row<0&&i.col>=w&&i.col<=S){l.column=!0,c.pressed=!0,c.target.eventPageX=o.pageX,c.target.eventOffsetX=o.offsetX,c.hoveredColumn=i.col,c.target.TD=a,c.target.col=i.col,c.columnsToMove=this.prepareColumnsToMoving(w,S),c.hasRowHeaders=!!this.hot.getSettings().rowHeaders,c.countCols=this.hot.countCols(),c.fixedColumnsStart=this.hot.getSettings().fixedColumnsStart,c.rootElementOffset=Vt(this.hot.rootElement).left;var C=c.hasRowHeaders?-1:0,P=s.holder.scrollTop+s.getColumnHeaderHeight(0)+1,R=i.col<c.fixedColumnsStart,W=Math.abs(this.hot.view._wt.wtOverlays.inlineStartOverlay.getScrollPosition()),z=Math.abs(o.offsetX-(this.hot.isRtl()?o.target.offsetWidth:0)),q=this.getColumnsWidth(w,i.col-1)+z,K=this.getColumnsWidth(C,w-1)+(R?W:0)+q;this.backlight.setPosition(P,K),this.backlight.setSize(this.getColumnsWidth(w,S),s.hider.offsetHeight-P),this.backlight.setOffset(null,-q),te(this.hot.rootElement,RC)}else Be(this.hot.rootElement,EC),c.pressed=!1,c.columnsToMove.length=0}},{key:"onMouseMove",value:function(o){var i=Yo.get(this);if(i.pressed){if(o.target===this.backlight.element){var a=this.backlight.getSize().width;this.backlight.setSize(0),setTimeout(function(){this.backlight.setPosition(a)})}i.target.eventPageX=o.pageX,this.refreshPositions()}}},{key:"onBeforeOnCellMouseOver",value:function(o,i,a,l){var s=this.hot.getSelectedRangeLast(),u=Yo.get(this);!s||!u.pressed||(u.columnsToMove.indexOf(i.col)>-1?Be(this.hot.rootElement,Ry):te(this.hot.rootElement,Ry),l.row=!0,l.column=!0,l.cell=!0,u.hoveredColumn=i.col,u.target.TD=a)}},{key:"onMouseUp",value:function(){var o=Yo.get(this),i=o.target.col,a=o.columnsToMove.length;if(o.hoveredColumn=void 0,o.pressed=!1,o.backlightWidth=0,Be(this.hot.rootElement,[RC,Ry,EC]),this.hot.selection.isSelectedByColumnHeader()&&te(this.hot.rootElement,EC),!(a<1||i===void 0)){var l=o.columnsToMove[0],s=this.hot.toPhysicalColumn(l),u=this.dragColumns(o.columnsToMove,i);if(o.columnsToMove.length=0,u===!0){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);var f=this.hot.toVisualColumn(s),c=f+a-1;this.hot.selectColumns(f,c)}}}},{key:"onAfterScrollVertically",value:function(){var o=this.hot.view._wt.wtTable,i=o.getColumnHeaderHeight(0)+1,a=o.holder.scrollTop,l=i+a;this.backlight.setPosition(l),this.backlight.setSize(null,o.hider.offsetHeight-l)}},{key:"buildPluginUI",value:function(){this.backlight.build(),this.guideline.build()}},{key:"onAfterLoadData",value:function(){this.moveBySettingsOrLoad()}},{key:"destroy",value:function(){this.backlight.destroy(),this.guideline.destroy(),da(wo(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return OC}},{key:"PLUGIN_PRIORITY",get:function(){return NBe}}]),r}(at);function Bu(e){return Bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bu(e)}function LBe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aH(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,BBe(n.key),n)}}function jBe(e,t,r){return t&&aH(e.prototype,t),r&&aH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function BBe(e){var t=FBe(e,"string");return Bu(t)==="symbol"?t:String(t)}function FBe(e,t){if(Bu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Bu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function va(){return typeof Reflect<"u"&&Reflect.get?va=Reflect.get.bind():va=function(t,r,n){var o=VBe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},va.apply(this,arguments)}function VBe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=So(e),e!==null););return e}function WBe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d0(e,t)}function d0(e,t){return d0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},d0(e,t)}function UBe(e){var t=YBe();return function(){var n=So(e),o;if(t){var i=So(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return zBe(this,o)}}function zBe(e,t){if(t&&(Bu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v0(e)}function v0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YBe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function So(e){return So=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},So(e)}var Ey="manualColumnResize",GBe=130,lH="manualColumnWidths",TC=new WeakMap,KBe=function(e){WBe(r,e);var t=UBe(r);function r(n){var o;LBe(this,r),o=t.call(this,n);var i=o.hot.rootDocument;return o.currentTH=null,o.currentCol=null,o.selectedCols=[],o.currentWidth=null,o.newSize=null,o.startY=null,o.startWidth=null,o.startOffset=null,o.handle=i.createElement("DIV"),o.guide=i.createElement("DIV"),o.eventManager=new Pt(v0(o)),o.pressed=null,o.dblclick=0,o.autoresizeTimeout=null,o.columnWidthsMap=void 0,TC.set(v0(o),{config:void 0}),te(o.handle,"manualColumnResizer"),te(o.guide,"manualColumnResizerGuide"),o}return jBe(r,[{key:"inlineDir",get:function(){return this.hot.isRtl()?"right":"left"}},{key:"isEnabled",value:function(){return this.hot.getSettings()[Ey]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.columnWidthsMap=new Ei,this.columnWidthsMap.addLocalHook("init",function(){return o.onMapInit()}),this.hot.columnIndexMapper.registerMap(this.pluginName,this.columnWidthsMap),this.addHook("modifyColWidth",function(i,a){return o.onModifyColWidth(i,a)}),this.addHook("beforeStretchingColumnWidth",function(i,a){return o.onBeforeStretchingColumnWidth(i,a)}),this.addHook("beforeColumnResize",function(i,a,l){return o.onBeforeColumnResize(i,a,l)}),this.bindEvents(),va(So(r.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),va(So(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){var o=TC.get(this);o.config=this.columnWidthsMap.getValues(),this.hot.columnIndexMapper.unregisterMap(this.pluginName),va(So(r.prototype),"disablePlugin",this).call(this)}},{key:"saveManualColumnWidths",value:function(){this.hot.runHooks("persistentStateSave",lH,this.columnWidthsMap.getValues())}},{key:"loadManualColumnWidths",value:function(){var o={};return this.hot.runHooks("persistentStateLoad",lH,o),o.value}},{key:"setManualSize",value:function(o,i){var a=Math.max(i,20),l=this.hot.toPhysicalColumn(o);return this.columnWidthsMap.setValueAtIndex(l,a),a}},{key:"clearManualSize",value:function(o){var i=this.hot.toPhysicalColumn(o);this.columnWidthsMap.setValueAtIndex(i,null)}},{key:"onMapInit",value:function(){var o=this,i=TC.get(this),a=this.hot.getSettings()[Ey],l=this.loadManualColumnWidths();typeof l<"u"?this.hot.batchExecution(function(){l.forEach(function(s,u){o.columnWidthsMap.setValueAtIndex(u,s)})},!0):Array.isArray(a)?(this.hot.batchExecution(function(){a.forEach(function(s,u){o.columnWidthsMap.setValueAtIndex(u,s)})},!0),i.config=a):a===!0&&Array.isArray(i.config)&&this.hot.batchExecution(function(){i.config.forEach(function(s,u){o.columnWidthsMap.setValueAtIndex(u,s)})},!0)}},{key:"setupHandlePosition",value:function(o){var i=this;if(o.parentNode){this.currentTH=o;var a=this.hot.view._wt,l=a.wtTable.getCoords(this.currentTH),s=l.col;if(!(s<0)){var u=Tt(this.currentTH),f=this.currentTH.getBoundingClientRect(),c=s<a.getSetting("fixedColumnsStart"),h;c&&(h=a.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,l.row,l.col)),h||(h=a.wtOverlays.topOverlay.getRelativeCellPosition(this.currentTH,l.row,l.col)),this.currentCol=this.hot.columnIndexMapper.getVisualFromRenderableIndex(s),this.selectedCols=[];var d=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&d){var v=this.hot.getSelectedRange();$(v,function(p){var m=p.getTopStartCorner().col,w=p.getBottomEndCorner().col;Ce(m,w,function(S){i.selectedCols.includes(S)||i.selectedCols.push(S)})})}this.selectedCols.includes(this.currentCol)||(this.selectedCols=[this.currentCol]),this.startOffset=h.start-6,this.startWidth=parseInt(f.width,10),this.handle.style.top="".concat(h.top,"px"),this.handle.style[this.inlineDir]="".concat(this.startOffset+this.startWidth,"px"),this.handle.style.height="".concat(u,"px"),this.hot.rootElement.appendChild(this.handle)}}}},{key:"refreshHandlePosition",value:function(){this.handle.style[this.inlineDir]="".concat(this.startOffset+this.currentWidth,"px")}},{key:"setupGuidePosition",value:function(){var o=parseInt(Tt(this.handle),10),i=parseInt(this.handle.style.top,10)+o,a=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);te(this.handle,"active"),te(this.guide,"active"),this.guide.style.top="".concat(i,"px"),this.refreshGuidePosition(),this.guide.style.height="".concat(a-o,"px"),this.hot.rootElement.appendChild(this.guide)}},{key:"refreshGuidePosition",value:function(){this.guide.style[this.inlineDir]=this.handle.style[this.inlineDir]}},{key:"hideHandleAndGuide",value:function(){Be(this.handle,"active"),Be(this.guide,"active")}},{key:"checkIfColumnHeader",value:function(o){return!!ii(o,["THEAD"],this.hot.rootElement)}},{key:"getClosestTHParent",value:function(o){return o.tagName!=="TABLE"?o.tagName==="TH"?o:this.getClosestTHParent(o.parentNode):null}},{key:"onMouseOver",value:function(o){if(!CT(o.target)&&this.checkIfColumnHeader(o.target)){var i=this.getClosestTHParent(o.target);if(!i)return;var a=i.getAttribute("colspan");i&&(a===null||a==="1")&&(this.pressed||this.setupHandlePosition(i))}}},{key:"afterMouseDownTimeout",value:function(){var o=this,i=function(){o.hot.forceFullRender=!0,o.hot.view.render(),o.hot.view.adjustElementsSize(!0)},a=function(u,f){var c=o.hot.runHooks("beforeColumnResize",o.newSize,u,!0);c!==void 0&&(o.newSize=c),o.hot.getSettings().stretchH==="all"?o.clearManualSize(u):o.setManualSize(u,o.newSize),o.saveManualColumnWidths(),o.hot.runHooks("afterColumnResize",o.newSize,u,!0),f&&i()};if(this.dblclick>=2){var l=this.selectedCols.length;l>1?($(this.selectedCols,function(s){a(s)}),i()):$(this.selectedCols,function(s){a(s,!0)})}this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(o){var i=this;Ne(o.target,"manualColumnResizer")&&(this.setupHandlePosition(this.currentTH),this.setupGuidePosition(),this.pressed=!0,this.autoresizeTimeout===null&&(this.autoresizeTimeout=setTimeout(function(){return i.afterMouseDownTimeout()},500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startX=o.pageX,this.newSize=this.startWidth)}},{key:"onMouseMove",value:function(o){var i=this;if(this.pressed){var a=(o.pageX-this.startX)*this.hot.getDirectionFactor();this.currentWidth=this.startWidth+a,$(this.selectedCols,function(l){i.newSize=i.setManualSize(l,i.currentWidth)}),this.refreshHandlePosition(),this.refreshGuidePosition()}}},{key:"onMouseUp",value:function(){var o=this,i=function(){o.hot.forceFullRender=!0,o.hot.view.render(),o.hot.view.adjustElementsSize(!0)},a=function(u,f){o.hot.runHooks("beforeColumnResize",o.newSize,u,!1),f&&i(),o.saveManualColumnWidths(),o.hot.runHooks("afterColumnResize",o.newSize,u,!1)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startWidth){var l=this.selectedCols.length;l>1?($(this.selectedCols,function(s){a(s)}),i()):$(this.selectedCols,function(s){a(s,!0)})}this.setupHandlePosition(this.currentTH)}}},{key:"bindEvents",value:function(){var o=this,i=this.hot,a=i.rootWindow,l=i.rootElement;this.eventManager.addEventListener(l,"mouseover",function(s){return o.onMouseOver(s)}),this.eventManager.addEventListener(l,"mousedown",function(s){return o.onMouseDown(s)}),this.eventManager.addEventListener(a,"mousemove",function(s){return o.onMouseMove(s)}),this.eventManager.addEventListener(a,"mouseup",function(){return o.onMouseUp()})}},{key:"onModifyColWidth",value:function(o,i){var a=o;if(this.enabled){var l=this.hot.toPhysicalColumn(i),s=this.columnWidthsMap.getValueAtIndex(l);this.hot.getSettings()[Ey]&&s&&(a=s)}return a}},{key:"onBeforeStretchingColumnWidth",value:function(o,i){var a=this.columnWidthsMap.getValueAtIndex(i);return a===null&&(a=o),a}},{key:"onBeforeColumnResize",value:function(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}},{key:"destroy",value:function(){va(So(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return Ey}},{key:"PLUGIN_PRIORITY",get:function(){return GBe}}]),r}(at);function bd(e){return bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bd(e)}function XBe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sH(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,ZBe(n.key),n)}}function qBe(e,t,r){return t&&sH(e.prototype,t),r&&sH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZBe(e){var t=QBe(e,"string");return bd(t)==="symbol"?t:String(t)}function QBe(e,t){if(bd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(bd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var PC=0,uH=1,fH=2,El="px",JBe=function(){function e(t){XBe(this,e),this.hot=t,this._element=null,this.state=PC}return qBe(e,[{key:"appendTo",value:function(r){r.appendChild(this._element),this.state=fH}},{key:"build",value:function(){this.state===PC&&(this._element=this.hot.rootDocument.createElement("div"),this.state=uH)}},{key:"destroy",value:function(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=PC}},{key:"isAppended",value:function(){return this.state===fH}},{key:"isBuilt",value:function(){return this.state>=uH}},{key:"setPosition",value:function(r,n){r!==void 0&&(this._element.style.top=r+El),n!==void 0&&(this._element.style.left=n+El)}},{key:"getPosition",value:function(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}},{key:"setSize",value:function(r,n){r&&(this._element.style.width=r+El),n&&(this._element.style.height=n+El)}},{key:"getSize",value:function(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}},{key:"setOffset",value:function(r,n){r&&(this._element.style.marginTop=r+El),n&&(this._element.style.marginLeft=n+El)}},{key:"getOffset",value:function(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}]),e}();const fz=JBe;function Fu(e){return Fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fu(e)}function eFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cH(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,rFe(n.key),n)}}function tFe(e,t,r){return t&&cH(e.prototype,t),r&&cH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function rFe(e){var t=nFe(e,"string");return Fu(t)==="symbol"?t:String(t)}function nFe(e,t){if(Fu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Fu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mp(){return typeof Reflect<"u"&&Reflect.get?mp=Reflect.get.bind():mp=function(t,r,n){var o=oFe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},mp.apply(this,arguments)}function oFe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Vu(e),e!==null););return e}function iFe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y0(e,t)}function y0(e,t){return y0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},y0(e,t)}function aFe(e){var t=uFe();return function(){var n=Vu(e),o;if(t){var i=Vu(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return lFe(this,o)}}function lFe(e,t){if(t&&(Fu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sFe(e)}function sFe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uFe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vu(e){return Vu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vu(e)}var fFe="ht__manualRowMove--backlight",cFe=function(e){iFe(r,e);var t=aFe(r);function r(){return eFe(this,r),t.apply(this,arguments)}return tFe(r,[{key:"build",value:function(){mp(Vu(r.prototype),"build",this).call(this),te(this._element,fFe)}}]),r}(fz);const hFe=cFe;function Wu(e){return Wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wu(e)}function dFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hH(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,yFe(n.key),n)}}function vFe(e,t,r){return t&&hH(e.prototype,t),r&&hH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function yFe(e){var t=pFe(e,"string");return Wu(t)==="symbol"?t:String(t)}function pFe(e,t){if(Wu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bp(){return typeof Reflect<"u"&&Reflect.get?bp=Reflect.get.bind():bp=function(t,r,n){var o=gFe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},bp.apply(this,arguments)}function gFe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Uu(e),e!==null););return e}function mFe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p0(e,t)}function p0(e,t){return p0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},p0(e,t)}function bFe(e){var t=CFe();return function(){var n=Uu(e),o;if(t){var i=Uu(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return wFe(this,o)}}function wFe(e,t){if(t&&(Wu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SFe(e)}function SFe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CFe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Uu(e){return Uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Uu(e)}var _Fe="ht__manualRowMove--guideline",OFe=function(e){mFe(r,e);var t=bFe(r);function r(){return dFe(this,r),t.apply(this,arguments)}return vFe(r,[{key:"build",value:function(){bp(Uu(r.prototype),"build",this).call(this),te(this._element,_Fe)}}]),r}(fz);const RFe=OFe;function zu(e){return zu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zu(e)}function EFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dH(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,PFe(n.key),n)}}function TFe(e,t,r){return t&&dH(e.prototype,t),r&&dH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function PFe(e){var t=kFe(e,"string");return zu(t)==="symbol"?t:String(t)}function kFe(e,t){if(zu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(zu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ya(){return typeof Reflect<"u"&&Reflect.get?ya=Reflect.get.bind():ya=function(t,r,n){var o=$Fe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ya.apply(this,arguments)}function $Fe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Co(e),e!==null););return e}function AFe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g0(e,t)}function g0(e,t){return g0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},g0(e,t)}function IFe(e){var t=xFe();return function(){var n=Co(e),o;if(t){var i=Co(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return MFe(this,o)}}function MFe(e,t){if(t&&(zu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return m0(e)}function m0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xFe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Co(e){return Co=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Co(e)}be.getSingleton().register("beforeRowMove");be.getSingleton().register("afterRowMove");var kC="manualRowMove",DFe=140,Go=new WeakMap,vH="ht__manualRowMove",Ty="show-ui",$C="on-moving--rows",AC="after-selection--rows",NFe=function(e){AFe(r,e);var t=IFe(r);function r(n){var o;return EFe(this,r),o=t.call(this,n),Go.set(m0(o),{rowsToMove:[],pressed:void 0,target:{eventPageY:void 0,coords:void 0,TD:void 0,row:void 0},cachedDropIndex:void 0}),o.eventManager=new Pt(m0(o)),o.backlight=new hFe(n),o.guideline=new RFe(n),o}return TFe(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[kC]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.addHook("beforeOnCellMouseDown",function(){return o.onBeforeOnCellMouseDown.apply(o,arguments)}),this.addHook("beforeOnCellMouseOver",function(){return o.onBeforeOnCellMouseOver.apply(o,arguments)}),this.addHook("afterScrollHorizontally",function(){return o.onAfterScrollHorizontally()}),this.addHook("afterLoadData",function(){return o.onAfterLoadData.apply(o,arguments)}),this.buildPluginUI(),this.registerEvents(),te(this.hot.rootElement,vH),ya(Co(r.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),ya(Co(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){Be(this.hot.rootElement,vH),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),ya(Co(r.prototype),"disablePlugin",this).call(this)}},{key:"moveRow",value:function(o,i){return this.moveRows([o],i)}},{key:"moveRows",value:function(o,i){var a=Go.get(this),l=a.cachedDropIndex,s=this.isMovePossible(o,i),u=this.hot.runHooks("beforeRowMove",o,i,l,s);if(a.cachedDropIndex=void 0,u!==!1){s&&this.hot.rowIndexMapper.moveIndexes(o,i);var f=s&&this.isRowOrderChanged(o,i);return this.hot.runHooks("afterRowMove",o,i,l,s,f),f}}},{key:"dragRow",value:function(o,i){return this.dragRows([o],i)}},{key:"dragRows",value:function(o,i){var a=this.countFinalIndex(o,i),l=Go.get(this);return l.cachedDropIndex=i,this.moveRows(o,a)}},{key:"isMovePossible",value:function(o,i){var a=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),l=o.length+i>a,s=i<0,u=o.some(function(c){return c<0}),f=o.some(function(c){return c>=a});return!(l||s||u||f)}},{key:"isRowOrderChanged",value:function(o,i){return o.some(function(a,l){return a-l!==i})}},{key:"countFinalIndex",value:function(o,i){var a=Lt(o,function(l,s){return s<i&&(l+=1),l},0);return i-a}},{key:"getRowsHeight",value:function(o,i){for(var a=this.hot.rowIndexMapper,l=0,s=o;s<=i;s++){var u=a.getRenderableFromVisualIndex(s);u!==null&&(l+=this.hot.view._wt.wtTable.getRowHeight(u)||23)}return l}},{key:"moveBySettingsOrLoad",value:function(){var o=this.hot.getSettings()[kC];if(Array.isArray(o))this.moveRows(o,0);else if(o!==void 0){var i=this.persistentStateLoad();i.length&&this.moveRows(i,0)}}},{key:"isFixedRowTop",value:function(o){return o<this.hot.getSettings().fixedRowsTop}},{key:"isFixedRowBottom",value:function(o){return o>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}},{key:"persistentStateSave",value:function(){this.hot.runHooks("persistentStateSave","manualRowMove",this.hot.rowIndexMapper.getIndexesSequence())}},{key:"persistentStateLoad",value:function(){var o={};return this.hot.runHooks("persistentStateLoad","manualRowMove",o),o.value?o.value:[]}},{key:"prepareRowsToMoving",value:function(){var o=this.hot.getSelectedRangeLast(),i=[];if(!o)return i;var a=o.from,l=o.to,s=Math.min(a.row,l.row),u=Math.max(a.row,l.row);return Ce(s,u,function(f){i.push(f)}),i}},{key:"refreshPositions",value:function(){var o=Go.get(this),i=o.target.coords,a=this.hot.view.getFirstFullyVisibleRow(),l=this.hot.view.getLastFullyVisibleRow(),s=this.hot.countRows();this.isFixedRowTop(i.row)&&a>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(a-1,-1)),this.isFixedRowBottom(i.row)&&l<s&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(l+1,1),void 0,!0);var u=this.hot.view._wt.wtTable,f=o.target.TD,c=Vt(this.hot.rootElement),h=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,i.row-1),d=o.target.eventPageY-c.top+u.holder.scrollTop,v=u.hider.offsetHeight,p=u.TBODY.offsetTop,m=this.backlight.getOffset().top,w=this.backlight.getSize().height;this.isFixedRowTop(i.row)&&(h+=u.holder.scrollTop),i.row<0?o.target.row=a>0?a-1:a:f.offsetHeight/2+h<=d?(o.target.row=i.row+1,h+=i.row===0?f.offsetHeight-1:f.offsetHeight):o.target.row=i.row;var S=d,C=h;d+w+m>=v?S=v-w-m:d+m<p&&(S=p+Math.abs(m)),h>=v-1&&(C=v-1),this.backlight.setPosition(S),this.guideline.setPosition(C)}},{key:"registerEvents",value:function(){var o=this,i=this.hot.rootDocument.documentElement;this.eventManager.addEventListener(i,"mousemove",function(a){return o.onMouseMove(a)}),this.eventManager.addEventListener(i,"mouseup",function(){return o.onMouseUp()})}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"onBeforeOnCellMouseDown",value:function(o,i,a,l){var s=this.hot.view._wt,u=s.wtTable,f=s.wtViewport,c=this.hot.selection.isSelectedByRowHeader(),h=this.hot.getSelectedRangeLast(),d=Go.get(this);if(!h||!c||d.pressed||o.button!==0){d.pressed=!1,d.rowsToMove.length=0,Be(this.hot.rootElement,[$C,Ty]);return}var v=this.guideline.isBuilt()&&!this.guideline.isAppended(),p=this.backlight.isBuilt()&&!this.backlight.isAppended();v&&p&&(this.guideline.appendTo(u.hider),this.backlight.appendTo(u.hider));var m=h.from,w=h.to,S=Math.min(m.row,w.row),C=Math.max(m.row,w.row);if(i.col<0&&i.row>=S&&i.row<=C){l.row=!0,d.pressed=!0,d.target.eventPageY=o.pageY,d.target.coords=i,d.target.TD=a,d.rowsToMove=this.prepareRowsToMoving();var P=u.holder.scrollLeft+f.getRowHeaderWidth();this.backlight.setPosition(null,P),this.backlight.setSize(u.hider.offsetWidth-P,this.getRowsHeight(S,C)),this.backlight.setOffset((this.getRowsHeight(S,i.row-1)+o.offsetY)*-1,null),te(this.hot.rootElement,$C),this.refreshPositions()}else Be(this.hot.rootElement,AC),d.pressed=!1,d.rowsToMove.length=0}},{key:"onMouseMove",value:function(o){var i=Go.get(this);if(i.pressed){if(o.target===this.backlight.element){var a=this.backlight.getSize().height;this.backlight.setSize(null,0),setTimeout(function(){this.backlight.setPosition(null,a)})}i.target.eventPageY=o.pageY,this.refreshPositions()}}},{key:"onBeforeOnCellMouseOver",value:function(o,i,a,l){var s=this.hot.getSelectedRangeLast(),u=Go.get(this);!s||!u.pressed||(u.rowsToMove.indexOf(i.row)>-1?Be(this.hot.rootElement,Ty):te(this.hot.rootElement,Ty),l.row=!0,l.column=!0,l.cell=!0,u.target.coords=i,u.target.TD=a)}},{key:"onMouseUp",value:function(){var o=Go.get(this),i=o.target.row,a=o.rowsToMove.length;if(o.pressed=!1,o.backlightHeight=0,Be(this.hot.rootElement,[$C,Ty,AC]),this.hot.selection.isSelectedByRowHeader()&&te(this.hot.rootElement,AC),!(a<1||i===void 0)){var l=o.rowsToMove[0],s=this.hot.toPhysicalRow(l),u=this.dragRows(o.rowsToMove,i);if(o.rowsToMove.length=0,u===!0){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);var f=this.hot.toVisualRow(s),c=f+a-1;this.hot.selectRows(f,c)}}}},{key:"onAfterScrollHorizontally",value:function(){var o=this.hot.view._wt.wtTable,i=this.hot.view._wt.wtViewport.getRowHeaderWidth(),a=o.holder.scrollLeft,l=i+a;this.backlight.setPosition(null,l),this.backlight.setSize(o.hider.offsetWidth-l)}},{key:"buildPluginUI",value:function(){this.backlight.build(),this.guideline.build()}},{key:"onAfterLoadData",value:function(){this.moveBySettingsOrLoad()}},{key:"destroy",value:function(){this.backlight.destroy(),this.guideline.destroy(),ya(Co(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return kC}},{key:"PLUGIN_PRIORITY",get:function(){return DFe}}]),r}(at);function Yu(e){return Yu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yu(e)}function HFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yH(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,jFe(n.key),n)}}function LFe(e,t,r){return t&&yH(e.prototype,t),r&&yH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function jFe(e){var t=BFe(e,"string");return Yu(t)==="symbol"?t:String(t)}function BFe(e,t){if(Yu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Yu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pa(){return typeof Reflect<"u"&&Reflect.get?pa=Reflect.get.bind():pa=function(t,r,n){var o=FFe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},pa.apply(this,arguments)}function FFe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=_o(e),e!==null););return e}function VFe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b0(e,t)}function b0(e,t){return b0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},b0(e,t)}function WFe(e){var t=zFe();return function(){var n=_o(e),o;if(t){var i=_o(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return UFe(this,o)}}function UFe(e,t){if(t&&(Yu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return w0(e)}function w0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zFe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _o(e){return _o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_o(e)}var Py="manualRowResize",YFe=30,pH="manualRowHeights",IC=new WeakMap,GFe=function(e){VFe(r,e);var t=WFe(r);function r(n){var o;HFe(this,r),o=t.call(this,n);var i=o.hot.rootDocument;return o.currentTH=null,o.currentRow=null,o.selectedRows=[],o.currentHeight=null,o.newSize=null,o.startY=null,o.startHeight=null,o.startOffset=null,o.handle=i.createElement("DIV"),o.guide=i.createElement("DIV"),o.eventManager=new Pt(w0(o)),o.pressed=null,o.dblclick=0,o.autoresizeTimeout=null,o.rowHeightsMap=void 0,IC.set(w0(o),{config:void 0}),te(o.handle,"manualRowResizer"),te(o.guide,"manualRowResizerGuide"),o}return LFe(r,[{key:"inlineDir",get:function(){return this.hot.isRtl()?"right":"left"}},{key:"isEnabled",value:function(){return this.hot.getSettings()[Py]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.rowHeightsMap=new Ei,this.rowHeightsMap.addLocalHook("init",function(){return o.onMapInit()}),this.hot.rowIndexMapper.registerMap(this.pluginName,this.rowHeightsMap),this.addHook("modifyRowHeight",function(i,a){return o.onModifyRowHeight(i,a)}),this.bindEvents(),pa(_o(r.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),pa(_o(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){var o=IC.get(this);o.config=this.rowHeightsMap.getValues(),this.hot.rowIndexMapper.unregisterMap(this.pluginName),pa(_o(r.prototype),"disablePlugin",this).call(this)}},{key:"saveManualRowHeights",value:function(){this.hot.runHooks("persistentStateSave",pH,this.rowHeightsMap.getValues())}},{key:"loadManualRowHeights",value:function(){var o={};return this.hot.runHooks("persistentStateLoad",pH,o),o.value}},{key:"setManualSize",value:function(o,i){var a=this.hot.toPhysicalRow(o),l=Math.max(i,VV.DEFAULT_HEIGHT);return this.rowHeightsMap.setValueAtIndex(a,l),l}},{key:"setupHandlePosition",value:function(o){var i=this;this.currentTH=o;var a=this.hot.view,l=a._wt,s=l.wtTable.getCoords(this.currentTH),u=s.row;if(!(u<0)){var f=vt(this.currentTH),c=this.currentTH.getBoundingClientRect(),h=u<l.getSetting("fixedRowsTop"),d=u>=a.countNotHiddenRowIndexes(0,1)-l.getSetting("fixedRowsBottom"),v;h?v=l.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col):d&&(v=l.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col)),v||(v=l.wtOverlays.inlineStartOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col)),this.currentRow=this.hot.rowIndexMapper.getVisualFromRenderableIndex(u),this.selectedRows=[];var p=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&p){var m=this.hot.getSelectedRange();$(m,function(w){var S=w.getTopStartCorner().row,C=w.getBottomStartCorner().row;Ce(S,C,function(P){i.selectedRows.includes(P)||i.selectedRows.push(P)})})}this.selectedRows.includes(this.currentRow)||(this.selectedRows=[this.currentRow]),this.startOffset=v.top-6,this.startHeight=parseInt(c.height,10),this.handle.style.top="".concat(this.startOffset+this.startHeight,"px"),this.handle.style[this.inlineDir]="".concat(v.start,"px"),this.handle.style.width="".concat(f,"px"),this.hot.rootElement.appendChild(this.handle)}}},{key:"refreshHandlePosition",value:function(){this.handle.style.top="".concat(this.startOffset+this.currentHeight,"px")}},{key:"setupGuidePosition",value:function(){var o=parseInt(vt(this.handle),10),i=parseInt(this.handle.style[this.inlineDir],10)+o,a=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);te(this.handle,"active"),te(this.guide,"active"),this.guide.style.top=this.handle.style.top,this.guide.style[this.inlineDir]="".concat(i,"px"),this.guide.style.width="".concat(a-o,"px"),this.hot.rootElement.appendChild(this.guide)}},{key:"refreshGuidePosition",value:function(){this.guide.style.top=this.handle.style.top}},{key:"hideHandleAndGuide",value:function(){Be(this.handle,"active"),Be(this.guide,"active")}},{key:"checkIfRowHeader",value:function(o){var i,a,l=ii(o,["TH"],this.hot.rootElement);return l&&((i=o.parentNode)===null||i===void 0||(a=i.parentNode)===null||a===void 0?void 0:a.tagName)==="TBODY"}},{key:"getClosestTHParent",value:function(o){return o.tagName!=="TABLE"?o.tagName==="TH"?o:this.getClosestTHParent(o.parentNode):null}},{key:"getActualRowHeight",value:function(o){var i=this.hot.view._wt.wtTable.getRowHeight(o);return i!==void 0&&this.newSize<i?i:this.newSize}},{key:"onMouseOver",value:function(o){if(!CT(o.target)&&this.checkIfRowHeader(o.target)){var i=this.getClosestTHParent(o.target);i&&(this.pressed||this.setupHandlePosition(i))}}},{key:"afterMouseDownTimeout",value:function(){var o=this,i=function(){o.hot.forceFullRender=!0,o.hot.view.render(),o.hot.view.adjustElementsSize(!0)},a=function(u,f){var c=o.hot.runHooks("beforeRowResize",o.getActualRowHeight(u),u,!0);c!==void 0&&(o.newSize=c),o.setManualSize(u,o.newSize),o.hot.runHooks("afterRowResize",o.getActualRowHeight(u),u,!0),f&&i()};if(this.dblclick>=2){var l=this.selectedRows.length;l>1?($(this.selectedRows,function(s){a(s)}),i()):$(this.selectedRows,function(s){a(s,!0)})}this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(o){var i=this;Ne(o.target,"manualRowResizer")&&(this.setupHandlePosition(this.currentTH),this.setupGuidePosition(),this.pressed=!0,this.autoresizeTimeout===null&&(this.autoresizeTimeout=setTimeout(function(){return i.afterMouseDownTimeout()},500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startY=o.pageY,this.newSize=this.startHeight)}},{key:"onMouseMove",value:function(o){var i=this;this.pressed&&(this.currentHeight=this.startHeight+(o.pageY-this.startY),$(this.selectedRows,function(a){i.newSize=i.setManualSize(a,i.currentHeight)}),this.refreshHandlePosition(),this.refreshGuidePosition())}},{key:"onMouseUp",value:function(){var o=this,i=function(){o.hot.forceFullRender=!0,o.hot.view.render(),o.hot.view.adjustElementsSize(!0)},a=function(u,f){o.hot.runHooks("beforeRowResize",o.getActualRowHeight(u),u,!1),f&&i(),o.saveManualRowHeights(),o.hot.runHooks("afterRowResize",o.getActualRowHeight(u),u,!1)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startHeight){var l=this.selectedRows.length;l>1?($(this.selectedRows,function(s){a(s)}),i()):$(this.selectedRows,function(s){a(s,!0)})}this.setupHandlePosition(this.currentTH)}}},{key:"bindEvents",value:function(){var o=this,i=this.hot,a=i.rootElement,l=i.rootWindow;this.eventManager.addEventListener(a,"mouseover",function(s){return o.onMouseOver(s)}),this.eventManager.addEventListener(a,"mousedown",function(s){return o.onMouseDown(s)}),this.eventManager.addEventListener(l,"mousemove",function(s){return o.onMouseMove(s)}),this.eventManager.addEventListener(l,"mouseup",function(){return o.onMouseUp()})}},{key:"onModifyRowHeight",value:function(o,i){var a=o;if(this.enabled){var l=this.hot.toPhysicalRow(i),s=this.rowHeightsMap.getValueAtIndex(l);this.hot.getSettings()[Py]&&s&&(a=s)}return a}},{key:"onMapInit",value:function(){var o=this,i=IC.get(this),a=this.hot.getSettings()[Py],l=this.loadManualRowHeights();this.hot.batchExecution(function(){typeof l<"u"?l.forEach(function(s,u){o.rowHeightsMap.setValueAtIndex(u,s)}):Array.isArray(a)?(a.forEach(function(s,u){o.rowHeightsMap.setValueAtIndex(u,s)}),i.config=a):a===!0&&Array.isArray(i.config)&&i.config.forEach(function(s,u){o.rowHeightsMap.setValueAtIndex(u,s)})},!0)}},{key:"destroy",value:function(){pa(_o(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return Py}},{key:"PLUGIN_PRIORITY",get:function(){return YFe}}]),r}(at);function wd(e){return wd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wd(e)}var gH,mH,bH,wH;function ky(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function KFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SH(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,qFe(n.key),n)}}function XFe(e,t,r){return t&&SH(e.prototype,t),r&&SH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qFe(e){var t=ZFe(e,"string");return wd(t)==="symbol"?t:String(t)}function ZFe(e,t){if(wd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(wd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var QFe=function(){function e(t,r,n,o,i,a){KFe(this,e),this.row=t,this.col=r,this.rowspan=n,this.colspan=o,this.removed=!1,this.cellCoordsFactory=i,this.cellRangeFactory=a}return XFe(e,[{key:"normalize",value:function(r){var n=r.countRows(),o=r.countCols();this.row<0?this.row=0:this.row>n-1&&(this.row=n-1),this.col<0?this.col=0:this.col>o-1&&(this.col=o-1),this.row+this.rowspan>n-1&&(this.rowspan=n-this.row),this.col+this.colspan>o-1&&(this.colspan=o-this.col)}},{key:"includes",value:function(r,n){return this.row<=r&&this.col<=n&&this.row+this.rowspan-1>=r&&this.col+this.colspan-1>=n}},{key:"includesHorizontally",value:function(r){return this.col<=r&&this.col+this.colspan-1>=r}},{key:"includesVertically",value:function(r){return this.row<=r&&this.row+this.rowspan-1>=r}},{key:"shift",value:function(r,n){var o=r[0]||r[1],i=n+Math.abs(r[0]||r[1])-1,a=r[0]?"colspan":"rowspan",l=r[0]?"col":"row",s=Math.min(n,i),u=Math.max(n,i),f=this[l],c=this[l]+this[a]-1;if(f>=n&&(this[l]+=o),o>0)n<=c&&n>f&&(this[a]+=o);else if(o<0){if(s<=f&&u>=c)return this.removed=!0,!1;if(f>=s&&f<=u){var h=u-f+1,d=Math.abs(o)-h;this[l]-=d+o,this[a]-=h}else if(f<=s&&c>=u)this[a]+=o;else if(f<=s&&c>=s&&c<u){var v=c-s+1;this[a]-=v}}return!0}},{key:"isFarther",value:function(r,n){return r?n==="down"?r.row+r.rowspan-1<this.row+this.rowspan-1:n==="up"?r.row>this.row:n==="right"?r.col+r.colspan-1<this.col+this.colspan-1:n==="left"?r.col>this.col:null:!0}},{key:"getLastRow",value:function(){return this.row+this.rowspan-1}},{key:"getLastColumn",value:function(){return this.col+this.colspan-1}},{key:"getRange",value:function(){return this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))}}],[{key:"NEGATIVE_VALUES_WARNING",value:function(r){return dt(gH||(gH=ky(["The merged cell declared with {row: ",", col: ",`,
rowspan: `,", colspan: ",`} contains negative values, which is
not supported. It will not be added to the collection.`],["The merged cell declared with {row: ",", col: ",`,\\x20
rowspan: `,", colspan: ",`} contains negative values, which is\\x20
not supported. It will not be added to the collection.`])),r.row,r.col,r.rowspan,r.colspan)}},{key:"IS_OUT_OF_BOUNDS_WARNING",value:function(r){return dt(mH||(mH=ky(["The merged cell declared at [",", ",`] is positioned
(or positioned partially) outside of the table range. It was not added to the table, please fix your setup.`],["The merged cell declared at [",", ",`] is positioned\\x20
(or positioned partially) outside of the table range. It was not added to the table, please fix your setup.`])),r.row,r.col)}},{key:"IS_SINGLE_CELL",value:function(r){return dt(bH||(bH=ky(["The merged cell declared at [",", ",`] has both "rowspan"
and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.`],["The merged cell declared at [",", ",`] has both "rowspan"\\x20
and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.`])),r.row,r.col)}},{key:"ZERO_SPAN_WARNING",value:function(r){return dt(wH||(wH=ky(["The merged cell declared at [",", ",`] has "rowspan"
or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`],["The merged cell declared at [",", ",`] has "rowspan"\\x20
or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`])),r.row,r.col)}},{key:"containsNegativeValues",value:function(r){return r.row<0||r.col<0||r.rowspan<0||r.colspan<0}},{key:"isSingleCell",value:function(r){return r.colspan===1&&r.rowspan===1}},{key:"containsZeroSpan",value:function(r){return r.colspan===0||r.rowspan===0}},{key:"isOutOfBounds",value:function(r,n,o){return r.row<0||r.col<0||r.row>=n||r.row+r.rowspan-1>=n||r.col>=o||r.col+r.colspan-1>=o}}]),e}();const An=QFe;function S0(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="")}function Sd(e){return Sd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sd(e)}var CH;function JFe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _H(e){return nVe(e)||rVe(e)||tVe(e)||eVe()}function eVe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tVe(e,t){if(e){if(typeof e=="string")return C0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return C0(e,t)}}function rVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nVe(e){if(Array.isArray(e))return C0(e)}function C0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OH(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,aVe(n.key),n)}}function iVe(e,t,r){return t&&OH(e.prototype,t),r&&OH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function aVe(e){var t=lVe(e,"string");return Sd(t)==="symbol"?t:String(t)}function lVe(e,t){if(Sd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Sd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sVe=function(){function e(t){oVe(this,e),this.plugin=t,this.mergedCells=[],this.hot=t.hot}return iVe(e,[{key:"get",value:function(r,n){var o=this.mergedCells,i=!1;return $(o,function(a){return a.row<=r&&a.row+a.rowspan-1>=r&&a.col<=n&&a.col+a.colspan-1>=n?(i=a,!1):!0}),i}},{key:"getByRange",value:function(r){var n=this.mergedCells,o=!1;return $(n,function(i){return i.row<=r.from.row&&i.row+i.rowspan-1>=r.to.row&&i.col<=r.from.col&&i.col+i.colspan-1>=r.to.col?(o=i,o):!0}),o}},{key:"getWithinRange",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.mergedCells,a=[],l=r;if(!l.includesRange){var s=this.hot._createCellCoords(l.from.row,l.from.col),u=this.hot._createCellCoords(l.to.row,l.to.col);l=this.hot._createCellRange(s,s,u)}return $(i,function(f){var c=n.hot._createCellCoords(f.row,f.col),h=n.hot._createCellCoords(f.row+f.rowspan-1,f.col+f.colspan-1),d=n.hot._createCellRange(c,c,h);o?l.overlaps(d)&&a.push(f):l.includesRange(d)&&a.push(f)}),a.length?a:!1}},{key:"add",value:function(r){var n=this.mergedCells,o=r.row,i=r.col,a=r.rowspan,l=r.colspan,s=new An(o,i,a,l,this.hot._createCellCoords,this.hot._createCellRange),u=this.get(o,i),f=this.isOverlapping(s);return!u&&!f?(this.hot&&s.normalize(this.hot),n.push(s),s):(gt(e.IS_OVERLAPPING_WARNING(s)),!1)}},{key:"remove",value:function(r,n){var o=this.mergedCells,i=this.get(r,n),a=i?this.mergedCells.indexOf(i):-1;return i&&a!==-1?(o.splice(a,1),i):!1}},{key:"clear",value:function(){var r=this,n=this.mergedCells,o=[],i=[];$(n,function(a){var l=r.hot.getCell(a.row,a.col);l&&o.push([l,r.get(a.row,a.col),a.row,a.col])}),this.mergedCells.length=0,$(o,function(a,l){Ce(0,a.rowspan-1,function(s){Ce(0,a.colspan-1,function(u){if(u!==0||s!==0){var f=r.hot.getCell(a.row+s,a.col+u);f&&i.push([f,null,null,null])}})}),o[l][1]=null}),$(o,function(a){S0.apply(void 0,_H(a))}),$(i,function(a){S0.apply(void 0,_H(a))})}},{key:"isOverlapping",value:function(r){var n=this,o=this.hot._createCellRange(this.hot._createCellCoords(0,0),this.hot._createCellCoords(r.row,r.col),this.hot._createCellCoords(r.row+r.rowspan-1,r.col+r.colspan-1)),i=!1;return $(this.mergedCells,function(a){var l=n.hot._createCellRange(n.hot._createCellCoords(0,0),n.hot._createCellCoords(a.row,a.col),n.hot._createCellCoords(a.row+a.rowspan-1,a.col+a.colspan-1));return l.overlaps(o)?(i=!0,!1):!0}),i}},{key:"isFirstRenderableMergedCell",value:function(r,n){var o=this.get(r,n);return o&&this.hot.rowIndexMapper.getNearestNotHiddenIndex(o.row,1)===r&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(o.col,1)===n}},{key:"getFirstRenderableCoords",value:function(r,n){var o=this.get(r,n);if(!o||this.isFirstRenderableMergedCell(r,n))return this.hot._createCellCoords(r,n);var i=this.hot.rowIndexMapper.getNearestNotHiddenIndex(o.row,1),a=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o.col,1);return this.hot._createCellCoords(i,a)}},{key:"shiftCollections",value:function(r,n,o){var i=this,a=[0,0];switch(r){case"right":a[0]+=o;break;case"left":a[0]-=o;break;case"down":a[1]+=o;break;case"up":a[1]-=o;break}$(this.mergedCells,function(l){l.shift(a,n)}),Fp(this.mergedCells.length-1,0,function(l){var s=i.mergedCells[l];s&&s.removed&&i.mergedCells.splice(i.mergedCells.indexOf(s),1)})}}],[{key:"IS_OVERLAPPING_WARNING",value:function(r){return dt(CH||(CH=JFe(["The merged cell declared at [",", ",`], overlaps
with the other declared merged cell. The overlapping merged cell was not added to the table, please
fix your setup.`],["The merged cell declared at [",", ",`], overlaps\\x20
with the other declared merged cell. The overlapping merged cell was not added to the table, please\\x20
fix your setup.`])),r.row,r.col)}}]),e}();const uVe=sVe;function Cd(e){return Cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cd(e)}function Fi(e,t){return dVe(e)||hVe(e,t)||cVe(e,t)||fVe()}function fVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cVe(e,t){if(e){if(typeof e=="string")return RH(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return RH(e,t)}}function RH(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hVe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function dVe(e){if(Array.isArray(e))return e}function vVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EH(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,pVe(n.key),n)}}function yVe(e,t,r){return t&&EH(e.prototype,t),r&&EH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pVe(e){var t=gVe(e,"string");return Cd(t)==="symbol"?t:String(t)}function gVe(e,t){if(Cd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Cd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mVe=function(){function e(t){vVe(this,e),this.plugin=t,this.mergedCellsCollection=this.plugin.mergedCellsCollection,this.currentFillData=null}return yVe(e,[{key:"correctSelectionAreaSize",value:function(r){if(r[0]===r[2]&&r[1]===r[3]){var n=this.mergedCellsCollection.get(r[0],r[1]);n&&(r[2]=r[0]+n.rowspan-1,r[3]=r[1]+n.colspan-1)}}},{key:"getDirection",value:function(r,n){var o=null;return n[0]===r[0]&&n[1]===r[1]&&n[3]===r[3]?o="down":n[2]===r[2]&&n[1]===r[1]&&n[3]===r[3]?o="up":n[1]===r[1]&&n[2]===r[2]?o="right":o="left",o}},{key:"snapDragArea",value:function(r,n,o,i){var a=n.slice(0),l=this.getAutofillSize(r,n,o),s=Fi(r,4),u=s[0],f=s[1],c=s[2],h=s[3],d=["up","down"].indexOf(o)>-1,v=d?c-u+1:h-f+1,p=Math.floor(l/v)*v,m=l-p,w=this.getFarthestCollection(r,n,o,i);if(w){if(o==="down"){var S=w.row+w.rowspan-u-m,C=a[2]+S;C>=this.plugin.hot.countRows()?a[2]-=m:a[2]+=m?S:0}else if(o==="right"){var P=w.col+w.colspan-f-m,R=a[3]+P;R>=this.plugin.hot.countCols()?a[3]-=m:a[3]+=m?P:0}else if(o==="up"){var W=c-m-w.row+1,z=a[0]+W;z<0?a[0]+=m:a[0]-=m?W:0}else if(o==="left"){var q=h-m-w.col+1,K=a[1]+q;K<0?a[1]+=m:a[1]-=m?q:0}}return this.updateCurrentFillCache({baseArea:r,dragDirection:o,foundMergedCells:i,fillSize:l,dragArea:a,cycleLength:v}),a}},{key:"updateCurrentFillCache",value:function(r){this.currentFillData||(this.currentFillData={}),Wt(this.currentFillData,r)}},{key:"getAutofillSize",value:function(r,n,o){var i=Fi(r,4),a=i[0],l=i[1],s=i[2],u=i[3],f=Fi(n,4),c=f[0],h=f[1],d=f[2],v=f[3];switch(o){case"up":return a-c;case"down":return d-s;case"left":return l-h;case"right":return v-u;default:return null}}},{key:"getDragArea",value:function(r,n,o){var i=Fi(r,4),a=i[0],l=i[1],s=i[2],u=i[3],f=Fi(n,4),c=f[0],h=f[1],d=f[2],v=f[3];switch(o){case"up":return[c,h,a-1,u];case"down":return[s+1,l,d,u];case"left":return[c,h,s,l-1];case"right":return[a,u+1,d,v];default:return null}}},{key:"getFarthestCollection",value:function(r,n,o,i){var a=Fi(r,4),l=a[0],s=a[1],u=a[2],f=a[3],c=["up","down"].indexOf(o)>-1,h=c?u:f,d=c?l:s,v=this.getAutofillSize(r,n,o),p=c?u-l+1:f-s+1,m=Math.floor(v/p)*p,w=v-m,S=null,C=null,P=null;switch(o){case"up":S="includesVertically",P=h-w+1;break;case"left":S="includesHorizontally",P=h-w+1;break;case"down":S="includesVertically",P=d+w-1;break;case"right":S="includesHorizontally",P=d+w-1;break}return $(i,function(R){R[S](P)&&R.isFarther(C,o)&&(C=R)}),C}},{key:"recreateAfterDataPopulation",value:function(r){if(this.currentFillData){var n=this.getRangeFromChanges(r),o=this.currentFillData.foundMergedCells,i=this.currentFillData.dragDirection,a=function(h,d){switch(i){case"up":return h.row-d>=n.from.row;case"down":return h.row+h.rowspan-1+d<=n.to.row;case"left":return h.col-d>=n.from.column;case"right":return h.col+h.colspan-1+d<=n.to.column;default:return null}},l=0,s=null,u=1;do for(var f=0;f<o.length;f+=1){if(s=o[f],l=u*this.currentFillData.cycleLength,a(s,l))switch(i){case"up":this.plugin.mergedCellsCollection.add({row:s.row-l,rowspan:s.rowspan,col:s.col,colspan:s.colspan});break;case"down":this.plugin.mergedCellsCollection.add({row:s.row+l,rowspan:s.rowspan,col:s.col,colspan:s.colspan});break;case"left":this.plugin.mergedCellsCollection.add({row:s.row,rowspan:s.rowspan,col:s.col-l,colspan:s.colspan});break;case"right":this.plugin.mergedCellsCollection.add({row:s.row,rowspan:s.rowspan,col:s.col+l,colspan:s.colspan});break}f===o.length-1&&(u+=1)}while(a(s,l));this.currentFillData=null,this.plugin.hot.render(),o.length>0&&this.plugin.ifChromeForceRepaint()}}},{key:"getRangeFromChanges",value:function(r){var n=this,o={min:null,max:null},i={min:null,max:null};return $(r,function(a){var l=a[0],s=n.plugin.hot.propToCol(a[1]);(o.min===null||l<o.min)&&(o.min=l),(o.max===null||l>o.max)&&(o.max=l),(i.min===null||s<i.min)&&(i.min=s),(i.max===null||s>i.max)&&(i.max=s)}),{from:{row:o.min,column:i.min},to:{row:o.max,column:i.max}}}},{key:"dragAreaOverlapsCollections",value:function(r,n,o){var i=this.getDragArea(r,n,o),a=Fi(i,4),l=a[0],s=a[1],u=a[2],f=a[3],c=this.plugin.hot._createCellCoords(l,s),h=this.plugin.hot._createCellCoords(u,f),d=this.plugin.hot._createCellRange(c,c,h);return!!this.mergedCellsCollection.getWithinRange(d,!0)}}]),e}();const bVe=mVe;function _d(e){return _d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_d(e)}function wVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TH(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,CVe(n.key),n)}}function SVe(e,t,r){return t&&TH(e.prototype,t),r&&TH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function CVe(e){var t=_Ve(e,"string");return _d(t)==="symbol"?t:String(t)}function _Ve(e,t){if(_d(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_d(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OVe=function(){function e(t){wVe(this,e),this.plugin=t,this.hot=t.hot,this.fullySelectedMergedCellClassName="fullySelectedMergedCell"}return SVe(e,[{key:"snapDelta",value:function(r,n,o){var i=n.to,a=i.row+r.row,l=i.col+r.col;r.row?this.jumpOverMergedCell(r,o,a):r.col&&this.jumpOverMergedCell(r,o,l)}},{key:"jumpOverMergedCell",value:function(r,n,o){var i=r.row||r.col,a=null,l=null,s=null;r.row?(a=n.includesVertically(o),l=n.row,s=n.getLastRow()):r.col&&(a=n.includesHorizontally(o),l=n.col,s=n.getLastColumn()),i!==0&&(i>0?a&&o!==l&&(i+=s-o+1):a&&o!==s&&(i-=o-l+1),r.row?r.row=i:r.col&&(r.col=i))}},{key:"getUpdatedSelectionRange",value:function(r,n){return this.hot._createCellRange(r.highlight,r.from,this.hot._createCellCoords(r.to.row+n.row,r.to.col+n.col))}},{key:"getSelectedMergedCellClassName",value:function(r,n,o,i){var a=Math.min(o[0],o[2]),l=Math.min(o[1],o[3]),s=Math.max(o[0],o[2]),u=Math.max(o[1],o[3]);if(i!==void 0){var f=this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(r,n);if(f){var c=this.plugin.mergedCellsCollection.get(r,n);if(c){var h=c.getLastRow(),d=c.getLastColumn(),v=a<=c.row&&l<=c.col&&s>=h&&u>=d;if(v)return"".concat(this.fullySelectedMergedCellClassName,"-").concat(i);if(this.plugin.selectionCalculations.isMergeCellFullySelected(c,this.plugin.hot.getSelectedRange()))return"".concat(this.fullySelectedMergedCellClassName,"-multiple")}}}}},{key:"isMergeCellFullySelected",value:function(r,n){var o=[];if(!n||!r)return!1;for(var i=0;i<r.rowspan;i+=1)for(var a=0;a<r.colspan;a+=1)o.push(this.hot._createCellCoords(r.row+i,r.col+a));for(var l=0;l<o.length;l+=1){for(var s=[],u=0;u<n.length;u+=1)s[u]=n[u].includes(o[l]);if(!s.includes(!0))return!1}return!0}},{key:"getSelectedMergedCellClassNameToRemove",value:function(){for(var r=[],n=0;n<=7;n+=1)r.push("".concat(this.fullySelectedMergedCellClassName,"-").concat(n));return r.push("".concat(this.fullySelectedMergedCellClassName,"-multiple")),r}}]),e}();const RVe=OVe;function EVe(e){return{key:"mergeCells",name:function(){var r=this.getSelectedLast();if(r){var n=e.mergedCellsCollection.get(r[0],r[1]);if(n.row===r[0]&&n.col===r[1]&&n.row+n.rowspan-1===r[2]&&n.col+n.colspan-1===r[3])return this.getTranslatedPhrase(qm)}return this.getTranslatedPhrase(Xm)},callback:function(){e.toggleMergeOnSelection()},disabled:function(){var r=this.getSelectedLast();if(!r)return!0;var n=An.isSingleCell({row:r[0],col:r[1],rowspan:r[2]-r[0]+1,colspan:r[3]-r[1]+1});return n||this.selection.isSelectedByCorner()},hidden:!1}}function Gu(e){return Gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gu(e)}function TVe(e,t){return $Ve(e)||kVe(e,t)||cz(e,t)||PVe()}function PVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kVe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function $Ve(e){if(Array.isArray(e))return e}function AVe(e){return xVe(e)||MVe(e)||cz(e)||IVe()}function IVe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cz(e,t){if(e){if(typeof e=="string")return _0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _0(e,t)}}function MVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xVe(e){if(Array.isArray(e))return _0(e)}function _0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function DVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PH(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,HVe(n.key),n)}}function NVe(e,t,r){return t&&PH(e.prototype,t),r&&PH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function HVe(e){var t=LVe(e,"string");return Gu(t)==="symbol"?t:String(t)}function LVe(e,t){if(Gu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Gu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ql(){return typeof Reflect<"u"&&Reflect.get?Ql=Reflect.get.bind():Ql=function(t,r,n){var o=jVe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Ql.apply(this,arguments)}function jVe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=pi(e),e!==null););return e}function BVe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O0(e,t)}function O0(e,t){return O0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},O0(e,t)}function FVe(e){var t=WVe();return function(){var n=pi(e),o;if(t){var i=pi(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return VVe(this,o)}}function VVe(e,t){if(t&&(Gu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hz(e)}function hz(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WVe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pi(e){return pi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},pi(e)}be.getSingleton().register("beforeMergeCells");be.getSingleton().register("afterMergeCells");be.getSingleton().register("beforeUnmergeCells");be.getSingleton().register("afterUnmergeCells");var lc="mergeCells",UVe=150,kH=new WeakMap,$H=lc,zVe=function(e){BVe(r,e);var t=FVe(r);function r(n){var o;return DVe(this,r),o=t.call(this,n),kH.set(hz(o),{lastDesiredCoords:null}),o.mergedCellsCollection=null,o.autofillCalculations=null,o.selectionCalculations=null,o}return NVe(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[lc]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.mergedCellsCollection=new uVe(this),this.autofillCalculations=new bVe(this),this.selectionCalculations=new RVe(this),this.addHook("afterInit",function(){return o.onAfterInit.apply(o,arguments)}),this.addHook("modifyTransformStart",function(){return o.onModifyTransformStart.apply(o,arguments)}),this.addHook("afterModifyTransformStart",function(){return o.onAfterModifyTransformStart.apply(o,arguments)}),this.addHook("modifyTransformEnd",function(){return o.onModifyTransformEnd.apply(o,arguments)}),this.addHook("modifyGetCellCoords",function(){return o.onModifyGetCellCoords.apply(o,arguments)}),this.addHook("beforeSetRangeStart",function(){return o.onBeforeSetRangeStart.apply(o,arguments)}),this.addHook("beforeSetRangeStartOnly",function(){return o.onBeforeSetRangeStart.apply(o,arguments)}),this.addHook("beforeSetRangeEnd",function(){return o.onBeforeSetRangeEnd.apply(o,arguments)}),this.addHook("afterIsMultipleSelection",function(){return o.onAfterIsMultipleSelection.apply(o,arguments)}),this.addHook("afterRenderer",function(){return o.onAfterRenderer.apply(o,arguments)}),this.addHook("afterContextMenuDefaultOptions",function(){return o.addMergeActionsToContextMenu.apply(o,arguments)}),this.addHook("afterGetCellMeta",function(){return o.onAfterGetCellMeta.apply(o,arguments)}),this.addHook("afterViewportRowCalculatorOverride",function(){return o.onAfterViewportRowCalculatorOverride.apply(o,arguments)}),this.addHook("afterViewportColumnCalculatorOverride",function(){return o.onAfterViewportColumnCalculatorOverride.apply(o,arguments)}),this.addHook("modifyAutofillRange",function(){return o.onModifyAutofillRange.apply(o,arguments)}),this.addHook("afterCreateCol",function(){return o.onAfterCreateCol.apply(o,arguments)}),this.addHook("afterRemoveCol",function(){return o.onAfterRemoveCol.apply(o,arguments)}),this.addHook("afterCreateRow",function(){return o.onAfterCreateRow.apply(o,arguments)}),this.addHook("afterRemoveRow",function(){return o.onAfterRemoveRow.apply(o,arguments)}),this.addHook("afterChange",function(){return o.onAfterChange.apply(o,arguments)}),this.addHook("beforeDrawBorders",function(){return o.onBeforeDrawAreaBorders.apply(o,arguments)}),this.addHook("afterDrawSelection",function(){return o.onAfterDrawSelection.apply(o,arguments)}),this.addHook("beforeRemoveCellClassNames",function(){return o.onBeforeRemoveCellClassNames.apply(o,arguments)}),this.addHook("beforeUndoStackChange",function(i,a){if(a==="MergeCells")return!1}),this.registerShortcuts(),Ql(pi(r.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),Ql(pi(r.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){var o=this.hot.getSettings()[lc];this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(o),Ql(pi(r.prototype),"updatePlugin",this).call(this)}},{key:"ifChromeForceRepaint",value:function(){var o=this;if(KE()){var i=[],a=[];this.mergedCellsCollection.mergedCells.forEach(function(l){for(var s=l.row,u=l.rowspan,f=s+1;f<s+u;f++)a.push(f)}),a=AVe(new Set(a)),a.forEach(function(l){var s=o.hot.rowIndexMapper.getRenderableFromVisualIndex(l);o.hot.view._wt.wtOverlays.getOverlays(!0).map(function(u){return(u==null?void 0:u.name)==="master"?u:u.clone.wtTable}).forEach(function(u){var f=u.getRow(s);f&&(f.style.background=as(f,"backgroundColor").replace(")",", 0.99)"),i.push(f))})}),this.hot._registerTimeout(function(){i.forEach(function(l){l.style.background=as(l,"backgroundColor").replace(", 0.99)",")")})},1)}}},{key:"validateSetting",value:function(o){var i=!0;return o?(An.containsNegativeValues(o)?(gt(An.NEGATIVE_VALUES_WARNING(o)),i=!1):An.isOutOfBounds(o,this.hot.countRows(),this.hot.countCols())?(gt(An.IS_OUT_OF_BOUNDS_WARNING(o)),i=!1):An.isSingleCell(o)?(gt(An.IS_SINGLE_CELL(o)),i=!1):An.containsZeroSpan(o)&&(gt(An.ZERO_SPAN_WARNING(o)),i=!1),i):!1}},{key:"generateFromSettings",value:function(o){var i=this;if(Array.isArray(o)){var a=[];if($(o,function(l){if(i.validateSetting(l)){var s=i.hot._createCellCoords(l.row,l.col),u=i.hot._createCellCoords(l.row+l.rowspan-1,l.col+l.colspan-1),f=i.hot._createCellRange(s,s,u);i.mergeRange(f,!0,!0),Ce(l.row,l.row+l.rowspan-1,function(c){Ce(l.col,l.col+l.colspan-1,function(h){c===l.row&&h===l.col||a.push([c,h,null])})})}}),a.length===0)return;this.hot.setDataAtCell(a)}}},{key:"clearCollections",value:function(){this.mergedCellsCollection.clear()}},{key:"canMergeRange",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return i?!0:this.validateSetting(o)}},{key:"toggleMergeOnSelection",value:function(){var o=this.hot.getSelectedRangeLast();if(o){o.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");var i=o.from,a=o.to;this.toggleMerge(o),this.hot.selectCell(i.row,i.col,a.row,a.col,!1)}}},{key:"mergeSelection",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.hot.getSelectedRangeLast();if(o){o.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");var i=o.from,a=o.to;this.unmergeRange(o,!0),this.mergeRange(o),this.hot.selectCell(i.row,i.col,a.row,a.col,!1)}}},{key:"unmergeSelection",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.hot.getSelectedRangeLast();if(o){var i=o.from,a=o.to;this.unmergeRange(o,!0),this.hot.selectCell(i.row,i.col,a.row,a.col,!1)}}},{key:"mergeRange",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=o.getTopStartCorner(),u=o.getBottomEndCorner(),f={row:s.row,col:s.col,rowspan:u.row-s.row+1,colspan:u.col-s.col+1},c=[],h=null;if(!this.canMergeRange(f,a))return!1;this.hot.runHooks("beforeMergeCells",o,a),Ce(0,f.rowspan-1,function(v){Ce(0,f.colspan-1,function(p){var m=null;c[v]||(c[v]=[]),v===0&&p===0?m=i.hot.getSourceDataAtCell(i.hot.toPhysicalRow(f.row),i.hot.toPhysicalColumn(f.col)):i.hot.setCellMeta(f.row+v,f.col+p,"hidden",!0),c[v][p]=m})}),this.hot.setCellMeta(f.row,f.col,"spanned",!0);var d=this.mergedCellsCollection.add(f);return d?(l?h=[f.row,f.col,c]:this.hot.populateFromArray(f.row,f.col,c,void 0,void 0,this.pluginName),a||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",o,f,a),h):!0}},{key:"unmergeRange",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l=this.mergedCellsCollection.getWithinRange(o);l&&(this.hot.runHooks("beforeUnmergeCells",o,a),$(l,function(s){i.mergedCellsCollection.remove(s.row,s.col),Ce(0,s.rowspan-1,function(u){Ce(0,s.colspan-1,function(f){i.hot.removeCellMeta(s.row+u,s.col+f,"hidden")})}),i.hot.removeCellMeta(s.row,s.col,"spanned")}),this.hot.runHooks("afterUnmergeCells",o,a),this.hot.render())}},{key:"toggleMerge",value:function(o){var i=this.mergedCellsCollection.get(o.from.row,o.from.col),a=i.row===o.from.row&&i.col===o.from.col&&i.row+i.rowspan-1===o.to.row&&i.col+i.colspan-1===o.to.col;a?this.unmergeRange(o):this.mergeSelection(o)}},{key:"merge",value:function(o,i,a,l){var s=this.hot._createCellCoords(o,i),u=this.hot._createCellCoords(a,l);this.mergeRange(this.hot._createCellRange(s,s,u))}},{key:"unmerge",value:function(o,i,a,l){var s=this.hot._createCellCoords(o,i),u=this.hot._createCellCoords(a,l);this.unmergeRange(this.hot._createCellRange(s,s,u))}},{key:"onAfterInit",value:function(){this.generateFromSettings(this.hot.getSettings()[lc]),this.hot.render()}},{key:"registerShortcuts",value:function(){var o=this,i=this.hot.getShortcutManager(),a=i.getContext("grid");a.addShortcut({keys:[["Control","m"]],callback:function(){o.toggleMerge(o.hot.getSelectedRangeLast()),o.hot.render()},runOnlyIf:function(s){return!s.altKey},group:$H})}},{key:"unregisterShortcuts",value:function(){var o=this.hot.getShortcutManager(),i=o.getContext("grid");i.removeShortcutsByGroup($H)}},{key:"onAfterIsMultipleSelection",value:function(o){if(o){for(var i=this.mergedCellsCollection.mergedCells,a=this.hot.getSelectedRangeLast(),l=0;l<i.length;l+=1)if(a.from.row===i[l].row&&a.from.col===i[l].col&&a.to.row===i[l].row+i[l].rowspan-1&&a.to.col===i[l].col+i[l].colspan-1)return!1}return o}},{key:"onModifyTransformStart",value:function(o){var i=kH.get(this),a=this.hot.getSelectedRangeLast(),l={row:o.row,col:o.col},s=null,u=this.hot._createCellCoords(a.highlight.row,a.highlight.col),f=this.mergedCellsCollection.get(u.row,u.col);if(i.lastDesiredCoords||(i.lastDesiredCoords=this.hot._createCellCoords(null,null)),f){var c=this.hot._createCellCoords(f.row,f.col),h=this.hot._createCellCoords(f.row+f.rowspan-1,f.col+f.colspan-1),d=this.hot._createCellRange(c,c,h);d.includes(i.lastDesiredCoords)||(i.lastDesiredCoords=this.hot._createCellCoords(null,null)),l.row=i.lastDesiredCoords.row?i.lastDesiredCoords.row-u.row:l.row,l.col=i.lastDesiredCoords.col?i.lastDesiredCoords.col-u.col:l.col,o.row>0?l.row=f.row+f.rowspan-1-u.row+o.row:o.row<0&&(l.row=u.row-f.row+o.row),o.col>0?l.col=f.col+f.colspan-1-u.col+o.col:o.col<0&&(l.col=u.col-f.col+o.col)}s=this.hot._createCellCoords(a.highlight.row+l.row,a.highlight.col+l.col);var v=this.mergedCellsCollection.get(s.row,s.col);if(v){var p=this.mergedCellsCollection.getFirstRenderableCoords(v.row,v.col);i.lastDesiredCoords=s,l={row:p.row-u.row,col:p.col-u.col}}l.row!==0&&(o.row=l.row),l.col!==0&&(o.col=l.col)}},{key:"onModifyTransformEnd",value:function(o){var i=this,a=this.hot.getSelectedRangeLast(),l=pr(o),s=this.selectionCalculations.getUpdatedSelectionRange(a,o),u=pr(l),f=this.mergedCellsCollection.getWithinRange(s,!0);do u=pr(l),this.selectionCalculations.getUpdatedSelectionRange(a,l),$(f,function(c){i.selectionCalculations.snapDelta(l,a,c)});while(l.row!==u.row||l.col!==u.col);o.row=l.row,o.col=l.col}},{key:"onModifyGetCellCoords",value:function(o,i){if(!(o<0||i<0)){var a=this.mergedCellsCollection.get(o,i);if(a){var l=a.row,s=a.col,u=a.colspan,f=a.rowspan;return[l,s,l+f-1,s+u-1]}}}},{key:"addMergeActionsToContextMenu",value:function(o){o.items.push({name:"---------"},EVe(this))}},{key:"onAfterRenderer",value:function(o,i,a){var l=this.mergedCellsCollection.get(i,a),s=Ue(l)?pr(l):void 0;if(Ue(s)){var u=this.hot,f=u.rowIndexMapper,c=u.columnIndexMapper,h=s.row,d=s.col,v=s.colspan,p=s.rowspan,m=this.translateMergedCellToRenderable(h,p,d,v),w=TVe(m,2),S=w[0],C=w[1],P=f.getRenderableFromVisualIndex(i),R=c.getRenderableFromVisualIndex(a),W=S-P+1,z=C-R+1;s.row=f.getNearestNotHiddenIndex(s.row,1),s.col=c.getNearestNotHiddenIndex(s.col,1),s.rowspan=Math.min(s.rowspan,W),s.colspan=Math.min(s.colspan,z)}S0(o,s,i,a)}},{key:"onBeforeSetRangeStart",value:function(o){if(this.mergedCellsCollection.isFirstRenderableMergedCell(o.row,o.col)){var i=this.mergedCellsCollection.get(o.row,o.col),a=[i.row,i.col];o.row=a[0],o.col=a[1]}}},{key:"onBeforeSetRangeEnd",value:function(o){var i=this.hot.getSelectedRangeLast();i.highlight=this.hot._createCellCoords(i.highlight.row,i.highlight.col),i.to=o;var a=!1;if(!(this.hot.selection.isSelectedByColumnHeader()||this.hot.selection.isSelectedByRowHeader()))do{a=!1;for(var l=0;l<this.mergedCellsCollection.mergedCells.length;l+=1){var s=this.mergedCellsCollection.mergedCells[l],u=s.getRange();i.expandByRange(u)&&(o.row=i.to.row,o.col=i.to.col,a=!0)}}while(a)}},{key:"onAfterGetCellMeta",value:function(o,i,a){var l=this.mergedCellsCollection.get(o,i);l&&(l.row!==o||l.col!==i?a.copyable=!1:(a.rowspan=l.rowspan,a.colspan=l.colspan))}},{key:"onAfterViewportRowCalculatorOverride",value:function(o){var i=this.hot.countCols();this.modifyViewportRowStart(o,i),this.modifyViewportRowEnd(o,i)}},{key:"modifyViewportRowStart",value:function(o,i){for(var a=this.hot.rowIndexMapper,l=a.getVisualFromRenderableIndex(o.startRow),s=0;s<i;s+=1){var u=this.mergedCellsCollection.get(l,s);if(Ue(u)){var f=a.getRenderableFromVisualIndex(a.getNearestNotHiddenIndex(u.row,1));if(f<o.startRow){o.startRow=f,this.modifyViewportRowStart(o,i);return}}}}},{key:"modifyViewportRowEnd",value:function(o,i){for(var a=this.hot.rowIndexMapper,l=a.getVisualFromRenderableIndex(o.endRow),s=0;s<i;s+=1){var u=this.mergedCellsCollection.get(l,s);if(Ue(u)){var f=u.row+u.rowspan-1,c=a.getRenderableFromVisualIndex(a.getNearestNotHiddenIndex(f,-1));if(c>o.endRow){o.endRow=c,this.modifyViewportRowEnd(o,i);return}}}}},{key:"onAfterViewportColumnCalculatorOverride",value:function(o){var i=this.hot.countRows();this.modifyViewportColumnStart(o,i),this.modifyViewportColumnEnd(o,i)}},{key:"modifyViewportColumnStart",value:function(o,i){for(var a=this.hot.columnIndexMapper,l=a.getVisualFromRenderableIndex(o.startColumn),s=0;s<i;s+=1){var u=this.mergedCellsCollection.get(s,l);if(Ue(u)){var f=a.getRenderableFromVisualIndex(a.getNearestNotHiddenIndex(u.col,1));if(f<o.startColumn){o.startColumn=f,this.modifyViewportColumnStart(o,i);return}}}}},{key:"modifyViewportColumnEnd",value:function(o,i){for(var a=this.hot.columnIndexMapper,l=a.getVisualFromRenderableIndex(o.endColumn),s=0;s<i;s+=1){var u=this.mergedCellsCollection.get(s,l);if(Ue(u)){var f=u.col+u.colspan-1,c=a.getRenderableFromVisualIndex(a.getNearestNotHiddenIndex(f,-1));if(c>o.endColumn){o.endColumn=c,this.modifyViewportColumnEnd(o,i);return}}}}},{key:"translateMergedCellToRenderable",value:function(o,i,a,l){var s=this.hot,u=s.rowIndexMapper,f=s.columnIndexMapper,c,h;i===0?c=u.getNearestNotHiddenIndex(o,1):c=u.getNearestNotHiddenIndex(o+i-1,-1),l===0?h=f.getNearestNotHiddenIndex(a,1):h=f.getNearestNotHiddenIndex(a+l-1,-1);var d=o>=0?u.getRenderableFromVisualIndex(c):o,v=a>=0?f.getRenderableFromVisualIndex(h):a;return[d,v]}},{key:"onModifyAutofillRange",value:function(o,i){this.autofillCalculations.correctSelectionAreaSize(i);var a=this.autofillCalculations.getDirection(i,o),l=o;if(this.autofillCalculations.dragAreaOverlapsCollections(i,l,a))return l=i,l;var s=this.mergedCellsCollection.getWithinRange({from:{row:i[0],col:i[1]},to:{row:i[2],col:i[3]}});return s&&(l=this.autofillCalculations.snapDragArea(i,l,a,s)),l}},{key:"onAfterCreateCol",value:function(o,i){this.mergedCellsCollection.shiftCollections("right",o,i)}},{key:"onAfterRemoveCol",value:function(o,i){this.mergedCellsCollection.shiftCollections("left",o,i)}},{key:"onAfterCreateRow",value:function(o,i,a){a!=="auto"&&this.mergedCellsCollection.shiftCollections("down",o,i)}},{key:"onAfterRemoveRow",value:function(o,i){this.mergedCellsCollection.shiftCollections("up",o,i)}},{key:"onAfterChange",value:function(o,i){i==="Autofill.fill"&&this.autofillCalculations.recreateAfterDataPopulation(o)}},{key:"onBeforeDrawAreaBorders",value:function(o,i){if(i&&i==="area"){var a=this.hot.getSelectedRangeLast(),l=this.mergedCellsCollection.getWithinRange(a);$(l,function(s){a.getBottomEndCorner().row===s.getLastRow()&&a.getBottomEndCorner().col===s.getLastColumn()&&(o[2]=s.row,o[3]=s.col)})}}},{key:"onAfterModifyTransformStart",value:function(o,i,a){if(this.enabled){var l=this.mergedCellsCollection.get(o.row,o.col);if(l){var s=i>0,u=i<0,f=a<0,c=a>0,h=l.row+l.rowspan-1===this.hot.countRows()-1,d=l.row===0,v=l.col+l.colspan-1===this.hot.countCols()-1,p=l.col===0;(s&&h||u&&d||c&&v||f&&p)&&(o.row=l.row,o.col=l.col)}}}},{key:"onAfterDrawSelection",value:function(o,i,a,l){if(a)return this.selectionCalculations.getSelectedMergedCellClassName(o,i,a,l)}},{key:"onBeforeRemoveCellClassNames",value:function(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}}],[{key:"PLUGIN_KEY",get:function(){return lc}},{key:"PLUGIN_PRIORITY",get:function(){return UVe}}]),r}(at);function AH(e){return XVe(e)||KVe(e)||GVe(e)||YVe()}function YVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GVe(e,t){if(e){if(typeof e=="string")return IH(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return IH(e,t)}}function IH(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function KVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function XVe(e){if(Array.isArray(e))return e}function qVe(e,t){return function(r,n){var o=AH(r),i=o.slice(1),a=AH(n),l=a.slice(1);return function s(u){var f=e[u],c=t[u],h=i[u],d=l[u],v=c.multiColumnSorting,p=v.compareFunctionFactory?v.compareFunctionFactory:q2(c.type),m=p(f,c,v)(h,d);if(m===Dn){var w=u+1;if(typeof t[w]<"u")return s(w)}return m}(0)}}var MH;function ZVe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xH(){gt(dt(MH||(MH=ZVe(["Plugins `columnSorting` and `multiColumnSorting` should not be enabled simultaneously. \n Only `multiColumnSorting` will work."],["Plugins \\`columnSorting\\` and \\`multiColumnSorting\\` should not be enabled simultaneously. \n Only \\`multiColumnSorting\\` will work."]))))}var dz="sort";function QVe(e,t,r){var n=[];return r===!1||e.isColumnSorted(t)&&e.getNumberOfSortedColumns()>1&&n.push("".concat(dz,"-").concat(e.getIndexOfColumnInSortQueue(t)+1)),n}function JVe(e){var t=e.className.split(" "),r=new RegExp("^".concat(dz,"-[0-9]{1,2}$"));return t.filter(function(n){return r.test(n)})}function Ku(e){return Ku=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ku(e)}function eWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DH(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,rWe(n.key),n)}}function tWe(e,t,r){return t&&DH(e.prototype,t),r&&DH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function rWe(e){var t=nWe(e,"string");return Ku(t)==="symbol"?t:String(t)}function nWe(e,t){if(Ku(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ku(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xr(){return typeof Reflect<"u"&&Reflect.get?xr=Reflect.get.bind():xr=function(t,r,n){var o=oWe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},xr.apply(this,arguments)}function oWe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=vr(e),e!==null););return e}function iWe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R0(e,t)}function R0(e,t){return R0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},R0(e,t)}function aWe(e){var t=uWe();return function(){var n=vr(e),o;if(t){var i=vr(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return lWe(this,o)}}function lWe(e,t){if(t&&(Ku(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sWe(e)}function sWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uWe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vr(e){return vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vr(e)}var E0="multiColumnSorting",fWe=170,cWe="append",NH="columnSorting";X2(E0,qVe);var hWe=function(e){iWe(r,e);var t=aWe(r);function r(n){var o;return eWe(this,r),o=t.call(this,n),o.pluginKey=E0,o}return tWe(r,[{key:"isEnabled",value:function(){return xr(vr(r.prototype),"isEnabled",this).call(this)}},{key:"enablePlugin",value:function(){!this.enabled&&this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[NH]&&xH(),xr(vr(r.prototype),"enablePlugin",this).call(this)}},{key:"disablePlugin",value:function(){xr(vr(r.prototype),"disablePlugin",this).call(this)}},{key:"sort",value:function(o){xr(vr(r.prototype),"sort",this).call(this,o)}},{key:"clearSort",value:function(){xr(vr(r.prototype),"clearSort",this).call(this)}},{key:"isSorted",value:function(){return xr(vr(r.prototype),"isSorted",this).call(this)}},{key:"getSortConfig",value:function(o){return xr(vr(r.prototype),"getSortConfig",this).call(this,o)}},{key:"setSortConfig",value:function(o){xr(vr(r.prototype),"setSortConfig",this).call(this,o)}},{key:"getNormalizedSortConfigs",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Array.isArray(o)?o:[o]}},{key:"updateHeaderClasses",value:function(o){for(var i,a=arguments.length,l=new Array(a>1?a-1:0),s=1;s<a;s++)l[s-1]=arguments[s];(i=xr(vr(r.prototype),"updateHeaderClasses",this)).call.apply(i,[this,o].concat(l)),Be(o,JVe(o)),this.enabled!==!1&&te(o,QVe.apply(void 0,l))}},{key:"onUpdateSettings",value:function(o){this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[NH]&&xH(),xr(vr(r.prototype),"onUpdateSettings",this).call(this,o)}},{key:"onAfterOnCellMouseDown",value:function(o,i){_R(i.row,i.col,o)!==!1&&this.wasClickableHeaderClicked(o,i.col)&&(this.hot.getShortcutManager().isCtrlPressed()?(this.hot.deselectCell(),this.hot.selectColumns(i.col),this.sort(this.getNextSortConfig(i.col,cWe))):this.sort(this.getColumnNextConfig(i.col)))}}],[{key:"PLUGIN_KEY",get:function(){return E0}},{key:"PLUGIN_PRIORITY",get:function(){return fWe}}]),r}(Q2);function Xu(e){return Xu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xu(e)}function dWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HH(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,yWe(n.key),n)}}function vWe(e,t,r){return t&&HH(e.prototype,t),r&&HH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function yWe(e){var t=pWe(e,"string");return Xu(t)==="symbol"?t:String(t)}function pWe(e,t){if(Xu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wp(){return typeof Reflect<"u"&&Reflect.get?wp=Reflect.get.bind():wp=function(t,r,n){var o=gWe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},wp.apply(this,arguments)}function gWe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=qu(e),e!==null););return e}function mWe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T0(e,t)}function T0(e,t){return T0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},T0(e,t)}function bWe(e){var t=CWe();return function(){var n=qu(e),o;if(t){var i=qu(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return wWe(this,o)}}function wWe(e,t){if(t&&(Xu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SWe(e)}function SWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CWe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qu(e){return qu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qu(e)}var _We="multipleSelectionHandles",OWe=160,RWe=function(e){mWe(r,e);var t=bWe(r);function r(n){var o;return dWe(this,r),o=t.call(this,n),o.dragged=[],o.eventManager=null,o.lastSetCell=null,o}return vWe(r,[{key:"isEnabled",value:function(){return cn()}},{key:"enablePlugin",value:function(){this.enabled||(this.eventManager||(this.eventManager=new Pt(this)),this.registerListeners(),wp(qu(r.prototype),"enablePlugin",this).call(this))}},{key:"registerListeners",value:function(){var o=this,i=this,a=this.hot.rootElement;function l(s){if(i.dragged.length===1)return i.dragged.splice(0,i.dragged.length),!0;var u=i.dragged.indexOf(s);if(u===-1)return!1;u===0?i.dragged=i.dragged.slice(0,1):u===1&&(i.dragged=i.dragged.slice(-1))}this.eventManager.addEventListener(a,"touchstart",function(s){var u;if(Ne(s.target,"topSelectionHandle-HitArea"))return u=i.hot.getSelectedRangeLast(),i.dragged.push("top"),i.touchStartRange={width:u.getWidth(),height:u.getHeight(),direction:u.getDirection()},s.preventDefault(),!1;if(Ne(s.target,"bottomSelectionHandle-HitArea"))return u=i.hot.getSelectedRangeLast(),i.dragged.push("bottom"),i.touchStartRange={width:u.getWidth(),height:u.getHeight(),direction:u.getDirection()},s.preventDefault(),!1}),this.eventManager.addEventListener(a,"touchend",function(s){if(Ne(s.target,"topSelectionHandle-HitArea"))return l.call(i,"top"),i.touchStartRange=void 0,s.preventDefault(),!1;if(Ne(s.target,"bottomSelectionHandle-HitArea"))return l.call(i,"bottom"),i.touchStartRange=void 0,s.preventDefault(),!1}),this.eventManager.addEventListener(a,"touchmove",function(s){var u=o.hot.rootDocument,f,c,h,d,v,p;if(i.dragged.length!==0){var m=u.elementFromPoint(s.touches[0].clientX,s.touches[0].clientY);!m||m===i.lastSetCell||((m.nodeName==="TD"||m.nodeName==="TH")&&(f=i.hot.getCoords(m),f.col===-1&&(f.col=0),c=i.hot.getSelectedRangeLast(),h=c.getWidth(),d=c.getHeight(),v=c.getDirection(),h===1&&d===1&&i.hot.selection.setRangeEnd(f),p=i.getCurrentRangeCoords(c,f,i.touchStartRange.direction,v,i.dragged[0]),p.start!==null&&i.hot.selection.setRangeStart(p.start),i.hot.selection.setRangeEnd(p.end),i.lastSetCell=m),s.preventDefault())}})}},{key:"getCurrentRangeCoords",value:function(o,i,a,l,s){var u=o.getTopStartCorner(),f=o.getBottomEndCorner(),c=o.getBottomStartCorner(),h=o.getTopEndCorner(),d={start:null,end:null};switch(a){case"NE-SW":switch(l){case"NE-SW":case"NW-SE":s==="top"?d={start:this.hot._createCellCoords(i.row,o.highlight.col),end:this.hot._createCellCoords(c.row,i.col)}:d={start:this.hot._createCellCoords(o.highlight.row,i.col),end:this.hot._createCellCoords(i.row,u.col)};break;case"SE-NW":s==="bottom"&&(d={start:this.hot._createCellCoords(f.row,i.col),end:this.hot._createCellCoords(i.row,u.col)});break}break;case"NW-SE":switch(l){case"NE-SW":s==="top"?d={start:i,end:c}:d.end=i;break;case"NW-SE":s==="top"?d={start:i,end:f}:d.end=i;break;case"SE-NW":s==="top"?d={start:i,end:u}:d.end=i;break;case"SW-NE":s==="top"?d={start:i,end:h}:d.end=i;break}break;case"SW-NE":switch(l){case"NW-SE":s==="bottom"?d={start:this.hot._createCellCoords(i.row,u.col),end:this.hot._createCellCoords(c.row,i.col)}:d={start:this.hot._createCellCoords(u.row,i.col),end:this.hot._createCellCoords(i.row,f.col)};break;case"SW-NE":s==="top"?d={start:this.hot._createCellCoords(o.highlight.row,i.col),end:this.hot._createCellCoords(i.row,f.col)}:d={start:this.hot._createCellCoords(i.row,u.col),end:this.hot._createCellCoords(u.row,i.col)};break;case"SE-NW":s==="bottom"?d={start:this.hot._createCellCoords(i.row,h.col),end:this.hot._createCellCoords(u.row,i.col)}:s==="top"&&(d={start:c,end:i});break}break;case"SE-NW":switch(l){case"NW-SE":case"NE-SW":case"SW-NE":s==="top"&&(d.end=i);break;case"SE-NW":s==="top"?d.end=i:d={start:i,end:u};break}break}return d}},{key:"isDragged",value:function(){return this.dragged.length>0}}],[{key:"PLUGIN_KEY",get:function(){return _We}},{key:"PLUGIN_PRIORITY",get:function(){return OWe}}]),r}(at);function P0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.label,r=t===void 0?"":t,n=e.colspan,o=n===void 0?1:n,i=e.origColspan,a=i===void 0?1:i,l=e.collapsible,s=l===void 0?!1:l,u=e.crossHiddenColumns,f=u===void 0?[]:u,c=e.isCollapsed,h=c===void 0?!1:c,d=e.isHidden,v=d===void 0?!1:d,p=e.isRoot,m=p===void 0?!1:p,w=e.isPlaceholder,S=w===void 0?!1:w;return{label:r,colspan:o,origColspan:a,collapsible:s,isCollapsed:h,crossHiddenColumns:f,isHidden:v,isRoot:m,isPlaceholder:S}}function vz(){return{label:"",isPlaceholder:!0}}function LH(e){return kWe(e)||PWe(e)||TWe(e)||EWe()}function EWe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TWe(e,t){if(e){if(typeof e=="string")return k0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return k0(e,t)}}function PWe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kWe(e){if(Array.isArray(e))return k0(e)}function k0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $We(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0,r=[];if(t===0)return r;$(e,function(o){var i=[],a=0;r.push(i),$(o,function(l){var s=P0();if(Ue(l)){var u=l.label,f=l.colspan;s.label=Mt(u),typeof f=="number"&&f>1&&(s.colspan=f,s.origColspan=f)}else s.label=Mt(l);a+=s.origColspan;var c=!1;if(a>=t&&(s.colspan=s.origColspan-(a-t),s.origColspan=s.colspan,c=!0),i.push(s),s.colspan>1)for(var h=0;h<s.colspan-1;h++)i.push(vz());return!c})});var n=Math.max.apply(Math,LH(We(r,function(o){return o.length})));return $(r,function(o){if(o.length<n){var i=We(new Array(n-o.length),function(){return P0()});o.splice.apply(o,[o.length,0].concat(LH(i)))}}),r}function Od(e){return Od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Od(e)}var AWe=["row","col"];function jH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function IWe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jH(Object(r),!0).forEach(function(n){MWe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function MWe(e,t,r){return t=yz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xWe(e,t){if(e==null)return{};var r=DWe(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DWe(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function NWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BH(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,yz(n.key),n)}}function HWe(e,t,r){return t&&BH(e.prototype,t),r&&BH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function yz(e){var t=LWe(e,"string");return Od(t)==="symbol"?t:String(t)}function LWe(e,t){if(Od(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Od(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MC(e,t,r){jWe(e,t),t.set(e,r)}function jWe(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nn(e,t){var r=pz(e,t,"get");return BWe(e,r)}function BWe(e,t){return t.get?t.get.call(e):t.value}function Zf(e,t,r){var n=pz(e,t,"set");return FWe(e,n,r),r}function pz(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function FWe(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}var FH=["label","collapsible"],Kn=new WeakMap,Vi=new WeakMap,xC=new WeakMap,VWe=function(){function e(){NWe(this,e),MC(this,Kn,{writable:!0,value:[]}),MC(this,Vi,{writable:!0,value:0}),MC(this,xC,{writable:!0,value:1/0})}return HWe(e,[{key:"setColumnsLimit",value:function(r){Zf(this,xC,r)}},{key:"setData",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Zf(this,Kn,$We(r,nn(this,xC))),Zf(this,Vi,nn(this,Kn).length)}},{key:"getData",value:function(){return nn(this,Kn)}},{key:"mergeWith",value:function(r){var n=this;$(r,function(o){var i=o.row,a=o.col,l=xWe(o,AWe),s=n.getHeaderSettings(i,a);s!==null&&Wt(s,l,FH)})}},{key:"map",value:function(r){$(nn(this,Kn),function(n){$(n,function(o){var i=r(IWe({},o));Ue(i)&&Wt(o,i,FH)})})}},{key:"getHeaderSettings",value:function(r,n){var o;if(r>=nn(this,Vi)||r<0)return null;var i=nn(this,Kn)[r];return n>=i.length?null:(o=i[n])!==null&&o!==void 0?o:null}},{key:"getHeadersSettings",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=[];if(r>=nn(this,Vi)||r<0)return i;for(var a=nn(this,Kn)[r],l=0,s=n;s<a.length;s++){var u=a[s];if(u.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(l+=u.colspan,i.push(u),u.colspan>1&&(s+=u.colspan-1),l===o)break;if(l>o)throw new Error("The last column settings cannot overlap the other header layers")}return i}},{key:"getLayersCount",value:function(){return nn(this,Vi)}},{key:"getColumnsCount",value:function(){return nn(this,Vi)>0?nn(this,Kn)[0].length:0}},{key:"clear",value:function(){Zf(this,Kn,[]),Zf(this,Vi,0)}}]),e}();function Rd(e){return Rd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rd(e)}function VH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function WH(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VH(Object(r),!0).forEach(function(n){Sp(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UH(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,gz(n.key),n)}}function UWe(e,t,r){return t&&UH(e.prototype,t),r&&UH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sp(e,t,r){return t=gz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gz(e){var t=zWe(e,"string");return Rd(t)==="symbol"?t:String(t)}function zWe(e,t){if(Rd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Rd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YWe(e){return qWe(e)||XWe(e)||KWe(e)||GWe()}function GWe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KWe(e,t){if(e){if(typeof e=="string")return $0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $0(e,t)}}function XWe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qWe(e){if(Array.isArray(e))return $0(e)}function $0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ZWe="DF-pre-order";function mz(e,t){for(var r=e.call(t,this),n=0;n<this.childs.length;n++){if(r===!1)return!1;r=mz.call(this.childs[n],e,t)}return r}var QWe="DF-post-order";function bz(e,t){for(var r=0;r<this.childs.length;r++){var n=bz.call(this.childs[r],e,t);if(n===!1)return!1}return e.call(t,this)}var wz="BF";function JWe(e,t){var r=[this];function n(){if(r.length!==0){var o=r.shift();r.push.apply(r,YWe(o.childs)),e.call(t,o)!==!1&&n()}}n()}var e2e=wz,zH=new Map([[ZWe,mz],[QWe,bz],[wz,JWe]]),YH=function(){function e(t){WWe(this,e),Sp(this,"data",{}),Sp(this,"parent",null),Sp(this,"childs",[]),this.data=t}return UWe(e,[{key:"addChild",value:function(r){r.parent=this,this.childs.push(r)}},{key:"cloneTree",value:function(){for(var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this,n=new e(WH({},r.data)),o=0;o<r.childs.length;o++)n.addChild(this.cloneTree(r.childs[o]));return n}},{key:"replaceTreeWith",value:function(r){this.data=WH({},r.data),this.childs=[];for(var n=0;n<r.childs.length;n++)this.addChild(r.childs[n])}},{key:"walkDown",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e2e;if(!zH.has(n))throw new Error('Traversal strategy "'.concat(n,'" does not exist'));zH.get(n).call(this,r,this)}},{key:"walkUp",value:function(r){var n=this,o=function i(a){var l=r.call(n,a);l!==!1&&a.parent!==null&&i(a.parent)};o(this)}}]),e}();function Ed(e){return Ed=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ed(e)}function GH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function KH(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GH(Object(r),!0).forEach(function(n){t2e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GH(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t2e(e,t,r){return t=Sz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r2e(e,t){return a2e(e)||i2e(e,t)||o2e(e,t)||n2e()}function n2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o2e(e,t){if(e){if(typeof e=="string")return XH(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return XH(e,t)}}function XH(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i2e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function a2e(e){if(Array.isArray(e))return e}function l2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qH(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,Sz(n.key),n)}}function s2e(e,t,r){return t&&qH(e.prototype,t),r&&qH(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sz(e){var t=u2e(e,"string");return Ed(t)==="symbol"?t:String(t)}function u2e(e,t){if(Ed(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ed(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function DC(e,t,r){f2e(e,t),t.set(e,r)}function f2e(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cr(e,t){var r=Cz(e,t,"get");return c2e(e,r)}function c2e(e,t){return t.get?t.get.call(e):t.value}function h2e(e,t,r){var n=Cz(e,t,"set");return d2e(e,n,r),r}function Cz(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function d2e(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}var Tl=new WeakMap,Wi=new WeakMap,Pl=new WeakMap,v2e=function(){function e(t){l2e(this,e),DC(this,Tl,{writable:!0,value:new Map}),DC(this,Wi,{writable:!0,value:new Map}),DC(this,Pl,{writable:!0,value:null}),h2e(this,Pl,t)}return s2e(e,[{key:"getRoots",value:function(){return Array.from(cr(this,Tl).values())}},{key:"getRootByColumn",value:function(r){var n;return cr(this,Wi).has(r)&&(n=cr(this,Tl).get(cr(this,Wi).get(r))),n}},{key:"getNode",value:function(r,n){var o=this.getRootByColumn(n);if(o){var i=n-cr(this,Wi).get(n),a=0,l;return o.walkDown(function(s){var u=s.data,f=u.origColspan,c=u.headerLevel;if(r===c){if(i>=a&&i<=a+f-1)return l=s,l.data.isRoot=n===l.data.columnIndex,!1;a+=f}}),l}}},{key:"rebuildTreeIndex",value:function(){var r=this,n=0;cr(this,Wi).clear(),$(cr(this,Tl),function(o){for(var i=r2e(o,2),a=i[1].data.colspan,l=n;l<n+a;l++)cr(r,Wi).set(l,n);n+=a})}},{key:"buildTree",value:function(){this.clear();for(var r=cr(this,Pl).getColumnsCount(),n=0;n<r;){var o=cr(this,Pl).getHeaderSettings(0,n),i=new YH;cr(this,Tl).set(n,i),this.buildLeaves(i,n,0,o.origColspan),n+=o.origColspan}this.rebuildTreeIndex()}},{key:"buildLeaves",value:function(r,n,o){var i=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,l=cr(this,Pl).getHeadersSettings(o,n,a);o+=1,$(l,function(s){var u=KH(KH({},s),{},{headerLevel:o-1,columnIndex:n}),f;o===1?(r.data=u,f=r):(f=new YH(u),r.addChild(f)),o<cr(i,Pl).getLayersCount()&&i.buildLeaves(f,n,o,s.origColspan),n+=s.origColspan})}},{key:"clear",value:function(){cr(this,Tl).clear(),cr(this,Wi).clear()}}]),e}();function _z(e,t){e.walkDown(function(r){var n=r.data,o=r.childs;if(!n.isHidden&&(t(n.columnIndex),o.length===0))for(var i=1;i<n.colspan;i++)t(n.columnIndex+i)})}function xg(e,t){var r=e.childs;if(r.length!==0)return r[0].data[t]}function Dg(e){return xg(e,"origColspan")===e.data.origColspan}function kP(e){var t=e.data,r=e.childs;if(!t.isCollapsed||t.isHidden||t.origColspan<=1)return{rollbackModification:function(){},affectedColumns:[],colspanCompensation:0};var n=Dg(e);if(n)return kP(r[0]);t.isCollapsed=!1;var o=r.slice(1),i=new Set,a=0;if(o.length>0)$(o,function(c){c.replaceTreeWith(c.data.clonedTree),c.data.clonedTree=null;var h=c.data;a+=h.colspan,_z(c,function(d){i.add(d)})});else{var l=t.colspan,s=t.origColspan,u=t.columnIndex;a=s-l;for(var f=1;f<s;f++)i.add(u+f)}return e.walkUp(function(c){var h=c.data;h.colspan+=a,h.colspan>=h.origColspan?(h.colspan=h.origColspan,h.isCollapsed=!1):Dg(c)&&(h.isCollapsed=xg(c,"isCollapsed"))}),{rollbackModification:function(){return $P(e)},affectedColumns:Array.from(i),colspanCompensation:a}}function $P(e){var t,r=e.data,n=e.childs;if(r.isCollapsed||r.isHidden||r.origColspan<=1)return{rollbackModification:function(){},affectedColumns:[],colspanCompensation:0};var o=Dg(e);if(o)return $P(n[0]);r.isCollapsed=!0;var i=n.slice(1),a=new Set;if(i.length>0)$(i,function(h){_z(h,function(d){a.add(d)}),h.data.clonedTree=h.cloneTree(),h.walkDown(function(d){var v=d.data;v.isHidden=!0})});else for(var l=r.origColspan,s=r.columnIndex,u=1;u<l;u++){var f=s+u;a.add(f)}var c=r.colspan-((t=xg(e,"colspan"))!==null&&t!==void 0?t:1);return e.walkUp(function(h){var d=h.data;d.colspan-=c,d.colspan<=1?(d.colspan=1,d.isCollapsed=!0):Dg(h)&&(d.isCollapsed=xg(h,"isCollapsed"))}),{rollbackModification:function(){return kP(e)},affectedColumns:Array.from(a),colspanCompensation:c}}var ZH;function y2e(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function p2e(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(dt(ZH||(ZH=y2e([`The passed node is not the last node on the tree. Only for
the last node, the hide column modification can be applied.`],[`The passed node is not the last node on the tree. Only for\\x20
the last node, the hide column modification can be applied.`]))));var r=e.data.crossHiddenColumns;if(!r.includes(t)){var n=!1;e.walkUp(function(o){var i=o.data.collapsible;if(i)return n=!0,!1}),!n&&e.walkUp(function(o){var i=o.data;i.crossHiddenColumns.push(t),i.colspan>1?i.colspan-=1:i.isHidden=!0})}}var QH;function g2e(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function m2e(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(dt(QH||(QH=g2e([`The passed node is not the last node on the tree. Only for
the last node, the show column modification can be applied.`],[`The passed node is not the last node on the tree. Only for\\x20
the last node, the show column modification can be applied.`]))));var r=e.data.crossHiddenColumns;if(r.includes(t)){var n=!1;e.walkUp(function(o){var i=o.data.collapsible;if(i)return n=!0,!1}),!n&&e.walkUp(function(o){var i=o.data;i.crossHiddenColumns.splice(i.crossHiddenColumns.indexOf(t),1),!i.isHidden&&i.colspan<i.origColspan&&(i.colspan+=1),i.isHidden=!1})}}var JH=new Map([["collapse",$P],["expand",kP],["hide-column",p2e],["show-column",m2e]]);function b2e(e,t,r){if(!JH.has(e))throw new Error('The node modifier action ("'.concat(e,'") does not exist.'));return JH.get(e)(t,r)}var w2e=["crossHiddenColumns"];function S2e(e,t){if(e==null)return{};var r=C2e(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function C2e(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function $y(e){var t=[];return $(e,function(r){r.walkDown(function(n){for(var o=n.data,i=o.origColspan,a=o.columnIndex,l=o.headerLevel,s=o.crossHiddenColumns,u=O2e(t,l),f=!1,c=a;c<a+i;c++){var h=s.includes(c);if(h||f)u.push(vz());else{var d=_2e(o);d.isRoot=!0,u.push(d),f=!0}}})}),t}function _2e(e){var t=P0(e);t.crossHiddenColumns;var r=S2e(t,w2e);return r}function O2e(e,t){var r;return Array.isArray(e[t])?r=e[t]:(r=[],e[t]=r),r}function Td(e){return Td=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Td(e)}var R2e=["row"];function eL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function tL(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eL(Object(r),!0).forEach(function(n){E2e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eL(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E2e(e,t,r){return t=Oz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T2e(e,t){if(e==null)return{};var r=P2e(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function P2e(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function k2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rL(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,Oz(n.key),n)}}function $2e(e,t,r){return t&&rL(e.prototype,t),r&&rL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oz(e){var t=A2e(e,"string");return Td(t)==="symbol"?t:String(t)}function A2e(e,t){if(Td(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Td(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NC(e,t,r){I2e(e,t),t.set(e,r)}function I2e(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qf(e,t,r){var n=Rz(e,t,"set");return M2e(e,n,r),r}function M2e(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}function Nt(e,t){var r=Rz(e,t,"get");return x2e(e,r)}function Rz(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function x2e(e,t){return t.get?t.get.call(e):t.value}var kn=new WeakMap,Mr=new WeakMap,Ui=new WeakMap,D2e=function(){function e(){k2e(this,e),NC(this,kn,{writable:!0,value:new VWe}),NC(this,Mr,{writable:!0,value:new v2e(Nt(this,kn))}),NC(this,Ui,{writable:!0,value:[[]]})}return $2e(e,[{key:"setState",value:function(r){Nt(this,kn).setData(r);var n=!1;try{Nt(this,Mr).buildTree()}catch{Nt(this,Mr).clear(),Nt(this,kn).clear(),n=!0}return Qf(this,Ui,$y(Nt(this,Mr).getRoots())),n}},{key:"setColumnsLimit",value:function(r){Nt(this,kn).setColumnsLimit(r)}},{key:"mergeStateWith",value:function(r){var n=this,o=We(r,function(i){var a=i.row,l=T2e(i,R2e);return tL({row:a<0?n.rowCoordsToLevel(a):a},l)});Nt(this,kn).mergeWith(o),Nt(this,Mr).buildTree(),Qf(this,Ui,$y(Nt(this,Mr).getRoots()))}},{key:"mapState",value:function(r){Nt(this,kn).map(r),Nt(this,Mr).buildTree(),Qf(this,Ui,$y(Nt(this,Mr).getRoots()))}},{key:"mapNodes",value:function(r){return Lt(Nt(this,Mr).getRoots(),function(n,o){return o.walkDown(function(i){var a=r(i.data);a!==void 0&&n.push(a)}),n},[])}},{key:"triggerNodeModification",value:function(r,n,o){n<0&&(n=this.rowCoordsToLevel(n));var i=Nt(this,Mr).getNode(n,o),a;return i&&(a=b2e(r,i,o),Qf(this,Ui,$y(Nt(this,Mr).getRoots()))),a}},{key:"triggerColumnModification",value:function(r,n){return this.triggerNodeModification(r,-1,n)}},{key:"rowCoordsToLevel",value:function(r){if(r>=0)return null;var n=r+Math.max(this.getLayersCount(),1);return n<0?null:n}},{key:"levelToRowCoords",value:function(r){if(r<0)return null;var n=r-Math.max(this.getLayersCount(),1);return n>=0?null:n}},{key:"getHeaderSettings",value:function(r,n){var o,i;return r<0&&(r=this.rowCoordsToLevel(r)),r===null||r>=this.getLayersCount()?null:(o=(i=Nt(this,Ui)[r])===null||i===void 0?void 0:i[n])!==null&&o!==void 0?o:null}},{key:"getHeaderTreeNodeData",value:function(r,n){if(r<0&&(r=this.rowCoordsToLevel(r)),r===null||r>=this.getLayersCount())return null;var o=Nt(this,Mr).getNode(r,n);return o?tL({},o.data):null}},{key:"findLeftMostColumnIndex",value:function(r,n){var o,i=(o=this.getHeaderSettings(r,n))!==null&&o!==void 0?o:{isRoot:!0},a=i.isRoot;if(a)return n;for(var l=n-1;l>=0;){var s,u=(s=this.getHeaderSettings(r,l))!==null&&s!==void 0?s:{isRoot:!0},f=u.isRoot;if(f)break;l-=1}return l}},{key:"getLayersCount",value:function(){return Nt(this,kn).getLayersCount()}},{key:"getColumnsCount",value:function(){return Nt(this,kn).getColumnsCount()}},{key:"clear",value:function(){Qf(this,Ui,[]),Nt(this,kn).clear(),Nt(this,Mr).clear()}}]),e}();function Pd(e){return Pd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pd(e)}function N2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nL(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,Ez(n.key),n)}}function H2e(e,t,r){return t&&nL(e.prototype,t),r&&nL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jf(e,t,r){return t=Ez(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ez(e){var t=L2e(e,"string");return Pd(t)==="symbol"?t:String(t)}function L2e(e,t){if(Pd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Pd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var j2e=function(){function e(t,r){N2e(this,e),Jf(this,"hot",void 0),Jf(this,"nestedHeaderSettingsGetter",void 0),Jf(this,"layersCount",0),Jf(this,"container",void 0),Jf(this,"widthsMap",void 0),this.hot=t,this.nestedHeaderSettingsGetter=r,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}return H2e(e,[{key:"setLayersCount",value:function(r){return this.layersCount=r,this}},{key:"getWidth",value:function(r){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(r))}},{key:"buildWidthsMap",value:function(){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);var r=this.container.querySelectorAll("tr:last-of-type th"),n=r.length;this.widthsMap.clear();for(var o=0;o<n;o++){var i=this.hot.columnIndexMapper.getVisualFromRenderableIndex(o),a=this.hot.toPhysicalColumn(i);this.widthsMap.setValueAtIndex(a,r[o].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}},{key:"_buildGhostTable",value:function(r){for(var n=this.hot,o=n.rootDocument,i=n.columnIndexMapper,a=o.createDocumentFragment(),l=o.createElement("table"),s=!!this.hot.getSettings().dropdownMenu,u=i.getRenderableIndexesLength(),f=0;f<this.layersCount;f++){for(var c=o.createElement("tr"),h=0;h<u;h++){var d=i.getVisualFromRenderableIndex(h);d===null&&(d=h);var v=o.createElement("th"),p=this.nestedHeaderSettingsGetter(f,d);if(p&&(!p.isPlaceholder||p.isHidden)){var m=p.label;s&&(m+='<button class="changeType"></button>'),Ka(v,m),v.colSpan=p.colspan,c.appendChild(v)}}l.appendChild(c)}a.appendChild(l),r.appendChild(a)}},{key:"clear",value:function(){this.widthsMap.clear(),this.container=null}}]),e}();const B2e=j2e;function Zu(e){return Zu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zu(e)}var oL,iL;function aL(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function F2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lL(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,Tz(n.key),n)}}function V2e(e,t,r){return t&&lL(e.prototype,t),r&&lL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ga(){return typeof Reflect<"u"&&Reflect.get?ga=Reflect.get.bind():ga=function(t,r,n){var o=W2e(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ga.apply(this,arguments)}function W2e(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Oo(e),e!==null););return e}function U2e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A0(e,t)}function A0(e,t){return A0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},A0(e,t)}function z2e(e){var t=G2e();return function(){var n=Oo(e),o;if(t){var i=Oo(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Y2e(this,o)}}function Y2e(e,t){if(t&&(Zu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sc(e)}function sc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G2e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Oo(e){return Oo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Oo(e)}function sL(e,t,r){return t=Tz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tz(e){var t=K2e(e,"string");return Zu(t)==="symbol"?t:String(t)}function K2e(e,t){if(Zu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uL(e,t,r){X2e(e,t),t.set(e,r)}function X2e(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ay(e,t,r){var n=Pz(e,t,"set");return q2e(e,n,r),r}function q2e(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}function kt(e,t){var r=Pz(e,t,"get");return Z2e(e,r)}function Pz(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function Z2e(e,t){return t.get?t.get.call(e):t.value}var fL="nestedHeaders",Q2e=280,Bt=new WeakMap,Ko=new WeakMap,J2e=function(e){U2e(r,e);var t=z2e(r);function r(){var n;F2e(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),uL(sc(n),Bt,{writable:!0,value:new D2e}),uL(sc(n),Ko,{writable:!0,value:null}),sL(sc(n),"ghostTable",new B2e(n.hot,function(l,s){return n.getHeaderSettings(l,s)})),sL(sc(n),"detectedOverlappedHeaders",!1),n}return V2e(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[fL]}},{key:"enablePlugin",value:function(){var o=this;if(!this.enabled){var i=this.hot.getSettings(),a=i.nestedHeaders;(!Array.isArray(a)||!Array.isArray(a[0]))&&gt(dt(oL||(oL=aL([`Your Nested Headers plugin configuration is invalid. The settings has to be
passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`],[`Your Nested Headers plugin configuration is invalid. The settings has to be\\x20
passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`])))),this.addHook("init",function(){return o.onInit()}),this.addHook("afterLoadData",function(){return o.onAfterLoadData.apply(o,arguments)}),this.addHook("beforeOnCellMouseDown",function(){return o.onBeforeOnCellMouseDown.apply(o,arguments)}),this.addHook("afterOnCellMouseDown",function(){return o.onAfterOnCellMouseDown.apply(o,arguments)}),this.addHook("beforeOnCellMouseOver",function(){return o.onBeforeOnCellMouseOver.apply(o,arguments)}),this.addHook("afterGetColumnHeaderRenderers",function(l){return o.onAfterGetColumnHeaderRenderers(l)}),this.addHook("modifyColWidth",function(){return o.onModifyColWidth.apply(o,arguments)}),this.addHook("modifyColumnHeaderValue",function(){return o.onModifyColumnHeaderValue.apply(o,arguments)}),this.addHook("beforeHighlightingColumnHeader",function(){return o.onBeforeHighlightingColumnHeader.apply(o,arguments)}),this.addHook("beforeCopy",function(){return o.onBeforeCopy.apply(o,arguments)}),this.addHook("afterViewportColumnCalculatorOverride",function(){return o.onAfterViewportColumnCalculatorOverride.apply(o,arguments)}),ga(Oo(r.prototype),"enablePlugin",this).call(this),this.updatePlugin()}}},{key:"updatePlugin",value:function(){var o=this;if(this.hot.view){var i=this.hot.getSettings(),a=i.nestedHeaders;kt(this,Bt).setColumnsLimit(this.hot.countCols()),Array.isArray(a)&&(this.detectedOverlappedHeaders=kt(this,Bt).setState(a)),this.detectedOverlappedHeaders&&gt(dt(iL||(iL=aL([`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration
is currently not supported.`],[`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\\x20
is currently not supported.`])))),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach(function(l,s){var u=l===!0?"hide-column":"show-column";kt(o,Bt).triggerColumnModification(u,s)}),!kt(this,Ko)&&this.enabled&&Ay(this,Ko,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe(function(l){l.forEach(function(s){var u=s.op,f=s.index,c=s.newValue;if(u==="replace"){var h=c===!0?"hide-column":"show-column";kt(o,Bt).triggerColumnModification(h,f)}}),o.ghostTable.buildWidthsMap()})),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),ga(Oo(r.prototype),"updatePlugin",this).call(this)}}},{key:"disablePlugin",value:function(){this.clearColspans(),kt(this,Bt).clear(),kt(this,Ko).unsubscribe(),Ay(this,Ko,null),this.ghostTable.clear(),ga(Oo(r.prototype),"disablePlugin",this).call(this)}},{key:"getStateManager",value:function(){return kt(this,Bt)}},{key:"getLayersCount",value:function(){return kt(this,Bt).getLayersCount()}},{key:"getHeaderSettings",value:function(o,i){return kt(this,Bt).getHeaderSettings(o,i)}},{key:"clearColspans",value:function(){if(this.hot.view)for(var o=this.hot.view._wt,i=o.getSetting("columnHeaders").length,a=o.wtTable.THEAD,l=o.wtOverlays.topOverlay.clone.wtTable.THEAD,s=o.wtOverlays.topInlineStartCornerOverlay?o.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,u=0;u<i;u++){var f=a.childNodes[u];if(!f)break;for(var c=l.childNodes[u],h=s?s.childNodes[u]:null,d=0,v=f.childNodes.length;d<v;d++)f.childNodes[d].removeAttribute("colspan"),Be(f.childNodes[d],"hiddenHeader"),c&&c.childNodes[d]&&(c.childNodes[d].removeAttribute("colspan"),Be(c.childNodes[d],"hiddenHeader")),s&&h&&h.childNodes[d]&&(h.childNodes[d].removeAttribute("colspan"),Be(h.childNodes[d],"hiddenHeader"))}}},{key:"headerRendererFactory",value:function(o){var i=this,a=this.hot.view._wt.getSetting("fixedColumnsStart");return function(l,s){var u,f=i.hot,c=f.columnIndexMapper,h=f.view,d=c.getVisualFromRenderableIndex(l);d===null&&(d=l),s.removeAttribute("colspan"),Be(s,"hiddenHeader");var v=(u=kt(i,Bt).getHeaderSettings(o,d))!==null&&u!==void 0?u:{label:""},p=v.colspan,m=v.isHidden,w=v.isPlaceholder;if(w||m)te(s,"hiddenHeader");else if(p>1){var S,C,P=h._wt.wtOverlays,R=(S=P.topInlineStartCornerOverlay)===null||S===void 0?void 0:S.clone.wtTable.THEAD.contains(s),W=(C=P.inlineStartOverlay)===null||C===void 0?void 0:C.clone.wtTable.THEAD.contains(s),z=R||W?Math.min(p,a-l):p;z>1&&s.setAttribute("colspan",z)}i.hot.view.appendColHeader(d,s,function(){return i.getColumnHeaderValue.apply(i,arguments)},o)}}},{key:"getColumnHeaderValue",value:function(o,i){var a,l=(a=kt(this,Bt).getHeaderSettings(i,o))!==null&&a!==void 0?a:{},s=l.isHidden,u=l.isPlaceholder;return u||s?"":this.hot.getColHeader(o,i)}},{key:"onBeforeHighlightingColumnHeader",value:function(o,i,a){var l=kt(this,Bt).getHeaderTreeNodeData(i,o);if(!l)return o;var s=a.classNames,u=a.columnCursor,f=a.selectionType,c=a.selectionWidth,h=kt(this,Bt).getHeaderSettings(i,o),d=h.isRoot,v=h.colspan;if(f===mv){if(!d)return l.columnIndex}else f===Zb&&(v>c-u||!d)&&(s.length=0);return o}},{key:"onBeforeCopy",value:function(o,i,a){var l=a.columnHeadersCount;if(l!==0)for(var s=0;s<i.length;s++){var u=i[s],f=u.startRow,c=u.startCol,h=u.endRow,d=u.endCol,v=h-f+1,p=c-d+1;if(f>=0||p===1)break;for(var m=c;m<=d;m++)for(var w=f;w<=h;w++){var S,C=v+w,P=m-c;if(P!==0){var R=(S=kt(this,Bt).getHeaderTreeNodeData(w,m))===null||S===void 0?void 0:S.isRoot;R===!1&&(o[C][P]="")}}}}},{key:"onBeforeOnCellMouseDown",value:function(o,i,a,l){var s=this._getHeaderTreeNodeDataByCoords(i);s&&(l.column=!0)}},{key:"onAfterOnCellMouseDown",value:function(o,i){var a=this._getHeaderTreeNodeDataByCoords(i);if(a){var l=this.hot.selection,s=l.isSelected()?l.getSelectedRange().current():null,u=[],f=a.columnIndex,c=a.origColspan,h=!l.inInSelection(i);o.shiftKey&&s?i.col<s.from.col?u.push(s.getTopEndCorner().col,f,i.row):i.col>s.from.col?u.push(s.getTopStartCorner().col,f+c-1,i.row):u.push(f,f+c-1,i.row):(Em(o)||Si(o)&&h)&&u.push(f,f+c-1,i.row),l.selectColumns.apply(l,u)}}},{key:"onBeforeOnCellMouseOver",value:function(o,i,a,l){var s;if(this.hot.view.isMouseDown()){var u=this._getHeaderTreeNodeDataByCoords(i);if(u){var f=u.columnIndex,c=u.origColspan,h=this.hot.getSelectedRangeLast(),d=h.getTopStartCorner(),v=h.getBottomEndCorner(),p=h.from;l.column=!0,l.cell=!0;var m=[];i.col<p.col?m.push(v.col,f):i.col>p.col?m.push(d.col,f+c-1):m.push(f,f+c-1),(s=this.hot).selectColumns.apply(s,m)}}}},{key:"onAfterGetColumnHeaderRenderers",value:function(o){o.length=0;for(var i=0;i<kt(this,Bt).getLayersCount();i++)o.push(this.headerRendererFactory(i))}},{key:"onAfterViewportColumnCalculatorOverride",value:function(o){for(var i=kt(this,Bt).getLayersCount(),a=o.startColumn,l=!!i,s=0;s<i;s++){var u=kt(this,Bt).findLeftMostColumnIndex(s,o.startColumn),f=this.hot.columnIndexMapper.getRenderableFromVisualIndex(u);if(u>=0&&(l=!1),Hr(f)&&f<o.startColumn){a=f;break}}o.startColumn=l?kt(this,Bt).getHeaderTreeNodeData(0,a).columnIndex:a}},{key:"onModifyColWidth",value:function(o,i){var a=this.ghostTable.getWidth(i);return o>a?o:a}},{key:"onModifyColumnHeaderValue",value:function(o,i,a){var l,s=(l=kt(this,Bt).getHeaderTreeNodeData(a,i))!==null&&l!==void 0?l:{label:""},u=s.label;return u}},{key:"onInit",value:function(){this.updatePlugin()}},{key:"onAfterLoadData",value:function(o,i){i||this.updatePlugin()}},{key:"destroy",value:function(){Ay(this,Bt,null),kt(this,Ko)!==null&&(kt(this,Ko).unsubscribe(),Ay(this,Ko,null)),ga(Oo(r.prototype),"destroy",this).call(this)}},{key:"_getHeaderTreeNodeDataByCoords",value:function(o){if(!(o.row>=0||o.col<0))return kt(this,Bt).getHeaderTreeNodeData(o.row,o.col)}}],[{key:"PLUGIN_KEY",get:function(){return fL}},{key:"PLUGIN_PRIORITY",get:function(){return Q2e}}]),r}(at);function cL(e){return nUe(e)||rUe(e)||tUe(e)||eUe()}function eUe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tUe(e,t){if(e){if(typeof e=="string")return I0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return I0(e,t)}}function rUe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nUe(e){if(Array.isArray(e))return I0(e)}function I0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qu(e){return Qu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qu(e)}function oUe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hL(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,aUe(n.key),n)}}function iUe(e,t,r){return t&&hL(e.prototype,t),r&&hL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function aUe(e){var t=lUe(e,"string");return Qu(t)==="symbol"?t:String(t)}function lUe(e,t){if(Qu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sUe=function(){function e(t,r){oUe(this,e),this.hot=r,this.data=null,this.plugin=t,this.parentReference=new WeakMap,this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}}return iUe(e,[{key:"setData",value:function(r){this.data=r}},{key:"getData",value:function(){return this.data}},{key:"getRawSourceData",value:function(){var r=null;return this.plugin.disableCoreAPIModifiers(),r=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),r}},{key:"updateWithData",value:function(r){this.setData(r),this.rewriteCache()}},{key:"rewriteCache",value:function(){var r=this;this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},Ce(0,this.data.length-1,function(n){r.cacheNode(r.data[n],0,null)})}},{key:"cacheNode",value:function(r,n,o){var i=this;this.cache.levels[n]||(this.cache.levels[n]=[],this.cache.levelCount+=1),this.cache.levels[n].push(r),this.cache.rows.push(r),this.cache.nodeInfo.set(r,{parent:o,row:this.cache.rows.length-1,level:n}),this.hasChildren(r)&&$(r.__children,function(a){i.cacheNode(a,n+1,r)})}},{key:"getDataObject",value:function(r){return r==null?null:this.cache.rows[r]}},{key:"readTreeNodes",value:function(r,n,o,i){var a=this,l=!1,s=n;if(isNaN(s)&&s.end)return s;var u=r;return u||(u={__children:this.data},l=!0,s-=1),o!=null&&s===o?{result:u,end:!0}:i!=null&&u===i?{result:s,end:!0}:(s+=1,u.__children&&$(u.__children,function(f){if(a.parentReference.set(f,l?null:u),s=a.readTreeNodes(f,s,o,i),isNaN(s)&&s.end)return!1}),s)}},{key:"mockParent",value:function(){var r=this.mockNode();return r.__children=this.data,r}},{key:"mockNode",value:function(){var r={};return ze(this.data[0],function(n,o){r[o]=null}),r}},{key:"getRowIndex",value:function(r){return r==null?null:this.cache.nodeInfo.get(r).row}},{key:"getRowIndexWithinParent",value:function(r){var n=null;isNaN(r)?n=r:n=this.getDataObject(r);var o=this.getRowParent(r);return o==null?this.data.indexOf(n):o.__children.indexOf(n)}},{key:"countAllRows",value:function(){var r={__children:this.data};return this.countChildren(r)}},{key:"countChildren",value:function(r){var n=this,o=0,i=r;return isNaN(i)||(i=this.getDataObject(i)),!i||!i.__children?0:($(i.__children,function(a){o+=1,a.__children&&(o+=n.countChildren(a))}),o)}},{key:"getRowParent",value:function(r){var n;return isNaN(r)?n=r:n=this.getDataObject(r),this.getRowObjectParent(n)}},{key:"getRowObjectParent",value:function(r){return!r||Qu(r)!=="object"?null:this.cache.nodeInfo.get(r).parent}},{key:"getRowLevel",value:function(r){var n=null;return isNaN(r)?n=r:n=this.getDataObject(r),n?this.getRowObjectLevel(n):null}},{key:"getRowObjectLevel",value:function(r){return r==null?null:this.cache.nodeInfo.get(r).level}},{key:"hasChildren",value:function(r){var n=r;return isNaN(n)||(n=this.getDataObject(n)),!!(n.__children&&n.__children.length)}},{key:"isChild",value:function(r){return this.getRowParent(r)!==null}},{key:"getChild",value:function(r,n){var o;return((o=r.__children)===null||o===void 0?void 0:o[n])||null}},{key:"isRowHighestLevel",value:function(r){return!this.isChild(r)}},{key:"isParent",value:function(r){var n,o=r;return isNaN(o)||(o=this.getDataObject(o)),o&&!!o.__children&&((n=o.__children)===null||n===void 0?void 0:n.length)!==0}},{key:"addChild",value:function(r,n){var o=n;this.hot.runHooks("beforeAddChild",r,o);var i=null;r&&(i=this.getRowIndex(r)),this.hot.runHooks("beforeCreateRow",i+this.countChildren(r)+1,1);var a=r;r||(a=this.mockParent()),a.__children||(a.__children=[]),o||(o=this.mockNode()),a.__children.push(o),this.rewriteCache();var l=this.getRowIndex(o);this.hot.rowIndexMapper.insertIndexes(l,1),this.hot.runHooks("afterCreateRow",l,1),this.hot.runHooks("afterAddChild",r,o)}},{key:"addChildAtIndex",value:function(r,n,o){var i=o,a;if(i||(i=this.mockNode()),this.hot.runHooks("beforeAddChild",r,i,n),r){var l=this.getRowIndex(r),s=l+n+1;this.hot.runHooks("beforeCreateRow",s,1),r.__children.splice(n,null,i),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(r),"__children",r.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(s,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",s,1),a=s}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",n,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),a=this.getRowIndex(this.data[n]);i=this.getDataObject(a),this.hot.runHooks("afterAddChild",r,i,n)}},{key:"addSibling",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"below",o=this.translateTrimmedRow(r),i=this.getRowParent(o),a=this.getRowIndexWithinParent(o);switch(n){case"below":this.addChildAtIndex(i,a+1,null);break;case"above":this.addChildAtIndex(i,a,null);break}}},{key:"detachFromParent",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=null,a=[];Array.isArray(r)?(Ce(r[0],r[2],function(w){var S=n.translateTrimmedRow(w);a.push(n.getDataObject(S))}),Ce(0,a.length-2,function(w){n.detachFromParent(a[w],!1)}),i=a[a.length-1]):i=r;var l=this.getRowIndex(i),s=this.countChildren(i),u=this.getRowIndexWithinParent(i),f=this.getRowParent(i),c=this.getRowParent(f),h=this.getRowIndex(c),d=null;if(this.hot.runHooks("beforeDetachChild",f,i),u!=null){var v=Array.from(new Array(l+s+1).keys()).splice(-1*(s+1));if(this.hot.runHooks("beforeRemoveRow",l,s+1,v,this.plugin.pluginName),f.__children.splice(u,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",l,s+1,v,this.plugin.pluginName),c){d=h+this.countChildren(c);var p=this.getChild(c,this.countChildren(c)-1),m=this.getRowIndex(p);this.hot.runHooks("beforeCreateRow",m+1,s+1,this.plugin.pluginName),c.__children.push(i)}else d=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",d-2,s+1,this.plugin.pluginName),this.data.push(i)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",d-2,s+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",f,i,this.getRowIndex(i)),o&&this.hot.render()}},{key:"filterData",value:function(r,n,o){var i=this,a=[];$(o,function(l){a.push(i.getDataObject(l))}),$(a,function(l){var s=i.getRowIndexWithinParent(l),u=i.getRowParent(l);u===null?i.data.splice(s,1):u.__children.splice(s,1)}),this.rewriteCache()}},{key:"spliceData",value:function(r,n,o){var i=this.getDataObject(r-1),a=null,l=r;if(i&&i.__children&&i.__children.length===0?(a=i,l=0):r<this.countAllRows()&&(a=this.getRowParent(r),l=this.getRowIndexWithinParent(r)),a)if(o){var s;(s=a.__children).splice.apply(s,[l,n].concat(cL(o)))}else a.__children.splice(l,n);else if(o){var u;(u=this.data).splice.apply(u,[l,n].concat(cL(o)))}else this.data.splice(l,n);this.rewriteCache()}},{key:"syncRowWithRawSource",value:function(r){var n=r,o=null;do o=this.getRowParent(o),o!==null&&(n=o);while(o!==null);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndex(n),"__children",n.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}},{key:"moveRow",value:function(r,n,o,i){var a=n===this.hot.countRows(),l=this.getRowParent(r),s=this.getRowIndexWithinParent(r),u=l.__children.slice(s,s+1),f=r>n,c=a?this.getRowParent(n-1):this.getRowParent(n);c==null&&(c=this.getRowParent(n-1)),c==null&&(c=this.getDataObject(n-1)),c?c.__children||(c.__children=[]):(c=this.getDataObject(n),c.__children=[]);var h=a||o||i?c.__children.length:this.getRowIndexWithinParent(n),d=l===c;c.__children.splice(h,0,u[0]),l.__children.splice(s+(f&&d?1:0),1),this.syncRowWithRawSource(l),d||this.syncRowWithRawSource(c)}},{key:"translateTrimmedRow",value:function(r){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(r):r}},{key:"untranslateTrimmedRow",value:function(r){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(r):r}}]),e}();const uUe=sUe;function kd(e){return kd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kd(e)}function dL(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,cUe(n.key),n)}}function fUe(e,t,r){return t&&dL(e.prototype,t),r&&dL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function cUe(e){var t=hUe(e,"string");return kd(t)==="symbol"?t:String(t)}function hUe(e,t){if(kd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(kd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dUe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var vUe=fUe(function e(t,r){dUe(this,e),this.hot=r,this.plugin=t});const AP=vUe;function Ju(e){return Ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ju(e)}function yUe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vL(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,gUe(n.key),n)}}function pUe(e,t,r){return t&&vL(e.prototype,t),r&&vL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function gUe(e){var t=mUe(e,"string");return Ju(t)==="symbol"?t:String(t)}function mUe(e,t){if(Ju(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ju(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bUe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M0(e,t)}function M0(e,t){return M0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},M0(e,t)}function wUe(e){var t=_Ue();return function(){var n=Ng(e),o;if(t){var i=Ng(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return SUe(this,o)}}function SUe(e,t){if(t&&(Ju(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CUe(e)}function CUe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _Ue(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ng(e){return Ng=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ng(e)}var OUe=function(e){bUe(r,e);var t=wUe(r);function r(n,o){var i;return yUe(this,r),i=t.call(this,n,o),i.dataManager=i.plugin.dataManager,i.collapsingUI=i.plugin.collapsingUI,i.rowHeaderWidthCache=null,i}return pUe(r,[{key:"appendLevelIndicators",value:function(o,i){var a=this.hot.toPhysicalRow(o),l=this.dataManager.getRowLevel(a),s=this.dataManager.getDataObject(a),u=i.getElementsByTagName("DIV")[0],f=u.querySelector("span.rowHeader"),c=u.querySelectorAll('[class^="ht_nesting"]');if($(c,function(p){p&&u.removeChild(p)}),te(i,r.CSS_CLASSES.indicatorContainer),l){var h=this.hot.rootDocument,d=f.cloneNode(!0);u.innerHTML="",Ce(0,l-1,function(){var p=h.createElement("SPAN");te(p,r.CSS_CLASSES.emptyIndicator),u.appendChild(p)}),u.appendChild(d)}if(this.dataManager.hasChildren(s)){var v=this.hot.rootDocument.createElement("DIV");te(i,r.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(a)?te(v,"".concat(r.CSS_CLASSES.button," ").concat(r.CSS_CLASSES.expandButton)):te(v,"".concat(r.CSS_CLASSES.button," ").concat(r.CSS_CLASSES.collapseButton)),u.appendChild(v)}}},{key:"updateRowHeaderWidth",value:function(o){var i=o;i||(i=this.dataManager.cache.levelCount),this.rowHeaderWidthCache=Math.max(50,11+10*i+25),this.hot.render()}}],[{key:"CSS_CLASSES",get:function(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",indicator:"ht_nestingLevel",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}}]),r}(AP);const kz=OUe;function ef(e){return ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ef(e)}function yL(e){return PUe(e)||TUe(e)||EUe(e)||RUe()}function RUe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EUe(e,t){if(e){if(typeof e=="string")return x0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return x0(e,t)}}function TUe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PUe(e){if(Array.isArray(e))return x0(e)}function x0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function kUe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pL(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,AUe(n.key),n)}}function $Ue(e,t,r){return t&&pL(e.prototype,t),r&&pL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function AUe(e){var t=IUe(e,"string");return ef(t)==="symbol"?t:String(t)}function IUe(e,t){if(ef(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ef(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MUe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D0(e,t)}function D0(e,t){return D0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},D0(e,t)}function xUe(e){var t=HUe();return function(){var n=Hg(e),o;if(t){var i=Hg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return DUe(this,o)}}function DUe(e,t){if(t&&(ef(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NUe(e)}function NUe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HUe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hg(e){return Hg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Hg(e)}var LUe=function(e){MUe(r,e);var t=xUe(r);function r(n,o){var i;return kUe(this,r),i=t.call(this,n,o),i.dataManager=i.plugin.dataManager,i.collapsedRows=[],i.collapsedRowsStash={stash:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;i.lastCollapsedRows=i.collapsedRows.slice(0),i.expandMultipleChildren(i.lastCollapsedRows,l)},shiftStash:function(l,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;s==null&&(s=1/0),$(i.lastCollapsedRows,function(f,c){f>=l&&f<s&&(i.lastCollapsedRows[c]=f+u)})},applyStash:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;i.collapseMultipleChildren(i.lastCollapsedRows,l),i.lastCollapsedRows=void 0},trimStash:function(l,s){Ce(l,l+s-1,function(u){var f=i.lastCollapsedRows.indexOf(u);f>-1&&i.lastCollapsedRows.splice(f,1)})}},i}return $Ue(r,[{key:"collapseChildren",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=[],u=null,f=null,c=null;return isNaN(o)?(u=o,f=this.dataManager.getRowIndex(u)):(u=this.dataManager.getDataObject(o),f=o),this.dataManager.hasChildren(u)&&$(u.__children,function(h){s.push(i.dataManager.getRowIndex(h))}),c=this.collapseRows(s,!0,!1),l&&this.trimRows(c),a&&this.renderAndAdjust(),this.collapsedRows.indexOf(f)===-1&&this.collapsedRows.push(f),c}},{key:"collapseMultipleChildren",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=[];$(o,function(u){s.push.apply(s,yL(i.collapseChildren(u,!1,!1)))}),l&&this.trimRows(s),a&&this.renderAndAdjust()}},{key:"collapseRow",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.collapseRows([o],i)}},{key:"collapseRows",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=[];return $(o,function(u){s.push(u),a&&i.collapseChildRows(u,s)}),l&&this.trimRows(s),s}},{key:"collapseChildRows",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(this.dataManager.hasChildren(o)){var s=this.dataManager.getDataObject(o);$(s.__children,function(u){var f=i.dataManager.getRowIndex(u);a.push(f),i.collapseChildRows(f,a)})}l&&this.trimRows(a)}},{key:"expandRow",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.expandRows([o],i)}},{key:"expandRows",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=[];return $(o,function(u){s.push(u),a&&i.expandChildRows(u,s)}),l&&this.untrimRows(s),s}},{key:"expandChildRows",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(this.dataManager.hasChildren(o)){var s=this.dataManager.getDataObject(o);$(s.__children,function(u){if(!i.isAnyParentCollapsed(u)){var f=i.dataManager.getRowIndex(u);a.push(f),i.expandChildRows(f,a)}})}l&&this.untrimRows(a)}},{key:"expandChildren",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=[],u=null,f=null,c=null;return isNaN(o)?(u=o,f=this.dataManager.getRowIndex(o)):(u=this.dataManager.getDataObject(o),f=o),this.collapsedRows.splice(this.collapsedRows.indexOf(f),1),this.dataManager.hasChildren(u)&&$(u.__children,function(h){var d=i.dataManager.getRowIndex(h);s.push(d)}),c=this.expandRows(s,!0,!1),l&&this.untrimRows(c),a&&this.renderAndAdjust(),c}},{key:"expandMultipleChildren",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=[];$(o,function(u){s.push.apply(s,yL(i.expandChildren(u,!1,!1)))}),l&&this.untrimRows(s),a&&this.renderAndAdjust()}},{key:"collapseAll",value:function(){var o=this,i=this.dataManager.getData(),a=[];$(i,function(l){o.dataManager.hasChildren(l)&&a.push(l)}),this.collapseMultipleChildren(a),this.renderAndAdjust()}},{key:"expandAll",value:function(){var o=this,i=this.dataManager.getData(),a=[];$(i,function(l){o.dataManager.hasChildren(l)&&a.push(l)}),this.expandMultipleChildren(a),this.renderAndAdjust()}},{key:"trimRows",value:function(o){var i=this;this.hot.batchExecution(function(){$(o,function(a){i.plugin.collapsedRowsMap.setValueAtIndex(a,!0)})},!0)}},{key:"untrimRows",value:function(o){var i=this;this.hot.batchExecution(function(){$(o,function(a){i.plugin.collapsedRowsMap.setValueAtIndex(a,!1)})},!0)}},{key:"areChildrenCollapsed",value:function(o){var i=this,a=isNaN(o)?o:this.dataManager.getDataObject(o),l=!0;return a===null&&(a={__children:this.dataManager.data}),this.dataManager.hasChildren(a)&&$(a.__children,function(s){var u=i.dataManager.getRowIndex(s);if(!i.plugin.collapsedRowsMap.getValueAtIndex(u))return l=!1,!1}),l}},{key:"isAnyParentCollapsed",value:function(o){for(var i=o;i!==null;){i=this.dataManager.getRowParent(i);var a=this.dataManager.getRowIndex(i);if(this.collapsedRows.indexOf(a)>-1)return!0}return!1}},{key:"toggleState",value:function(o,i){if(!(i.col>=0)){var a=this.translateTrimmedRow(i.row);Ne(o.target,kz.CSS_CLASSES.button)&&(this.areChildrenCollapsed(a)?this.expandChildren(a):this.collapseChildren(a),gn(o))}}},{key:"translateTrimmedRow",value:function(o){return this.hot.toPhysicalRow(o)}},{key:"untranslateTrimmedRow",value:function(o){return this.hot.toVisualRow(o)}},{key:"renderAndAdjust",value:function(){this.hot.render(),this.hot.view.adjustElementsSize()}}]),r}(AP);const jUe=LUe;function tf(e){return tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tf(e)}function BUe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gL(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,VUe(n.key),n)}}function FUe(e,t,r){return t&&gL(e.prototype,t),r&&gL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function VUe(e){var t=WUe(e,"string");return tf(t)==="symbol"?t:String(t)}function WUe(e,t){if(tf(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tf(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UUe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N0(e,t)}function N0(e,t){return N0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},N0(e,t)}function zUe(e){var t=GUe();return function(){var n=Lg(e),o;if(t){var i=Lg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return YUe(this,o)}}function YUe(e,t){if(t&&(tf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $z(e)}function $z(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GUe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Lg(e){return Lg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lg(e)}var mL=new WeakMap,KUe=function(e){UUe(r,e);var t=zUe(r);function r(n,o){var i;return BUe(this,r),i=t.call(this,n,o),mL.set($z(i),{row_above:function(l,s){var u=s[s.length-1];i.dataManager.addSibling(u.start.row,"above")},row_below:function(l,s){var u=s[s.length-1];i.dataManager.addSibling(u.start.row,"below")}}),i.dataManager=i.plugin.dataManager,i}return FUe(r,[{key:"appendOptions",value:function(o){var i=this,a=[{key:"add_child",name:function(){return this.getTranslatedPhrase(yb)},callback:function(){var s=i.dataManager.translateTrimmedRow(i.hot.getSelectedLast()[0]),u=i.dataManager.getDataObject(s);i.dataManager.addChild(u)},disabled:function(){var s=i.hot.getSelectedLast();return!s||s[0]<0||i.hot.selection.isSelectedByColumnHeader()||i.hot.countRows()>=i.hot.getSettings().maxRows}},{key:"detach_from_parent",name:function(){return this.getTranslatedPhrase(pb)},callback:function(){i.dataManager.detachFromParent(i.hot.getSelectedLast())},disabled:function(){var s=i.hot.getSelectedLast(),u=i.dataManager.translateTrimmedRow(s[0]),f=i.dataManager.getRowParent(u);return!f||!s||s[0]<0||i.hot.selection.isSelectedByColumnHeader()||i.hot.countRows()>=i.hot.getSettings().maxRows}},{name:"---------"}];return Ce(0,o.items.length-1,function(l){if(l===0)return $(a,function(s,u){o.items.splice(l+u,0,s)}),!1}),this.modifyRowInsertingOptions(o)}},{key:"modifyRowInsertingOptions",value:function(o){var i=mL.get(this);return Ce(0,o.items.length-1,function(a){var l=i[o.items[a].key];l!=null&&(o.items[a].callback=l)}),o}}]),r}(AP);const XUe=KUe;function $d(e){return $d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$d(e)}var bL;function wL(e){return JUe(e)||QUe(e)||ZUe(e)||qUe()}function qUe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZUe(e,t){if(e){if(typeof e=="string")return H0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return H0(e,t)}}function QUe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function JUe(e){if(Array.isArray(e))return H0(e)}function H0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function eze(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function tze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SL(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,nze(n.key),n)}}function rze(e,t,r){return t&&SL(e.prototype,t),r&&SL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function nze(e){var t=oze(e,"string");return $d(t)==="symbol"?t:String(t)}function oze(e,t){if($d(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if($d(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ize=function(){function e(t){tze(this,e),this.plugin=t,this.hot=t.hot,this.dataManager=t.dataManager,this.collapsingUI=t.collapsingUI}return rze(e,[{key:"onBeforeRowMove",value:function(r,n,o,i){var a=this,l=this.displayAPICompatibilityWarning({rows:r,finalIndex:n,dropIndex:o,movePossible:i});if(l)return!1;this.movedToCollapsed=!1;var s=o===this.hot.countRows(),u=s?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(o),f=!0,c=r.map(function(m){if(!f)return!1;var w=a.dataManager.translateTrimmedRow(m);return f=a.shouldAllowMoving(w,u),w}),h=c.indexOf(u)===-1;if(!f||!h)return!1;var d=this.getBaseParent(c),v=this.getTargetParent(s,u),p=d===v;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(v),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(c,u,p),this.moveRows(c,u,v),this.dataManager.rewriteCache(),this.moveCellsMeta(c,u),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",r,n,o,i,i&&this.isRowOrderChanged(r,n)),this.hot.render(),this.selectCells(r,o),!1}},{key:"displayAPICompatibilityWarning",value:function(r){var n=r.rows,o=r.finalIndex,i=r.dropIndex,a=r.movePossible,l=!1;return pt(i)&&(gt(dt(bL||(bL=eze([`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows
when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`],[`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\\x20
when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`])))),this.hot.runHooks("afterRowMove",n,o,i,a,!1),l=!0),l}},{key:"shouldAllowMoving",value:function(r,n){return!(this.dataManager.isParent(r)||this.dataManager.isRowHighestLevel(r)||r===n||n===0)}},{key:"getBaseParent",value:function(r){return this.dataManager.getRowParent(r[0])}},{key:"getTargetParent",value:function(r,n){var o=this.dataManager.getRowParent(r?n-1:n);return o==null&&(o=this.dataManager.getRowParent(n-1)),o}},{key:"shiftCollapsibleParentsLocations",value:function(r,n,o){o||(Math.max.apply(Math,wL(r))<=n?this.collapsingUI.collapsedRowsStash.shiftStash(r[0],n,-1*r.length):this.collapsingUI.collapsedRowsStash.shiftStash(n,r[0],r.length))}},{key:"moveRows",value:function(r,n,o){var i=this,a=n===this.dataManager.getRowIndex(o)+this.dataManager.countChildren(o)+1;this.hot.batchRender(function(){r.forEach(function(l){i.dataManager.moveRow(l,n,i.movedToCollapsed,a)})})}},{key:"moveCellsMeta",value:function(r,n){var o=this,i,a=[],l=Math.max.apply(Math,wL(r))<n;r.forEach(function(s){a.push(o.hot.getCellMetaAtRow(s))}),this.hot.spliceCellsMeta(r[0],r.length),(i=this.hot).spliceCellsMeta.apply(i,[n-(l?a.length:0),0].concat(a))}},{key:"selectCells",value:function(r,n){var o=r.length,i=0,a=0,l=null,s=null;if(this.movedToCollapsed){var u=null;r[o-1]<n?u=this.dataManager.translateTrimmedRow(n-o):u=this.dataManager.translateTrimmedRow(n);var f=this.dataManager.getRowParent(u===null?this.hot.countSourceRows()-1:u-1),c=this.dataManager.getRowIndex(f);i=this.dataManager.untranslateTrimmedRow(c),a=i}else r[o-1]<n?(a=n-1,i=a-o+1):(i=n,a=i+o-1);l=this.hot.selection,s=this.hot.countCols()-1,l.setRangeStart(this.hot._createCellCoords(i,0)),l.setRangeEnd(this.hot._createCellCoords(a,s),!0)}},{key:"isRowOrderChanged",value:function(r,n){return r.some(function(o,i){return o-i!==n})}}]),e}();function rf(e){return rf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rf(e)}function aze(e){return fze(e)||uze(e)||sze(e)||lze()}function lze(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sze(e,t){if(e){if(typeof e=="string")return L0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return L0(e,t)}}function uze(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fze(e){if(Array.isArray(e))return L0(e)}function L0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function cze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CL(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,dze(n.key),n)}}function hze(e,t,r){return t&&CL(e.prototype,t),r&&CL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function dze(e){var t=vze(e,"string");return rf(t)==="symbol"?t:String(t)}function vze(e,t){if(rf(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(rf(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ma(){return typeof Reflect<"u"&&Reflect.get?ma=Reflect.get.bind():ma=function(t,r,n){var o=yze(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ma.apply(this,arguments)}function yze(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ro(e),e!==null););return e}function pze(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j0(e,t)}function j0(e,t){return j0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},j0(e,t)}function gze(e){var t=bze();return function(){var n=Ro(e),o;if(t){var i=Ro(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return mze(this,o)}}function mze(e,t){if(t&&(rf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Az(e)}function Az(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ro(e){return Ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ro(e)}var HC="nestedRows",wze=300,Xn=new WeakMap,Sze="The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled.",Cze=function(e){pze(r,e);var t=gze(r);function r(n){var o;return cze(this,r),o=t.call(this,n),o.dataManager=null,o.headersUI=null,o.collapsedRowsMap=null,Xn.set(Az(o),{movedToCollapsed:!1,skipRender:null,skipCoreAPIModifiers:!1}),o}return hze(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[HC]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new yv),this.dataManager=new uUe(this,this.hot),this.collapsingUI=new jUe(this,this.hot),this.headersUI=new kz(this,this.hot),this.contextMenuUI=new XUe(this,this.hot),this.rowMoveController=new ize(this),this.addHook("afterInit",function(){return o.onAfterInit.apply(o,arguments)}),this.addHook("beforeViewRender",function(){return o.onBeforeViewRender.apply(o,arguments)}),this.addHook("modifyRowData",function(){return o.onModifyRowData.apply(o,arguments)}),this.addHook("modifySourceLength",function(){return o.onModifySourceLength.apply(o,arguments)}),this.addHook("beforeDataSplice",function(){return o.onBeforeDataSplice.apply(o,arguments)}),this.addHook("filterData",function(){return o.onFilterData.apply(o,arguments)}),this.addHook("afterContextMenuDefaultOptions",function(){return o.onAfterContextMenuDefaultOptions.apply(o,arguments)}),this.addHook("afterGetRowHeader",function(){return o.onAfterGetRowHeader.apply(o,arguments)}),this.addHook("beforeOnCellMouseDown",function(){return o.onBeforeOnCellMouseDown.apply(o,arguments)}),this.addHook("beforeRemoveRow",function(){return o.onBeforeRemoveRow.apply(o,arguments)}),this.addHook("afterRemoveRow",function(){return o.onAfterRemoveRow.apply(o,arguments)}),this.addHook("beforeAddChild",function(){return o.onBeforeAddChild.apply(o,arguments)}),this.addHook("afterAddChild",function(){return o.onAfterAddChild.apply(o,arguments)}),this.addHook("beforeDetachChild",function(){return o.onBeforeDetachChild.apply(o,arguments)}),this.addHook("afterDetachChild",function(){return o.onAfterDetachChild.apply(o,arguments)}),this.addHook("modifyRowHeaderWidth",function(){return o.onModifyRowHeaderWidth.apply(o,arguments)}),this.addHook("afterCreateRow",function(){return o.onAfterCreateRow.apply(o,arguments)}),this.addHook("beforeRowMove",function(){return o.onBeforeRowMove.apply(o,arguments)}),this.addHook("beforeLoadData",function(i){return o.onBeforeLoadData(i)}),this.addHook("beforeUpdateData",function(i){return o.onBeforeLoadData(i)}),ma(Ro(r.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),ma(Ro(r.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin();var o=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(o),ma(Ro(r.prototype),"updatePlugin",this).call(this)}},{key:"onBeforeRowMove",value:function(o,i,a,l){return this.rowMoveController.onBeforeRowMove(o,i,a,l)}},{key:"disableCoreAPIModifiers",value:function(){var o=Xn.get(this);o.skipCoreAPIModifiers=!0}},{key:"enableCoreAPIModifiers",value:function(){var o=Xn.get(this);o.skipCoreAPIModifiers=!1}},{key:"onBeforeOnCellMouseDown",value:function(o,i,a){this.collapsingUI.toggleState(o,i,a)}},{key:"onModifyRowData",value:function(o){var i=Xn.get(this);if(!i.skipCoreAPIModifiers)return this.dataManager.getDataObject(o)}},{key:"onModifySourceLength",value:function(){var o=Xn.get(this);if(!o.skipCoreAPIModifiers)return this.dataManager.countAllRows()}},{key:"onBeforeDataSplice",value:function(o,i,a){var l=Xn.get(this);return l.skipCoreAPIModifiers||this.dataManager.isRowHighestLevel(o)?!0:(this.dataManager.spliceData(o,i,a),!1)}},{key:"onFilterData",value:function(o,i,a){var l=Xn.get(this);return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(a[0],i),this.collapsingUI.collapsedRowsStash.shiftStash(a[0],null,-1*i),this.dataManager.filterData(o,i,a),l.skipRender=!0,this.dataManager.getData().slice()}},{key:"onAfterContextMenuDefaultOptions",value:function(o){return this.contextMenuUI.appendOptions(o)}},{key:"onAfterGetRowHeader",value:function(o,i){this.headersUI.appendLevelIndicators(o,i)}},{key:"onModifyRowHeaderWidth",value:function(o){return this.headersUI.rowHeaderWidthCache||o}},{key:"onAfterRemoveRow",value:function(o,i,a,l){var s=this;if(l!==this.pluginName){var u=Xn.get(this);setTimeout(function(){u.skipRender=null,s.headersUI.updateRowHeaderWidth(),s.collapsingUI.collapsedRowsStash.applyStash()},0)}}},{key:"onBeforeRemoveRow",value:function(o,i,a){var l=this,s=Array.from(a.reduce(function(u,f){if(l.dataManager.isParent(f)){var c=l.dataManager.getDataObject(f).__children;return u.add(f),Array.isArray(c)&&c.forEach(function(h){return u.add(l.dataManager.getRowIndex(h))}),u}return u.add(f)},new Set));a.length=0,a.push.apply(a,s)}},{key:"onBeforeAddChild",value:function(){this.collapsingUI.collapsedRowsStash.stash()}},{key:"onAfterAddChild",value:function(o,i){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(i)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}},{key:"onBeforeDetachChild",value:function(){this.collapsingUI.collapsedRowsStash.stash()}},{key:"onAfterDetachChild",value:function(o,i,a){this.collapsingUI.collapsedRowsStash.shiftStash(a,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}},{key:"onAfterCreateRow",value:function(){this.dataManager.rewriteCache()}},{key:"onAfterInit",value:function(){var o=Math.max.apply(Math,aze(this.dataManager.cache.levels));o>0&&this.headersUI.updateRowHeaderWidth(o)}},{key:"onBeforeViewRender",value:function(o,i){var a=Xn.get(this);a.skipRender&&(i.skipRender=!0)}},{key:"destroy",value:function(){ma(Ro(r.prototype),"destroy",this).call(this)}},{key:"onBeforeLoadData",value:function(o){if(!xW(o)){RT(Sze),this.hot.getSettings()[HC]=!1,this.disablePlugin();return}this.dataManager.setData(o),this.dataManager.rewriteCache()}}],[{key:"PLUGIN_KEY",get:function(){return HC}},{key:"PLUGIN_PRIORITY",get:function(){return wze}}]),r}(at);function Ad(e){return Ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ad(e)}function _ze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _L(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,Rze(n.key),n)}}function Oze(e,t,r){return t&&_L(e.prototype,t),r&&_L(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rze(e){var t=Eze(e,"string");return Ad(t)==="symbol"?t:String(t)}function Eze(e,t){if(Ad(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ad(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tze=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:window;_ze(this,e),this.rootWindow=r,this.prefix=t,this.savedKeys=[],this.loadSavedKeys()}return Oze(e,[{key:"saveValue",value:function(r,n){this.rootWindow.localStorage.setItem("".concat(this.prefix,"_").concat(r),JSON.stringify(n)),this.savedKeys.indexOf(r)===-1&&(this.savedKeys.push(r),this.saveSavedKeys())}},{key:"loadValue",value:function(r,n){var o=typeof r>"u"?n:r,i=this.rootWindow.localStorage.getItem("".concat(this.prefix,"_").concat(o));return i===null?void 0:JSON.parse(i)}},{key:"reset",value:function(r){this.rootWindow.localStorage.removeItem("".concat(this.prefix,"_").concat(r))}},{key:"resetAll",value:function(){var r=this;$(this.savedKeys,function(n,o){r.rootWindow.localStorage.removeItem("".concat(r.prefix,"_").concat(r.savedKeys[o]))}),this.clearSavedKeys()}},{key:"loadSavedKeys",value:function(){var r=this.rootWindow.localStorage.getItem("".concat(this.prefix,"__persistentStateKeys")),n=typeof r=="string"?JSON.parse(r):void 0;this.savedKeys=n||[]}},{key:"saveSavedKeys",value:function(){this.rootWindow.localStorage.setItem("".concat(this.prefix,"__persistentStateKeys"),JSON.stringify(this.savedKeys))}},{key:"clearSavedKeys",value:function(){this.savedKeys.length=0,this.saveSavedKeys()}}]),e}();const Pze=Tze;function nf(e){return nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nf(e)}function kze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OL(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,Aze(n.key),n)}}function $ze(e,t,r){return t&&OL(e.prototype,t),r&&OL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Aze(e){var t=Ize(e,"string");return nf(t)==="symbol"?t:String(t)}function Ize(e,t){if(nf(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nf(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ba(){return typeof Reflect<"u"&&Reflect.get?ba=Reflect.get.bind():ba=function(t,r,n){var o=Mze(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ba.apply(this,arguments)}function Mze(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Eo(e),e!==null););return e}function xze(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B0(e,t)}function B0(e,t){return B0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},B0(e,t)}function Dze(e){var t=Lze();return function(){var n=Eo(e),o;if(t){var i=Eo(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Nze(this,o)}}function Nze(e,t){if(t&&(nf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hze(e)}function Hze(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Eo(e){return Eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Eo(e)}be.getSingleton().register("persistentStateSave");be.getSingleton().register("persistentStateLoad");be.getSingleton().register("persistentStateReset");var RL="persistentState",jze=0,Bze=function(e){xze(r,e);var t=Dze(r);function r(n){var o;return kze(this,r),o=t.call(this,n),o.storage=void 0,o}return $ze(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[RL]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.storage||(this.storage=new Pze(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",function(i,a){return o.saveValue(i,a)}),this.addHook("persistentStateLoad",function(i,a){return o.loadValue(i,a)}),this.addHook("persistentStateReset",function(){return o.resetValue()}),ba(Eo(r.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.storage=void 0,ba(Eo(r.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),ba(Eo(r.prototype),"updatePlugin",this).call(this)}},{key:"loadValue",value:function(o,i){i.value=this.storage.loadValue(o)}},{key:"saveValue",value:function(o,i){this.storage.saveValue(o,i)}},{key:"resetValue",value:function(o){typeof o>"u"?this.storage.resetAll():this.storage.reset(o)}},{key:"destroy",value:function(){ba(Eo(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return RL}},{key:"PLUGIN_PRIORITY",get:function(){return jze}}]),r}(at);function of(e){return of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},of(e)}function Fze(e){return zze(e)||Uze(e)||Wze(e)||Vze()}function Vze(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wze(e,t){if(e){if(typeof e=="string")return F0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F0(e,t)}}function Uze(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zze(e){if(Array.isArray(e))return F0(e)}function F0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Yze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EL(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,Kze(n.key),n)}}function Gze(e,t,r){return t&&EL(e.prototype,t),r&&EL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kze(e){var t=Xze(e,"string");return of(t)==="symbol"?t:String(t)}function Xze(e,t){if(of(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(of(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wa(){return typeof Reflect<"u"&&Reflect.get?wa=Reflect.get.bind():wa=function(t,r,n){var o=qze(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},wa.apply(this,arguments)}function qze(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=To(e),e!==null););return e}function Zze(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V0(e,t)}function V0(e,t){return V0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},V0(e,t)}function Qze(e){var t=tYe();return function(){var n=To(e),o;if(t){var i=To(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Jze(this,o)}}function Jze(e,t){if(t&&(of(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eYe(e)}function eYe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tYe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function To(e){return To=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},To(e)}var LC="search",rYe=190,nYe="htSearchResult",oYe=function(t,r,n,o,i){t.getCellMeta(r,n).isSearchResult=i},iYe=function(t,r,n){return pt(t)||t===null||!t.toLocaleLowerCase||t.length===0||pt(r)||r===null?!1:r.toString().toLocaleLowerCase(n.locale).indexOf(t.toLocaleLowerCase(n.locale))!==-1},aYe=function(e){Zze(r,e);var t=Qze(r);function r(n){var o;return Yze(this,r),o=t.call(this,n),o.callback=oYe,o.queryMethod=iYe,o.searchResultClass=nYe,o}return Gze(r,[{key:"isEnabled",value:function(){return this.hot.getSettings()[LC]}},{key:"enablePlugin",value:function(){var o=this;if(!this.enabled){var i=this.hot.getSettings()[LC];this.updatePluginSettings(i),this.addHook("beforeRenderer",function(){return o.onBeforeRenderer.apply(o,arguments)}),wa(To(r.prototype),"enablePlugin",this).call(this)}}},{key:"disablePlugin",value:function(){var o=this,i=function(){return o.onBeforeRenderer.apply(o,arguments)};this.hot.addHook("beforeRenderer",i),this.hot.addHookOnce("afterViewRender",function(){o.hot.removeHook("beforeRenderer",i)}),wa(To(r.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),wa(To(r.prototype),"updatePlugin",this).call(this)}},{key:"query",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getCallback(),l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.getQueryMethod(),s=this.hot.countRows(),u=this.hot.countCols(),f=[],c=this.hot;return Ce(0,s-1,function(h){Ce(0,u-1,function(d){var v=i.hot.getDataAtCell(h,d),p=i.hot.getCellMeta(h,d),m=p.search.callback||a,w=p.search.queryMethod||l,S=w(o,v,p);if(S){var C={row:h,col:d,data:v};f.push(C)}m&&m(c,h,d,v,S)})}),f}},{key:"getCallback",value:function(){return this.callback}},{key:"setCallback",value:function(o){this.callback=o}},{key:"getQueryMethod",value:function(){return this.queryMethod}},{key:"setQueryMethod",value:function(o){this.queryMethod=o}},{key:"getSearchResultClass",value:function(){return this.searchResultClass}},{key:"setSearchResultClass",value:function(o){this.searchResultClass=o}},{key:"updatePluginSettings",value:function(o){Ue(o)&&(o.searchResultClass&&this.setSearchResultClass(o.searchResultClass),o.queryMethod&&this.setQueryMethod(o.queryMethod),o.callback&&this.setCallback(o.callback))}},{key:"onBeforeRenderer",value:function(o,i,a,l,s,u){var f=u.className||[],c=[];if(typeof f=="string")c=f.split(" ");else{var h;(h=c).push.apply(h,Fze(f))}this.isEnabled()&&u.isSearchResult?c.includes(this.searchResultClass)||c.push("".concat(this.searchResultClass)):c.includes(this.searchResultClass)&&c.splice(c.indexOf(this.searchResultClass),1),u.className=c.join(" ")}},{key:"destroy",value:function(){wa(To(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return LC}},{key:"PLUGIN_PRIORITY",get:function(){return rYe}}]),r}(at);function af(e){return af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},af(e)}function lYe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TL(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,uYe(n.key),n)}}function sYe(e,t,r){return t&&TL(e.prototype,t),r&&TL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function uYe(e){var t=fYe(e,"string");return af(t)==="symbol"?t:String(t)}function fYe(e,t){if(af(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(af(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jl(){return typeof Reflect<"u"&&Reflect.get?Jl=Reflect.get.bind():Jl=function(t,r,n){var o=cYe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Jl.apply(this,arguments)}function cYe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=gi(e),e!==null););return e}function hYe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W0(e,t)}function W0(e,t){return W0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},W0(e,t)}function dYe(e){var t=pYe();return function(){var n=gi(e),o;if(t){var i=gi(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return vYe(this,o)}}function vYe(e,t){if(t&&(af(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yYe(e)}function yYe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pYe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gi(e){return gi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gi(e)}var gYe="touchScroll",mYe=200,bYe=function(e){hYe(r,e);var t=dYe(r);function r(n){var o;return lYe(this,r),o=t.call(this,n),o.scrollbars=[],o.clones=[],o.lockedCollection=!1,o.freezeOverlays=!1,o}return sYe(r,[{key:"isEnabled",value:function(){return WE()}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.addHook("afterViewRender",function(){return o.onAfterViewRender()}),this.registerEvents(),Jl(gi(r.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.lockedCollection=!1,Jl(gi(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){Jl(gi(r.prototype),"disablePlugin",this).call(this)}},{key:"registerEvents",value:function(){var o=this;this.addHook("beforeTouchScroll",function(){return o.onBeforeTouchScroll()}),this.addHook("afterMomentumScroll",function(){return o.onAfterMomentumScroll()})}},{key:"onAfterViewRender",value:function(){if(!this.lockedCollection){var o=this.hot.view._wt.wtOverlays,i=o.topOverlay,a=o.bottomOverlay,l=o.inlineStartOverlay,s=o.topInlineStartCornerOverlay,u=o.bottomInlineStartCornerOverlay;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(i),a.clone&&this.scrollbars.push(a),this.scrollbars.push(l),s&&this.scrollbars.push(s),u&&u.clone&&this.scrollbars.push(u),this.clones=[],i.needFullRender&&this.clones.push(i.clone.wtTable.holder.parentNode),a.needFullRender&&this.clones.push(a.clone.wtTable.holder.parentNode),l.needFullRender&&this.clones.push(l.clone.wtTable.holder.parentNode),s&&this.clones.push(s.clone.wtTable.holder.parentNode),u&&u.clone&&this.clones.push(u.clone.wtTable.holder.parentNode)}}},{key:"onBeforeTouchScroll",value:function(){this.freezeOverlays=!0,$(this.clones,function(o){te(o,"hide-tween")})}},{key:"onAfterMomentumScroll",value:function(){var o=this;this.freezeOverlays=!1,$(this.clones,function(i){Be(i,"hide-tween"),te(i,"show-tween")}),this.hot._registerTimeout(function(){$(o.clones,function(i){Be(i,"show-tween")})},400),$(this.scrollbars,function(i){i.refresh(),i.resetFixedPosition()}),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}}],[{key:"PLUGIN_KEY",get:function(){return gYe}},{key:"PLUGIN_PRIORITY",get:function(){return mYe}},{key:"SETTING_KEYS",get:function(){return!0}}]),r}(at);function lf(e){return lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lf(e)}function wYe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PL(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,CYe(n.key),n)}}function SYe(e,t,r){return t&&PL(e.prototype,t),r&&PL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function CYe(e){var t=_Ye(e,"string");return lf(t)==="symbol"?t:String(t)}function _Ye(e,t){if(lf(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(lf(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sa(){return typeof Reflect<"u"&&Reflect.get?Sa=Reflect.get.bind():Sa=function(t,r,n){var o=OYe(t,r);if(o){var i=Object.getOwnPropertyDescriptor(o,r);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Sa.apply(this,arguments)}function OYe(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Po(e),e!==null););return e}function RYe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U0(e,t)}function U0(e,t){return U0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},U0(e,t)}function EYe(e){var t=kYe();return function(){var n=Po(e),o;if(t){var i=Po(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return TYe(this,o)}}function TYe(e,t){if(t&&(lf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PYe(e)}function PYe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kYe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Po(e){return Po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Po(e)}var Iy="trimRows",$Ye=330,AYe=function(e){RYe(r,e);var t=EYe(r);function r(n){var o;return wYe(this,r),o=t.call(this,n),o.trimmedRowsMap=null,o}return SYe(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[Iy]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new yv),this.trimmedRowsMap.addLocalHook("init",function(){return o.onMapInit()}),Sa(Po(r.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){var o=this,i=this.hot.getSettings()[Iy];Array.isArray(i)&&this.hot.batchExecution(function(){o.trimmedRowsMap.clear(),$(i,function(a){o.trimmedRowsMap.setValueAtIndex(a,!0)})},!0),Sa(Po(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.hot.rowIndexMapper.unregisterMap("trimRows"),Sa(Po(r.prototype),"disablePlugin",this).call(this)}},{key:"getTrimmedRows",value:function(){return this.trimmedRowsMap.getTrimmedIndexes()}},{key:"trimRows",value:function(o){var i=this,a=this.getTrimmedRows(),l=this.isValidConfig(o),s=a;l&&(s=Array.from(new Set(a.concat(o))));var u=this.hot.runHooks("beforeTrimRow",a,s,l);u!==!1&&(l&&this.hot.batchExecution(function(){$(o,function(f){i.trimmedRowsMap.setValueAtIndex(f,!0)})},!0),this.hot.runHooks("afterTrimRow",a,s,l,l&&s.length>a.length))}},{key:"trimRow",value:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.trimRows(i)}},{key:"untrimRows",value:function(o){var i=this.getTrimmedRows(),a=this.isValidConfig(o),l=i,s=this.trimmedRowsMap.getValues().slice(),u=o.length>0;a&&u&&($(o,function(c){s[c]=!1}),l=Lt(s,function(c,h,d){return h&&c.push(d),c},[]));var f=this.hot.runHooks("beforeUntrimRow",i,l,a&&u);f!==!1&&(a&&u&&this.trimmedRowsMap.setValues(s),this.hot.runHooks("afterUntrimRow",i,l,a&&u,a&&l.length<i.length))}},{key:"untrimRow",value:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];this.untrimRows(i)}},{key:"isTrimmed",value:function(o){return this.trimmedRowsMap.getValueAtIndex(o)||!1}},{key:"untrimAll",value:function(){this.untrimRows(this.getTrimmedRows())}},{key:"isValidConfig",value:function(o){var i=this.hot.countSourceRows();return o.every(function(a){return Number.isInteger(a)&&a>=0&&a<i})}},{key:"onMapInit",value:function(){var o=this,i=this.hot.getSettings()[Iy];Array.isArray(i)&&this.hot.batchExecution(function(){$(i,function(a){o.trimmedRowsMap.setValueAtIndex(a,!0)})},!0)}},{key:"destroy",value:function(){Sa(Po(r.prototype),"destroy",this).call(this)}}],[{key:"PLUGIN_KEY",get:function(){return Iy}},{key:"PLUGIN_PRIORITY",get:function(){return $Ye}}]),r}(at);function sf(e){return sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sf(e)}function Iz(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kL(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,IYe(n.key),n)}}function Mz(e,t,r){return t&&kL(e.prototype,t),r&&kL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function IYe(e){var t=MYe(e,"string");return sf(t)==="symbol"?t:String(t)}function MYe(e,t){if(sf(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(sf(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xz(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&z0(e,t)}function z0(e,t){return z0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},z0(e,t)}function Dz(e){var t=NYe();return function(){var n=jg(e),o;if(t){var i=jg(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return xYe(this,o)}}function xYe(e,t){if(t&&(sf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return DYe(e)}function DYe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NYe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jg(e){return jg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},jg(e)}function HYe(e){return BYe(e)||jYe(e)||Hz(e)||LYe()}function LYe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jYe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BYe(e){if(Array.isArray(e))return Y0(e)}function Nz(e,t){return WYe(e)||VYe(e,t)||Hz(e,t)||FYe()}function FYe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hz(e,t){if(e){if(typeof e=="string")return Y0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Y0(e,t)}}function Y0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function VYe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(f){u=!0,o=f}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function WYe(e){if(Array.isArray(e))return e}var Lz="undoRedo",UYe="undoRedo";function ge(e){var t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,this.enabled=!1,e.addHook("afterChange",function(r,n){var o=this,i=r&&r.length;if(i){var a=r.find(function(s){var u=Nz(s,4),f=u[2],c=u[3];return f!==c});if(a){var l=function(){var u=r.reduce(function(c,h){return c.push(HYe(h)),c},[]);$(u,function(c){c[1]=e.propToCol(c[1])});var f=i>1?o.getSelected():[[u[0][0],u[0][1]]];return new ge.ChangeAction(u,f)};t.done(l,n)}}}),e.addHook("afterCreateRow",function(r,n,o){t.done(function(){return new ge.CreateRowAction(r,n)},o)}),e.addHook("beforeRemoveRow",function(r,n,o,i){var a=function(){var s=e.toPhysicalRow(r),u=ar(t.instance.getSourceData(s,0,s+n-1,t.instance.countSourceCols()-1));return new ge.RemoveRowAction(s,u,e.getSettings().fixedRowsBottom,e.getSettings().fixedRowsTop,e.rowIndexMapper.getIndexesSequence())};t.done(a,i)}),e.addHook("afterCreateCol",function(r,n,o){t.done(function(){return new ge.CreateColumnAction(r,n)},o)}),e.addHook("beforeRemoveCol",function(r,n,o,i){var a=function(){var s=t.instance.getSourceDataArray(),u=(t.instance.countCols()+r)%t.instance.countCols(),f=[],c=[],h=[];Ce(s.length-1,function(p){var m=[],w=s[p];Ce(u,u+(n-1),function(S){m.push(w[e.toPhysicalColumn(S)])}),f.push(m)}),Ce(n-1,function(p){h.push(e.toPhysicalColumn(u+p))}),Array.isArray(e.getSettings().colHeaders)&&Ce(n-1,function(p){c.push(e.getSettings().colHeaders[e.toPhysicalColumn(u+p)]||null)});var d=e.columnIndexMapper.getIndexesSequence(),v=e.rowIndexMapper.getIndexesSequence();return new ge.RemoveColumnAction(u,h,f,c,d,v,e.getSettings().fixedColumnsStart)};t.done(a,i)}),e.addHook("beforeCellAlignment",function(r,n,o,i){t.done(function(){return new ge.CellAlignmentAction(r,n,o,i)})}),e.addHook("beforeFilter",function(r){t.done(function(){return new ge.FiltersAction(r)})}),e.addHook("beforeRowMove",function(r,n){r!==!1&&t.done(function(){return new ge.RowMoveAction(r,n)})}),e.addHook("beforeMergeCells",function(r,n){n||t.done(function(){return new ge.MergeCellsAction(e,r)})}),e.addHook("afterUnmergeCells",function(r,n){n||t.done(function(){return new ge.UnmergeCellsAction(e,r)})}),e.addHook("afterInit",function(){t.init()})}ge.prototype.done=function(e,t){if(!this.ignoreNewActions){var r=t==="UndoRedo.undo"||t==="UndoRedo.redo"||t==="auto";if(!r){var n=this.doneActions.slice(),o=this.instance.runHooks("beforeUndoStackChange",n,t);if(o!==!1){var i=e(),a=this.undoneActions.slice();this.doneActions.push(i),this.instance.runHooks("afterUndoStackChange",n,this.doneActions.slice()),this.instance.runHooks("beforeRedoStackChange",a),this.undoneActions.length=0,this.instance.runHooks("afterRedoStackChange",a,this.undoneActions.slice())}}}};ge.prototype.undo=function(){if(this.isUndoAvailable()){var e=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",e);var t=this.doneActions.pop();this.instance.runHooks("afterUndoStackChange",e,this.doneActions.slice());var r=ar(t),n=this.instance.runHooks("beforeUndo",r);if(n===!1)return;this.ignoreNewActions=!0;var o=this,i=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",i),t.undo(this.instance,function(){o.ignoreNewActions=!1,o.undoneActions.push(t)}),this.instance.runHooks("afterRedoStackChange",i,this.undoneActions.slice()),this.instance.runHooks("afterUndo",r)}};ge.prototype.redo=function(){if(this.isRedoAvailable()){var e=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",e);var t=this.undoneActions.pop();this.instance.runHooks("afterRedoStackChange",e,this.undoneActions.slice());var r=ar(t),n=this.instance.runHooks("beforeRedo",r);if(n===!1)return;this.ignoreNewActions=!0;var o=this,i=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",i),t.redo(this.instance,function(){o.ignoreNewActions=!1,o.doneActions.push(t)}),this.instance.runHooks("afterUndoStackChange",i,this.doneActions.slice()),this.instance.runHooks("afterRedo",r)}};ge.prototype.isUndoAvailable=function(){return this.doneActions.length>0};ge.prototype.isRedoAvailable=function(){return this.undoneActions.length>0};ge.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0};ge.prototype.isEnabled=function(){return this.enabled};ge.prototype.enable=function(){if(!this.isEnabled()){var e=this.instance;this.enabled=!0,GYe(e),this.registerShortcuts(),e.addHook("afterChange",jz)}};ge.prototype.disable=function(){if(this.isEnabled()){var e=this.instance;this.enabled=!1,KYe(e),this.unregisterShortcuts(),e.removeHook("afterChange",jz)}};ge.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null};ge.Action=function(){};ge.Action.prototype.undo=function(){};ge.Action.prototype.redo=function(){};ge.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"};Ho(ge.ChangeAction,ge.Action);ge.ChangeAction.prototype.undo=function(e,t){for(var r=ar(this.changes),n=e.countEmptyRows(!0),o=e.countEmptyCols(!0),i=0,a=r.length;i<a;i++)r[i].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(r,null,null,"UndoRedo.undo");for(var l=0,s=r.length;l<s;l++){var u=Nz(r[l],2),f=u[0],c=u[1];e.getSettings().minSpareRows&&f+1+e.getSettings().minSpareRows===e.countRows()&&n===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(f+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&c+1+e.getSettings().minSpareCols===e.countCols()&&o===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(c+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())}e.selectCells(this.selected,!1,!1)};ge.ChangeAction.prototype.redo=function(e,t){for(var r=ar(this.changes),n=0,o=r.length;n<o;n++)r[n].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(r,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)};ge.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"};Ho(ge.CreateRowAction,ge.Action);ge.CreateRowAction.prototype.undo=function(e,t){var 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")};ge.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")};ge.RemoveRowAction=function(e,t,r,n,o){this.index=e,this.data=t,this.actionType="remove_row",this.fixedRowsBottom=r,this.fixedRowsTop=n,this.rowIndexesSequence=o};Ho(ge.RemoveRowAction,ge.Action);ge.RemoveRowAction.prototype.undo=function(e,t){var r=this,n=e.getSettings(),o=[];n.fixedRowsBottom=this.fixedRowsBottom,n.fixedRowsTop=this.fixedRowsTop,this.data.forEach(function(i,a){Object.keys(i).forEach(function(l){var s=parseInt(l,10);o.push([r.index+a,isNaN(s)?l:s,i[l]])})}),e.alter("insert_row_above",this.index,this.data.length,"UndoRedo.undo"),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(o,null,null,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence)};ge.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")};ge.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"};Ho(ge.CreateColumnAction,ge.Action);ge.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")};ge.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")};ge.RemoveColumnAction=function(e,t,r,n,o,i,a){this.index=e,this.indexes=t,this.data=r,this.amount=this.data[0].length,this.headers=n,this.columnPositions=o.slice(0),this.rowPositions=i.slice(0),this.actionType="remove_col",this.fixedColumnsStart=a};Ho(ge.RemoveColumnAction,ge.Action);ge.RemoveColumnAction.prototype.undo=function(e,t){var r=this,n=e.getSettings();n.fixedColumnsStart=this.fixedColumnsStart;for(var o=this.indexes.slice(0).sort(),i=function(h,d,v){return v[r.indexes.indexOf(o[d])]},a=this.data.length,l=[],s=0;s<a;s++)l.push(We(this.data[s],i));var u=We(this.headers,i),f=[];e.alter("insert_col_start",this.indexes[0],this.indexes.length,"UndoRedo.undo"),$(e.getSourceDataArray(),function(c,h){$(o,function(d,v){c[d]=l[h][v],f.push([h,d,c[d]])})}),e.setSourceDataAtCell(f,void 0,void 0,"UndoRedo.undo"),e.columnIndexMapper.insertIndexes(o[0],o.length),typeof this.headers<"u"&&$(u,function(c,h){e.getSettings().colHeaders[o[h]]=c}),e.batchExecution(function(){e.rowIndexMapper.setIndexesSequence(r.rowPositions),e.columnIndexMapper.setIndexesSequence(r.columnPositions)},!0),e.addHookOnce("afterViewRender",t),e.render()};ge.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")};ge.CellAlignmentAction=function(e,t,r,n){this.stateBefore=e,this.range=t,this.type=r,this.alignment=n};ge.CellAlignmentAction.prototype.undo=function(e,t){var r=this;$(this.range,function(n){n.forAll(function(o,i){o>=0&&i>=0&&e.setCellMeta(o,i,"className",r.stateBefore[o][i]||" htLeft")})}),e.addHookOnce("afterViewRender",t),e.render()};ge.CellAlignmentAction.prototype.redo=function(e,t){qo(this.range,this.type,this.alignment,function(r,n){return e.getCellMeta(r,n)},function(r,n,o,i){return e.setCellMeta(r,n,o,i)}),e.addHookOnce("afterViewRender",t),e.render()};ge.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"};Ho(ge.FiltersAction,ge.Action);ge.FiltersAction.prototype.undo=function(e,t){var r=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),r.conditionCollection.importAllConditions(this.conditionsStack.slice(0,this.conditionsStack.length-1)),r.filter()};ge.FiltersAction.prototype.redo=function(e,t){var r=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),r.conditionCollection.importAllConditions(this.conditionsStack),r.filter()};var zYe=function(e){xz(r,e);var t=Dz(r);function r(n,o){var i;Iz(this,r),i=t.call(this),i.cellRange=o;var a=i.cellRange.getTopStartCorner(),l=i.cellRange.getBottomEndCorner();return i.rangeData=n.getData(a.row,a.col,l.row,l.col),i}return Mz(r,[{key:"undo",value:function(o,i){var a=o.getPlugin("mergeCells");o.addHookOnce("afterViewRender",i),a.unmergeRange(this.cellRange,!0);var l=this.cellRange.getTopStartCorner();o.populateFromArray(l.row,l.col,this.rangeData,void 0,void 0,"MergeCells")}},{key:"redo",value:function(o,i){var a=o.getPlugin("mergeCells");o.addHookOnce("afterViewRender",i),a.mergeRange(this.cellRange)}}]),r}(ge.Action);ge.MergeCellsAction=zYe;var YYe=function(e){xz(r,e);var t=Dz(r);function r(n,o){var i;return Iz(this,r),i=t.call(this),i.cellRange=o,i}return Mz(r,[{key:"undo",value:function(o,i){var a=o.getPlugin("mergeCells");o.addHookOnce("afterViewRender",i),a.mergeRange(this.cellRange,!0)}},{key:"redo",value:function(o,i){var a=o.getPlugin("mergeCells");o.addHookOnce("afterViewRender",i),a.unmergeRange(this.cellRange,!0),o.render()}}]),r}(ge.Action);ge.UnmergeCellsAction=YYe;ge.RowMoveAction=function(e,t){this.rows=e.slice(),this.finalIndex=t,this.actionType="row_move"};Ho(ge.RowMoveAction,ge.Action);ge.RowMoveAction.prototype.undo=function(e,t){var r=this,n=e.getPlugin("manualRowMove"),o=[].concat(this.rows),i=o.filter(function(f){return f>r.finalIndex}),a=o.filter(function(f){return f<=r.finalIndex}),l=i.sort(function(f,c){return c-f}).concat(a.sort(function(f,c){return f-c}));e.addHookOnce("afterViewRender",t);for(var s=0;s<l.length;s+=1){var u=e.toVisualRow(l[s]);n.moveRow(u,l[s])}e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)};ge.RowMoveAction.prototype.redo=function(e,t){var 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)};ge.prototype.init=function(){var e=this.instance.getSettings().undo,t=typeof e>"u"||e;this.instance.undoRedo||(this.instance.undoRedo=this),t?this.instance.undoRedo.enable():this.instance.undoRedo.disable()};ge.prototype.registerShortcuts=function(){var e=this,t=this.instance.getShortcutManager(),r=t.getContext("grid"),n=function(a){return!a.altKey},o={runOnlyIf:n,group:Lz};r.addShortcuts([{keys:[["Control/Meta","z"]],callback:function(){e.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:function(){e.redo()}}],o)};ge.prototype.unregisterShortcuts=function(){var e=this.instance.getShortcutManager(),t=e.getContext("grid");t.removeShortcutsByGroup(Lz)};function jz(e,t){var r=this;if(t==="loadData")return r.undoRedo.clear()}function GYe(e){e.undo=function(){return e.undoRedo.undo()},e.redo=function(){return e.undoRedo.redo()},e.isUndoAvailable=function(){return e.undoRedo.isUndoAvailable()},e.isRedoAvailable=function(){return e.undoRedo.isRedoAvailable()},e.clearUndo=function(){return e.undoRedo.clear()}}function KYe(e){delete e.undo,delete e.redo,delete e.isUndoAvailable,delete e.isRedoAvailable,delete e.clearUndo}var Ev=be.getSingleton();Ev.add("afterUpdateSettings",function(){var e;(e=this.getPlugin("undoRedo"))===null||e===void 0||e.init()});Ev.register("beforeUndo");Ev.register("afterUndo");Ev.register("beforeRedo");Ev.register("afterRedo");ge.PLUGIN_KEY=UYe;ge.SETTING_KEYS=!0;function XYe(){rt(aEe),rt(AEe),rt(XEe),rt(VTe),rt(lPe),rt(Q2),rt(Mke),rt(h$e),rt(hU),rt(dAe),rt(BAe),rt(ZAe),rt(OU),rt(tMe),rt(ZHe),rt($Le),rt(tje),rt(Eje),rt(Xje),rt(HBe),rt(KBe),rt(NFe),rt(GFe),rt(zVe),rt(hWe),rt(RWe),rt(J2e),rt(Cze),rt(Bze),rt(aYe),rt(bYe),rt(AYe),rt(ge)}function qYe(){bRe(),xRe(),qRe(),d0e(),XYe()}function ZYe(e){var t=typeof window>"u"?!1:window.jQuery;t&&(t.fn.handsontable=function(r){var n=this.first(),o=n.data("handsontable");if(typeof r!="string"){var i=r||{};return o?o.updateSettings(i):(o=new e.Core(n[0],i),n.data("handsontable",o),o.init()),n}var a;if(o)if(typeof o[r]<"u"){for(var l,s=arguments.length,u=new Array(s>1?s-1:0),f=1;f<s;f++)u[f-1]=arguments[f];a=(l=o[r]).call.apply(l,[o].concat(u)),r==="destroy"&&n.removeData()}else throw new Error("Handsontable do not provide action: ".concat(r));return a})}var jC,BC,FC,VC,WC;qYe();ZYe(Me);Me.__GhostTable=mP;Me._getListenersCounter=Qae;Me._getRegisteredMapsCounter=Wge;Me.EventManager=Pt;var QYe=[Hee,Uee,spe,URe,QJ,iae,Vie,ose,Bee,Uie,kae,Qle],JYe=[tae,$ae];Me.helper={};Me.dom={};$(QYe,function(e){$(Object.getOwnPropertyNames(e),function(t){t.charAt(0)!=="_"&&(Me.helper[t]=e[t])})});$(JYe,function(e){$(Object.getOwnPropertyNames(e),function(t){t.charAt(0)!=="_"&&(Me.dom[t]=e[t])})});Me.cellTypes=(jC=Me.cellTypes)!==null&&jC!==void 0?jC:{};$(pSe(),function(e){Me.cellTypes[e]=nP(e)});Me.cellTypes.registerCellType=an;Me.cellTypes.getCellType=nP;Me.editors=(BC=Me.editors)!==null&&BC!==void 0?BC:{};$(Uae(),function(e){Me.editors["".concat(Er(e),"Editor")]=Bp(e)});Me.editors.registerEditor=_r;Me.editors.getEditor=Bp;Me.renderers=(FC=Me.renderers)!==null&&FC!==void 0?FC:{};$(Xse(),function(e){var t=Vp(e);e==="base"&&(Me.renderers.cellDecorator=t),Me.renderers["".concat(Er(e),"Renderer")]=t});Me.renderers.registerRenderer=$n;Me.renderers.getRenderer=Vp;Me.validators=(VC=Me.validators)!==null&&VC!==void 0?VC:{};$(Qse(),function(e){Me.validators["".concat(Er(e),"Validator")]=$T(e)});Me.validators.registerValidator=Hl;Me.validators.getValidator=$T;Me.plugins=(WC=Me.plugins)!==null&&WC!==void 0?WC:{};$(kT(),function(e){Me.plugins[e]=fv(e)});Me.plugins["".concat(Er(at.PLUGIN_KEY),"Plugin")]=at;Me.plugins.registerPlugin=rt;Me.plugins.getPlugin=fv;function Id(e){return Id=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Id(e)}var ue;function ce(e,t,r){return t=eGe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eGe(e){var t=tGe(e,"string");return Id(t)==="symbol"?t:String(t)}function tGe(e,t){if(Id(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Id(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rGe=(ue={languageCode:"zh-CN"},ce(ue,Im,"上方插入行"),ce(ue,Mm,"下方插入行"),ce(ue,xm,"左方插入列"),ce(ue,Dm,"右方插入列"),ce(ue,Nm,["移除该行","移除多行"]),ce(ue,Hm,["移除该列","移除多列"]),ce(ue,Lm,"撤销"),ce(ue,jm,"恢复"),ce(ue,Bm,"只读"),ce(ue,Fm,"清空该列"),ce(ue,tb,"对齐"),ce(ue,rb,"左对齐"),ce(ue,nb,"水平居中"),ce(ue,ob,"右对齐"),ce(ue,ib,"两端对齐"),ce(ue,ab,"顶端对齐"),ce(ue,lb,"垂直居中"),ce(ue,sb,"底端对齐"),ce(ue,Gm,"冻结该列"),ce(ue,Km,"取消冻结"),ce(ue,ub,"边框"),ce(ue,fb,"上"),ce(ue,cb,"右"),ce(ue,hb,"下"),ce(ue,db,"左"),ce(ue,vb,"移除边框"),ce(ue,Zm,"插入批注"),ce(ue,Qm,"编辑批注"),ce(ue,Jm,"删除批注"),ce(ue,eb,"只读批注"),ce(ue,Xm,"合并"),ce(ue,qm,"取消合并"),ce(ue,Vm,"复制"),ce(ue,Wm,"带标题的复制"),ce(ue,Um,"带标题组的复制"),ce(ue,zm,"仅复制标题"),ce(ue,Ym,"剪切"),ce(ue,yb,"插入子行"),ce(ue,pb,"与母行分离"),ce(ue,gb,["隐藏该列","隐藏多列"]),ce(ue,mb,["显示该列","显示多列"]),ce(ue,bb,["隐藏该行","隐藏多行"]),ce(ue,wb,["显示该行","显示多行"]),ce(ue,pv,"无"),ce(ue,Sb,"为空"),ce(ue,Cb,"不为空"),ce(ue,_b,"等于"),ce(ue,Ob,"不等于"),ce(ue,Rb,"开头是"),ce(ue,Eb,"结尾是"),ce(ue,Tb,"包含"),ce(ue,Pb,"不包含"),ce(ue,kb,"大于"),ce(ue,$b,"大于或等于"),ce(ue,Ab,"小于"),ce(ue,Ib,"小于或等于"),ce(ue,Mb,"在此范围"),ce(ue,xb,"不在此范围"),ce(ue,Db,"之后"),ce(ue,Nb,"之前"),ce(ue,Hb,"今天"),ce(ue,Lb,"明天"),ce(ue,jb,"昨天"),ce(ue,wh,"空白单元格"),ce(ue,Bb,"按条件过滤"),ce(ue,Fb,"按值过滤"),ce(ue,Vb,"且"),ce(ue,gv,"或"),ce(ue,Wb,"全选"),ce(ue,Ub,"清除"),ce(ue,zb,"确认"),ce(ue,Yb,"取消"),ce(ue,Gb,"搜索"),ce(ue,Kb,"值"),ce(ue,Xb,"第二值"),ue);const nGe=rGe;QT(nGe);const oGe=function(e,t,r,n,o,i,a){if(Me.renderers.getRenderer("text")(e,t,r,n,o,i,a),a.style){const l=t.style;Object.assign(l,a.style)}};Me.renderers.registerRenderer("styleRender",oGe);const Bz=e=>(nY("data-v-adf756f3"),e=e(),oY(),e),iGe={class:"excel-wrapper"},aGe={key:0,class:"loading"},lGe=Bz(()=>Cp("img",{class:"lg",src:uY,alt:"xlsx"},null,-1)),sGe=Bz(()=>Cp("img",{class:"sm",src:fY,alt:"loading"},null,-1)),uGe={class:"table-wrapper"},fGe={class:"btn-group"},cGe=["onClick"],hGe=G0({__name:"XlsxTable",props:{data:null},setup(e){const t=e,r=Ml(null),n=Ml(null),o=Ml(0),i=Ml(!0);let a,l;const s={language:"zh-CN",colHeaders:!0,rowHeaders:!0,autoRowSize:!1,autoColumnSize:!1,height:"100%",cells(c,h){const d=a==null?void 0:a.cell;return d?d[__e(c,h)]:{}},columns(c){const h=a==null?void 0:a.columns;return h?h[c]:{}},colWidths(c){const h=a==null?void 0:a.colWidths;return typeof h=="number"?h:h?h[c]:a==null?void 0:a.defaults.colWidth},rowHeights(c){const h=a==null?void 0:a.rowHeights;return typeof h=="number"?h:h?h[c]:a==null?void 0:a.defaults.rowHeight},outsideClickDeselects:!1,licenseKey:"non-commercial-and-evaluation"},u=c=>{o.value!==c&&(o.value=c,f.parseSheet())},f={hotTable(){var c;return(c=r.value)==null?void 0:c.hotInstance},parseWorkbook(){i.value=!0,l==null||l.postMessage({type:"parseWorkbook",workbook:t.data})},parseSheet(){i.value=!0,l==null||l.postMessage({type:"parseSheet",sheet:o.value||n.value[0].id})},updateTable(){rY(()=>{setTimeout(()=>{var c;(c=this.hotTable())==null||c.updateSettings({data:a==null?void 0:a.data,mergeCells:a==null?void 0:a.merge})},0)})}};return Gz(()=>t.data,()=>{f.parseWorkbook()}),Kz(async()=>{var c;l=O_e.create(),l==null||l.addEventListener("message",h=>{const{type:d,sheetData:v,sheets:p}=h.data;switch(d){case"sheets":n.value=p,p.length&&(o.value=p[0].id,f.parseSheet());break;case"parseSheet":a=v,f.updateTable();break}}),l==null||l.addEventListener("error",h=>{console.error(h)}),(c=f.hotTable())==null||c.addHook("afterUpdateSettings",()=>i.value=!1),f.parseWorkbook()}),Xz(()=>{l==null||l.terminate()}),(c,h)=>(ec(),tc("div",iGe,[i.value?(ec(),tc("div",aGe,[lGe,sGe,qz(" 加载中,请耐心等待... ")])):Zz("",!0),Cp("div",uGe,[Qz(Jz(iP),{ref_key:"table",ref:r,settings:s},null,512)]),Cp("div",fGe,[(ec(!0),tc(eY,null,tY(n.value,d=>(ec(),tc("button",{key:d.id,style:{padding:"0 30px"},class:iY({active:o.value===d.id}),onClick:v=>u(d.id)},aY(d.name),11,cGe))),128))])]))}});const gGe=lY(hGe,[["__scopeId","data-v-adf756f3"]]);export{gGe as default};