jquery.dgtable 2.0.21 → 2.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- import e from"jquery";var t,r,n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={};function o(){if(r)return t;r=1;var e=function(e){return e&&e.Math===Math&&e};return t=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof n&&n)||e("object"==typeof t&&t)||function(){return this}()||Function("return this")()}var l,s,a,d,u,c,h,f,m={};function p(){return s?l:(s=1,l=function(e){try{return!!e()}catch(e){return!0}})}function v(){if(d)return a;d=1;var e=p();return a=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function g(){if(c)return u;c=1;var e=p();return u=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function b(){if(f)return h;f=1;var e=g(),t=Function.prototype.call;return h=e?t.bind(t):function(){return t.apply(t,arguments)},h}var C,w,y,_,S,W,x,I,R,N,E,P,F,k,L,T,H,O,A,M,z,$,j,B,V,D,U,q,X,Y,G,J,K,Q,Z,ee,te,re,ne,ie,oe,le={};function se(){return y?w:(y=1,w=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function ae(){if(S)return _;S=1;var e=g(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return _=e?n:function(e){return function(){return r.apply(e,arguments)}},_}function de(){if(x)return W;x=1;var e=ae(),t=e({}.toString),r=e("".slice);return W=function(e){return r(t(e),8,-1)}}function ue(){return E?N:(E=1,N=function(e){return null==e})}function ce(){if(F)return P;F=1;var e=ue(),t=TypeError;return P=function(r){if(e(r))throw new t("Can't call method on "+r);return r}}function he(){if(L)return k;L=1;var e=function(){if(R)return I;R=1;var e=ae(),t=p(),r=de(),n=Object,i=e("".split);return I=t(function(){return!n("z").propertyIsEnumerable(0)})?function(e){return"String"===r(e)?i(e,""):n(e)}:n}(),t=ce();return k=function(r){return e(t(r))}}function fe(){if(H)return T;H=1;var e="object"==typeof document&&document.all;return T=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function me(){if(A)return O;A=1;var e=fe();return O=function(t){return"object"==typeof t?null!==t:e(t)}}function pe(){if(z)return M;z=1;var e=o(),t=fe();return M=function(r,n){return arguments.length<2?(i=e[r],t(i)?i:void 0):e[r]&&e[r][n];var i},M}function ve(){if(j)return $;j=1;var e=ae();return $=e({}.isPrototypeOf)}function ge(){if(V)return B;V=1;var e=o().navigator,t=e&&e.userAgent;return B=t?String(t):""}function be(){if(U)return D;U=1;var e,t,r=o(),n=ge(),i=r.process,l=r.Deno,s=i&&i.versions||l&&l.version,a=s&&s.v8;return a&&(t=(e=a.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&n&&(!(e=n.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=n.match(/Chrome\/(\d+)/))&&(t=+e[1]),D=t}function Ce(){if(X)return q;X=1;var e=be(),t=p(),r=o().String;return q=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41})}function we(){if(G)return Y;G=1;var e=Ce();return Y=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function ye(){if(K)return J;K=1;var e=pe(),t=fe(),r=ve(),n=we(),i=Object;return J=n?function(e){return"symbol"==typeof e}:function(n){var o=e("Symbol");return t(o)&&r(o.prototype,i(n))}}function _e(){if(Z)return Q;Z=1;var e=String;return Q=function(t){try{return e(t)}catch(e){return"Object"}}}function Se(){if(te)return ee;te=1;var e=fe(),t=_e(),r=TypeError;return ee=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")}}function We(){if(ne)return re;ne=1;var e=Se(),t=ue();return re=function(r,n){var i=r[n];return t(i)?void 0:e(i)},re}function xe(){if(oe)return ie;oe=1;var e=b(),t=fe(),r=me(),n=TypeError;return ie=function(i,o){var l,s;if("string"===o&&t(l=i.toString)&&!r(s=e(l,i)))return s;if(t(l=i.valueOf)&&!r(s=e(l,i)))return s;if("string"!==o&&t(l=i.toString)&&!r(s=e(l,i)))return s;throw new n("Can't convert object to primitive value")}}var Ie,Re,Ne,Ee,Pe,Fe,ke,Le,Te,He,Oe,Ae,Me,ze,$e,je,Be,Ve,De,Ue,qe,Xe,Ye,Ge,Je={exports:{}};function Ke(){if(Ee)return Ne;Ee=1;var e=o(),t=Object.defineProperty;return Ne=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch(t){e[r]=n}return n}}function Qe(){if(Pe)return Je.exports;Pe=1;var e=Re?Ie:(Re=1,Ie=!1),t=o(),r=Ke(),n="__core-js_shared__",i=Je.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.48.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Je.exports}function Ze(){if(ke)return Fe;ke=1;var e=Qe();return Fe=function(t,r){return e[t]||(e[t]=r||{})}}function et(){if(Te)return Le;Te=1;var e=ce(),t=Object;return Le=function(r){return t(e(r))}}function tt(){if(Oe)return He;Oe=1;var e=ae(),t=et(),r=e({}.hasOwnProperty);return He=Object.hasOwn||function(e,n){return r(t(e),n)}}function rt(){if(Me)return Ae;Me=1;var e=ae(),t=0,r=Math.random(),n=e(1.1.toString);return Ae=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++t+r,36)}}function nt(){if($e)return ze;$e=1;var e=o(),t=Ze(),r=tt(),n=rt(),i=Ce(),l=we(),s=e.Symbol,a=t("wks"),d=l?s.for||s:s&&s.withoutSetter||n;return ze=function(e){return r(a,e)||(a[e]=i&&r(s,e)?s[e]:d("Symbol."+e)),a[e]}}function it(){if(Be)return je;Be=1;var e=b(),t=me(),r=ye(),n=We(),i=xe(),o=nt(),l=TypeError,s=o("toPrimitive");return je=function(o,a){if(!t(o)||r(o))return o;var d,u=n(o,s);if(u){if(void 0===a&&(a="default"),d=e(u,o,a),!t(d)||r(d))return d;throw new l("Can't convert object to primitive value")}return void 0===a&&(a="number"),i(o,a)}}function ot(){if(De)return Ve;De=1;var e=it(),t=ye();return Ve=function(r){var n=e(r,"string");return t(n)?n:n+""}}function lt(){if(Ye)return Xe;Ye=1;var e=v(),t=p(),r=function(){if(qe)return Ue;qe=1;var e=o(),t=me(),r=e.document,n=t(r)&&t(r.createElement);return Ue=function(e){return n?r.createElement(e):{}}}();return Xe=!e&&!t(function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a})}function st(){if(Ge)return m;Ge=1;var e=v(),t=b(),r=function(){if(C)return le;C=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return le.f=r?function(e){var r=t(this,e);return!!r&&r.enumerable}:e,le}(),n=se(),i=he(),o=ot(),l=tt(),s=lt(),a=Object.getOwnPropertyDescriptor;return m.f=e?a:function(e,d){if(e=i(e),d=o(d),s)try{return a(e,d)}catch(e){}if(l(e,d))return n(!t(r.f,e,d),e[d])},m}var at,dt,ut,ct,ht,ft,mt,pt={};function vt(){if(ct)return ut;ct=1;var e=me(),t=String,r=TypeError;return ut=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")}}function gt(){if(ht)return pt;ht=1;var e=v(),t=lt(),r=function(){if(dt)return at;dt=1;var e=v(),t=p();return at=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}(),n=vt(),i=ot(),o=TypeError,l=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a="enumerable",d="configurable",u="writable";return pt.f=e?r?function(e,t,r){if(n(e),t=i(t),n(r),"function"==typeof e&&"prototype"===t&&"value"in r&&u in r&&!r[u]){var o=s(e,t);o&&o[u]&&(e[t]=r.value,r={configurable:d in r?r[d]:o[d],enumerable:a in r?r[a]:o[a],writable:!1})}return l(e,t,r)}:l:function(e,r,s){if(n(e),r=i(r),n(s),t)try{return l(e,r,s)}catch(e){}if("get"in s||"set"in s)throw new o("Accessors not supported");return"value"in s&&(e[r]=s.value),e},pt}function bt(){if(mt)return ft;mt=1;var e=v(),t=gt(),r=se();return ft=e?function(e,n,i){return t.f(e,n,r(1,i))}:function(e,t,r){return e[t]=r,e}}var Ct,wt,yt,_t,St,Wt,xt,It,Rt,Nt,Et,Pt,Ft,kt,Lt,Tt={exports:{}};function Ht(){if(_t)return yt;_t=1;var e=ae(),t=fe(),r=Qe(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(e){return n(e)}),yt=r.inspectSource}function Ot(){if(It)return xt;It=1;var e=Ze(),t=rt(),r=e("keys");return xt=function(e){return r[e]||(r[e]=t(e))}}function At(){return Nt?Rt:(Nt=1,Rt={})}function Mt(){if(Ft)return Tt.exports;Ft=1;var e=ae(),t=p(),r=fe(),n=tt(),i=v(),l=function(){if(wt)return Ct;wt=1;var e=v(),t=tt(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,i=t(r,"name"),o=i&&"something"===function(){}.name,l=i&&(!e||e&&n(r,"name").configurable);return Ct={EXISTS:i,PROPER:o,CONFIGURABLE:l}}().CONFIGURABLE,s=Ht(),a=function(){if(Pt)return Et;Pt=1;var e,t,r,n=function(){if(Wt)return St;Wt=1;var e=o(),t=fe(),r=e.WeakMap;return St=t(r)&&/native code/.test(String(r))}(),i=o(),l=me(),s=bt(),a=tt(),d=Qe(),u=Ot(),c=At(),h="Object already initialized",f=i.TypeError,m=i.WeakMap;if(n||d.state){var p=d.state||(d.state=new m);p.get=p.get,p.has=p.has,p.set=p.set,e=function(e,t){if(p.has(e))throw new f(h);return t.facade=e,p.set(e,t),t},t=function(e){return p.get(e)||{}},r=function(e){return p.has(e)}}else{var v=u("state");c[v]=!0,e=function(e,t){if(a(e,v))throw new f(h);return t.facade=e,s(e,v,t),t},t=function(e){return a(e,v)?e[v]:{}},r=function(e){return a(e,v)}}return Et={set:e,get:t,has:r,enforce:function(n){return r(n)?t(n):e(n,{})},getterFor:function(e){return function(r){var n;if(!l(r)||(n=t(r)).type!==e)throw new f("Incompatible receiver, "+e+" required");return n}}}}(),d=a.enforce,u=a.get,c=String,h=Object.defineProperty,f=e("".slice),m=e("".replace),g=e([].join),b=i&&!t(function(){return 8!==h(function(){},"length",{value:8}).length}),C=String(String).split("String"),w=Tt.exports=function(e,t,r){"Symbol("===f(c(t),0,7)&&(t="["+m(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!n(e,"name")||l&&e.name!==t)&&(i?h(e,"name",{value:t,configurable:!0}):e.name=t),b&&r&&n(r,"arity")&&e.length!==r.arity&&h(e,"length",{value:r.arity});try{r&&n(r,"constructor")&&r.constructor?i&&h(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var o=d(e);return n(o,"source")||(o.source=g(C,"string"==typeof t?t:"")),e};return Function.prototype.toString=w(function(){return r(this)&&u(this).source||s(this)},"toString"),Tt.exports}function zt(){if(Lt)return kt;Lt=1;var e=fe(),t=gt(),r=Mt(),n=Ke();return kt=function(i,o,l,s){s||(s={});var a=s.enumerable,d=void 0!==s.name?s.name:o;if(e(l)&&r(l,d,s),s.global)a?i[o]=l:n(o,l);else{try{s.unsafe?i[o]&&(a=!0):delete i[o]}catch(e){}a?i[o]=l:t.f(i,o,{value:l,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return i},kt}var $t,jt,Bt,Vt,Dt,Ut,qt,Xt,Yt,Gt,Jt,Kt,Qt,Zt,er,tr,rr,nr={};function ir(){if(Vt)return Bt;Vt=1;var e=function(){if(jt)return $t;jt=1;var e=Math.ceil,t=Math.floor;return $t=Math.trunc||function(r){var n=+r;return(n>0?t:e)(n)},$t}();return Bt=function(t){var r=+t;return r!=r||0===r?0:e(r)}}function or(){if(Ut)return Dt;Ut=1;var e=ir(),t=Math.max,r=Math.min;return Dt=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)}}function lr(){if(Xt)return qt;Xt=1;var e=ir(),t=Math.min;return qt=function(r){var n=e(r);return n>0?t(n,9007199254740991):0}}function sr(){if(Gt)return Yt;Gt=1;var e=lr();return Yt=function(t){return e(t.length)}}var ar,dr,ur,cr,hr,fr,mr,pr,vr,gr,br,Cr,wr,yr,_r,Sr,Wr,xr,Ir={};function Rr(){if(ur)return dr;ur=1;var e=pe(),t=ae(),r=function(){if(rr)return nr;rr=1;var e=function(){if(Zt)return Qt;Zt=1;var e=ae(),t=tt(),r=he(),n=function(){if(Kt)return Jt;Kt=1;var e=he(),t=or(),r=sr(),n=function(n){return function(i,o,l){var s=e(i),a=r(s);if(0===a)return!n&&-1;var d,u=t(l,a);if(n&&o!=o){for(;a>u;)if((d=s[u++])!=d)return!0}else for(;a>u;u++)if((n||u in s)&&s[u]===o)return n||u||0;return!n&&-1}};return Jt={includes:n(!0),indexOf:n(!1)}}().indexOf,i=At(),o=e([].push);return Qt=function(e,l){var s,a=r(e),d=0,u=[];for(s in a)!t(i,s)&&t(a,s)&&o(u,s);for(;l.length>d;)t(a,s=l[d++])&&(~n(u,s)||o(u,s));return u},Qt}(),t=(tr?er:(tr=1,er=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])).concat("length","prototype");return nr.f=Object.getOwnPropertyNames||function(r){return e(r,t)},nr}(),n=(ar||(ar=1,Ir.f=Object.getOwnPropertySymbols),Ir),i=vt(),o=t([].concat);return dr=e("Reflect","ownKeys")||function(e){var t=r.f(i(e)),l=n.f;return l?o(t,l(e)):t}}function Nr(){if(hr)return cr;hr=1;var e=tt(),t=Rr(),r=st(),n=gt();return cr=function(i,o,l){for(var s=t(o),a=n.f,d=r.f,u=0;u<s.length;u++){var c=s[u];e(i,c)||l&&e(l,c)||a(i,c,d(o,c))}}}function Er(){if(vr)return pr;vr=1;var e=o(),t=st().f,r=bt(),n=zt(),i=Ke(),l=Nr(),s=function(){if(mr)return fr;mr=1;var e=p(),t=fe(),r=/#|\.prototype\./,n=function(r,n){var a=o[i(r)];return a===s||a!==l&&(t(n)?e(n):!!n)},i=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},o=n.data={},l=n.NATIVE="N",s=n.POLYFILL="P";return fr=n}();return pr=function(o,a){var d,u,c,h,f,m=o.target,p=o.global,v=o.stat;if(d=p?e:v?e[m]||i(m,{}):e[m]&&e[m].prototype)for(u in a){if(h=a[u],c=o.dontCallGetSet?(f=t(d,u))&&f.value:d[u],!s(p?u:m+(v?".":"#")+u,o.forced)&&void 0!==c){if(typeof h==typeof c)continue;l(h,c)}(o.sham||c&&c.sham)&&r(h,"sham",!0),n(d,u,h,o)}}}function Pr(){if(wr)return Cr;wr=1;var e=function(){if(br)return gr;br=1;var e={};return e[nt()("toStringTag")]="z",gr="[object z]"===String(e)}(),t=fe(),r=de(),n=nt()("toStringTag"),i=Object,o="Arguments"===r(function(){return arguments}());return Cr=e?r:function(e){var l,s,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(l=i(e),n))?s:o?r(l):"Object"===(a=r(l))&&t(l.callee)?"Arguments":a},Cr}function Fr(){if(_r)return yr;_r=1;var e=Pr(),t=String;return yr=function(r){if("Symbol"===e(r))throw new TypeError("Cannot convert a Symbol value to a string");return t(r)}}function kr(){if(Wr)return Sr;Wr=1;var e=Mt(),t=gt();return Sr=function(r,n,i){return i.get&&e(i.get,n,{getter:!0}),i.set&&e(i.set,n,{setter:!0}),t.f(r,n,i)}}!function(){if(xr)return i;xr=1;var e=Er(),t=v(),r=o(),n=ae(),l=tt(),s=fe(),a=ve(),d=Fr(),u=kr(),c=Nr(),h=r.Symbol,f=h&&h.prototype;if(t&&s(h)&&(!("description"in f)||void 0!==h().description)){var m={},p=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:d(arguments[0]),t=a(f,this)?new h(e):void 0===e?h():h(e);return""===e&&(m[t]=!0),t};c(p,h),p.prototype=f,f.constructor=p;var g="Symbol(description detection)"===String(h("description detection")),b=n(f.valueOf),C=n(f.toString),w=/^Symbol\((.*)\)[^)]+$/,y=n("".replace),_=n("".slice);u(f,"description",{configurable:!0,get:function(){var e=b(this);if(l(m,e))return"";var t=C(e),r=g?_(t,7,-1):y(t,w,"$1");return""===r?void 0:r}}),e({global:!0,constructor:!0,forced:!0},{Symbol:p})}}();var Lr,Tr,Hr,Or,Ar,Mr,zr,$r,jr,Br,Vr,Dr,Ur,qr,Xr,Yr={};function Gr(){if(Tr)return Lr;Tr=1;var e=_e(),t=TypeError;return Lr=function(r,n){if(!delete r[n])throw new t("Cannot delete property "+e(n)+" of "+e(r))},Lr}function Jr(){if(Or)return Hr;Or=1;var e=ae();return Hr=e([].slice)}function Kr(){if($r)return zr;$r=1;var e=p();return zr=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})}}let Qr;!function(){if(Xr)return Yr;Xr=1;var e=Er(),t=ae(),r=Se(),n=et(),i=sr(),o=Gr(),l=Fr(),s=p(),a=function(){if(Mr)return Ar;Mr=1;var e=Jr(),t=Math.floor,r=function(n,i){var o=n.length;if(o<8)for(var l,s,a=1;a<o;){for(s=a,l=n[a];s&&i(n[s-1],l)>0;)n[s]=n[--s];s!==a++&&(n[s]=l)}else for(var d=t(o/2),u=r(e(n,0,d),i),c=r(e(n,d),i),h=u.length,f=c.length,m=0,p=0;m<h||p<f;)n[m+p]=m<h&&p<f?i(u[m],c[p])<=0?u[m++]:c[p++]:m<h?u[m++]:c[p++];return n};return Ar=r}(),d=Kr(),u=function(){if(Br)return jr;Br=1;var e=ge().match(/firefox\/(\d+)/i);return jr=!!e&&+e[1]}(),c=function(){if(Dr)return Vr;Dr=1;var e=ge();return Vr=/MSIE|Trident/.test(e)}(),h=be(),f=function(){if(qr)return Ur;qr=1;var e=ge().match(/AppleWebKit\/(\d+)\./);return Ur=!!e&&+e[1]}(),m=[],v=t(m.sort),g=t(m.push),b=s(function(){m.sort(void 0)}),C=s(function(){m.sort(null)}),w=d("sort"),y=!s(function(){if(h)return h<70;if(!(u&&u>3)){if(c)return!0;if(f)return f<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)m.push({k:t+n,v:r})}for(m.sort(function(e,t){return t.v-e.v}),n=0;n<m.length;n++)t=m[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}});e({target:"Array",proto:!0,forced:b||!C||!w||!y},{sort:function(e){void 0!==e&&r(e);var t=n(this);if(y)return void 0===e?v(t):v(t,e);var s,d,u=[],c=i(t);for(d=0;d<c;d++)d in t&&g(u,t[d]);for(a(u,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:l(t)>l(r)?1:-1}}(e)),s=i(u),d=0;d<s;)t[d]=u[d++];for(;d<c;)o(t,d++);return t}})}();const Zr=()=>{const e=document.createElement("div");e.dir="rtl",Object.assign(e.style,{direction:"rtl",fontSize:"14px",width:"1px",height:"1px",position:"absolute",top:"-1000px",overflow:"scroll"}),e.textContent="A",document.body.appendChild(e);let t="reverse";return e.scrollLeft>0?t="default":(e.scrollLeft=1,0===Math.floor(e.scrollLeft)&&(t="negative")),e.parentNode.removeChild(e),t};function en(e,t){if(void 0===t&&(t="rtl"===getComputedStyle(e).direction),!0===t&&void 0===Qr&&(Qr=Zr()),!t)return e.scrollLeft;switch(Qr){case"negative":return e.scrollLeft+e.scrollWidth-e.clientWidth;case"reverse":return e.scrollWidth-e.scrollLeft-e.clientWidth;default:return e.scrollLeft}}function tn(e,t,r){e.scrollLeft=function(e,t,r){return void 0===r&&(r="rtl"===getComputedStyle(e).direction),function(e,t,r){if(void 0===r&&(r="rtl"===getComputedStyle(e).direction),!0===r&&void 0===Qr&&(Qr=Zr()),!r)return t;switch(Qr){case"negative":return t-e.scrollWidth+e.clientWidth;case"reverse":return e.scrollWidth-t-e.clientWidth;default:return t}}(e,r?e.scrollWidth-e.clientWidth-t:t,r)}(e,t,r)}const rn=function(e,t){for(let[r,n]of Object.entries(t))e.style[r]=null==n?"":String(n)},nn=function(e,t,r,n,i){return(...o)=>{let l,s,a,d,u=o[0];if(e?(l=o[1],s=!!o[2],a=!!o[3],d=!!o[4]):(s=!!o[1],a=!!o[2],d=!!o[3]),u===window)return u.document.documentElement[`client${r}`];if(9===u.nodeType){const e=u.documentElement,t=u.body;return Math.max(t[`scroll${r}`],e[`scroll${r}`],t[`offset${r}`],e[`offset${r}`],e[`client${r}`])}{let o,c,h=!1,f=!1;if(!e&&"getBoundingClientRect"in u&&(o=u.getBoundingClientRect()[t],h=!0,f=!0),(void 0===o||d||h!==s||f!==a)&&(c=e?getComputedStyle(u,l):getComputedStyle(u)),void 0===o){let e=c[t];"auto"===e?(o=u[`client${r}`],h=!0):o=parseFloat(e),"border-box"===c.boxSizing&&(h=!0,f=!0)}if(s!==h){let e=parseFloat(c[`padding-${n}`]||0)+parseFloat(c[`padding-${i}`]||0);s?o+=e:o-=e}if(a!==f){let e=parseFloat(c[`border-${n}-width`]||0)+parseFloat(c[`border-${i}-width`]||0);a?o+=e:o-=e}return o<0&&(o=0),d&&(o+=parseFloat(c[`margin-${n}`]||0)+parseFloat(c[`margin-${i}`]||0)),o}}},on=nn(!1,"width","Width","left","right"),ln=nn(!1,"height","Height","top","bottom"),sn=(an="left",dn="right",(e,t,r=!1,n=!1,i=!1)=>{if(e===window)return;if(9===e.nodeType)return;const o=getComputedStyle(e);let l=!1;if("border-box"===o.boxSizing&&(l=!0),r=!!r,n=!!n,(i=!!i)&&(t-=(parseFloat(o[`margin-${an}`])||0)+(parseFloat(o[`margin-${dn}`])||0)),r!==l){let e=parseFloat(o[`padding-${an}`]||0)+parseFloat(o[`padding-${dn}`]||0);r?t-=e:t+=e}if(n!==l){let e=(parseFloat(o[`border-${an}-width`])||0)+(parseFloat(o[`border-${dn}-width`])||0);n?t-=e:t+=e}t<0&&(t=0),e.style.width=t+"px"});var an,dn;const un=e=>{if(!e.getClientRects().length)return{top:0,left:0};let t=e.getBoundingClientRect(),r=e.ownerDocument.defaultView;return{top:t.top+r.pageYOffset,left:t.left+r.pageXOffset}};let cn=null;const hn=function(e,t){if(null===cn&&(()=>{try{document.createElement("div").querySelector(":scope > div"),cn=!0}catch(e){cn=!1}})(),!0===cn)return e.querySelectorAll(t.replace(/((?:^|,)\s*)/g,"$1:scope "));{let r=e.id;const n="ID_"+Date.now();e.id=n,t=t.replace(/((?:^|,)\s*)/g,"$1#"+n);try{return e.querySelectorAll(t)}finally{this.id=r}}};class fn{constructor(){this._events=[]}add(e,t,r,n){let i=t.split("."),o=i[0],l=i[1];e.addEventListener(o,r,n||!1);let s=!0===n||"object"==typeof n&&!0===n.capture;return this._events.push({el:e,name:o,namespace:l,handler:r,useCapture:s}),this}remove(e,t,r,n){let i=t?t.split("."):"",o=i[0],l=i[1],s=!0===n||"object"==typeof n&&!0===n.capture,a=[],d=[];if(e||o||l||r||void 0!==n)for(let t of this._events)e&&t.el!==e||o&&t.name!==o||l&&t.namespace!==l||r&&t.handler!==r||void 0!==n&&t.useCapture!==s?a.push(t):d.push(t);else d=this._events;this._events=a;for(let e of d)e.el.removeEventListener(e.name,e.handler,e.useCapture);return this}}const mn=Object.prototype.hasOwnProperty,pn=void 0!==Element.prototype.insertAdjacentElement;function vn(e,t,r){t?!1===pn||e instanceof DocumentFragment?r.insertBefore(e,t):t.insertAdjacentElement("beforebegin",e):r.appendChild(e)}function gn(e,t,r,n){return e.parentNode!==n?(t||(t=document.createDocumentFragment()),t.appendChild(e)):(t&&t.childNodes.length>0&&(vn(t,r,n),t=null),e.nextSibling!==r&&vn(e,r,n)),t}const bn=Symbol("destroyed");class Cn{constructor(e){var t;const r=this._p={list:e.list||null,hookScrollEvent:void 0===e.hookScrollEvent||!!e.hookScrollEvent,count:e.count||0,virtual:void 0===e.virtual||!!e.virtual,userItemsParent:e.itemsParent||null,setVirtualWrapperWidth:null===(t=e.autoVirtualWrapperWidth)||void 0===t||t,estimatedItemHeight:20,buffer:5,itemHeightEstimatorFn:null,itemElementCreatorFn:_n,onItemRender:null,onItemUnrender:null,onScrollHeightChange:null,virtualWrapper:null,currentItemsParent:null,cachedItemHeights:[],cachedItemEstimatedHeights:[],cachedItemPositions:[],itemPositionsNeedsUpdate:0,boundRender:this.render.bind(this),existingEls:[]};r.currentItemsParent=r.userItemsParent||r.list,this._hookEvents(),"number"==typeof e.count&&this.setCount(e.count),"boolean"==typeof e.virtual&&this.setVirtual(e.virtual),"number"==typeof e.estimatedItemHeight&&this.setEstimatedItemHeight(e.estimatedItemHeight),"number"==typeof e.buffer&&this.setBuffer(e.buffer),"function"==typeof e.itemHeightEstimatorFn&&this.setItemHeightEstimatorFn(e.itemHeightEstimatorFn),"function"==typeof e.itemElementCreatorFn&&this.setItemElementCreatorFn(e.itemElementCreatorFn),"function"==typeof e.onItemRender&&this.setOnItemRender(e.onItemRender),"function"==typeof e.onItemUnrender&&this.setOnItemUnrender(e.onItemUnrender),"function"==typeof e.onScrollHeightChange&&this.setOnScrollHeightChange(e.onScrollHeightChange)}destroy(){this[bn]||(this[bn]=!0,this._unhookEvents().invalidate()._destroyElements())}setHookScrollEvent(e){const t=this._p;return e=void 0===e||!!e,t.hookScrollEvent===e||(t.hookScrollEvent=e,this._unhookEvents()._hookEvents()),this}isHookScrollEventEnabled(){return this._p.hookScrollEvent}setCount(e){return this._p.count=e,this.invalidate()}getCount(){return this._p.count}setVirtual(e){const t=this._p;return e=void 0===e||!!e,t.virtual===e||(t.virtual=e,this._hookEvents().invalidate()._destroyElements()),this}isVirtual(){return this._p.virtual}setEstimatedItemHeight(e){return this._p.estimatedItemHeight=Math.abs(("number"==typeof e?e:Number(e))||20),this}getEstimatedItemHeight(){return this._p.estimatedItemHeight}setAutoVirtualWrapperWidth(e){const t=this._p;return t.autoVirtualWrapperWidth=void 0===e||!!e,t.virtualWrapper&&t.autoVirtualWrapperWidth!==t.virtualWrapperWidthWasSet&&(t.virtualWrapper.style.width=t.autoVirtualWrapperWidth?"100%":"",t.virtualWrapperWidthWasSet=t.autoVirtualWrapperWidth),this}isAutoVirtualWrapperWidth(){return this._p.autoVirtualWrapperWidth}setBuffer(e){return this._p.buffer=Math.abs("number"==typeof e?e:Number(e)||5),this}getBuffer(){return this._p.buffer}setItemHeightEstimatorFn(e){return this._p.itemHeightEstimatorFn=e,this}setItemElementCreatorFn(e){return this._p.itemElementCreatorFn=e||_n,this}setOnItemRender(e){return this._p.onItemRender=e,this}setOnItemUnrender(e){return this._p.onItemUnrender=e,this}setOnScrollHeightChange(e){return this._p.onScrollHeightChange=e,this}estimateFullHeight(){const e=this._p;if(0===e.count)return 0;if(e.virtual)return this._calculateItemPosition(e.count)||0;{const t=e.existingEls;if(e.count===t.length){let e=t[0].getBoundingClientRect(),r=t[t.length-1].getBoundingClientRect();return r.top-e.top+r.height}return this._calculateItemPosition(e.count)||0}}invalidatePositions(){const e=this._p;return e.itemPositionsNeedsUpdate=0,e.cachedItemHeights=[],e.cachedItemEstimatedHeights=[],e.cachedItemPositions=[],e.cachedItemHeights.length=e.count,e.cachedItemEstimatedHeights.length=e.count,e.cachedItemPositions.length=e.count,this}invalidate(){const e=this._p;this.invalidatePositions(),e.virtual||this._destroyElements();for(let t of e.existingEls)delete t[wn];return this}render(){if(this[bn])return;const e=this._p,t=e.list,r=e.virtual;let n=e.virtualWrapper,i=e.currentItemsParent,o=t.scrollTop,l=o+t.clientHeight,s=e.count,a=e.buffer,d=e.onItemUnrender,u=e.existingEls,c=u.length;if(r){const r=t.clientWidth;n||(n=e.virtualWrapper=e.userItemsParent,n||(n=e.virtualWrapper=document.createElement("div"),t.appendChild(n)),this._resetCurrentItemsParent(),i=e.currentItemsParent,e.autoVirtualWrapperWidth?(n.style.width="100%",e.virtualWrapperWidthWasSet=!0):e.virtualWrapperWidthWasSet=!1);for(let e=0;e<c;e++)u[e][yn]=!0;this._calculateItemPosition(e.count-1);let d=this._getExistingElsRange(),f=Sn(e.cachedItemPositions,o),m=Math.max(0,f-a),p=m,v=this._calculateItemPosition(p),g=a,b=Math.max(p,Sn(e.cachedItemPositions,l-1)+1+a),C=[],w=null,y=n.childNodes[0];const _=function(e){let t;return-1!==d.firstIndex&&e>=d.firstIndex&&e<=d.lastIndex&&(t=u.find(t=>t[wn]===e&&!0===t[yn])),void 0===t&&(t=(d.firstIndex<m||d.firstValidArrayIndex>0?u.find(e=>(e[wn]<m||!1===mn.call(e,wn))&&!0===e[yn]):void 0)||xn(u,e=>!0===e[yn])),void 0!==t&&delete t[yn],t};for(;p<s&&p<b;p++){let e=_(p);y&&y===e&&(y=y.nextSibling);const t=this._dequeueElementForIndex(e,p,y,!0);C.push([t,p]),w=gn(t,w,y,i)}w&&w.childNodes.length>0&&vn(w,y,i);for(let t of C){const r=t[1];this._insertItemAndFlow(t[0],r,!1),v=e.cachedItemPositions[r]+e.cachedItemHeights[r]}if(v<l)for(;(v<l||g-- >0)&&p<s;p++){let t=_(p);y&&y===t&&(y=y.nextSibling),this._dequeueElementForIndex(t,p,y,!1),v=e.cachedItemPositions[p]+e.cachedItemHeights[p]}let S=this.estimateFullHeight(),W=S+"px";var h;n.style.height!==W&&(n.style.height=W,null===(h=e.onScrollHeightChange)||void 0===h||h.call(e,S)),r!==t.clientWidth&&this.render()}else if(s!==u.length){for(let e=0;e<c;e++)u[e][yn]=!0;let e=i.childNodes[0],t=null;for(let r=0;r<s;r++){let n=u.find(e=>e[wn]===r&&!0===e[yn]);void 0!==n&&delete n[yn],e&&e===n&&(e=e.nextSibling),t=gn(this._dequeueElementForIndex(n,r,e,!0),t,e,i)}t&&t.childNodes.length>0&&vn(t,e,i)}c=u.length;for(let e=0;e<c;e++){const t=u[e];if(!0!==t[yn])continue;let r=t.parentNode;r&&r.removeChild(t),d&&void 0!==t[wn]&&d(t),u.splice(e,1),e--,c--}}addItemsAt(e,t=-1){if("number"!=typeof e||e<=0)return this;const r=this._p;if((t<0||t>=r.count)&&(t=r.count),r.count+=e,r.virtual)t>=0&&t<r.count&&this._invalidateItemIndexesAt(t,-1);else{let n=r.existingEls;if(n.length!==r.count-e)return this;let i=this._getExistingElsRange();if(-1===i.firstValidArrayIndex)return this;const o=r.currentItemsParent;let l=i.firstValidArrayIndex+t-i.firstIndex;this._pushItemIndexesAt(t,e);let s=n[l-1]?n[l-1].nextSibling:n[0],a=null;for(let r=t,n=t+e;r<n;r++)a=gn(this._dequeueElementForIndex(void 0,r,s,!0),a,s,o);a&&a.childNodes.length>0&&vn(a,s,o)}return this}removeItemsAt(e,t){const r=this._p;if("number"!=typeof e||"number"!=typeof t||e<=0||t<0||t>=r.count)return this;if(r.count-=Math.min(e,r.count-t),r.virtual)this._invalidateItemIndexesAt(t,-1);else{let n=r.existingEls;if(n.length!==r.count+e)return this;let i=this._getExistingElsRange();if(-1===i.firstValidArrayIndex)return this;this._pushItemIndexesAt(t+e,-e);const o=r.onItemUnrender;let l=i.firstValidArrayIndex+t-i.firstIndex;if(l<n.length){for(let t=0;t<e;t++){let e=n[l+t],r=e.parentNode;r&&r.removeChild(e),o&&void 0!==e[wn]&&o(e)}n.splice(l,e)}}return this}refreshItemAt(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return this;if(t.virtual)this._invalidateItemIndexesAt(e,1);else{let r=t.existingEls;if(r.length!==t.count)return this;let n=this._getExistingElsRange();if(e>=n.firstIndex&&e<=n.lastIndex){let t=r[n.firstValidArrayIndex+e-n.firstIndex];delete t[wn],this._dequeueElementForIndex(t,e,t.nextSibling,!1)}}return this}isItemRendered(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return!1;let r=this._getExistingElsRange();return e>=r.firstIndex&&e<=r.lastIndex}getItemElementAt(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return;let r=t.existingEls,n=this._getExistingElsRange();return e>=n.firstIndex&&e<=n.lastIndex?r[n.firstValidArrayIndex+e-n.firstIndex]:void 0}getItemPosition(e){const t=this._p;if(!("number"!=typeof e||e<0||e>=t.count)){if(t.virtual)return this._calculateItemPosition(e);{let r=this.getItemElementAt(e);if(void 0===r)return;const n=t.list;return un(r).top-un(n).top+n.scrollTop}}}getItemIndexFromElement(e){return e?e[wn]:void 0}getItemSize(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return;let r=t.cachedItemHeights[e-1];return void 0===r&&(r=t.itemHeightEstimatorFn?t.itemHeightEstimatorFn(e-1):null,"number"!=typeof r&&(r=t.estimatedItemHeight),t.cachedItemEstimatedHeights[e-1]=r),r}getVisibleItemCount(){const e=this._p,t=e.list;let r,n,i=t.scrollTop,o=t.clientHeight;if(e.virtual)r=Sn(e.cachedItemPositions,i),n=Sn(e.cachedItemPositions,i+o,r);else{const t=e=>{let t=this.getItemPosition(e);return void 0===t&&(t=1/0),t};r=Wn(e.count,t,i),n=Wn(e.count,t,i+o,r)}return this.getItemPosition(n)===i+o&&n--,n-r+1}createGhostItemElement(e,t,r){const n=this._p;let i=this._dequeueElementForIndex(null,e,!1,!0);try{t&&n.currentItemsParent.appendChild(i),r(i)}finally{if(t){let e=i.parentNode;e&&e.removeChild(i)}n.onItemUnrender&&n.onItemUnrender(i)}}_resetCurrentItemsParent(){var e,t;const r=this._p;r.currentItemsParent=null!==(e=null!==(t=r.virtualWrapper)&&void 0!==t?t:r.userItemsParent)&&void 0!==e?e:r.list}_destroyElements(){const e=this._p,t=e.onItemUnrender,r=e.existingEls;for(let e=0;e<r.length;e++){const n=r[e];let i=n.parentNode;i&&i.removeChild(n),t&&void 0!==n[wn]&&t(n)}return r.length=0,e.virtualWrapper&&(e.virtualWrapper!==e.userItemsParent&&e.virtualWrapper.parentNode&&e.virtualWrapper.parentNode.removeChild(e.virtualWrapper),e.virtualWrapper=null,this._resetCurrentItemsParent()),this}_invalidateItemIndexesAt(e,t){const r=this._p;this._setItemPositionsNeedsUpdate(e);let n=r.existingEls,i=n.length,o=this._getExistingElsRange();if(-1!==o.firstValidArrayIndex&&(-1===t&&(t=n.length),e>=o.firstIndex&&e<=o.lastIndex))for(let r=o.firstValidArrayIndex+e-o.firstIndex,l=0;r<i&&l<t;r++,l++)delete n[r][wn]}_pushItemIndexesAt(e,t){let r=this._p.existingEls,n=r.length,i=this._getExistingElsRange();if(-1!==i.firstValidArrayIndex&&e>=i.firstIndex&&e<=i.lastIndex)for(let o=i.firstValidArrayIndex+e-i.firstIndex;o<n;o++)r[o][wn]+=t}_hookEvents(){const e=this._p;return this._unhookEvents(),e.virtual&&e.hookScrollEvent&&e.list&&e.list.addEventListener("scroll",e.boundRender),this}_unhookEvents(){const e=this._p;return e.list&&e.list.removeEventListener("scroll",e.boundRender),this}_setItemPositionsNeedsUpdate(e){const t=this._p;e<t.itemPositionsNeedsUpdate&&(t.itemPositionsNeedsUpdate=e)}_calculateItemPosition(e){const t=this._p,r=t.cachedItemPositions;if(e>=t.itemPositionsNeedsUpdate){const n=t.count,i=t.cachedItemHeights,o=t.cachedItemEstimatedHeights,l=t.estimatedItemHeight,s=t.itemHeightEstimatorFn;i.length!==n&&(i.length=n,o.length=n,r.length=n);let a=t.itemPositionsNeedsUpdate,d=Math.min(e,n),u=0;a>0&&(u=r[a-1]);for(let e=a;e<=d;e++){if(0===e){r[e]=u;continue}const t=e-1;let n=i[t];void 0===n&&(n=s?s(t):null,"number"!=typeof n&&(n=l),o[t]=n),u+=n,r[e]=u}t.itemPositionsNeedsUpdate=d+1}if(e>0&&e===t.count){let n=t.cachedItemHeights[e-1];return void 0===n&&(n=t.itemHeightEstimatorFn?t.itemHeightEstimatorFn(e-1):null,"number"!=typeof n&&(n=t.estimatedItemHeight),t.cachedItemEstimatedHeights[e-1]=n),r[e-1]+n}return r[e]}_dequeueElementForIndex(e,t,r,n){const i=this._p,o=i.virtualWrapper;i.currentItemsParent;const l=i.existingEls,s=i.onItemRender,a=i.onItemUnrender,d=!e,u=d||t!==e[wn];if(e?a&&u&&a(e):(e=i.itemElementCreatorFn(),o&&!1!==r&&(e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.right="0")),u&&(e.innerHTML="",s&&s(e,t)),!1!==r){if(r instanceof Node||(r=null),!d){let t=l.indexOf(e);-1!==t&&l.splice(t,1)}let i=r?l.indexOf(r):-1;-1===i?l.push(e):l.splice(i,0,e),n||this._insertItemAndFlow(e,t,r)}return e[wn]=t,e}_insertItemAndFlow(e,t,r){const n=this._p,i=n.virtualWrapper,o=n.currentItemsParent;if(!1!==r&&(r instanceof Node||(r=null),e.parentNode===o&&e.nextSibling===r||vn(e,r,o)),i){let r=e.getBoundingClientRect().height,i=n.cachedItemHeights[t];i!==r&&(n.cachedItemHeights[t]=r),(void 0!==i&&r!==i||void 0===i&&r!==n.cachedItemEstimatedHeights[t])&&this._setItemPositionsNeedsUpdate(t+1);let o=this._calculateItemPosition(t);const l=Rn();!1===l?e.style.top=`${o}px`:e.style[l]=`translateY(${o}px)`}}_getExistingElsRange(){const e=this._p.existingEls;let t=-1,r=-1;for(let r=0,n=e.length;r<n;r++)if(!1!==mn.call(e[r],wn)){t=r;break}for(let t=e.length-1;t>=0;t--)if(!1!==mn.call(e[t],wn)){r=t;break}return{firstValidArrayIndex:t,lastValidArrayIndex:r,firstIndex:-1!==t?e[t][wn]:-1,lastIndex:-1!==r?e[r][wn]:-1}}}const wn=Symbol("index"),yn=Symbol("reuse"),_n=()=>document.createElement("li"),Sn=(e,t,r=0,n=-1)=>{let i=e.length;if(n<0&&(n+=i),n<=r)return n;for(;r<=n;){let o=Math.floor(r+(n-r)/2),l=e[o];if(l===t||l<=t&&o<i&&e[o+1]>t){for(;o>0&&e[o-1]===l;)o--;return o}l<t?r=o+1:n=o-1}return-1===n?0:i-1},Wn=(e,t,r,n=0,i=-1)=>{if(i<0&&(i+=e),i<=n)return i;for(;n<=i;){let o=Math.floor(n+(i-n)/2),l=t(o);if(l===r||l<=r&&o<e&&t(o+1)>r){for(;o>0&&t(o-1)===l;)o--;return o}l<r?n=o+1:i=o-1}return-1===i?0:t(e-1)},xn=(e,t)=>{for(let r=e.length-1;r>=0;r--)if(t(e[r]))return e[r]};let In=null;const Rn=()=>{if(null===In){let e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],t=document.createElement("div");In=!1;for(let r of e)if(t&&void 0!==t.style[r]){In=r;break}}return In};function Nn(e,t){for(let r=0,n=e.length;r>=0&&r<n;r+=1)if(t(e[r],r,e))return e[r]}function En(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}const Pn=Symbol("safe"),Fn=Symbol("hover_in"),kn=Symbol("hover_out"),Ln=Symbol("row_click"),Tn=Symbol("preview_cell"),Hn=Symbol("cell"),On=Symbol("related_touch"),An=Symbol("original_row_index"),Mn=Symbol("destroyed");class zn extends Array{constructor(e){var t,r,n;super(),this.onComparatorRequired=null,this.customSortingProvider=null,e=e||{},this.sortColumn=null!==(t=e.sortColumn)&&void 0!==t?t:[],this.onComparatorRequired=null!==(r=e.onComparatorRequired)&&void 0!==r?r:null,this.customSortingProvider=null!==(n=e.customSortingProvider)&&void 0!==n?n:null}add(e,t){if(Array.isArray(e)){const r=e;if("number"==typeof t)for(let e=0,n=r.length;e<n;e++)this.splice(t++,0,r[e]);else for(let e=0,t=r.length;e<t;e++)this.push(r[e])}else{const r=e;"number"==typeof t?this.splice(t,0,r):this.push(r)}}reset(e){this.length=0,e&&this.add(e)}filteredCollection(e,t){if(e&&t){const r=new zn({sortColumn:this.sortColumn,onComparatorRequired:this.onComparatorRequired,customSortingProvider:this.customSortingProvider});for(let n=0,i=this.length;n<i;n++){const i=this[n];e(i,t)&&(i[An]=n,r.push(i))}return r}return null}sort(e){let t;if("function"==typeof e)return super.sort(e);if(this.sortColumn.length){const e=[];for(let t=0;t<this.sortColumn.length;t++){const r=$n(this.sortColumn[t],this.sortColumn[t].descending);let n=null;this.onComparatorRequired&&(n=this.onComparatorRequired(this.sortColumn[t].column,this.sortColumn[t].descending,r)),n||(n=r),e.push(n.bind(this))}if(1===e.length)t=e[0];else{const r=e.length;t=(t,n)=>{let i=0;for(let o=0;o<r;o++)if(i=e[o](t,n),0!==i)return i;return i}}const r=e=>(e.sort(t),e);if(this.customSortingProvider){const e=this.customSortingProvider(this,r);e!==this&&this.splice(0,this.length,...e)}else r(this)}return this}}function $n(e,t){let r=e.comparePath;"string"==typeof r&&(r=r.split("."));const n=r.length,i=n>1,o=t?1:-1,l=t?-1:1;return function(e,t){let s=e[r[0]],a=t[r[0]];if(i)for(let e=1;e<n;e++)s=s&&s[r[e]],a=a&&a[r[e]];return s===a?0:null==s?o:null==a?l:s<a?o:l}}class jn extends Array{constructor(){super()}get(e){for(let t=0,r=this.length;t<r;t++)if(this[t].name===e)return this[t];return null}indexOf(e){const t="string"==typeof e?e:e.name;for(let e=0,r=this.length;e<r;e++)if(this[e].name===t)return e;return-1}getByOrder(e){for(let t=0,r=this.length;t<r;t++)if(this[t].order===e)return this[t];return null}normalizeOrder(){const e=[];for(let t=0;t<this.length;t++)e.push(this[t]);e.sort((e,t)=>e.order<t.order?-1:e.order>t.order?1:0);for(let t=0;t<e.length;t++)e[t].order=t;return this}getColumns(){const e=[];for(let t=0;t<this.length;t++)e.push(this[t]);return e.sort((e,t)=>e.order<t.order?-1:e.order>t.order?1:0),e}getVisibleColumns(){const e=[];for(let t=0;t<this.length;t++){const r=this[t];r.visible&&e.push(r)}return e.sort((e,t)=>e.order<t.order?-1:e.order>t.order?1:0),e}getMaxOrder(){let e=0;for(let t=0;t<this.length;t++){const r=this[t];r.order>e&&(e=r.order)}return e}moveColumn(e,t){if(e&&t){const r=e.order,n=t.order;if(r<n)for(let e=r+1;e<=n;e++){const t=this.getByOrder(e);t&&t.order--}else for(let e=r-1;e>=n;e--){const t=this.getByOrder(e);t&&t.order++}e.order=n}return this}}function Bn(e,t){const r=t.column,n=null==t.keyword?"":t.keyword.toString();if(!n||!r)return!0;let i=e[r];if(null==i)return!1;let o=i.toString(),l=n;return t.caseSensitive||(o=o.toLowerCase(),l=l.toLowerCase()),-1!==o.indexOf(l)}const Vn={NONE:"none",AUTO:"auto",SCROLL:"scroll"},Dn=document.createElement.bind(document);function Un(e){["relative","absolute","fixed"].includes(getComputedStyle(e).position)||(e.style.position="relative")}function qn(e){const t=e.target;return/^(?:INPUT|TEXTAREA|BUTTON|SELECT)$/.test(t.tagName)}function Xn(e){const t=getComputedStyle(e);return(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)}function Yn(e){const t=e.style;t["-webkit-touch-callout"]="none",t["-webkit-user-select"]="none",t["-moz-user-select"]="none",t["-ms-user-select"]="none",t["-o-user-select"]="none",t["user-select"]="none"}function Gn(e,t){const r=e._o.tableClassName,n=Dn("div");n.className=e.el.className;const i=Dn("div");i.className=r+"-header";const o=Dn("div");o.className=r+"-header-row";const l=Dn("div");l.className=r+"-header-cell";const s=Dn("div");s.textContent=t,l.appendChild(s),o.appendChild(l),i.appendChild(o),n.appendChild(i),rn(n,{position:"absolute",top:"-9999px",visibility:"hidden"}),document.body.appendChild(n);const a=on(l);return n.remove(),a}function Jn(e){const t=e._o,r=e._p;let n,i=0,o=0;r.table&&(i=r.table?r.table.scrollTop:0,o=r.table?r.table.scrollLeft:0,t.virtualTable&&(n=r.table.style.display,r.table.style.display="none"));let l=on(e.el);r.table&&(t.virtualTable&&void 0!==n&&(r.table.style.display=n),r.table.scrollTop=i,r.table.scrollLeft=o,r.header&&(r.header.scrollLeft=o));const s=t.tableClassName,a=Dn("div");a.className=e.el.className,rn(a,{"z-index":"-1",position:"absolute",left:"0",top:"-9999px"});const d=Dn("div");d.className=`${s}-header`,a.appendChild(d);const u=Dn("div");u.index=null,u.vIndex=null,u.className=`${s}-header-row`,d.appendChild(u);for(let e=0;e<r.visibleColumns.length;e++){const t=r.visibleColumns[e],n=Dn("div");n.className=`${s}-header-cell ${t.cellClasses||""}`,n.columnName=t.name,n.appendChild(Dn("div")),u.appendChild(n)}document.body.appendChild(a),l-=function(e){const t=getComputedStyle(e);return(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0)}(u);const c=u.querySelectorAll(`div.${s}-header-cell`);for(const e of c){const t=getComputedStyle(e);if("border-box"!==t.boxSizing){l-=(parseFloat(t.borderRightWidth)||0)+(parseFloat(t.borderLeftWidth)||0)+Xn(e);const n=e.columnName,i=r.columns.get(n);i&&(l-=i.arrowProposedWidth||0)}}return a.remove(),Math.max(0,l)}function Kn(e){const t=e._p,r=e._o.tableClassName,n=r+"-row",i=r+"-cell",o=t.visibleColumns,l=o.length,s=Dn("div");s.className=n,s.style.float="left";let a=0;for(let e=0;e<l;e++){var d,u;const t=o[e],r=Dn("div");r.className=i,r.style.width=(null!==(d=t.actualWidth)&&void 0!==d?d:0)+"px",t.cellClasses&&(r.className+=" "+t.cellClasses),r.appendChild(Dn("div")),s.appendChild(r),a+=null!==(u=t.actualWidth)&&void 0!==u?u:0}const c=Dn("div");c.className=e.el.className,rn(c,{"z-index":"-1",position:"absolute",left:"0",top:"-9999px",float:"left",width:"1px",overflow:"hidden"});const h=Dn("div");h.className=r,c.appendChild(h);const f=Dn("div");f.className=r+"-body",f.style.width=a+1e4+"px",h.appendChild(f),f.appendChild(s),document.body.appendChild(c);const m=Dn("div");rn(m,{border:"1.5px solid #000",width:"0",height:"0",position:"absolute",left:"0",top:"-9999px"}),document.body.appendChild(m);const p=parseFloat(getComputedStyle(m).borderWidth),v=Math.round(p)!==p;m.remove();let g=on(s,!0,!0,!0);return g-=t.scrollbarWidth||0,v&&g++,c.remove(),g}function Qn(e){const t=e._p;return!!t.table&&"rtl"===getComputedStyle(t.table).direction}function Zn(e){return 0===e.widthMode?"auto":2===e.widthMode?100*e.width+"%":e.width}class ei{static saveSelection(e){const t=window.getSelection();if(!t||0===t.rangeCount)return null;const r=t.getRangeAt(0);if(e!==r.commonAncestorContainer&&!function(e,t){let r=e;for(;(r=null!==(n=null===(i=r)||void 0===i?void 0:i.parentNode)&&void 0!==n?n:null)&&r!==t;)var n,i;return!!r}(r.commonAncestorContainer,e))return null;const n=r.cloneRange();n.selectNodeContents(e),n.setEnd(r.startContainer,r.startOffset);const i=n.toString().length;return{start:i,end:i+r.toString().length}}static restoreSelection(e,t){let r=0;const n=[e];let i,o=!1,l=!1;const s=document.createRange();for(s.setStart(e,0),s.collapse(!0);!l&&(i=n.pop());)if(i.nodeType===Node.TEXT_NODE){const e=r+i.length;!o&&t.start>=r&&t.start<=e&&(s.setStart(i,t.start-r),o=!0),o&&t.end>=r&&t.end<=e&&(s.setEnd(i,t.end-r),l=!0),r=e}else{let e=i.childNodes.length;for(;e--;)n.push(i.childNodes[e])}const a=window.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}}const ti=document.createElement.bind(document);function ri(e,t){var r,n,i;const o=e._o,l=Qn(e);let s=t.target.closest(`div.${o.tableClassName}-header-cell,div.${o.cellPreviewClassName}`);if(!s)return null;s[Hn]&&(s=s[Hn]);let a=s.previousSibling;for(;a&&1!==a.nodeType;)a=a.previousSibling;const d=!a,u=t,c=null!==(r=null!==(n=t[On])&&void 0!==n?n:null===(i=u.changedTouches)||void 0===i?void 0:i[0])&&void 0!==r?r:t,h=(c.pageX||c.clientX||0)-un(s).left;if(l){var f,m,p;if(!d&&on(s,!0,!0,!0)-h<=o.resizeAreaWidth/2)return null!==(f=null===(m=a)||void 0===m?void 0:m.columnName)&&void 0!==f?f:null;if(h<=o.resizeAreaWidth/2)return null!==(p=s.columnName)&&void 0!==p?p:null}else{var v,g,b;if(!d&&h<=o.resizeAreaWidth/2)return null!==(v=null===(g=a)||void 0===g?void 0:g.columnName)&&void 0!==v?v:null;if(on(s,!0,!0,!0)-h<=o.resizeAreaWidth/2)return null!==(b=s.columnName)&&void 0!==b?b:null}return null}function ni(e){const t=e._p;return t.resizer&&(t.resizer.remove(),t.resizer=null,t.eventsSink.remove(document,".colresize")),e}function ii(e,t){const r=t;if("mousedown"===t.type&&0!==r.button)return;const n=e._o,i=e._p,o=ri(e,t);if(o){const r=i.columns.get(o);if(!n.resizableColumns||!r||!r.resizable)return!1;const l=Qn(e);i.resizer&&i.resizer.remove(),i.resizer=ti("div"),i.resizer.className=n.resizerClassName,rn(i.resizer,{position:"absolute",display:"block",zIndex:"-1",visibility:"hidden",width:"2px",background:"#000",opacity:"0.7"}),e.el.appendChild(i.resizer);const s=r.element,a=i.resizer.parentNode,d=getComputedStyle(a),u=getComputedStyle(s),c=un(s),h=un(a);h.left+=parseFloat(d.borderLeftWidth)||0,h.top+=parseFloat(d.borderTopWidth)||0,c.left-=h.left,c.top-=h.top,c.top-=parseFloat(u.borderTopWidth)||0;const f=on(i.resizer,!0,!0,!0);l?(c.left-=Math.ceil((parseFloat(u.borderLeftWidth)||0)/2),c.left-=Math.ceil(f/2)):(c.left+=on(s,!0,!0,!0),c.left+=Math.ceil((parseFloat(u.borderRightWidth)||0)/2),c.left-=Math.ceil(f/2)),rn(i.resizer,{"z-index":"10",visibility:"visible",left:c.left+"px",top:c.top+"px",height:ln(e.el,!1,!1,!1)+"px"}),i.resizer.columnName=s.columnName;try{i.resizer.style.zIndex=""}catch{}i.eventsSink.add(document,"mousemove.colresize",t=>oi(e,t)).add(document,"touchmove.colresize",t=>oi(e,t)).add(document,"mouseup.colresize",t=>li(e,t)).add(document,"touchend.colresize",t=>li(e,t)),t.preventDefault()}}function oi(e,t){var r,n,i;const o=e._p;if(!o.resizer)return;const l=o.columns.get(o.resizer.columnName);if(!l)return;const s=Qn(e),a=l.element,d=o.resizer.parentNode,u=getComputedStyle(d),c=getComputedStyle(a),h=un(a),f=un(d);f.left+=parseFloat(u.borderLeftWidth)||0,h.left-=f.left;const m=on(o.resizer,!0,!0,!0),p="border-box"===c.boxSizing,v=t;let g=(null!==(r=null!==(n=t[On])&&void 0!==n?n:null===(i=v.changedTouches)||void 0===i?void 0:i[0])&&void 0!==r?r:t).pageX-f.left,b=h.left;b-=Math.ceil(m/2),s?(b+=on(a,!0,!0,!0),b-=l.ignoreMin?0:e._o.minColumnWidth,p||(b-=Math.ceil((parseFloat(c.borderLeftWidth)||0)/2),b-=Xn(a)),g>b&&(g=b)):(b+=l.ignoreMin?0:e._o.minColumnWidth,p||(b+=Math.ceil((parseFloat(c.borderRightWidth)||0)/2),b+=Xn(a)),g<b&&(g=b)),o.resizer.style.left=g+"px"}function li(e,t){var r,n,i;const o=e._o,l=e._p;if(!l.resizer)return;l.eventsSink.remove(document,".colresize");const s=l.columns.get(l.resizer.columnName);if(!s)return l.resizer.remove(),void(l.resizer=null);const a=Qn(e),d=s.element,u=d.firstChild,c=l.resizer.parentNode,h=getComputedStyle(c),f=getComputedStyle(d),m=un(d),p=un(c);p.left+=parseFloat(h.borderLeftWidth)||0,m.left-=p.left;const v=on(l.resizer,!0,!0,!0),g="border-box"===f.boxSizing,b=t;let C=(null!==(r=null!==(n=t[On])&&void 0!==n?n:null===(i=b.changedTouches)||void 0===i?void 0:i[0])&&void 0!==r?r:t).pageX-p.left,w=m.left,y=0;if(w-=Math.ceil(v/2),a){if(!g){C+=Xn(d);const e=getComputedStyle(u||d);C+=parseFloat(e.borderLeftWidth)||0,C+=parseFloat(e.borderRightWidth)||0,C+=s.arrowProposedWidth||0}w+=on(d,!0,!0,!0);const t=w-(s.ignoreMin?0:e._o.minColumnWidth);C>t&&(C=t),y=w-C}else{if(!g){C-=Xn(d);const e=getComputedStyle(u||d);C-=parseFloat(e.borderLeftWidth)||0,C-=parseFloat(e.borderRightWidth)||0,C-=s.arrowProposedWidth||0}const t=w+(s.ignoreMin?0:e._o.minColumnWidth);C<t&&(C=t),y=C-w}l.resizer.remove(),l.resizer=null;let _=y;if(2===s.widthMode){let t=Jn(e),r=0,n=0;for(let e=0;e<l.visibleColumns.length;e++){var S;const i=l.visibleColumns[e];i.name!==s.name&&(2===i.widthMode?(r+=i.width,n++):t-=null!==(S=i.actualWidth)&&void 0!==S?S:0)}if(t=Math.max(1,t),1===t&&l.table&&(t=l.table.clientWidth),_=y/t,n>0){const e=_/((1-_)/r);r+=_,(r<1&&o.relativeWidthGrowsToFillWidth||r>1&&o.relativeWidthShrinksToFillWidth)&&(_=e)}_*=100,_+="%"}e.setColumnWidth(s.name,_)}function si(e,t){var r;const n=e._o,i=e._p;if(!n.resizableColumns)return;const o=ri(e,t),l=t.target.closest(`div.${n.tableClassName}-header-cell,div.${n.cellPreviewClassName}`);l&&(o&&null!==(r=i.columns.get(o))&&void 0!==r&&r.resizable?l.style.cursor="e-resize":l.style.cursor="")}function ai(e,t){var r,n,i;const o=e._o,l=t,s=t,a=null!==(r=null!==(n=t[On])&&void 0!==n?n:null===(i=l.changedTouches)||void 0===i?void 0:i[0])&&void 0!==r?r:{pageX:s.pageX,pageY:s.pageY},d=t.target.closest(`div.${o.tableClassName}-header-cell,div.${o.cellPreviewClassName}`);if(!d)return;const u=un(d);u.width=on(d,!0,!0,!0),u.height=ln(d,!0,!0,!0),e.emit("headercontextmenu",{columnName:d.columnName,pageX:a.pageX,pageY:a.pageY,bounds:u})}function di(e,t){if(qn(t))return;if(ri(e,t))return;const r=e._o,n=e._p,i=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!i)return;if(!r.sortableColumns)return;const o=n.columns.get(i.columnName),l=n.rows.sortColumn;if(o&&o.sortable){let t=!0;const n=l.length?l[l.length-1]:null;n&&n.column===o.name&&(n.descending&&r.allowCancelSort?(t=!1,l.splice(l.length-1,1)):n.descending=!n.descending);const i=e;t?i.sort(o.name,void 0,!0).render():i.sort()}}const ui=Array.prototype.indexOf,ci=document.createElement.bind(document);function hi(e){const t=e._p;return t.headerRow&&(t.headerRow=void 0),e}function fi(e){const t=e._o,r=e._p;if(!r.tbody)return e;if(t.virtualTable&&r.virtualListHelper){const e=r.virtualListHelper.estimateFullHeight();r._lastVirtualScrollHeight=e,r.tbody.style.height=e+"px"}else r.tbody.style.height="";return e}function mi(e,t){const r=e._p;if(!r.table)return e;const n=r.table.offsetWidth-r.table.clientWidth;if(n!==r.scrollbarWidth||t){var i;r.scrollbarWidth=n;for(let e=0;e<r.columns.length;e++)r.columns[e].actualWidthConsideringScrollbarWidth=null;if(r.scrollbarWidth>0&&r.visibleColumns.length>0&&r.tbody&&r.headerRow){var o;const e=r.visibleColumns.length-1;r.visibleColumns[e].actualWidthConsideringScrollbarWidth=(null!==(o=r.visibleColumns[e].actualWidth)&&void 0!==o?o:0)-r.scrollbarWidth;const t=r.visibleColumns[e].actualWidthConsideringScrollbarWidth+"px",n=r.tbody.childNodes;for(let r=0,i=n.length;r<i;r++){const i=n[r];1===i.nodeType&&(i.childNodes[e].style.width=t)}r.headerRow.childNodes[e].style.width=t}vi(e),null===(i=r.notifyRendererOfColumnsConfig)||void 0===i||i.call(r)}return e}function pi(e,t){const r=e._o,n=e._p;if(!n.tbody||!n.table||!n.headerRow)return e;const i=Kn(e);if(n.tbody.style.minWidth=i+"px",n.headerRow.style.minWidth=i+(n.scrollbarWidth||0)+"px",n.eventsSink.remove(n.table,"scroll"),r.width===Vn.AUTO)sn(n.table,on(n.tbody,!0,!0,!0)),sn(e.el,on(n.table,!0,!0,!0));else if(r.width===Vn.SCROLL){if(t){const t=n.table?n.table.scrollTop:0,r=n.table?n.table.scrollLeft:0;!function(e){const t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}(e.el),n.table.scrollTop=t,n.table.scrollLeft=r,n.header&&(n.header.scrollLeft=r)}const r=()=>function(e){const t=e._p;t.header.scrollLeft=t.table.scrollLeft,gi(e)}(e);n.eventsSink.add(n.table,"scroll",r)}return e}function vi(e){var t;const r=e._p,n=e._o;if(!r.headerRow)return;const i=n.tableClassName+"-sticky",o=r.headerRow,l=Qn(e);r.lastIsRtl=l;const s=null!==(t=r.scrollbarWidth)&&void 0!==t?t:0;let a=0,d=0,u=null;const c=[],h=[];let f=null,m=[];for(let e=o.firstElementChild;e;e=e.nextElementSibling){var p;const t=e.getAttribute("data-column");if(!t)continue;const n=r.columns.get(t);if(n)if("start"===n.sticky||"end"===n.sticky){var v;e.className+=" "+i,e.style.position="sticky";let t=null!==(v=n.actualWidth)&&void 0!==v?v:0,r=null;if(null===u&&(r=getComputedStyle(e),u=r.boxSizing),"content-box"===u&&(null===r&&(r=getComputedStyle(e)),t+=(parseFloat(r.paddingLeft)||0)+(parseFloat(r.paddingRight)||0)+(parseFloat(r.borderLeftWidth)||0)+(parseFloat(r.borderRightWidth)||0)),"start"===n.sticky){const r=n.stickyPos={direction:"start",absDirection:l?"right":"left",offset:a};e.style[r.absDirection]=a+"px",a+=t,m.length=0,f=[e],c.push(f)}else{const r=n.stickyPos={direction:"end",absDirection:l?"left":"right",offset:d};e.style[r.absDirection]=d+s+"px",d+=t,h.push([e,...m]),m.length=0}}else delete n.stickyPos,null!==(p=f)&&void 0!==p&&p.push(e),null!=m&&m.push(e),"sticky"===e.style.position&&(e.classList.remove(i),e.style.position="",e.style.left="",e.style.right="")}r.stickiesStart=c,r.stickiesEnd=h,gi(e)}function gi(e){const t=e._p;if(!t.table||!t.headerRow||!t.tbody)return;const r=t.stickiesStart,n=t.stickiesEnd,i=t.stickiesSetStart,o=t.stickiesSetEnd,l=t.stickiesSetStart=new Set,s=t.stickiesSetEnd=new Set;if(null!=r&&r.length||null!=n&&n.length){const e=t.table.scrollLeft;if(e===t.lastStickyScrollLeft)return;t.lastStickyScrollLeft=e;const i=t.headerRow.children,o=1.5,a=t.lastIsRtl,d=(e,t,r)=>{if(e&&e.length)for(const n of e){const e=n[0],l=n.slice(1),s=l[0],d=l[l.length-1];if(!e||!e.getBoundingClientRect)continue;const u=e.getBoundingClientRect(),c=t!==a;let h=!1;if(s&&d){const e=s.getBoundingClientRect(),r=d.getBoundingClientRect();h=t?a?u.right-o>r.left&&u.left+o<e.right:u.right-o>e.left&&u.left+o<r.right:a?u.left+o<e.right&&u.right-o>r.left:u.left+o<r.right&&u.right-o>e.left}e.classList.toggle(c?"is-sticky-left":"is-sticky-right",h),h&&r.add(ui.call(i,e))}};d(r,!0,l),d(n,!1,s)}const a=[],d=[];for(const e of l)(null==i?void 0:i.has(e))||a.push({index:e,start:!0});for(const e of s)(null==o?void 0:o.has(e))||a.push({index:e,start:!1});if(i)for(const e of i)l.has(e)||d.push({index:e,start:!0});if(o)for(const e of o)s.has(e)||d.push({index:e,start:!1});if(!a.length&&!d.length)return;let u=t.tbody.firstElementChild;for(;u;){const e=u.children;for(const r of d){var c;null===(c=e[r.index])||void 0===c||c.classList.remove(r.start!==t.lastIsRtl?"is-sticky-left":"is-sticky-right")}for(const r of a){var h;null===(h=e[r.index])||void 0===h||h.classList.add(r.start!==t.lastIsRtl?"is-sticky-left":"is-sticky-right")}u=u.nextElementSibling}t.isStickyColumns=new Map;for(const e of l)t.isStickyColumns.set(e,"start");for(const e of s)t.isStickyColumns.set(e,"end")}function bi(e,t){const r=e._p,n=e._o;if(!r.headerRow||!r.tbody)return e;const i=r.headerRow.querySelectorAll(`div.${n.tableClassName}-header-cell`)[t];if(!i)return e;const o=r.columns.get(i.columnName);if(o){i.style.width=(o.actualWidthConsideringScrollbarWidth||o.actualWidth||0)+"px";const e=(o.actualWidthConsideringScrollbarWidth||o.actualWidth||0)+"px",n=r.tbody.childNodes;for(let r=0,i=n.length;r<i;r++){const i=n[r];1===i.nodeType&&(i.childNodes[t].style.width=e)}}return e}function Ci(e){const t=e._p,r=e._o;if(t.table&&t.headerRow){const e=r.tableClassName,i=hn(t.headerRow,`>div.${e}-header-cell.sorted`),o=Array.prototype.slice.call(i,0).map(e=>e.querySelector(":scope>div>.sort-arrow")).filter(e=>!!e);for(const e of o){var n;const r=null===(n=e.parentNode)||void 0===n?void 0:n.parentNode;if(r){const e=t.columns.get(r.columnName);e&&(e.arrowProposedWidth=0)}e.remove()}for(const e of i)e.classList.remove("sorted","desc")}return e}function wi(e,t,r){var n;const i=e._p,o=e._o,l=i.columns.get(t);if(!l)return!1;const s=ci("span");return s.className="sort-arrow",l.element&&(l.element.className+=r?" sorted desc":" sorted",null!==(n=l.element.firstChild)&&void 0!==n&&n.insertBefore(s,l.element.firstChild.firstChild)),2!==l.widthMode&&o.adjustColumnWidthForSortArrow&&(l.arrowProposedWidth=s.scrollWidth+(parseFloat(getComputedStyle(s).marginRight)||0)+(parseFloat(getComputedStyle(s).marginLeft)||0)),!0}function yi(e,t){const r=t.firstChild;t.addEventListener("mousedown",t=>ii(e,t)),t.addEventListener("mousemove",t=>si(e,t)),t.addEventListener("mouseup",t=>function(e,t){2===t.button&&ai(e,t)}(e,t)),t.addEventListener("mouseleave",t=>function(e,t){const r=e._o,n=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);n&&(n.style.cursor="")}(e,t)),t.addEventListener("touchstart",t=>function(e,t){const r=e._p;if(r.currentTouchId)return;const n=t.changedTouches[0];r.currentTouchId=n.identifier;const i=t.currentTarget,o={x:n.pageX,y:n.pageY};let l,s=o;const a=function(){r.currentTouchId=null,r.eventsSink.remove(i,".colheader"),clearTimeout(l)};t[On]=t.changedTouches[0],ii(e,t),l=setTimeout(()=>{a(),r.eventsSink.add(i,"touchend.colheader",e=>{qn(e)||e.preventDefault(),r.eventsSink.remove(i,".colheader")},{once:!0}).add(i,"touchcancel.colheader",e=>{r.eventsSink.remove(i,".colheader")},{once:!0}),Math.sqrt(Math.pow(Math.abs(s.x-o.x),2)+Math.pow(Math.abs(s.y-o.y),2))<9&&(ni(e),ai(e,t))},500),r.eventsSink.add(i,"touchend.colheader",t=>{const n=t,i=Nn(Array.from(n.changedTouches),e=>e.identifier===r.currentTouchId);i&&(a(),qn(t)||t.preventDefault(),s={x:i.pageX,y:i.pageY},(Math.sqrt(Math.pow(Math.abs(s.x-o.x),2)+Math.pow(Math.abs(s.y-o.y),2))<9||r.resizer)&&(n[On]=i,di(e,n)))}).add(i,"touchcancel.colheader",a).add(i,"touchmove.colheader",t=>{const n=t,i=Nn(Array.from(n.changedTouches),e=>e.identifier===r.currentTouchId);i&&(s={x:i.pageX,y:i.pageY},r.resizer&&(t.preventDefault(),n[On]=i,si(e,n)))})}(e,t)),t.addEventListener("dragstart",t=>function(e,t){const r=e._o,n=e._p;if(r.movableColumns){var i;const e=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!e)return void t.preventDefault();const o=n.columns.get(e.columnName);o&&o.movable?(e.style.opacity="0.35",n.dragId=161061273*Math.random(),null===(i=t.dataTransfer)||void 0===i||i.setData("text",JSON.stringify({dragId:n.dragId,column:o.name}))):t.preventDefault()}else t.preventDefault()}(e,t)),t.addEventListener("click",t=>di(e,t)),t.addEventListener("contextmenu",e=>e.preventDefault()),r.addEventListener("dragenter",t=>function(e,t){const r=e._o,n=e._p;if(r.movableColumns){var i;let e=null;const o=null===(i=t.dataTransfer)||void 0===i?void 0:i.getData("text");if(o)try{e=JSON.parse(o)}catch{e=null}const l=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!l)return;if(!e||n.dragId===e.dragId&&l.columnName!==e.column){const e=n.columns.get(l.columnName);e&&(e.movable||e!==n.visibleColumns[0])&&l.classList.add("drag-over")}}}(e,t)),r.addEventListener("dragover",e=>{e.preventDefault()}),r.addEventListener("dragleave",t=>function(e,t){const r=e._o,n=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!n)return;const i=t.relatedTarget;(null==i?void 0:i.contains(n.firstChild))||n.classList.remove("drag-over")}(e,t)),r.addEventListener("drop",t=>function(e,t,r){t.preventDefault();const n=e._o,i=e._p,o=null===(r=t.dataTransfer)||void 0===r?void 0:r.getData("text");if(!o)return;let l;try{l=JSON.parse(o)}catch{return}const s=t.target.closest(`div.${n.tableClassName}-header-cell,div.${n.cellPreviewClassName}`);if(s){if(n.movableColumns&&l.dragId===i.dragId){const t=l.column,r=s.columnName,n=i.columns.get(t),o=i.columns.get(r);n&&o&&n.movable&&(o.movable||o!==i.visibleColumns[0])&&e.moveColumn(t,r)}s.classList.remove("drag-over")}}(e,t))}function _i(e,t){let r=Math.max(0,parseFloat(e)||0),n=0;return r>0&&(e===r+"%"?(n=2,r/=100):r>0&&r<1?n=2:(r<t&&(r=t),n=1)),{width:r,mode:n}}function Si(e,t){var r;let n=_i(t.width,t.ignoreMin?0:e.minColumnWidth),i={name:t.name,label:void 0===t.label?t.name:t.label,width:n.width,widthMode:n.mode,resizable:void 0===t.resizable||t.resizable,sortable:void 0===t.sortable||t.sortable,movable:void 0===t.movable||t.movable,visible:void 0===t.visible||t.visible,cellClasses:void 0===t.cellClasses?e.cellClasses:t.cellClasses,ignoreMin:void 0!==t.ignoreMin&&!!t.ignoreMin,sticky:void 0===t.sticky?null:t.sticky||null,allowPreview:!(null!==(r=t.allowPreview)&&void 0!==r&&!r),dataPath:[],comparePath:[],order:0};const o=void 0===t.dataPath?i.name:t.dataPath,l=void 0===t.comparePath?o:t.comparePath;return i.dataPath="string"==typeof o?o.split("."):o,i.comparePath="string"==typeof l?l.split("."):l,i}function Wi(e){const t=e._p;0===t.visibleColumns.length&&t.columns.length&&(t.columns[0].visible=!0,t.visibleColumns.push(t.columns[0]),e.emit("showcolumn",t.columns[0].name))}function xi(e){const t=e._p;if(t.filteredRows&&t.filterArgs){let r=e._o.filter||Bn;t.filteredRows=t.rows.filteredCollection(r,t.filterArgs)}}function Ii(e,t,r){let n=r.dataPath,i=t[n[0]];for(let e=1;e<n.length&&null!=i;e++)i=i&&i[n[e]];const o=e.cellFormatter;let l;if(o[Pn])l=o(i,r.name,t);else try{l=o(i,r.name,t)}catch(e){l="[ERROR]",console.error("Failed to generate content for cell "+r.name,e)}return null==l&&(l=""),l}const Ri=Array.prototype.indexOf,Ni=document.createElement.bind(document);function Ei(e){const t=e._p;if(t.cellPreviewCell){var r;const n=t.cellPreviewCell,i=n[Hn];let o;try{o=ei.saveSelection(n)}catch{}t.cellPreviewCell.remove(),i&&t._unbindCellHoverOut(i),t._unbindCellHoverOut(n);try{o&&i&&ei.restoreSelection(i,o)}catch{}e.emit("cellpreviewdestroy",{el:n.firstChild,name:n.columnName,rowIndex:null!==(r=n.rowIndex)&&void 0!==r?r:null,rowData:null==n.rowIndex?null:t.rows[n.rowIndex],cell:i,cellEl:null==i?void 0:i.firstChild}),i&&delete i[Tn],delete n[Hn],t.cellPreviewCell=null,t.abortCellPreview=!1}else t.abortCellPreview=!0;return e}const Pi=Object.prototype.hasOwnProperty;class Fi{constructor(e){var t,r;this.VERSION=Fi.VERSION;const n=this._o={},i=this._p={eventsSink:new fn,mitt:{all:o=o||new Map,on:function(e,t){var r=o.get(e);r?r.push(t):o.set(e,[t])},off:function(e,t){var r=o.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):o.set(e,[]))},emit:function(e,t){var r=o.get(e);r&&r.slice().map(function(e){e(t)}),(r=o.get("*"))&&r.slice().map(function(r){r(e,t)})}},tableSkeletonNeedsRendering:!0};var o;this.el=e.el&&e.el instanceof HTMLElement?e.el:document.createElement("div"),this.el!==e.el&&this.el.classList.add(e.className||"dgtable-wrapper"),i.eventsSink.add(this.el,"dragend.colresize",e=>{return t=e,void(this._p.resizer||(t.target.style.opacity=""));var t}),n.virtualTable=void 0===e.virtualTable||!!e.virtualTable,n.estimatedRowHeight=e.estimatedRowHeight||void 0,n.rowsBufferSize=e.rowsBufferSize||3,n.minColumnWidth=Math.max(e.minColumnWidth||35,0),n.resizeAreaWidth=e.resizeAreaWidth||8,n.resizableColumns=void 0===e.resizableColumns||!!e.resizableColumns,n.movableColumns=void 0===e.movableColumns||!!e.movableColumns;const l=null!==(t=e.maxColumnsSortCount)&&void 0!==t?t:e.sortableColumns;n.sortableColumns=void 0===l?1:Number(l)||1,n.adjustColumnWidthForSortArrow=void 0===e.adjustColumnWidthForSortArrow||!!e.adjustColumnWidthForSortArrow,n.convertColumnWidthsToRelative=void 0!==e.convertColumnWidthsToRelative&&!!e.convertColumnWidthsToRelative,n.autoFillTableWidth=void 0!==e.autoFillTableWidth&&!!e.autoFillTableWidth,n.allowCancelSort=void 0===e.allowCancelSort||!!e.allowCancelSort,n.cellClasses=void 0===e.cellClasses?"":e.cellClasses,n.resizerClassName=void 0===e.resizerClassName?"dgtable-resize":e.resizerClassName,n.tableClassName=void 0===e.tableClassName?"dgtable":e.tableClassName,n.allowCellPreview=void 0===e.allowCellPreview||e.allowCellPreview,n.allowHeaderCellPreview=void 0===e.allowHeaderCellPreview||e.allowHeaderCellPreview,n.cellPreviewClassName=void 0===e.cellPreviewClassName?"dgtable-cell-preview":e.cellPreviewClassName,n.cellPreviewAutoBackground=void 0===e.cellPreviewAutoBackground||e.cellPreviewAutoBackground,n.onComparatorRequired=void 0===e.onComparatorRequired?null:e.onComparatorRequired,n.customSortingProvider=void 0===e.customSortingProvider?null:e.customSortingProvider,n.width=void 0===e.width?Vn.NONE:e.width,n.relativeWidthGrowsToFillWidth=void 0===e.relativeWidthGrowsToFillWidth||!!e.relativeWidthGrowsToFillWidth,n.relativeWidthShrinksToFillWidth=void 0!==e.relativeWidthShrinksToFillWidth&&!!e.relativeWidthShrinksToFillWidth,this.setCellFormatter(e.cellFormatter),this.setHeaderCellFormatter(e.headerCellFormatter),this.setFilter(e.filter),n.height=e.height,this.setColumns(e.columns||[],!1);let s=[];const a=null!==(r=e.sortedColumns)&&void 0!==r?r:e.sortColumn;if(a){let e=Array.isArray(a)?a:[a];for(let t=0,r=e.length;t<r;t++){var d;let r=e[t];"string"==typeof r&&(r={column:r,descending:!1});let n=i.columns.get(r.column);n&&s.push({column:r.column,comparePath:n.comparePath||n.dataPath,descending:null!==(d=r.descending)&&void 0!==d&&d})}}i.rows=new zn({sortColumn:s}),i.rows.onComparatorRequired=(e,t,r)=>{if(n.onComparatorRequired)return n.onComparatorRequired(e,t,r)},i.rows.customSortingProvider=(e,t)=>n.customSortingProvider?n.customSortingProvider(e,t):t(e),i.filteredRows=null,i.scrollbarWidth=0,i._lastVirtualScrollHeight=0,function(e){const t=e._p,r=t=>{let r=t.currentTarget,n=t.relatedTarget;n===r||r.contains(n)||r[Tn]&&(n===r[Tn]||r[Tn].contains(n))||function(e,t,r,n){const i=e._o,o=e._p,l=t.firstElementChild;if(!l)return;if(!(l.scrollWidth-l.clientWidth>1||l.scrollHeight-l.clientHeight>1))return;Ei(e),o.abortCellPreview=!1;const s=t.parentElement;if(!s)return;const a=null===(r=o.visibleColumns[Ri.call(s.childNodes,t)])||void 0===r?void 0:r.name,d=a?o.columns.get(a):null;if(!d||!1===d.allowPreview)return;const u=Ni("div");u.innerHTML=t.innerHTML,u.className=i.cellPreviewClassName;const c=t.classList.contains(`${i.tableClassName}-header-cell`);c&&(u.classList.add("header"),t.classList.contains("sortable")&&u.classList.add("sortable"),u.draggable=!0,yi(e,u));const h=getComputedStyle(t),f=getComputedStyle(l),m="right"===h.float,p=m?"right":"left",v=parseFloat(h.paddingLeft)||0,g=parseFloat(h.paddingRight)||0,b=parseFloat(h.paddingTop)||0,C=parseFloat(h.paddingBottom)||0;let w=l.scrollWidth+(t.clientWidth-l.offsetWidth);const y="border-box"===h.boxSizing;if(y?u.style.boxSizing="border-box":(w-=v+g,u.style.marginTop=(parseFloat(h.borderTopWidth)||0)+"px"),!o.transparentBgColor1){const e=document.createElement("div");document.body.appendChild(e),e.style.backgroundColor="transparent",o.transparentBgColor1=getComputedStyle(e).backgroundColor,e.style.backgroundColor="rgba(0,0,0,0)",o.transparentBgColor2=getComputedStyle(e).backgroundColor,e.remove()}const _={"box-sizing":y?"border-box":"content-box",width:w+"px","min-height":Math.max(ln(t),/%/.test(h.minHeight)?0:parseFloat(h.minHeight)||0)+"px","padding-left":v+"px","padding-right":g+"px","padding-top":b+"px","padding-bottom":C+"px",overflow:"hidden",position:"absolute","z-index":"-1",[p]:"0",top:"0",cursor:h.cursor};let S=h.backgroundColor;S!==o.transparentBgColor1&&S!==o.transparentBgColor2||(S=getComputedStyle(s).backgroundColor),S!==o.transparentBgColor1&&S!==o.transparentBgColor2||(S="#fff"),_["background-color"]=S,rn(u,_),u.firstChild&&rn(u.firstChild,{direction:f.direction,"white-space":f.whiteSpace,"min-height":f.minHeight,"line-height":f.lineHeight,font:f.font}),e.el.appendChild(u),c&&Yn(u),u.rowVIndex=s.vIndex;const W=u.rowIndex=s.index;u.columnName=a;try{const e=ei.saveSelection(t);e&&ei.restoreSelection(u,e)}catch{}if(e.emit("cellpreview",{el:u.firstElementChild,name:u.columnName,rowIndex:null!=W?W:null,rowData:null==W?null:o.rows[W],cell:t,cellEl:l}),o.abortCellPreview)return void u.remove();null!=W&&u.addEventListener("click",t=>{e.emit("rowclick",{event:t,filteredRowIndex:s.vIndex,rowIndex:W,rowEl:s,rowData:o.rows[W]})});const x=e.el,I=x===window?document:x,R=getComputedStyle(x),N=un(t),E=un(x);if(m){const e=window.innerWidth;N.right=e-(N.left+on(t,!0,!0,!0)),E.right=e-(E.left+on(x,!0,!0,!0))}N.left-=parseFloat(R.borderLeftWidth)||0,"right"===p&&void 0!==N.right&&void 0!==E.right&&(N.right-=parseFloat(R.borderRightWidth)||0),N.top-=parseFloat(R.borderTopWidth)||0,"left"===p?N.left+=parseFloat(h.borderLeftWidth)||0:void 0!==N.right&&(N.right+=parseFloat(h.borderRightWidth)||0),N.top+=parseFloat(h.borderTopWidth)||parseFloat(h.borderBottomWidth)||0,N.left-=E.left,"right"===p&&void 0!==N.right&&void 0!==E.right&&(N.right-=E.right),N.top-=E.top;const P=on(x,!1,!1,!1)-on(u,!0,!0,!0),F="left"===p?N.left:null!==(n=N.right)&&void 0!==n?n:0,k=F<0?0:F>P?P:F;"left"===p?N.left=k:N.right=k;const L=ln(t,!0,!0,!0),T=("scrollTop"in I?I.scrollTop:0)+ln(x,!0)-L;N.top>T&&(N.top=Math.max(0,T));const H={top:N.top+"px","z-index":9999};H[p]=("left"===p?N.left:N.right)+"px",rn(u,H),u[Hn]=t,o.cellPreviewCell=u,t[Tn]=u,o._bindCellHoverOut(t),o._bindCellHoverOut(u),u.addEventListener("wheel",()=>{Ei(e)})}(e,r)},n=t=>{let r=t.currentTarget[Hn]||t.currentTarget,n=t.relatedTarget;n===e.el||r.contains(n)||r[Tn]&&(n===r[Tn]||r[Tn].contains(n))||function(e){Ei(e)}(e)};t._bindCellHoverIn=e=>{e[Fn]||e.addEventListener("mouseover",e[Fn]=r)},t._unbindCellHoverIn=e=>{e[Fn]&&(e.removeEventListener("mouseover",e[Fn]),e[Fn]=null)},t._bindCellHoverOut=e=>{e[kn]||e.addEventListener("mouseout",e[kn]=n)},t._unbindCellHoverOut=e=>{e[kn]&&(e.removeEventListener("mouseout",e[kn]),e[kn]=null)}}(this)}on(e,t){return this[Mn]||this._p.mitt.on(e,t),this}once(e,t){if(this[Mn])return this;const r=n=>{this._p.mitt.off(e,r),t(n)};return this._p.mitt.on(e,r),this}off(e,t){return this[Mn]||(e||t?this._p.mitt.off(e,t):this._p.mitt.all.clear()),this}emit(e,t){return this[Mn]||this._p.mitt.emit(e,t),this}destroy(){var e,t,r;const n=this._p,i=this.el;if(this[Mn]||!n)return this;if(n.resizer&&(n.resizer.remove(),n.resizer=null),null!==(e=n.virtualListHelper)&&void 0!==e&&e.destroy(),n.virtualListHelper=null,hi(this),null!==(t=n.table)&&void 0!==t&&t.remove(),null!==(r=n.tbody)&&void 0!==r&&r.remove(),n.workerListeners){for(let e=0;e<n.workerListeners.length;e++){let t=n.workerListeners[e];t.worker.removeEventListener("message",t.listener,!1)}n.workerListeners.length=0}n.rows.length=n.columns.length=0,n._deferredRender&&clearTimeout(n._deferredRender);for(let e in this)Pi.call(this,e)&&(this[e]=null);return this[Mn]=!0,i&&i.remove(),this}close(){this.destroy()}remove(){this.destroy()}render(){const e=this._o,t=this._p;if(!this.el.offsetParent)return t._deferredRender||(t._deferredRender=setTimeout(()=>{t._deferredRender=null,!this[Mn]&&this.el.offsetParent&&this.render()})),this;if(!0===t.tableSkeletonNeedsRendering){var r;t.tableSkeletonNeedsRendering=!1,e.width===Vn.AUTO&&Ci(this);let o=t.table&&t.table.parentNode?t.table.scrollTop:NaN,l=t.table&&t.table.parentNode?(n=t.table,void 0===i&&(i="rtl"===getComputedStyle(n).direction),i?n.scrollWidth-n.clientWidth-en(n,i):en(n,i)):NaN;!function(e,t){const r=e._p,n=e._o;null!==(t=r.virtualListHelper)&&void 0!==t&&t.destroy(),r.virtualListHelper=null,r.table&&n.virtualTable&&(r.table.remove(),r.table=void 0,r.tbody=void 0),hi(e),r.currentTouchId=null,r.header&&r.header.remove();const i=n.tableClassName,o=ci("div"),l=ci("div");o.className=`${i}-header`,l.className=`${i}-header-row`,r.header=o,r.headerRow=l,o.appendChild(l),e.el.prepend(o),Un(e.el),n.width===Vn.SCROLL?e.el.style.overflow="hidden":e.el.style.overflow="",!n.height&&n.virtualTable&&(n.height=ln(e.el,!0))}(this),function(e){const t=e._p,r=e._o,n=r.tableClassName;if(r.virtualTable&&!t.virtualRowHeight){const r=()=>{const e=ci("div"),t=e.appendChild(ci("div")),r=t.appendChild(ci("div"));return e.className=`${n}-row`,t.className=`${n}-cell`,r.innerHTML="0",e.style.visibility="hidden",e.style.position="absolute",e},i=ci("div");i.className=e.el.className,rn(i,{"z-index":"-1",position:"absolute",left:"0",top:"-9999px",width:"1px",overflow:"hidden"});const o=ci("div");o.className=n,i.appendChild(o);const l=ci("div");l.className=`${n}-body`,l.style.width="99999px",o.appendChild(l),document.body.appendChild(i);const s=r(),a=r(),d=r();l.appendChild(s),l.appendChild(a),l.appendChild(d),t.virtualRowHeight=ln(a,!0,!0,!0),i.remove()}if(!t.table){var i;const o=document.createDocumentFragment(),l=ci("div");l.className=n,r.virtualTable&&(l.className+=" virtual");const s=getComputedStyle(l);let a=(null!==(i=r.height)&&void 0!==i?i:0)-ln(t.header,!0,!0,!0);"border-box"!==s.boxSizing&&(a-=parseFloat(s.borderTopWidth)||0,a-=parseFloat(s.borderBottomWidth)||0,a-=parseFloat(s.paddingTop)||0,a-=parseFloat(s.paddingBottom)||0),rn(l,{height:r.height?a+"px":"auto",display:"block",overflowY:"auto",overflowX:r.width===Vn.SCROLL?"auto":"hidden"}),o.appendChild(l);const d=ci("div");d.className=r.tableClassName+"-body",d.style.minHeight="1px",t.table=l,t.tbody=d,Un(d),Un(l),l.appendChild(d),e.el.appendChild(o),function(e,t){const r=e._p,n=e._o,i=n.tableClassName,o=i+"-row",l=i+"-row-alt",s=i+"-cell",a=i+"-sticky";let d=r.visibleColumns,u=d.length;r.notifyRendererOfColumnsConfig=()=>{d=r.visibleColumns,u=d.length;for(let e=0;e<u;e++){const t=d[e];t._finalWidth=t.actualWidthConsideringScrollbarWidth||t.actualWidth}},r.virtualListHelper=new Cn({list:r.table,itemsParent:r.tbody,autoVirtualWrapperWidth:!1,virtual:n.virtualTable,buffer:n.rowsBufferSize,estimatedItemHeight:n.estimatedRowHeight?n.estimatedRowHeight:r.virtualRowHeight||40,itemElementCreatorFn:()=>ci("div"),onItemRender:(t,i)=>{const c=r.filteredRows||r.rows,h=!!r.filteredRows,f=n.allowCellPreview,m=r.isStickyColumns;t.className=o,i%2==1&&(t.className+=" "+l);const p=c[i],v=h?p[An]:i;t.vIndex=i,t.index=v;for(let e=0;e<u;e++){var g;const i=d[e],o=ci("div");if(o.columnName=i.name,o.setAttribute("data-column",i.name),o.className=s,o.style.width=(null!==(g=i._finalWidth)&&void 0!==g?g:0)+"px",i.cellClasses&&(o.className+=" "+i.cellClasses),i.stickyPos){o.className+=" "+a,o.style.position="sticky",o.style[i.stickyPos.absDirection]=i.stickyPos.offset+"px";const t=null==m?void 0:m.get(e);"start"===t&&!r.lastIsRtl||"end"===t&&r.lastIsRtl?o.classList.add("is-sticky-left"):("start"===t&&r.lastIsRtl||"end"===t&&!r.lastIsRtl)&&o.classList.add("is-sticky-right")}f&&r._bindCellHoverIn(o),o.appendChild(ci("div")).innerHTML=Ii(n,p,i),t.appendChild(o)}t.addEventListener("click",t[Ln]=r=>{e.emit("rowclick",{event:r,filteredRowIndex:i,rowIndex:v,rowEl:t,rowData:p})}),e.emit("rowcreate",{filteredRowIndex:i,rowIndex:v,rowEl:t,rowData:p})},onItemUnrender:t=>{t[Ln]&&t.removeEventListener("click",t[Ln]),function(e,t){const r=e._p;for(let e=0,n=t.childNodes,i=n.length;e<i;e++)r._unbindCellHoverIn(n[e])}(e,t),e.emit("rowdestroy",t)},onScrollHeightChange:t=>{t>r._lastVirtualScrollHeight&&!r.scrollbarWidth&&mi(e),r._lastVirtualScrollHeight=t}}),r.virtualListHelper.setCount((null!==(t=r.filteredRows)&&void 0!==t?t:r.rows).length),r.notifyRendererOfColumnsConfig()}(e)}}(this),this.tableWidthChanged(!0,!1),function(e){const t=e._p,r=e._o,n=r.allowCellPreview,i=r.allowHeaderCellPreview,o=r.tableClassName+"-header-cell",l=t.headerRow;for(let a=0;a<t.visibleColumns.length;a++){const d=t.visibleColumns[a];if(d.visible){var s;const u=ci("div");u.draggable=!0,u.className=o,u.style.width=(null!==(s=d.actualWidth)&&void 0!==s?s:0)+"px",r.sortableColumns&&d.sortable&&(u.className+=" sortable"),u.columnName=d.name,u.setAttribute("data-column",d.name);const c=ci("div");c.innerHTML=r.headerCellFormatter(d.label,d.name),u.appendChild(c),n&&i&&t._bindCellHoverIn(u),l.appendChild(u),t.visibleColumns[a].element=u,yi(e,u),Yn(u)}}vi(e),e.emit("headerrowcreate",l)}(this),t.virtualListHelper.setCount((null!==(r=t.filteredRows)&&void 0!==r?r:t.rows).length),fi(this),mi(this,!0),pi(this,!0);for(let e=0;e<t.rows.sortColumn.length;e++)wi(this,t.rows.sortColumn[e].column,t.rows.sortColumn[e].descending);e.adjustColumnWidthForSortArrow&&t.rows.sortColumn.length?this.tableWidthChanged(!0):e.virtualTable||this.tableWidthChanged(),isNaN(o)||(t.table.scrollTop=o),isNaN(l)||(tn(t.table,l),tn(t.header,l)),this.emit("renderskeleton")}var n,i;return t.virtualListHelper.render(),this.emit("render"),this}clearAndRender(e){var t;let r=this._p;return r.tableSkeletonNeedsRendering=!0,null!==(t=r.notifyRendererOfColumnsConfig)&&void 0!==t&&t.call(r),(void 0===e||e)&&this.render(),this}setColumns(e,t){const r=this._p;e=e||[];let n=new jn;for(let t=0,r=0;t<e.length;t++){let i=e[t],o=Si(this._o,i);void 0!==i.order?(i.order>r&&(r=i.order+1),o.order=i.order):o.order=r++,n.push(o)}return n.normalizeOrder(),r.columns=n,r.visibleColumns=n.getVisibleColumns(),Wi(this),this.clearAndRender(t),this}addColumn(e,t,r){const n=this._p;let i=n.columns;if(e&&!i.get(e.name)){let o=null;void 0!==t&&(o="string"==typeof t?i.get(t):i.getByOrder(t));let l=Si(this._o,e);l.order=o?o.order:i.getMaxOrder()+1;for(let e=i.getMaxOrder(),t=l.order;e>=t;e--){let t=i.getByOrder(e);t&&t.order++}i.push(l),i.normalizeOrder(),n.visibleColumns=i.getVisibleColumns(),Wi(this),this.clearAndRender(r),this.emit("addcolumn",l.name)}return this}removeColumn(e,t){const r=this._p;let n=r.columns,i=n.indexOf(e);return i>-1&&(n.splice(i,1),n.normalizeOrder(),r.visibleColumns=n.getVisibleColumns(),Wi(this),this.clearAndRender(t),this.emit("removecolumn",e)),this}setColumnLabel(e,t){let r=this._p.columns.get(e);if(r&&(r.label=void 0===t?r.name:t,r.element))for(let e=0;e<r.element.firstChild.childNodes.length;e++){let t=r.element.firstChild.childNodes[e];if(3===t.nodeType){t.textContent=r.label;break}}return this}moveColumn(e,t,r=!0){const n=this._o,i=this._p;let o,l,s=i.columns,a=r?i.visibleColumns:s.getColumns();if("string"==typeof e?o=s.get(e):"number"==typeof e&&(o=a[e]),"string"==typeof t?l=s.get(t):"number"==typeof t&&(l=a[t]),o&&l&&e!==t){let e=o.order,t=l.order,r=s.moveColumn(o,l).getVisibleColumns();if(i.visibleColumns.length!==r.length||i.visibleColumns.some((e,t)=>e!==r[t]))if(i.visibleColumns=r,Wi(this),n.virtualTable)this.clearAndRender();else{var d,u;const r=hn(i.headerRow,`>div.${n.tableClassName}-header-cell`);let o=e<t?t+1:t,l=e;r[0].parentNode.insertBefore(r[l],r[o]);let s=i.visibleColumns[e],a=(null!==(d=s.actualWidthConsideringScrollbarWidth||s.actualWidth)&&void 0!==d?d:0)+"px",c=i.visibleColumns[t],h=(null!==(u=c.actualWidthConsideringScrollbarWidth||c.actualWidth)&&void 0!==u?u:0)+"px",f=i.tbody.childNodes;for(let r=0,n=f.length;r<n;r++){let n=f[r];1===n.nodeType&&(n.insertBefore(n.childNodes[l],n.childNodes[o]),n.childNodes[t].firstChild.style.width=h,n.childNodes[e].firstChild.style.width=a)}}this.emit("movecolumn",{name:o.name,src:e,dest:t})}return this}setColumnVisible(e,t){const r=this._p;let n=r.columns.get(e);return t=!!t,n&&!!n.visible!==t&&(n.visible=t,r.visibleColumns=r.columns.getVisibleColumns(),this.emit(t?"showcolumn":"hidecolumn",e),Wi(this),this.clearAndRender()),this}isColumnVisible(e){let t=this._p.columns.get(e);return!!t&&t.visible}setMinColumnWidth(e){let t=this._o;return e=Math.max(e,0),t.minColumnWidth!==e&&(t.minColumnWidth=e,this.tableWidthChanged(!0)),this}getMinColumnWidth(){return this._o.minColumnWidth}setColumnWidth(e,t){let r=this._p.columns.get(e),n=_i(t,r.ignoreMin?0:this._o.minColumnWidth);if(r){let e=Zn(r);r.width=n.width,r.widthMode=n.mode;let t=Zn(r);e!==t&&this.tableWidthChanged(!0),this.emit("columnwidth",{name:r.name,width:t,oldWidth:e})}return this}getColumnWidth(e){let t=this._p.columns.get(e);return t?Zn(t):null}getColumnConfig(e){var t,r;let n=this._p.columns.get(e);return n?{name:n.name,label:n.label,width:Zn(n),dataPath:null===(t=n.dataPath)||void 0===t?void 0:t.join("."),comparePath:null===(r=n.comparePath)||void 0===r?void 0:r.join("."),resizable:n.resizable,movable:n.movable,sortable:n.sortable,visible:n.visible,cellClasses:n.cellClasses,ignoreMin:n.ignoreMin,sticky:n.sticky,order:n.order}:null}getColumnsConfig(){const e=this._p;let t={};for(let r=0;r<e.columns.length;r++)t[e.columns[r].name]=this.getColumnConfig(e.columns[r].name);return t}setMaxColumnSortCount(e){const t=this._p,r=this._o;if(r.sortableColumns!==e&&(r.sortableColumns=e,t.table)){const e=hn(t.headerRow,`>div.${r.tableClassName}-header-cell`);for(let n=0,i=e.length;n<i;n++)e[n].classList[r.sortableColumns>0&&t.visibleColumns[n].sortable?"add":"remove"]("sortable")}return this}getMaxColumnSortCount(){return this._o.sortableColumns}setSortableColumns(e){return this.setMaxColumnSortCount(e)}getSortableColumns(){return this.getMaxColumnSortCount()}setMovableColumns(e){let t=this._o;return e=void 0===e||!!e,t.movableColumns!==e&&(t.movableColumns=e),this}getMovableColumns(){return this._o.movableColumns}setResizableColumns(e){let t=this._o;return e=void 0===e||!!e,t.resizableColumns!==e&&(t.resizableColumns=e),this}getResizableColumns(){return this._o.resizableColumns}getConvertColumnWidthsToRelative(){return this._o.convertColumnWidthsToRelative}setConvertColumnWidthsToRelative(e,t=!0){let r=this._o;return e=!!e,r.convertColumnWidthsToRelative!==e&&(r.convertColumnWidthsToRelative=e,t&&this.tableWidthChanged(!0)),this}setOnComparatorRequired(e){let t=this._o;return t.onComparatorRequired!==e&&(t.onComparatorRequired=e),this}setCustomSortingProvider(e){let t=this._o;return t.customSortingProvider!==e&&(t.customSortingProvider=e),this}sort(e,t,r){const n=this._o,i=this._p;let o=i.columns.get(e),l=i.rows.sortColumn.map(e=>({column:e.column,descending:e.descending}));if(o){if(r){for(let e=0;e<l.length;e++)if(l[e].column===o.name){e<l.length-1?l.length=0:(t=l[l.length-1].descending,l.splice(l.length-1,1));break}(n.sortableColumns>0&&l.length>=n.sortableColumns||l.length>=i.visibleColumns.length)&&(l.length=0)}else l.length=0;t=void 0!==t&&t,l.push({column:o.name,descending:!!t})}else l.length=0;return this.setSortedColumns(l)}resort(){const e=this._p;let t=e.columns,r=e.rows.sortColumn;if(r.length){for(let e=0;e<r.length;e++)t.get(r[e].column)||r.splice(e--,1);e.rows.sortColumn=r,r.length&&(e.rows.sort(),e.filteredRows&&e.filteredRows.sort());let n=[];for(let e=0;e<r.length;e++)n.push({column:r[e].column,descending:r[e].descending});this.emit("sort",{sorts:n,resort:!0})}return this}setSortedColumns(e,t={immediate:!0,render:!0}){var r;const n=this._o,i=this._p;let o=i.columns,l=e.filter(e=>o.get(e.column)).map(e=>{let t=o.get(e.column);return{column:t.name,comparePath:t.comparePath||t.dataPath,descending:!!e.descending}});n.sortableColumns>0&&l.length>n.sortableColumns&&(l.length=n.sortableColumns),Ci(this);for(let e=0;e<l.length;e++)wi(this,l[e].column,l[e].descending);n.adjustColumnWidthForSortArrow&&!i.tableSkeletonNeedsRendering&&this.tableWidthChanged(!0),i.rows.sortColumn=l,l.length&&t.immediate&&(i.rows.sort(),i.filteredRows&&i.filteredRows.sort()),null!==(r=i.virtualListHelper)&&void 0!==r&&r.invalidate(),i.virtualListHelper&&t.render&&i.virtualListHelper.render();let s=[];for(let e=0;e<l.length;e++)s.push({column:l[e].column,descending:l[e].descending});return this.emit("sort",{sorts:s}),this}getSortedColumns(){const e=this._p;let t=[];for(let r=0;r<e.rows.sortColumn.length;r++){let n=e.rows.sortColumn[r];t.push({column:n.column,descending:n.descending})}return t}setCellFormatter(e){if(!e){const t=e=>"string"==typeof e?En(e):e;t[Pn]=!0,e=t}return this._o.cellFormatter=e,this}setHeaderCellFormatter(e){return this._o.headerCellFormatter=e||function(e){return"string"==typeof e?En(e):e},this}setFilter(e){return this._o.filter=e,this}filter(e){const t=this._p;let r=this._o.filter||Bn;"string"==typeof arguments[0]&&"string"==typeof arguments[1]&&(e={column:arguments[0],keyword:arguments[1],caseSensitive:arguments[2]});let n=!!t.filteredRows;return t.filteredRows&&(t.filteredRows=null),t.filterArgs=null==e?null:"object"!=typeof e||Array.isArray(e)?e:Object.assign({},e),null!==t.filterArgs?(t.filteredRows=t.rows.filteredCollection(r,t.filterArgs),(n||t.filteredRows)&&(this.clearAndRender(),this.emit("filter",e))):(t.filterArgs=null,t.filteredRows=null,this.clearAndRender(),this.emit("filterclear",{})),this}clearFilter(){const e=this._p;return e.filteredRows&&(e.filterArgs=null,e.filteredRows=null,this.clearAndRender(),this.emit("filterclear",{})),this}getHtmlForRowCell(e,t){const r=this._p;if(e<0||e>r.rows.length-1)return null;let n=r.columns.get(t);if(!n)return null;let i=r.rows[e];return Ii(this._o,i,n)}getHtmlForRowDataCell(e,t){let r=this._p.columns.get(t);return r?Ii(this._o,e,r):null}getRowYPos(e){return this._p.virtualListHelper.getItemPosition(e)||null}getDataForRow(e){const t=this._p;return e<0||e>t.rows.length-1?null:t.rows[e]}getRowCount(){const e=this._p;return e.rows?e.rows.length:0}getIndexForRow(e){return this._p.rows.indexOf(e)}getFilteredRowCount(){const e=this._p;return(e.filteredRows||e.rows).length}getIndexForFilteredRow(e){const t=this._p;return(t.filteredRows||t.rows).indexOf(e)}getDataForFilteredRow(e){const t=this._p;return e<0||e>(t.filteredRows||t.rows).length-1?null:(t.filteredRows||t.rows)[e]}getHeaderRowElement(){return this._p.headerRow}addRows(e,t,r,n){let i=this._p;"boolean"==typeof t&&(n=r,r=t,t=-1),"number"!=typeof t&&(t=-1),(t<0||t>i.rows.length)&&(t=i.rows.length),n=void 0===n||!!n;const o=(Array.isArray(e)?e:[e]).length;return e&&(i.rows.add(e,t),i.filteredRows||r&&i.rows.sortColumn.length?(r&&i.rows.sortColumn.length?this.resort():xi(this),i.tableSkeletonNeedsRendering=!0,n&&this.render()):n&&(i.virtualListHelper.addItemsAt(o,t),this._o.virtualTable?(fi(this),mi(this),this.render(),pi(this,!1)):i.tbody&&(this.render(),mi(this),pi(this,!0))),this.emit("addrows",{count:o,clear:!1})),this}removeRows(e,t,r){let n=this._p;return"number"!=typeof t||t<=0||e<0||e>n.rows.length-1||(n.rows.splice(e,t),r=void 0===r||!!r,n.filteredRows?(xi(this),n.tableSkeletonNeedsRendering=!0,r&&this.render()):r&&(n.virtualListHelper.removeItemsAt(t,e),this._o.virtualTable?(fi(this),mi(this),this.render(),pi(this,!1)):(this.render(),mi(this),pi(this,!0)))),this}removeRow(e,t){return this.removeRows(e,1,t)}refreshRow(e,t=!0){let r=this._p;if(e<0||e>r.rows.length-1)return this;let n=-1;return r.filteredRows&&-1===(n=r.filteredRows.indexOf(r.rows[e]))||(-1===n&&(n=e),r.virtualListHelper.refreshItemAt(n),t&&r.virtualListHelper.render()),this}getRowElement(e){let t=this._p;if(e<0||e>t.rows.length-1)return null;let r=-1;return t.filteredRows&&-1===(r=t.filteredRows.indexOf(t.rows[e]))?null:(-1===r&&(r=e),t.virtualListHelper.getItemElementAt(r)||null)}refreshAllVirtualRows(){return this._p.virtualListHelper.invalidate().render(),this}setRows(e,t){let r=this._p;return r.rows.reset(e),t&&r.rows.sortColumn.length?this.resort():xi(this),this.clearAndRender().emit("addrows",{count:e.length,clear:!0}),this}tableWidthChanged(e,t){let r=this._o,n=this._p,i=Jn(this),o=i,l=0;if(!n.table)return this;t=void 0===t||t;let s=0;if(n.tbody||(t=!1),t&&(s=parseFloat(n.tbody.style.minWidth)||0),o!==n.lastDetectedWidth||e){var a;n.lastDetectedWidth=i;let e=0,d=[],u=0;for(let e=0;e<n.columns.length;e++)n.columns[e].actualWidthConsideringScrollbarWidth=null;for(let t=0;t<n.visibleColumns.length;t++){let i=n.visibleColumns[t];if(1===i.widthMode){let n=i.width;n+=i.arrowProposedWidth||0,!i.ignoreMin&&n<r.minColumnWidth&&(n=r.minColumnWidth),o-=n,e+=n,n!==i.actualWidth&&(i.actualWidth=n,d.push(t))}else if(0===i.widthMode){let n=Gn(this,i.label)+20;n+=i.arrowProposedWidth||0,!i.ignoreMin&&n<r.minColumnWidth&&(n=r.minColumnWidth),o-=n,e+=n,n!==i.actualWidth&&(i.actualWidth=n,r.convertColumnWidthsToRelative||d.push(t))}else 2===i.widthMode&&(u+=i.width,l++)}if(r.convertColumnWidthsToRelative)for(let t=0;t<n.visibleColumns.length;t++){let r=n.visibleColumns[t];0===r.widthMode&&(r.widthMode=2,o+=r.actualWidth,r.width=r.actualWidth/e,u+=r.width,l++)}if(l&&(u<1&&r.relativeWidthGrowsToFillWidth||u>1&&r.relativeWidthShrinksToFillWidth))for(let e=0;e<n.visibleColumns.length;e++){let t=n.visibleColumns[e];2===t.widthMode&&(t.width/=u)}let c=Math.max(0,o);0===c&&(c=n.table.clientWidth);let h=r.minColumnWidth/c;if(isNaN(h)&&(h=0),h>0){let e,t=0;for(let e=0;e<n.visibleColumns.length;e++){let r=n.visibleColumns[e];2===r.widthMode&&!r.ignoreMin&&r.width<h&&(t+=h-r.width,r.width=h)}for(let r=0;r<n.visibleColumns.length;r++){let i=n.visibleColumns[r];2===i.widthMode&&!i.ignoreMin&&i.width>h&&t>0&&(e=Math.min(t,i.width-h),i.width-=e,t-=e)}}if(r.autoFillTableWidth&&o>0){let e=0,t=o;for(let r=0;r<n.visibleColumns.length;r++){let i=n.visibleColumns[r];i.resizable||1!==i.widthMode||(e+=i.width),2===i.widthMode&&(t-=Math.round(c*i.width))}let r=(i-e)/(i-t-e)||NaN;for(let e=0;e<n.visibleColumns.length&&t>0;e++){let t=n.visibleColumns[e];if(t.resizable||1!==t.widthMode)if(2===t.widthMode)t.width*=r;else{let n=t.actualWidth*r;t.actualWidth!==n&&(t.actualWidth=n,-1===d.indexOf(e)&&d.push(e))}}}for(let e=0;e<n.visibleColumns.length;e++){let t=n.visibleColumns[e];if(2===t.widthMode){let r=Math.round(c*t.width);o-=r,l--,0===l&&1===o&&(r++,o--),-1===o&&(r--,o++),r!==t.actualWidth&&(t.actualWidth=r,d.push(e))}}if(n.visibleColumns.length&&(n.visibleColumns[n.visibleColumns.length-1].actualWidthConsideringScrollbarWidth=n.visibleColumns[n.visibleColumns.length-1].actualWidth-(n.scrollbarWidth||0)),null!==(a=n.notifyRendererOfColumnsConfig)&&void 0!==a&&a.call(n),t){let e=Kn(this);s<e&&pi(this,!1);for(let e=0;e<d.length;e++)bi(this,d[e]);s>e&&pi(this,!1)}}return this}tableHeightChanged(){let e=this._o,t=this._p;if(!t.table)return this;const r=getComputedStyle(t.table);let n=ln(this.el,!0)-(parseFloat(r.borderTopWidth)||0)-(parseFloat(r.borderBottomWidth)||0);return n!==e.height&&(e.height=n,t.tbody&&(t.tbody.style.height=Math.max(e.height-ln(t.header,!0,!0,!0),1)+"px"),e.virtualTable&&this.clearAndRender()),this}hideCellPreview(){return Ei(this),this}abortCellPreview(){return this.hideCellPreview(),this}cancelColumnResize(){return ni(this),this}getUrlForElementContent(e){let t,r=document.getElementById(e);if(r){let e=r.textContent;if("function"==typeof Blob)t=new Blob([e||""]);else{const r=window,n=r.BlobBuilder||r.WebKitBlobBuilder||r.MozBlobBuilder||r.MSBlobBuilder;if(!n)return null;const i=new n;i.append(e||""),t=i.getBlob()}return(window.URL||window.webkitURL).createObjectURL(t)}return null}isWorkerSupported(){return window.Worker instanceof Function}createWebWorker(e,t,r){if(this.isWorkerSupported()){let n=this._p,i=new Worker(e),o=e=>{e.data.append?this.addRows(e.data.rows,r):this.setRows(e.data.rows,r)};return i.addEventListener("message",o,!1),n.workerListeners||(n.workerListeners=[]),n.workerListeners.push({worker:i,listener:o}),(t||void 0===t)&&i.postMessage(null),i}return null}unbindWebWorker(e){let t=this._p;if(t.workerListeners)for(let r=0;r<t.workerListeners.length;r++)t.workerListeners[r].worker===e&&(e.removeEventListener("message",t.workerListeners[r].listener,!1),t.workerListeners.splice(r,1),r--);return this}}Fi.VERSION="@@VERSION",Fi.Width=Vn;class ki extends Fi{constructor(t){super(t),this.$el=e(this.el).data("dgtable",this).on("remove",()=>this.destroy()),this.on("headerrowdestroy",()=>{var t;const r=null===(t=this._p)||void 0===t?void 0:t.headerRow;r&&e(r).find(`div.${this._o.tableClassName}-header-cell`).remove()})}destroy(){var t,r;return null!==(t=this._p)&&void 0!==t&&t.table&&e(this._p.table).empty(),null!==(r=this._p)&&void 0!==r&&r.tbody&&e(this._p.tbody).empty(),super.destroy()}}export{ki as default};
1
+ import e from"jquery";var t,r,n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={};function o(){if(r)return t;r=1;var e=function(e){return e&&e.Math===Math&&e};return t=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof n&&n)||e("object"==typeof t&&t)||function(){return this}()||Function("return this")()}var l,s,a,d,u,c,h,f,m={};function p(){return s?l:(s=1,l=function(e){try{return!!e()}catch(e){return!0}})}function v(){if(d)return a;d=1;var e=p();return a=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function g(){if(c)return u;c=1;var e=p();return u=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function b(){if(f)return h;f=1;var e=g(),t=Function.prototype.call;return h=e?t.bind(t):function(){return t.apply(t,arguments)},h}var C,w,y,_,W,S,x,I,R,N,E,P,F,k,L,T,H,M,O,A,z,$,j,B,V,D,U,q,X,Y,G,J,K,Q,Z,ee,te,re,ne,ie,oe,le={};function se(){return y?w:(y=1,w=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function ae(){if(W)return _;W=1;var e=g(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return _=e?n:function(e){return function(){return r.apply(e,arguments)}},_}function de(){if(x)return S;x=1;var e=ae(),t=e({}.toString),r=e("".slice);return S=function(e){return r(t(e),8,-1)}}function ue(){return E?N:(E=1,N=function(e){return null==e})}function ce(){if(F)return P;F=1;var e=ue(),t=TypeError;return P=function(r){if(e(r))throw new t("Can't call method on "+r);return r}}function he(){if(L)return k;L=1;var e=function(){if(R)return I;R=1;var e=ae(),t=p(),r=de(),n=Object,i=e("".split);return I=t(function(){return!n("z").propertyIsEnumerable(0)})?function(e){return"String"===r(e)?i(e,""):n(e)}:n}(),t=ce();return k=function(r){return e(t(r))}}function fe(){if(H)return T;H=1;var e="object"==typeof document&&document.all;return T=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function me(){if(O)return M;O=1;var e=fe();return M=function(t){return"object"==typeof t?null!==t:e(t)}}function pe(){if(z)return A;z=1;var e=o(),t=fe();return A=function(r,n){return arguments.length<2?(i=e[r],t(i)?i:void 0):e[r]&&e[r][n];var i},A}function ve(){if(j)return $;j=1;var e=ae();return $=e({}.isPrototypeOf)}function ge(){if(V)return B;V=1;var e=o().navigator,t=e&&e.userAgent;return B=t?String(t):""}function be(){if(U)return D;U=1;var e,t,r=o(),n=ge(),i=r.process,l=r.Deno,s=i&&i.versions||l&&l.version,a=s&&s.v8;return a&&(t=(e=a.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&n&&(!(e=n.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=n.match(/Chrome\/(\d+)/))&&(t=+e[1]),D=t}function Ce(){if(X)return q;X=1;var e=be(),t=p(),r=o().String;return q=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41})}function we(){if(G)return Y;G=1;var e=Ce();return Y=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function ye(){if(K)return J;K=1;var e=pe(),t=fe(),r=ve(),n=we(),i=Object;return J=n?function(e){return"symbol"==typeof e}:function(n){var o=e("Symbol");return t(o)&&r(o.prototype,i(n))}}function _e(){if(Z)return Q;Z=1;var e=String;return Q=function(t){try{return e(t)}catch(e){return"Object"}}}function We(){if(te)return ee;te=1;var e=fe(),t=_e(),r=TypeError;return ee=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")}}function Se(){if(ne)return re;ne=1;var e=We(),t=ue();return re=function(r,n){var i=r[n];return t(i)?void 0:e(i)},re}function xe(){if(oe)return ie;oe=1;var e=b(),t=fe(),r=me(),n=TypeError;return ie=function(i,o){var l,s;if("string"===o&&t(l=i.toString)&&!r(s=e(l,i)))return s;if(t(l=i.valueOf)&&!r(s=e(l,i)))return s;if("string"!==o&&t(l=i.toString)&&!r(s=e(l,i)))return s;throw new n("Can't convert object to primitive value")}}var Ie,Re,Ne,Ee,Pe,Fe,ke,Le,Te,He,Me,Oe,Ae,ze,$e,je,Be,Ve,De,Ue,qe,Xe,Ye,Ge,Je={exports:{}};function Ke(){if(Ee)return Ne;Ee=1;var e=o(),t=Object.defineProperty;return Ne=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch(t){e[r]=n}return n}}function Qe(){if(Pe)return Je.exports;Pe=1;var e=Re?Ie:(Re=1,Ie=!1),t=o(),r=Ke(),n="__core-js_shared__",i=Je.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.48.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Je.exports}function Ze(){if(ke)return Fe;ke=1;var e=Qe();return Fe=function(t,r){return e[t]||(e[t]=r||{})}}function et(){if(Te)return Le;Te=1;var e=ce(),t=Object;return Le=function(r){return t(e(r))}}function tt(){if(Me)return He;Me=1;var e=ae(),t=et(),r=e({}.hasOwnProperty);return He=Object.hasOwn||function(e,n){return r(t(e),n)}}function rt(){if(Ae)return Oe;Ae=1;var e=ae(),t=0,r=Math.random(),n=e(1.1.toString);return Oe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++t+r,36)}}function nt(){if($e)return ze;$e=1;var e=o(),t=Ze(),r=tt(),n=rt(),i=Ce(),l=we(),s=e.Symbol,a=t("wks"),d=l?s.for||s:s&&s.withoutSetter||n;return ze=function(e){return r(a,e)||(a[e]=i&&r(s,e)?s[e]:d("Symbol."+e)),a[e]}}function it(){if(Be)return je;Be=1;var e=b(),t=me(),r=ye(),n=Se(),i=xe(),o=nt(),l=TypeError,s=o("toPrimitive");return je=function(o,a){if(!t(o)||r(o))return o;var d,u=n(o,s);if(u){if(void 0===a&&(a="default"),d=e(u,o,a),!t(d)||r(d))return d;throw new l("Can't convert object to primitive value")}return void 0===a&&(a="number"),i(o,a)}}function ot(){if(De)return Ve;De=1;var e=it(),t=ye();return Ve=function(r){var n=e(r,"string");return t(n)?n:n+""}}function lt(){if(Ye)return Xe;Ye=1;var e=v(),t=p(),r=function(){if(qe)return Ue;qe=1;var e=o(),t=me(),r=e.document,n=t(r)&&t(r.createElement);return Ue=function(e){return n?r.createElement(e):{}}}();return Xe=!e&&!t(function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a})}function st(){if(Ge)return m;Ge=1;var e=v(),t=b(),r=function(){if(C)return le;C=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return le.f=r?function(e){var r=t(this,e);return!!r&&r.enumerable}:e,le}(),n=se(),i=he(),o=ot(),l=tt(),s=lt(),a=Object.getOwnPropertyDescriptor;return m.f=e?a:function(e,d){if(e=i(e),d=o(d),s)try{return a(e,d)}catch(e){}if(l(e,d))return n(!t(r.f,e,d),e[d])},m}var at,dt,ut,ct,ht,ft,mt,pt={};function vt(){if(ct)return ut;ct=1;var e=me(),t=String,r=TypeError;return ut=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")}}function gt(){if(ht)return pt;ht=1;var e=v(),t=lt(),r=function(){if(dt)return at;dt=1;var e=v(),t=p();return at=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}(),n=vt(),i=ot(),o=TypeError,l=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a="enumerable",d="configurable",u="writable";return pt.f=e?r?function(e,t,r){if(n(e),t=i(t),n(r),"function"==typeof e&&"prototype"===t&&"value"in r&&u in r&&!r[u]){var o=s(e,t);o&&o[u]&&(e[t]=r.value,r={configurable:d in r?r[d]:o[d],enumerable:a in r?r[a]:o[a],writable:!1})}return l(e,t,r)}:l:function(e,r,s){if(n(e),r=i(r),n(s),t)try{return l(e,r,s)}catch(e){}if("get"in s||"set"in s)throw new o("Accessors not supported");return"value"in s&&(e[r]=s.value),e},pt}function bt(){if(mt)return ft;mt=1;var e=v(),t=gt(),r=se();return ft=e?function(e,n,i){return t.f(e,n,r(1,i))}:function(e,t,r){return e[t]=r,e}}var Ct,wt,yt,_t,Wt,St,xt,It,Rt,Nt,Et,Pt,Ft,kt,Lt,Tt={exports:{}};function Ht(){if(_t)return yt;_t=1;var e=ae(),t=fe(),r=Qe(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(e){return n(e)}),yt=r.inspectSource}function Mt(){if(It)return xt;It=1;var e=Ze(),t=rt(),r=e("keys");return xt=function(e){return r[e]||(r[e]=t(e))}}function Ot(){return Nt?Rt:(Nt=1,Rt={})}function At(){if(Ft)return Tt.exports;Ft=1;var e=ae(),t=p(),r=fe(),n=tt(),i=v(),l=function(){if(wt)return Ct;wt=1;var e=v(),t=tt(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,i=t(r,"name"),o=i&&"something"===function(){}.name,l=i&&(!e||e&&n(r,"name").configurable);return Ct={EXISTS:i,PROPER:o,CONFIGURABLE:l}}().CONFIGURABLE,s=Ht(),a=function(){if(Pt)return Et;Pt=1;var e,t,r,n=function(){if(St)return Wt;St=1;var e=o(),t=fe(),r=e.WeakMap;return Wt=t(r)&&/native code/.test(String(r))}(),i=o(),l=me(),s=bt(),a=tt(),d=Qe(),u=Mt(),c=Ot(),h="Object already initialized",f=i.TypeError,m=i.WeakMap;if(n||d.state){var p=d.state||(d.state=new m);p.get=p.get,p.has=p.has,p.set=p.set,e=function(e,t){if(p.has(e))throw new f(h);return t.facade=e,p.set(e,t),t},t=function(e){return p.get(e)||{}},r=function(e){return p.has(e)}}else{var v=u("state");c[v]=!0,e=function(e,t){if(a(e,v))throw new f(h);return t.facade=e,s(e,v,t),t},t=function(e){return a(e,v)?e[v]:{}},r=function(e){return a(e,v)}}return Et={set:e,get:t,has:r,enforce:function(n){return r(n)?t(n):e(n,{})},getterFor:function(e){return function(r){var n;if(!l(r)||(n=t(r)).type!==e)throw new f("Incompatible receiver, "+e+" required");return n}}}}(),d=a.enforce,u=a.get,c=String,h=Object.defineProperty,f=e("".slice),m=e("".replace),g=e([].join),b=i&&!t(function(){return 8!==h(function(){},"length",{value:8}).length}),C=String(String).split("String"),w=Tt.exports=function(e,t,r){"Symbol("===f(c(t),0,7)&&(t="["+m(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!n(e,"name")||l&&e.name!==t)&&(i?h(e,"name",{value:t,configurable:!0}):e.name=t),b&&r&&n(r,"arity")&&e.length!==r.arity&&h(e,"length",{value:r.arity});try{r&&n(r,"constructor")&&r.constructor?i&&h(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var o=d(e);return n(o,"source")||(o.source=g(C,"string"==typeof t?t:"")),e};return Function.prototype.toString=w(function(){return r(this)&&u(this).source||s(this)},"toString"),Tt.exports}function zt(){if(Lt)return kt;Lt=1;var e=fe(),t=gt(),r=At(),n=Ke();return kt=function(i,o,l,s){s||(s={});var a=s.enumerable,d=void 0!==s.name?s.name:o;if(e(l)&&r(l,d,s),s.global)a?i[o]=l:n(o,l);else{try{s.unsafe?i[o]&&(a=!0):delete i[o]}catch(e){}a?i[o]=l:t.f(i,o,{value:l,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return i},kt}var $t,jt,Bt,Vt,Dt,Ut,qt,Xt,Yt,Gt,Jt,Kt,Qt,Zt,er,tr,rr,nr={};function ir(){if(Vt)return Bt;Vt=1;var e=function(){if(jt)return $t;jt=1;var e=Math.ceil,t=Math.floor;return $t=Math.trunc||function(r){var n=+r;return(n>0?t:e)(n)},$t}();return Bt=function(t){var r=+t;return r!=r||0===r?0:e(r)}}function or(){if(Ut)return Dt;Ut=1;var e=ir(),t=Math.max,r=Math.min;return Dt=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)}}function lr(){if(Xt)return qt;Xt=1;var e=ir(),t=Math.min;return qt=function(r){var n=e(r);return n>0?t(n,9007199254740991):0}}function sr(){if(Gt)return Yt;Gt=1;var e=lr();return Yt=function(t){return e(t.length)}}var ar,dr,ur,cr,hr,fr,mr,pr,vr,gr,br,Cr,wr,yr,_r,Wr,Sr,xr,Ir={};function Rr(){if(ur)return dr;ur=1;var e=pe(),t=ae(),r=function(){if(rr)return nr;rr=1;var e=function(){if(Zt)return Qt;Zt=1;var e=ae(),t=tt(),r=he(),n=function(){if(Kt)return Jt;Kt=1;var e=he(),t=or(),r=sr(),n=function(n){return function(i,o,l){var s=e(i),a=r(s);if(0===a)return!n&&-1;var d,u=t(l,a);if(n&&o!=o){for(;a>u;)if((d=s[u++])!=d)return!0}else for(;a>u;u++)if((n||u in s)&&s[u]===o)return n||u||0;return!n&&-1}};return Jt={includes:n(!0),indexOf:n(!1)}}().indexOf,i=Ot(),o=e([].push);return Qt=function(e,l){var s,a=r(e),d=0,u=[];for(s in a)!t(i,s)&&t(a,s)&&o(u,s);for(;l.length>d;)t(a,s=l[d++])&&(~n(u,s)||o(u,s));return u},Qt}(),t=(tr?er:(tr=1,er=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])).concat("length","prototype");return nr.f=Object.getOwnPropertyNames||function(r){return e(r,t)},nr}(),n=(ar||(ar=1,Ir.f=Object.getOwnPropertySymbols),Ir),i=vt(),o=t([].concat);return dr=e("Reflect","ownKeys")||function(e){var t=r.f(i(e)),l=n.f;return l?o(t,l(e)):t}}function Nr(){if(hr)return cr;hr=1;var e=tt(),t=Rr(),r=st(),n=gt();return cr=function(i,o,l){for(var s=t(o),a=n.f,d=r.f,u=0;u<s.length;u++){var c=s[u];e(i,c)||l&&e(l,c)||a(i,c,d(o,c))}}}function Er(){if(vr)return pr;vr=1;var e=o(),t=st().f,r=bt(),n=zt(),i=Ke(),l=Nr(),s=function(){if(mr)return fr;mr=1;var e=p(),t=fe(),r=/#|\.prototype\./,n=function(r,n){var a=o[i(r)];return a===s||a!==l&&(t(n)?e(n):!!n)},i=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},o=n.data={},l=n.NATIVE="N",s=n.POLYFILL="P";return fr=n}();return pr=function(o,a){var d,u,c,h,f,m=o.target,p=o.global,v=o.stat;if(d=p?e:v?e[m]||i(m,{}):e[m]&&e[m].prototype)for(u in a){if(h=a[u],c=o.dontCallGetSet?(f=t(d,u))&&f.value:d[u],!s(p?u:m+(v?".":"#")+u,o.forced)&&void 0!==c){if(typeof h==typeof c)continue;l(h,c)}(o.sham||c&&c.sham)&&r(h,"sham",!0),n(d,u,h,o)}}}function Pr(){if(wr)return Cr;wr=1;var e=function(){if(br)return gr;br=1;var e={};return e[nt()("toStringTag")]="z",gr="[object z]"===String(e)}(),t=fe(),r=de(),n=nt()("toStringTag"),i=Object,o="Arguments"===r(function(){return arguments}());return Cr=e?r:function(e){var l,s,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(l=i(e),n))?s:o?r(l):"Object"===(a=r(l))&&t(l.callee)?"Arguments":a},Cr}function Fr(){if(_r)return yr;_r=1;var e=Pr(),t=String;return yr=function(r){if("Symbol"===e(r))throw new TypeError("Cannot convert a Symbol value to a string");return t(r)}}function kr(){if(Sr)return Wr;Sr=1;var e=At(),t=gt();return Wr=function(r,n,i){return i.get&&e(i.get,n,{getter:!0}),i.set&&e(i.set,n,{setter:!0}),t.f(r,n,i)}}!function(){if(xr)return i;xr=1;var e=Er(),t=v(),r=o(),n=ae(),l=tt(),s=fe(),a=ve(),d=Fr(),u=kr(),c=Nr(),h=r.Symbol,f=h&&h.prototype;if(t&&s(h)&&(!("description"in f)||void 0!==h().description)){var m={},p=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:d(arguments[0]),t=a(f,this)?new h(e):void 0===e?h():h(e);return""===e&&(m[t]=!0),t};c(p,h),p.prototype=f,f.constructor=p;var g="Symbol(description detection)"===String(h("description detection")),b=n(f.valueOf),C=n(f.toString),w=/^Symbol\((.*)\)[^)]+$/,y=n("".replace),_=n("".slice);u(f,"description",{configurable:!0,get:function(){var e=b(this);if(l(m,e))return"";var t=C(e),r=g?_(t,7,-1):y(t,w,"$1");return""===r?void 0:r}}),e({global:!0,constructor:!0,forced:!0},{Symbol:p})}}();var Lr,Tr,Hr,Mr,Or,Ar,zr,$r,jr,Br,Vr,Dr,Ur,qr,Xr,Yr={};function Gr(){if(Tr)return Lr;Tr=1;var e=_e(),t=TypeError;return Lr=function(r,n){if(!delete r[n])throw new t("Cannot delete property "+e(n)+" of "+e(r))},Lr}function Jr(){if(Mr)return Hr;Mr=1;var e=ae();return Hr=e([].slice)}function Kr(){if($r)return zr;$r=1;var e=p();return zr=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})}}let Qr;!function(){if(Xr)return Yr;Xr=1;var e=Er(),t=ae(),r=We(),n=et(),i=sr(),o=Gr(),l=Fr(),s=p(),a=function(){if(Ar)return Or;Ar=1;var e=Jr(),t=Math.floor,r=function(n,i){var o=n.length;if(o<8)for(var l,s,a=1;a<o;){for(s=a,l=n[a];s&&i(n[s-1],l)>0;)n[s]=n[--s];s!==a++&&(n[s]=l)}else for(var d=t(o/2),u=r(e(n,0,d),i),c=r(e(n,d),i),h=u.length,f=c.length,m=0,p=0;m<h||p<f;)n[m+p]=m<h&&p<f?i(u[m],c[p])<=0?u[m++]:c[p++]:m<h?u[m++]:c[p++];return n};return Or=r}(),d=Kr(),u=function(){if(Br)return jr;Br=1;var e=ge().match(/firefox\/(\d+)/i);return jr=!!e&&+e[1]}(),c=function(){if(Dr)return Vr;Dr=1;var e=ge();return Vr=/MSIE|Trident/.test(e)}(),h=be(),f=function(){if(qr)return Ur;qr=1;var e=ge().match(/AppleWebKit\/(\d+)\./);return Ur=!!e&&+e[1]}(),m=[],v=t(m.sort),g=t(m.push),b=s(function(){m.sort(void 0)}),C=s(function(){m.sort(null)}),w=d("sort"),y=!s(function(){if(h)return h<70;if(!(u&&u>3)){if(c)return!0;if(f)return f<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)m.push({k:t+n,v:r})}for(m.sort(function(e,t){return t.v-e.v}),n=0;n<m.length;n++)t=m[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}});e({target:"Array",proto:!0,forced:b||!C||!w||!y},{sort:function(e){void 0!==e&&r(e);var t=n(this);if(y)return void 0===e?v(t):v(t,e);var s,d,u=[],c=i(t);for(d=0;d<c;d++)d in t&&g(u,t[d]);for(a(u,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:l(t)>l(r)?1:-1}}(e)),s=i(u),d=0;d<s;)t[d]=u[d++];for(;d<c;)o(t,d++);return t}})}();const Zr=()=>{const e=document.createElement("div");e.dir="rtl",Object.assign(e.style,{direction:"rtl",fontSize:"14px",width:"1px",height:"1px",position:"absolute",top:"-1000px",overflow:"scroll"}),e.textContent="A",document.body.appendChild(e);let t="reverse";return e.scrollLeft>0?t="default":(e.scrollLeft=1,0===Math.floor(e.scrollLeft)&&(t="negative")),e.parentNode.removeChild(e),t};function en(e,t){if(void 0===t&&(t="rtl"===getComputedStyle(e).direction),!0===t&&void 0===Qr&&(Qr=Zr()),!t)return e.scrollLeft;switch(Qr){case"negative":return e.scrollLeft+e.scrollWidth-e.clientWidth;case"reverse":return e.scrollWidth-e.scrollLeft-e.clientWidth;default:return e.scrollLeft}}function tn(e,t,r){e.scrollLeft=function(e,t,r){return void 0===r&&(r="rtl"===getComputedStyle(e).direction),function(e,t,r){if(void 0===r&&(r="rtl"===getComputedStyle(e).direction),!0===r&&void 0===Qr&&(Qr=Zr()),!r)return t;switch(Qr){case"negative":return t-e.scrollWidth+e.clientWidth;case"reverse":return e.scrollWidth-t-e.clientWidth;default:return t}}(e,r?e.scrollWidth-e.clientWidth-t:t,r)}(e,t,r)}const rn=function(e,t){for(let[r,n]of Object.entries(t))e.style[r]=null==n?"":String(n)},nn=function(e,t,r,n,i){return(...o)=>{let l,s,a,d,u=o[0];if(e?(l=o[1],s=!!o[2],a=!!o[3],d=!!o[4]):(s=!!o[1],a=!!o[2],d=!!o[3]),u===window)return u.document.documentElement[`client${r}`];if(9===u.nodeType){const e=u.documentElement,t=u.body;return Math.max(t[`scroll${r}`],e[`scroll${r}`],t[`offset${r}`],e[`offset${r}`],e[`client${r}`])}{let o,c,h=!1,f=!1;if(!e&&"getBoundingClientRect"in u&&(o=u.getBoundingClientRect()[t],h=!0,f=!0),(void 0===o||d||h!==s||f!==a)&&(c=e?getComputedStyle(u,l):getComputedStyle(u)),void 0===o){let e=c[t];"auto"===e?(o=u[`client${r}`],h=!0):o=parseFloat(e),"border-box"===c.boxSizing&&(h=!0,f=!0)}if(s!==h){let e=parseFloat(c[`padding-${n}`]||0)+parseFloat(c[`padding-${i}`]||0);s?o+=e:o-=e}if(a!==f){let e=parseFloat(c[`border-${n}-width`]||0)+parseFloat(c[`border-${i}-width`]||0);a?o+=e:o-=e}return o<0&&(o=0),d&&(o+=parseFloat(c[`margin-${n}`]||0)+parseFloat(c[`margin-${i}`]||0)),o}}},on=nn(!1,"width","Width","left","right"),ln=nn(!1,"height","Height","top","bottom"),sn=(an="left",dn="right",(e,t,r=!1,n=!1,i=!1)=>{if(e===window)return;if(9===e.nodeType)return;const o=getComputedStyle(e);let l=!1;if("border-box"===o.boxSizing&&(l=!0),r=!!r,n=!!n,(i=!!i)&&(t-=(parseFloat(o[`margin-${an}`])||0)+(parseFloat(o[`margin-${dn}`])||0)),r!==l){let e=parseFloat(o[`padding-${an}`]||0)+parseFloat(o[`padding-${dn}`]||0);r?t-=e:t+=e}if(n!==l){let e=(parseFloat(o[`border-${an}-width`])||0)+(parseFloat(o[`border-${dn}-width`])||0);n?t-=e:t+=e}t<0&&(t=0),e.style.width=t+"px"});var an,dn;const un=e=>{if(!e.getClientRects().length)return{top:0,left:0};let t=e.getBoundingClientRect(),r=e.ownerDocument.defaultView;return{top:t.top+r.pageYOffset,left:t.left+r.pageXOffset}};let cn=null;const hn=function(e,t){if(null===cn&&(()=>{try{document.createElement("div").querySelector(":scope > div"),cn=!0}catch(e){cn=!1}})(),!0===cn)return e.querySelectorAll(t.replace(/((?:^|,)\s*)/g,"$1:scope "));{let r=e.id;const n="ID_"+Date.now();e.id=n,t=t.replace(/((?:^|,)\s*)/g,"$1#"+n);try{return e.querySelectorAll(t)}finally{this.id=r}}};class fn{constructor(){this._events=[]}add(e,t,r,n){let i=t.split("."),o=i[0],l=i[1];e.addEventListener(o,r,n||!1);let s=!0===n||"object"==typeof n&&!0===n.capture;return this._events.push({el:e,name:o,namespace:l,handler:r,useCapture:s}),this}remove(e,t,r,n){let i=t?t.split("."):"",o=i[0],l=i[1],s=!0===n||"object"==typeof n&&!0===n.capture,a=[],d=[];if(e||o||l||r||void 0!==n)for(let t of this._events)e&&t.el!==e||o&&t.name!==o||l&&t.namespace!==l||r&&t.handler!==r||void 0!==n&&t.useCapture!==s?a.push(t):d.push(t);else d=this._events;this._events=a;for(let e of d)e.el.removeEventListener(e.name,e.handler,e.useCapture);return this}}const mn=Object.prototype.hasOwnProperty,pn=void 0!==Element.prototype.insertAdjacentElement;function vn(e,t,r){t?!1===pn||e instanceof DocumentFragment?r.insertBefore(e,t):t.insertAdjacentElement("beforebegin",e):r.appendChild(e)}function gn(e,t,r,n){return e.parentNode!==n?(t||(t=document.createDocumentFragment()),t.appendChild(e)):(t&&t.childNodes.length>0&&(vn(t,r,n),t=null),e.nextSibling!==r&&vn(e,r,n)),t}const bn=Symbol("destroyed");class Cn{constructor(e){var t;const r=this._p={list:e.list||null,hookScrollEvent:void 0===e.hookScrollEvent||!!e.hookScrollEvent,count:e.count||0,virtual:void 0===e.virtual||!!e.virtual,userItemsParent:e.itemsParent||null,setVirtualWrapperWidth:null===(t=e.autoVirtualWrapperWidth)||void 0===t||t,estimatedItemHeight:20,buffer:5,itemHeightEstimatorFn:null,itemElementCreatorFn:_n,onItemRender:null,onItemUnrender:null,onScrollHeightChange:null,virtualWrapper:null,currentItemsParent:null,cachedItemHeights:[],cachedItemEstimatedHeights:[],cachedItemPositions:[],itemPositionsNeedsUpdate:0,boundRender:this.render.bind(this),existingEls:[]};r.currentItemsParent=r.userItemsParent||r.list,this._hookEvents(),"number"==typeof e.count&&this.setCount(e.count),"boolean"==typeof e.virtual&&this.setVirtual(e.virtual),"number"==typeof e.estimatedItemHeight&&this.setEstimatedItemHeight(e.estimatedItemHeight),"number"==typeof e.buffer&&this.setBuffer(e.buffer),"function"==typeof e.itemHeightEstimatorFn&&this.setItemHeightEstimatorFn(e.itemHeightEstimatorFn),"function"==typeof e.itemElementCreatorFn&&this.setItemElementCreatorFn(e.itemElementCreatorFn),"function"==typeof e.onItemRender&&this.setOnItemRender(e.onItemRender),"function"==typeof e.onItemUnrender&&this.setOnItemUnrender(e.onItemUnrender),"function"==typeof e.onScrollHeightChange&&this.setOnScrollHeightChange(e.onScrollHeightChange)}destroy(){this[bn]||(this[bn]=!0,this._unhookEvents().invalidate()._destroyElements())}setHookScrollEvent(e){const t=this._p;return e=void 0===e||!!e,t.hookScrollEvent===e||(t.hookScrollEvent=e,this._unhookEvents()._hookEvents()),this}isHookScrollEventEnabled(){return this._p.hookScrollEvent}setCount(e){return this._p.count=e,this.invalidate()}getCount(){return this._p.count}setVirtual(e){const t=this._p;return e=void 0===e||!!e,t.virtual===e||(t.virtual=e,this._hookEvents().invalidate()._destroyElements()),this}isVirtual(){return this._p.virtual}setEstimatedItemHeight(e){return this._p.estimatedItemHeight=Math.abs(("number"==typeof e?e:Number(e))||20),this}getEstimatedItemHeight(){return this._p.estimatedItemHeight}setAutoVirtualWrapperWidth(e){const t=this._p;return t.autoVirtualWrapperWidth=void 0===e||!!e,t.virtualWrapper&&t.autoVirtualWrapperWidth!==t.virtualWrapperWidthWasSet&&(t.virtualWrapper.style.width=t.autoVirtualWrapperWidth?"100%":"",t.virtualWrapperWidthWasSet=t.autoVirtualWrapperWidth),this}isAutoVirtualWrapperWidth(){return this._p.autoVirtualWrapperWidth}setBuffer(e){return this._p.buffer=Math.abs("number"==typeof e?e:Number(e)||5),this}getBuffer(){return this._p.buffer}setItemHeightEstimatorFn(e){return this._p.itemHeightEstimatorFn=e,this}setItemElementCreatorFn(e){return this._p.itemElementCreatorFn=e||_n,this}setOnItemRender(e){return this._p.onItemRender=e,this}setOnItemUnrender(e){return this._p.onItemUnrender=e,this}setOnScrollHeightChange(e){return this._p.onScrollHeightChange=e,this}estimateFullHeight(){const e=this._p;if(0===e.count)return 0;if(e.virtual)return this._calculateItemPosition(e.count)||0;{const t=e.existingEls;if(e.count===t.length){let e=t[0].getBoundingClientRect(),r=t[t.length-1].getBoundingClientRect();return r.top-e.top+r.height}return this._calculateItemPosition(e.count)||0}}invalidatePositions(){const e=this._p;return e.itemPositionsNeedsUpdate=0,e.cachedItemHeights=[],e.cachedItemEstimatedHeights=[],e.cachedItemPositions=[],e.cachedItemHeights.length=e.count,e.cachedItemEstimatedHeights.length=e.count,e.cachedItemPositions.length=e.count,this}invalidate(){const e=this._p;this.invalidatePositions(),e.virtual||this._destroyElements();for(let t of e.existingEls)delete t[wn];return this}render(){if(this[bn])return;const e=this._p,t=e.list,r=e.virtual;let n=e.virtualWrapper,i=e.currentItemsParent,o=t.scrollTop,l=o+t.clientHeight,s=e.count,a=e.buffer,d=e.onItemUnrender,u=e.existingEls,c=u.length;if(r){const r=t.clientWidth;n||(n=e.virtualWrapper=e.userItemsParent,n||(n=e.virtualWrapper=document.createElement("div"),t.appendChild(n)),this._resetCurrentItemsParent(),i=e.currentItemsParent,e.autoVirtualWrapperWidth?(n.style.width="100%",e.virtualWrapperWidthWasSet=!0):e.virtualWrapperWidthWasSet=!1);for(let e=0;e<c;e++)u[e][yn]=!0;this._calculateItemPosition(e.count-1);let d=this._getExistingElsRange(),f=Wn(e.cachedItemPositions,o),m=Math.max(0,f-a),p=m,v=this._calculateItemPosition(p),g=a,b=Math.max(p,Wn(e.cachedItemPositions,l-1)+1+a),C=[],w=null,y=n.childNodes[0];const _=function(e){let t;return-1!==d.firstIndex&&e>=d.firstIndex&&e<=d.lastIndex&&(t=u.find(t=>t[wn]===e&&!0===t[yn])),void 0===t&&(t=(d.firstIndex<m||d.firstValidArrayIndex>0?u.find(e=>(e[wn]<m||!1===mn.call(e,wn))&&!0===e[yn]):void 0)||xn(u,e=>!0===e[yn])),void 0!==t&&delete t[yn],t};for(;p<s&&p<b;p++){let e=_(p);y&&y===e&&(y=y.nextSibling);const t=this._dequeueElementForIndex(e,p,y,!0);C.push([t,p]),w=gn(t,w,y,i)}w&&w.childNodes.length>0&&vn(w,y,i);for(let t of C){const r=t[1];this._insertItemAndFlow(t[0],r,!1),v=e.cachedItemPositions[r]+e.cachedItemHeights[r]}if(v<l)for(;(v<l||g-- >0)&&p<s;p++){let t=_(p);y&&y===t&&(y=y.nextSibling),this._dequeueElementForIndex(t,p,y,!1),v=e.cachedItemPositions[p]+e.cachedItemHeights[p]}let W=this.estimateFullHeight(),S=W+"px";var h;n.style.height!==S&&(n.style.height=S,null===(h=e.onScrollHeightChange)||void 0===h||h.call(e,W)),r!==t.clientWidth&&this.render()}else if(s!==u.length){for(let e=0;e<c;e++)u[e][yn]=!0;let e=i.childNodes[0],t=null;for(let r=0;r<s;r++){let n=u.find(e=>e[wn]===r&&!0===e[yn]);void 0!==n&&delete n[yn],e&&e===n&&(e=e.nextSibling),t=gn(this._dequeueElementForIndex(n,r,e,!0),t,e,i)}t&&t.childNodes.length>0&&vn(t,e,i)}c=u.length;for(let e=0;e<c;e++){const t=u[e];if(!0!==t[yn])continue;let r=t.parentNode;r&&r.removeChild(t),d&&void 0!==t[wn]&&d(t),u.splice(e,1),e--,c--}}addItemsAt(e,t=-1){if("number"!=typeof e||e<=0)return this;const r=this._p;if((t<0||t>=r.count)&&(t=r.count),r.count+=e,r.virtual)t>=0&&t<r.count&&this._invalidateItemIndexesAt(t,-1);else{let n=r.existingEls;if(n.length!==r.count-e)return this;let i=this._getExistingElsRange();if(-1===i.firstValidArrayIndex)return this;const o=r.currentItemsParent;let l=i.firstValidArrayIndex+t-i.firstIndex;this._pushItemIndexesAt(t,e);let s=n[l-1]?n[l-1].nextSibling:n[0],a=null;for(let r=t,n=t+e;r<n;r++)a=gn(this._dequeueElementForIndex(void 0,r,s,!0),a,s,o);a&&a.childNodes.length>0&&vn(a,s,o)}return this}removeItemsAt(e,t){const r=this._p;if("number"!=typeof e||"number"!=typeof t||e<=0||t<0||t>=r.count)return this;if(r.count-=Math.min(e,r.count-t),r.virtual)this._invalidateItemIndexesAt(t,-1);else{let n=r.existingEls;if(n.length!==r.count+e)return this;let i=this._getExistingElsRange();if(-1===i.firstValidArrayIndex)return this;this._pushItemIndexesAt(t+e,-e);const o=r.onItemUnrender;let l=i.firstValidArrayIndex+t-i.firstIndex;if(l<n.length){for(let t=0;t<e;t++){let e=n[l+t],r=e.parentNode;r&&r.removeChild(e),o&&void 0!==e[wn]&&o(e)}n.splice(l,e)}}return this}refreshItemAt(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return this;if(t.virtual)this._invalidateItemIndexesAt(e,1);else{let r=t.existingEls;if(r.length!==t.count)return this;let n=this._getExistingElsRange();if(e>=n.firstIndex&&e<=n.lastIndex){let t=r[n.firstValidArrayIndex+e-n.firstIndex];delete t[wn],this._dequeueElementForIndex(t,e,t.nextSibling,!1)}}return this}isItemRendered(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return!1;let r=this._getExistingElsRange();return e>=r.firstIndex&&e<=r.lastIndex}getItemElementAt(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return;let r=t.existingEls,n=this._getExistingElsRange();return e>=n.firstIndex&&e<=n.lastIndex?r[n.firstValidArrayIndex+e-n.firstIndex]:void 0}getItemPosition(e){const t=this._p;if(!("number"!=typeof e||e<0||e>=t.count)){if(t.virtual)return this._calculateItemPosition(e);{let r=this.getItemElementAt(e);if(void 0===r)return;const n=t.list;return un(r).top-un(n).top+n.scrollTop}}}getItemIndexFromElement(e){return e?e[wn]:void 0}getItemSize(e){const t=this._p;if("number"!=typeof e||e<0||e>=t.count)return;let r=t.cachedItemHeights[e-1];return void 0===r&&(r=t.itemHeightEstimatorFn?t.itemHeightEstimatorFn(e-1):null,"number"!=typeof r&&(r=t.estimatedItemHeight),t.cachedItemEstimatedHeights[e-1]=r),r}getVisibleItemCount(){const e=this._p,t=e.list;let r,n,i=t.scrollTop,o=t.clientHeight;if(e.virtual)r=Wn(e.cachedItemPositions,i),n=Wn(e.cachedItemPositions,i+o,r);else{const t=e=>{let t=this.getItemPosition(e);return void 0===t&&(t=1/0),t};r=Sn(e.count,t,i),n=Sn(e.count,t,i+o,r)}return this.getItemPosition(n)===i+o&&n--,n-r+1}createGhostItemElement(e,t,r){const n=this._p;let i=this._dequeueElementForIndex(null,e,!1,!0);try{t&&n.currentItemsParent.appendChild(i),r(i)}finally{if(t){let e=i.parentNode;e&&e.removeChild(i)}n.onItemUnrender&&n.onItemUnrender(i)}}_resetCurrentItemsParent(){var e,t;const r=this._p;r.currentItemsParent=null!==(e=null!==(t=r.virtualWrapper)&&void 0!==t?t:r.userItemsParent)&&void 0!==e?e:r.list}_destroyElements(){const e=this._p,t=e.onItemUnrender,r=e.existingEls;for(let e=0;e<r.length;e++){const n=r[e];let i=n.parentNode;i&&i.removeChild(n),t&&void 0!==n[wn]&&t(n)}return r.length=0,e.virtualWrapper&&(e.virtualWrapper!==e.userItemsParent&&e.virtualWrapper.parentNode&&e.virtualWrapper.parentNode.removeChild(e.virtualWrapper),e.virtualWrapper=null,this._resetCurrentItemsParent()),this}_invalidateItemIndexesAt(e,t){const r=this._p;this._setItemPositionsNeedsUpdate(e);let n=r.existingEls,i=n.length,o=this._getExistingElsRange();if(-1!==o.firstValidArrayIndex&&(-1===t&&(t=n.length),e>=o.firstIndex&&e<=o.lastIndex))for(let r=o.firstValidArrayIndex+e-o.firstIndex,l=0;r<i&&l<t;r++,l++)delete n[r][wn]}_pushItemIndexesAt(e,t){let r=this._p.existingEls,n=r.length,i=this._getExistingElsRange();if(-1!==i.firstValidArrayIndex&&e>=i.firstIndex&&e<=i.lastIndex)for(let o=i.firstValidArrayIndex+e-i.firstIndex;o<n;o++)r[o][wn]+=t}_hookEvents(){const e=this._p;return this._unhookEvents(),e.virtual&&e.hookScrollEvent&&e.list&&e.list.addEventListener("scroll",e.boundRender),this}_unhookEvents(){const e=this._p;return e.list&&e.list.removeEventListener("scroll",e.boundRender),this}_setItemPositionsNeedsUpdate(e){const t=this._p;e<t.itemPositionsNeedsUpdate&&(t.itemPositionsNeedsUpdate=e)}_calculateItemPosition(e){const t=this._p,r=t.cachedItemPositions;if(e>=t.itemPositionsNeedsUpdate){const n=t.count,i=t.cachedItemHeights,o=t.cachedItemEstimatedHeights,l=t.estimatedItemHeight,s=t.itemHeightEstimatorFn;i.length!==n&&(i.length=n,o.length=n,r.length=n);let a=t.itemPositionsNeedsUpdate,d=Math.min(e,n),u=0;a>0&&(u=r[a-1]);for(let e=a;e<=d;e++){if(0===e){r[e]=u;continue}const t=e-1;let n=i[t];void 0===n&&(n=s?s(t):null,"number"!=typeof n&&(n=l),o[t]=n),u+=n,r[e]=u}t.itemPositionsNeedsUpdate=d+1}if(e>0&&e===t.count){let n=t.cachedItemHeights[e-1];return void 0===n&&(n=t.itemHeightEstimatorFn?t.itemHeightEstimatorFn(e-1):null,"number"!=typeof n&&(n=t.estimatedItemHeight),t.cachedItemEstimatedHeights[e-1]=n),r[e-1]+n}return r[e]}_dequeueElementForIndex(e,t,r,n){const i=this._p,o=i.virtualWrapper;i.currentItemsParent;const l=i.existingEls,s=i.onItemRender,a=i.onItemUnrender,d=!e,u=d||t!==e[wn];if(e?a&&u&&a(e):(e=i.itemElementCreatorFn(),o&&!1!==r&&(e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.right="0")),u&&(e.innerHTML="",s&&s(e,t)),!1!==r){if(r instanceof Node||(r=null),!d){let t=l.indexOf(e);-1!==t&&l.splice(t,1)}let i=r?l.indexOf(r):-1;-1===i?l.push(e):l.splice(i,0,e),n||this._insertItemAndFlow(e,t,r)}return e[wn]=t,e}_insertItemAndFlow(e,t,r){const n=this._p,i=n.virtualWrapper,o=n.currentItemsParent;if(!1!==r&&(r instanceof Node||(r=null),e.parentNode===o&&e.nextSibling===r||vn(e,r,o)),i){let r=e.getBoundingClientRect().height,i=n.cachedItemHeights[t];i!==r&&(n.cachedItemHeights[t]=r),(void 0!==i&&r!==i||void 0===i&&r!==n.cachedItemEstimatedHeights[t])&&this._setItemPositionsNeedsUpdate(t+1);let o=this._calculateItemPosition(t);const l=Rn();!1===l?e.style.top=`${o}px`:e.style[l]=`translateY(${o}px)`}}_getExistingElsRange(){const e=this._p.existingEls;let t=-1,r=-1;for(let r=0,n=e.length;r<n;r++)if(!1!==mn.call(e[r],wn)){t=r;break}for(let t=e.length-1;t>=0;t--)if(!1!==mn.call(e[t],wn)){r=t;break}return{firstValidArrayIndex:t,lastValidArrayIndex:r,firstIndex:-1!==t?e[t][wn]:-1,lastIndex:-1!==r?e[r][wn]:-1}}}const wn=Symbol("index"),yn=Symbol("reuse"),_n=()=>document.createElement("li"),Wn=(e,t,r=0,n=-1)=>{let i=e.length;if(n<0&&(n+=i),n<=r)return n;for(;r<=n;){let o=Math.floor(r+(n-r)/2),l=e[o];if(l===t||l<=t&&o<i&&e[o+1]>t){for(;o>0&&e[o-1]===l;)o--;return o}l<t?r=o+1:n=o-1}return-1===n?0:i-1},Sn=(e,t,r,n=0,i=-1)=>{if(i<0&&(i+=e),i<=n)return i;for(;n<=i;){let o=Math.floor(n+(i-n)/2),l=t(o);if(l===r||l<=r&&o<e&&t(o+1)>r){for(;o>0&&t(o-1)===l;)o--;return o}l<r?n=o+1:i=o-1}return-1===i?0:t(e-1)},xn=(e,t)=>{for(let r=e.length-1;r>=0;r--)if(t(e[r]))return e[r]};let In=null;const Rn=()=>{if(null===In){let e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],t=document.createElement("div");In=!1;for(let r of e)if(t&&void 0!==t.style[r]){In=r;break}}return In};function Nn(e,t){for(let r=0,n=e.length;r>=0&&r<n;r+=1)if(t(e[r],r,e))return e[r]}function En(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}const Pn=Symbol("safe"),Fn=Symbol("hover_in"),kn=Symbol("hover_out"),Ln=Symbol("row_click"),Tn=Symbol("preview_cell"),Hn=Symbol("cell"),Mn=Symbol("related_touch"),On=Symbol("original_row_index"),An=Symbol("destroyed");class zn extends Array{constructor(e){var t,r,n;super(),this.onComparatorRequired=null,this.customSortingProvider=null,e=e||{},this.sortColumn=null!==(t=e.sortColumn)&&void 0!==t?t:[],this.onComparatorRequired=null!==(r=e.onComparatorRequired)&&void 0!==r?r:null,this.customSortingProvider=null!==(n=e.customSortingProvider)&&void 0!==n?n:null}add(e,t){if(Array.isArray(e)){const r=e;if("number"==typeof t)for(let e=0,n=r.length;e<n;e++)this.splice(t++,0,r[e]);else for(let e=0,t=r.length;e<t;e++)this.push(r[e])}else{const r=e;"number"==typeof t?this.splice(t,0,r):this.push(r)}}reset(e){this.length=0,e&&this.add(e)}filteredCollection(e,t){if(e&&t){const r=new zn({sortColumn:this.sortColumn,onComparatorRequired:this.onComparatorRequired,customSortingProvider:this.customSortingProvider});for(let n=0,i=this.length;n<i;n++){const i=this[n];e(i,t)&&(i[On]=n,r.push(i))}return r}return null}sort(e){let t;if("function"==typeof e)return super.sort(e);if(this.sortColumn.length){const e=[];for(let t=0;t<this.sortColumn.length;t++){const r=$n(this.sortColumn[t],this.sortColumn[t].descending);let n=null;this.onComparatorRequired&&(n=this.onComparatorRequired(this.sortColumn[t].column,this.sortColumn[t].descending,r)),n||(n=r),e.push(n.bind(this))}if(1===e.length)t=e[0];else{const r=e.length;t=(t,n)=>{let i=0;for(let o=0;o<r;o++)if(i=e[o](t,n),0!==i)return i;return i}}const r=e=>(e.sort(t),e);if(this.customSortingProvider){const e=this.customSortingProvider(this,r);e!==this&&this.splice(0,this.length,...e)}else r(this)}return this}}function $n(e,t){let r=e.comparePath;"string"==typeof r&&(r=r.split("."));const n=r.length,i=n>1,o=t?1:-1,l=t?-1:1;return function(e,t){let s=e[r[0]],a=t[r[0]];if(i)for(let e=1;e<n;e++)s=s&&s[r[e]],a=a&&a[r[e]];return s===a?0:null==s?o:null==a?l:s<a?o:l}}class jn extends Array{constructor(){super()}get(e){for(let t=0,r=this.length;t<r;t++)if(this[t].name===e)return this[t];return null}indexOf(e){const t="string"==typeof e?e:e.name;for(let e=0,r=this.length;e<r;e++)if(this[e].name===t)return e;return-1}getByOrder(e){for(let t=0,r=this.length;t<r;t++)if(this[t].order===e)return this[t];return null}normalizeOrder(){const e=[];for(let t=0;t<this.length;t++)e.push(this[t]);e.sort((e,t)=>e.order<t.order?-1:e.order>t.order?1:0);for(let t=0;t<e.length;t++)e[t].order=t;return this}getColumns(){const e=[];for(let t=0;t<this.length;t++)e.push(this[t]);return e.sort((e,t)=>e.order<t.order?-1:e.order>t.order?1:0),e}getVisibleColumns(){const e=[];for(let t=0;t<this.length;t++){const r=this[t];r.visible&&e.push(r)}return e.sort((e,t)=>e.order<t.order?-1:e.order>t.order?1:0),e}getMaxOrder(){let e=0;for(let t=0;t<this.length;t++){const r=this[t];r.order>e&&(e=r.order)}return e}moveColumn(e,t){if(e&&t){const r=e.order,n=t.order;if(r<n)for(let e=r+1;e<=n;e++){const t=this.getByOrder(e);t&&t.order--}else for(let e=r-1;e>=n;e--){const t=this.getByOrder(e);t&&t.order++}e.order=n}return this}}function Bn(e,t){const r=t.column,n=null==t.keyword?"":t.keyword.toString();if(!n||!r)return!0;let i=e[r];if(null==i)return!1;let o=i.toString(),l=n;return t.caseSensitive||(o=o.toLowerCase(),l=l.toLowerCase()),-1!==o.indexOf(l)}const Vn={NONE:"none",AUTO:"auto",SCROLL:"scroll"},Dn=document.createElement.bind(document);function Un(e){["relative","absolute","fixed"].includes(getComputedStyle(e).position)||(e.style.position="relative")}function qn(e){const t=e.target;return/^(?:INPUT|TEXTAREA|BUTTON|SELECT)$/.test(t.tagName)}function Xn(e){const t=getComputedStyle(e);return(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)}function Yn(e){const t=e.style;t["-webkit-touch-callout"]="none",t["-webkit-user-select"]="none",t["-moz-user-select"]="none",t["-ms-user-select"]="none",t["-o-user-select"]="none",t["user-select"]="none"}function Gn(e,t){const r=e._o.tableClassName,n=Dn("div");n.className=e.el.className;const i=Dn("div");i.className=r+"-header";const o=Dn("div");o.className=r+"-header-row";const l=Dn("div");l.className=r+"-header-cell";const s=Dn("div");s.textContent=t,l.appendChild(s),o.appendChild(l),i.appendChild(o),n.appendChild(i),rn(n,{position:"absolute",top:"-9999px",visibility:"hidden"}),document.body.appendChild(n);const a=on(l);return n.remove(),a}function Jn(e){const t=e._o,r=e._p;let n,i=0,o=0;r.table&&(i=r.table?r.table.scrollTop:0,o=r.table?r.table.scrollLeft:0,t.virtualTable&&(n=r.table.style.display,r.table.style.display="none"));let l=on(e.el);r.table&&(t.virtualTable&&void 0!==n&&(r.table.style.display=n),r.table.scrollTop=i,r.table.scrollLeft=o,r.header&&(r.header.scrollLeft=o));const s=t.tableClassName,a=Dn("div");a.className=e.el.className,rn(a,{"z-index":"-1",position:"absolute",left:"0",top:"-9999px"});const d=Dn("div");d.className=`${s}-header`,a.appendChild(d);const u=Dn("div");u.index=null,u.vIndex=null,u.className=`${s}-header-row`,d.appendChild(u);for(let e=0;e<r.visibleColumns.length;e++){const t=r.visibleColumns[e],n=Dn("div");n.className=`${s}-header-cell ${t.cellClasses||""}`,n.columnName=t.name,n.appendChild(Dn("div")),u.appendChild(n)}document.body.appendChild(a),l-=function(e){const t=getComputedStyle(e);return(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0)}(u);const c=u.querySelectorAll(`div.${s}-header-cell`);for(const e of c){const t=getComputedStyle(e);if("border-box"!==t.boxSizing){l-=(parseFloat(t.borderRightWidth)||0)+(parseFloat(t.borderLeftWidth)||0)+Xn(e);const n=e.columnName,i=r.columns.get(n);i&&(l-=i.arrowProposedWidth||0)}}return a.remove(),Math.max(0,l)}function Kn(e){const t=e._p,r=e._o.tableClassName,n=r+"-row",i=r+"-cell",o=t.visibleColumns,l=o.length,s=Dn("div");s.className=n,s.style.float="left";let a=0;for(let e=0;e<l;e++){var d,u;const t=o[e],r=Dn("div");r.className=i,r.style.width=(null!==(d=t.actualWidth)&&void 0!==d?d:0)+"px",t.cellClasses&&(r.className+=" "+t.cellClasses),r.appendChild(Dn("div")),s.appendChild(r),a+=null!==(u=t.actualWidth)&&void 0!==u?u:0}const c=Dn("div");c.className=e.el.className,rn(c,{"z-index":"-1",position:"absolute",left:"0",top:"-9999px",float:"left",width:"1px",overflow:"hidden"});const h=Dn("div");h.className=r,c.appendChild(h);const f=Dn("div");f.className=r+"-body",f.style.width=a+1e4+"px",h.appendChild(f),f.appendChild(s),document.body.appendChild(c);const m=Dn("div");rn(m,{border:"1.5px solid #000",width:"0",height:"0",position:"absolute",left:"0",top:"-9999px"}),document.body.appendChild(m);const p=parseFloat(getComputedStyle(m).borderWidth),v=Math.round(p)!==p;m.remove();let g=on(s,!0,!0,!0);return g-=t.scrollbarWidth||0,v&&g++,c.remove(),g}function Qn(e){const t=e._p;return!!t.table&&"rtl"===getComputedStyle(t.table).direction}function Zn(e){return 0===e.widthMode?"auto":2===e.widthMode?100*e.width+"%":e.width}class ei{static saveSelection(e){const t=window.getSelection();if(!t||0===t.rangeCount)return null;const r=t.getRangeAt(0);if(e!==r.commonAncestorContainer&&!function(e,t){let r=e;for(;(r=null!==(n=null===(i=r)||void 0===i?void 0:i.parentNode)&&void 0!==n?n:null)&&r!==t;)var n,i;return!!r}(r.commonAncestorContainer,e))return null;const n=r.cloneRange();n.selectNodeContents(e),n.setEnd(r.startContainer,r.startOffset);const i=n.toString().length;return{start:i,end:i+r.toString().length}}static restoreSelection(e,t){let r=0;const n=[e];let i,o=!1,l=!1;const s=document.createRange();for(s.setStart(e,0),s.collapse(!0);!l&&(i=n.pop());)if(i.nodeType===Node.TEXT_NODE){const e=r+i.length;!o&&t.start>=r&&t.start<=e&&(s.setStart(i,t.start-r),o=!0),o&&t.end>=r&&t.end<=e&&(s.setEnd(i,t.end-r),l=!0),r=e}else{let e=i.childNodes.length;for(;e--;)n.push(i.childNodes[e])}const a=window.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}}const ti=document.createElement.bind(document);function ri(e,t){var r,n,i;const o=e._o,l=Qn(e);let s=t.target.closest(`div.${o.tableClassName}-header-cell,div.${o.cellPreviewClassName}`);if(!s)return null;s[Hn]&&(s=s[Hn]);let a=s.previousSibling;for(;a&&1!==a.nodeType;)a=a.previousSibling;const d=!a,u=t,c=null!==(r=null!==(n=t[Mn])&&void 0!==n?n:null===(i=u.changedTouches)||void 0===i?void 0:i[0])&&void 0!==r?r:t,h=(c.pageX||c.clientX||0)-un(s).left;if(l){var f,m,p;if(!d&&on(s,!0,!0,!0)-h<=o.resizeAreaWidth/2)return null!==(f=null===(m=a)||void 0===m?void 0:m.columnName)&&void 0!==f?f:null;if(h<=o.resizeAreaWidth/2)return null!==(p=s.columnName)&&void 0!==p?p:null}else{var v,g,b;if(!d&&h<=o.resizeAreaWidth/2)return null!==(v=null===(g=a)||void 0===g?void 0:g.columnName)&&void 0!==v?v:null;if(on(s,!0,!0,!0)-h<=o.resizeAreaWidth/2)return null!==(b=s.columnName)&&void 0!==b?b:null}return null}function ni(e){const t=e._p;return t.resizer&&(t.resizer.remove(),t.resizer=null,t.eventsSink.remove(document,".colresize")),e}function ii(e,t){const r=t;if("mousedown"===t.type&&0!==r.button)return;const n=e._o,i=e._p,o=ri(e,t);if(o){const r=i.columns.get(o);if(!n.resizableColumns||!r||!r.resizable)return!1;const l=Qn(e);i.resizer&&i.resizer.remove(),i.resizer=ti("div"),i.resizer.className=n.resizerClassName,rn(i.resizer,{position:"absolute",display:"block",zIndex:"-1",visibility:"hidden",width:"2px",background:"#000",opacity:"0.7"}),e.el.appendChild(i.resizer);const s=r.element,a=i.resizer.parentNode,d=getComputedStyle(a),u=getComputedStyle(s),c=un(s),h=un(a);h.left+=parseFloat(d.borderLeftWidth)||0,h.top+=parseFloat(d.borderTopWidth)||0,c.left-=h.left,c.top-=h.top,c.top-=parseFloat(u.borderTopWidth)||0;const f=on(i.resizer,!0,!0,!0);l?(c.left-=Math.ceil((parseFloat(u.borderLeftWidth)||0)/2),c.left-=Math.ceil(f/2)):(c.left+=on(s,!0,!0,!0),c.left+=Math.ceil((parseFloat(u.borderRightWidth)||0)/2),c.left-=Math.ceil(f/2)),rn(i.resizer,{"z-index":"10",visibility:"visible",left:c.left+"px",top:c.top+"px",height:ln(e.el,!1,!1,!1)+"px"}),i.resizer.columnName=s.columnName;try{i.resizer.style.zIndex=""}catch{}i.eventsSink.add(document,"mousemove.colresize",t=>oi(e,t)).add(document,"touchmove.colresize",t=>oi(e,t)).add(document,"mouseup.colresize",t=>li(e,t)).add(document,"touchend.colresize",t=>li(e,t)),t.preventDefault()}}function oi(e,t){var r,n,i;const o=e._p;if(!o.resizer)return;const l=o.columns.get(o.resizer.columnName);if(!l)return;const s=Qn(e),a=l.element,d=o.resizer.parentNode,u=getComputedStyle(d),c=getComputedStyle(a),h=un(a),f=un(d);f.left+=parseFloat(u.borderLeftWidth)||0,h.left-=f.left;const m=on(o.resizer,!0,!0,!0),p="border-box"===c.boxSizing,v=t;let g=(null!==(r=null!==(n=t[Mn])&&void 0!==n?n:null===(i=v.changedTouches)||void 0===i?void 0:i[0])&&void 0!==r?r:t).pageX-f.left,b=h.left;b-=Math.ceil(m/2),s?(b+=on(a,!0,!0,!0),b-=l.ignoreMin?0:e._o.minColumnWidth,p||(b-=Math.ceil((parseFloat(c.borderLeftWidth)||0)/2),b-=Xn(a)),g>b&&(g=b)):(b+=l.ignoreMin?0:e._o.minColumnWidth,p||(b+=Math.ceil((parseFloat(c.borderRightWidth)||0)/2),b+=Xn(a)),g<b&&(g=b)),o.resizer.style.left=g+"px"}function li(e,t){var r,n,i;const o=e._o,l=e._p;if(!l.resizer)return;l.eventsSink.remove(document,".colresize");const s=l.columns.get(l.resizer.columnName);if(!s)return l.resizer.remove(),void(l.resizer=null);const a=Qn(e),d=s.element,u=d.firstChild,c=l.resizer.parentNode,h=getComputedStyle(c),f=getComputedStyle(d),m=un(d),p=un(c);p.left+=parseFloat(h.borderLeftWidth)||0,m.left-=p.left;const v=on(l.resizer,!0,!0,!0),g="border-box"===f.boxSizing,b=t;let C=(null!==(r=null!==(n=t[Mn])&&void 0!==n?n:null===(i=b.changedTouches)||void 0===i?void 0:i[0])&&void 0!==r?r:t).pageX-p.left,w=m.left,y=0;if(w-=Math.ceil(v/2),a){if(!g){C+=Xn(d);const e=getComputedStyle(u||d);C+=parseFloat(e.borderLeftWidth)||0,C+=parseFloat(e.borderRightWidth)||0,C+=s.arrowProposedWidth||0}w+=on(d,!0,!0,!0);const t=w-(s.ignoreMin?0:e._o.minColumnWidth);C>t&&(C=t),y=w-C}else{if(!g){C-=Xn(d);const e=getComputedStyle(u||d);C-=parseFloat(e.borderLeftWidth)||0,C-=parseFloat(e.borderRightWidth)||0,C-=s.arrowProposedWidth||0}const t=w+(s.ignoreMin?0:e._o.minColumnWidth);C<t&&(C=t),y=C-w}l.resizer.remove(),l.resizer=null;let _=y;if(2===s.widthMode){let t=Jn(e),r=0,n=0;for(let e=0;e<l.visibleColumns.length;e++){var W;const i=l.visibleColumns[e];i.name!==s.name&&(2===i.widthMode?(r+=i.width,n++):t-=null!==(W=i.actualWidth)&&void 0!==W?W:0)}if(t=Math.max(1,t),1===t&&l.table&&(t=l.table.clientWidth),_=y/t,n>0){const e=_/((1-_)/r);r+=_,(r<1&&o.relativeWidthGrowsToFillWidth||r>1&&o.relativeWidthShrinksToFillWidth)&&(_=e)}_*=100,_+="%"}e.setColumnWidth(s.name,_)}function si(e,t){var r;const n=e._o,i=e._p;if(!n.resizableColumns)return;const o=ri(e,t),l=t.target.closest(`div.${n.tableClassName}-header-cell,div.${n.cellPreviewClassName}`);l&&(o&&null!==(r=i.columns.get(o))&&void 0!==r&&r.resizable?l.style.cursor="e-resize":l.style.cursor="")}function ai(e,t){var r,n,i;const o=e._o,l=t,s=t,a=null!==(r=null!==(n=t[Mn])&&void 0!==n?n:null===(i=l.changedTouches)||void 0===i?void 0:i[0])&&void 0!==r?r:{pageX:s.pageX,pageY:s.pageY},d=t.target.closest(`div.${o.tableClassName}-header-cell,div.${o.cellPreviewClassName}`);if(!d)return;const u=un(d);u.width=on(d,!0,!0,!0),u.height=ln(d,!0,!0,!0),e.emit("headercontextmenu",{columnName:d.columnName,pageX:a.pageX,pageY:a.pageY,bounds:u})}function di(e,t){if(qn(t))return;if(ri(e,t))return;const r=e._o,n=e._p,i=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!i)return;if(!r.sortableColumns)return;const o=n.columns.get(i.columnName),l=n.rows.sortColumn;if(o&&o.sortable){let t=!0;const n=l.length?l[l.length-1]:null;n&&n.column===o.name&&(n.descending&&r.allowCancelSort?(t=!1,l.splice(l.length-1,1)):n.descending=!n.descending);const i=e;t?i.sort(o.name,void 0,!0).render():i.sort()}}const ui=Array.prototype.indexOf,ci=document.createElement.bind(document);function hi(e){const t=e._p;return t.headerRow&&(t.headerRow=void 0),e}function fi(e){const t=e._o,r=e._p;if(!r.tbody)return e;if(t.virtualTable&&r.virtualListHelper){const e=r.virtualListHelper.estimateFullHeight();r._lastVirtualScrollHeight=e,r.tbody.style.height=e+"px"}else r.tbody.style.height="";return e}function mi(e,t){const r=e._p;if(!r.table)return e;const n=r.table.offsetWidth-r.table.clientWidth;if(n!==r.scrollbarWidth||t){var i;r.scrollbarWidth=n;for(let e=0;e<r.columns.length;e++)r.columns[e].actualWidthConsideringScrollbarWidth=null;if(r.scrollbarWidth>0&&r.visibleColumns.length>0&&r.tbody&&r.headerRow){var o;const e=r.visibleColumns.length-1;r.visibleColumns[e].actualWidthConsideringScrollbarWidth=(null!==(o=r.visibleColumns[e].actualWidth)&&void 0!==o?o:0)-r.scrollbarWidth;const t=r.visibleColumns[e].actualWidthConsideringScrollbarWidth+"px",n=r.tbody.childNodes;for(let r=0,i=n.length;r<i;r++){const i=n[r];1===i.nodeType&&(i.childNodes[e].style.width=t)}r.headerRow.childNodes[e].style.width=t}vi(e),null===(i=r.notifyRendererOfColumnsConfig)||void 0===i||i.call(r)}return e}function pi(e,t){const r=e._o,n=e._p;if(!n.tbody||!n.table||!n.headerRow)return e;const i=Kn(e);if(n.tbody.style.minWidth=i+"px",n.headerRow.style.minWidth=i+(n.scrollbarWidth||0)+"px",n.eventsSink.remove(n.table,"scroll"),r.width===Vn.AUTO)sn(n.table,on(n.tbody,!0,!0,!0)),sn(e.el,on(n.table,!0,!0,!0));else if(r.width===Vn.SCROLL){if(t){const t=n.table?n.table.scrollTop:0,r=n.table?n.table.scrollLeft:0;!function(e){const t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}(e.el),n.table.scrollTop=t,n.table.scrollLeft=r,n.header&&(n.header.scrollLeft=r)}const r=()=>function(e){const t=e._p;t.header.scrollLeft=t.table.scrollLeft,gi(e)}(e);n.eventsSink.add(n.table,"scroll",r)}return e}function vi(e){var t;const r=e._p,n=e._o;if(!r.headerRow)return;const i=n.tableClassName+"-sticky",o=r.headerRow,l=Qn(e);r.lastIsRtl=l;const s=null!==(t=r.scrollbarWidth)&&void 0!==t?t:0;let a=0,d=0,u=null;const c=[],h=[];let f=null,m=[];for(let e=o.firstElementChild;e;e=e.nextElementSibling){var p;const t=e.getAttribute("data-column");if(!t)continue;const n=r.columns.get(t);if(n)if("start"===n.sticky||"end"===n.sticky){var v;e.className+=" "+i,e.style.position="sticky";let t=null!==(v=n.actualWidth)&&void 0!==v?v:0,r=null;if(null===u&&(r=getComputedStyle(e),u=r.boxSizing),"content-box"===u&&(null===r&&(r=getComputedStyle(e)),t+=(parseFloat(r.paddingLeft)||0)+(parseFloat(r.paddingRight)||0)+(parseFloat(r.borderLeftWidth)||0)+(parseFloat(r.borderRightWidth)||0)),"start"===n.sticky){const r=n.stickyPos={direction:"start",absDirection:l?"right":"left",offset:a};e.style[r.absDirection]=a+"px",a+=t,m.length=0,f=[e],c.push(f)}else{const r=n.stickyPos={direction:"end",absDirection:l?"left":"right",offset:d};e.style[r.absDirection]=d+s+"px",d+=t,h.push([e,...m]),m.length=0}}else delete n.stickyPos,null!==(p=f)&&void 0!==p&&p.push(e),null!=m&&m.push(e),"sticky"===e.style.position&&(e.classList.remove(i),e.style.position="",e.style.left="",e.style.right="")}r.stickiesStart=c,r.stickiesEnd=h,gi(e)}function gi(e){const t=e._p;if(!t.table||!t.headerRow||!t.tbody)return;const r=t.stickiesStart,n=t.stickiesEnd,i=t.stickiesSetStart,o=t.stickiesSetEnd,l=t.stickiesSetStart=new Set,s=t.stickiesSetEnd=new Set;if(null!=r&&r.length||null!=n&&n.length){const e=t.table.scrollLeft;if(e===t.lastStickyScrollLeft)return;t.lastStickyScrollLeft=e;const i=t.headerRow.children,o=1.5,a=t.lastIsRtl,d=(e,t,r)=>{if(e&&e.length)for(const n of e){const e=n[0],l=n.slice(1),s=l[0],d=l[l.length-1];if(!e||!e.getBoundingClientRect)continue;const u=e.getBoundingClientRect(),c=t!==a;let h=!1;if(s&&d){const e=s.getBoundingClientRect(),r=d.getBoundingClientRect();h=t?a?u.right-o>r.left&&u.left+o<e.right:u.right-o>e.left&&u.left+o<r.right:a?u.left+o<e.right&&u.right-o>r.left:u.left+o<r.right&&u.right-o>e.left}e.classList.toggle(c?"is-sticky-left":"is-sticky-right",h),h&&r.add(ui.call(i,e))}};d(r,!0,l),d(n,!1,s)}const a=[],d=[];for(const e of l)(null==i?void 0:i.has(e))||a.push({index:e,start:!0});for(const e of s)(null==o?void 0:o.has(e))||a.push({index:e,start:!1});if(i)for(const e of i)l.has(e)||d.push({index:e,start:!0});if(o)for(const e of o)s.has(e)||d.push({index:e,start:!1});if(!a.length&&!d.length)return;let u=t.tbody.firstElementChild;for(;u;){const e=u.children;for(const r of d){var c;null===(c=e[r.index])||void 0===c||c.classList.remove(r.start!==t.lastIsRtl?"is-sticky-left":"is-sticky-right")}for(const r of a){var h;null===(h=e[r.index])||void 0===h||h.classList.add(r.start!==t.lastIsRtl?"is-sticky-left":"is-sticky-right")}u=u.nextElementSibling}t.isStickyColumns=new Map;for(const e of l)t.isStickyColumns.set(e,"start");for(const e of s)t.isStickyColumns.set(e,"end")}function bi(e,t){const r=e._p,n=e._o;if(!r.headerRow||!r.tbody)return e;const i=r.headerRow.querySelectorAll(`div.${n.tableClassName}-header-cell`)[t];if(!i)return e;const o=r.columns.get(i.columnName);if(o){i.style.width=(o.actualWidthConsideringScrollbarWidth||o.actualWidth||0)+"px";const e=(o.actualWidthConsideringScrollbarWidth||o.actualWidth||0)+"px",n=r.tbody.childNodes;for(let r=0,i=n.length;r<i;r++){const i=n[r];1===i.nodeType&&(i.childNodes[t].style.width=e)}}return e}function Ci(e){const t=e._p,r=e._o;if(t.table&&t.headerRow){const e=r.tableClassName,i=hn(t.headerRow,`>div.${e}-header-cell.sorted`),o=Array.prototype.slice.call(i,0).map(e=>e.querySelector(":scope>div>.sort-arrow")).filter(e=>!!e);for(const e of o){var n;const r=null===(n=e.parentNode)||void 0===n?void 0:n.parentNode;if(r){const e=t.columns.get(r.columnName);e&&(e.arrowProposedWidth=0)}e.remove()}for(const e of i)e.classList.remove("sorted","desc")}return e}function wi(e,t,r){var n;const i=e._p,o=e._o,l=i.columns.get(t);if(!l)return!1;const s=ci("span");return s.className="sort-arrow",l.element&&(l.element.className+=r?" sorted desc":" sorted",null!==(n=l.element.firstChild)&&void 0!==n&&n.insertBefore(s,l.element.firstChild.firstChild)),2!==l.widthMode&&o.adjustColumnWidthForSortArrow&&(l.arrowProposedWidth=s.scrollWidth+(parseFloat(getComputedStyle(s).marginRight)||0)+(parseFloat(getComputedStyle(s).marginLeft)||0)),!0}function yi(e,t){const r=t.firstChild;t.addEventListener("mousedown",t=>ii(e,t)),t.addEventListener("mousemove",t=>si(e,t)),t.addEventListener("mouseup",t=>function(e,t){2===t.button&&ai(e,t)}(e,t)),t.addEventListener("mouseleave",t=>function(e,t){const r=e._o,n=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);n&&(n.style.cursor="")}(e,t)),t.addEventListener("touchstart",t=>function(e,t){const r=e._p;if(r.currentTouchId)return;const n=t.changedTouches[0];r.currentTouchId=n.identifier;const i=t.currentTarget,o={x:n.pageX,y:n.pageY};let l,s=o;const a=function(){r.currentTouchId=null,r.eventsSink.remove(i,".colheader"),clearTimeout(l)};t[Mn]=t.changedTouches[0],ii(e,t),l=setTimeout(()=>{a(),r.eventsSink.add(i,"touchend.colheader",e=>{qn(e)||e.preventDefault(),r.eventsSink.remove(i,".colheader")},{once:!0}).add(i,"touchcancel.colheader",e=>{r.eventsSink.remove(i,".colheader")},{once:!0}),Math.sqrt(Math.pow(Math.abs(s.x-o.x),2)+Math.pow(Math.abs(s.y-o.y),2))<9&&(ni(e),ai(e,t))},500),r.eventsSink.add(i,"touchend.colheader",t=>{const n=t,i=Nn(Array.from(n.changedTouches),e=>e.identifier===r.currentTouchId);i&&(a(),qn(t)||t.preventDefault(),s={x:i.pageX,y:i.pageY},(Math.sqrt(Math.pow(Math.abs(s.x-o.x),2)+Math.pow(Math.abs(s.y-o.y),2))<9||r.resizer)&&(n[Mn]=i,di(e,n)))}).add(i,"touchcancel.colheader",a).add(i,"touchmove.colheader",t=>{const n=t,i=Nn(Array.from(n.changedTouches),e=>e.identifier===r.currentTouchId);i&&(s={x:i.pageX,y:i.pageY},r.resizer&&(t.preventDefault(),n[Mn]=i,si(e,n)))})}(e,t)),t.addEventListener("dragstart",t=>function(e,t){const r=e._o,n=e._p;if(r.movableColumns){var i;const e=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!e)return void t.preventDefault();const o=n.columns.get(e.columnName);o&&o.movable?(e.style.opacity="0.35",n.dragId=161061273*Math.random(),null===(i=t.dataTransfer)||void 0===i||i.setData("text",JSON.stringify({dragId:n.dragId,column:o.name}))):t.preventDefault()}else t.preventDefault()}(e,t)),t.addEventListener("click",t=>di(e,t)),t.addEventListener("contextmenu",e=>e.preventDefault()),r.addEventListener("dragenter",t=>function(e,t){const r=e._o,n=e._p;if(r.movableColumns){var i;let e=null;const o=null===(i=t.dataTransfer)||void 0===i?void 0:i.getData("text");if(o)try{e=JSON.parse(o)}catch{e=null}const l=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!l)return;if(!e||n.dragId===e.dragId&&l.columnName!==e.column){const e=n.columns.get(l.columnName);e&&(e.movable||e!==n.visibleColumns[0])&&l.classList.add("drag-over")}}}(e,t)),r.addEventListener("dragover",e=>{e.preventDefault()}),r.addEventListener("dragleave",t=>function(e,t){const r=e._o,n=t.target.closest(`div.${r.tableClassName}-header-cell,div.${r.cellPreviewClassName}`);if(!n)return;const i=t.relatedTarget;(null==i?void 0:i.contains(n.firstChild))||n.classList.remove("drag-over")}(e,t)),r.addEventListener("drop",t=>function(e,t,r){t.preventDefault();const n=e._o,i=e._p,o=null===(r=t.dataTransfer)||void 0===r?void 0:r.getData("text");if(!o)return;let l;try{l=JSON.parse(o)}catch{return}const s=t.target.closest(`div.${n.tableClassName}-header-cell,div.${n.cellPreviewClassName}`);if(s){if(n.movableColumns&&l.dragId===i.dragId){const t=l.column,r=s.columnName,n=i.columns.get(t),o=i.columns.get(r);n&&o&&n.movable&&(o.movable||o!==i.visibleColumns[0])&&e.moveColumn(t,r)}s.classList.remove("drag-over")}}(e,t))}function _i(e,t){let r=Math.max(0,parseFloat(e)||0),n=0;return r>0&&(e===r+"%"?(n=2,r/=100):r>0&&r<1?n=2:(r<t&&(r=t),n=1)),{width:r,mode:n}}function Wi(e,t){var r;let n=_i(t.width,t.ignoreMin?0:e.minColumnWidth),i={name:t.name,label:void 0===t.label?t.name:t.label,width:n.width,widthMode:n.mode,resizable:void 0===t.resizable||t.resizable,sortable:void 0===t.sortable||t.sortable,movable:void 0===t.movable||t.movable,visible:void 0===t.visible||t.visible,cellClasses:void 0===t.cellClasses?e.cellClasses:t.cellClasses,ignoreMin:void 0!==t.ignoreMin&&!!t.ignoreMin,sticky:void 0===t.sticky?null:t.sticky||null,allowPreview:!(null!==(r=t.allowPreview)&&void 0!==r&&!r),dataPath:[],comparePath:[],order:0};const o=void 0===t.dataPath?i.name:t.dataPath,l=void 0===t.comparePath?o:t.comparePath;return i.dataPath="string"==typeof o?o.split("."):o,i.comparePath="string"==typeof l?l.split("."):l,i}function Si(e){const t=e._p;0===t.visibleColumns.length&&t.columns.length&&(t.columns[0].visible=!0,t.visibleColumns.push(t.columns[0]),e.emit("showcolumn",t.columns[0].name))}function xi(e){const t=e._p;if(t.filteredRows&&t.filterArgs){let r=e._o.filter||Bn;t.filteredRows=t.rows.filteredCollection(r,t.filterArgs)}}function Ii(e,t,r){let n=r.dataPath,i=t[n[0]];for(let e=1;e<n.length&&null!=i;e++)i=i&&i[n[e]];const o=e.cellFormatter;let l;if(o[Pn])l=o(i,r.name,t);else try{l=o(i,r.name,t)}catch(e){l="[ERROR]",console.error("Failed to generate content for cell "+r.name,e)}return null==l&&(l=""),l}const Ri=Array.prototype.indexOf,Ni=document.createElement.bind(document);function Ei(e){const t=e._p;if(t.cellPreviewCell){var r;const n=t.cellPreviewCell,i=n[Hn];let o;try{o=ei.saveSelection(n)}catch{}t.cellPreviewCell.remove(),i&&t._unbindCellHoverOut(i),t._unbindCellHoverOut(n);try{o&&i&&ei.restoreSelection(i,o)}catch{}e.emit("cellpreviewdestroy",{el:n.firstChild,name:n.columnName,rowIndex:null!==(r=n.rowIndex)&&void 0!==r?r:null,rowData:null==n.rowIndex?null:t.rows[n.rowIndex],cell:i,cellEl:null==i?void 0:i.firstChild}),i&&delete i[Tn],delete n[Hn],t.cellPreviewCell=null,t.abortCellPreview=!1}else t.abortCellPreview=!0;return e}const Pi=Object.prototype.hasOwnProperty;class Fi{constructor(e){var t,r;this.VERSION=Fi.VERSION;const n=this._o={},i=this._p={eventsSink:new fn,mitt:{all:o=o||new Map,on:function(e,t){var r=o.get(e);r?r.push(t):o.set(e,[t])},off:function(e,t){var r=o.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):o.set(e,[]))},emit:function(e,t){var r=o.get(e);r&&r.slice().map(function(e){e(t)}),(r=o.get("*"))&&r.slice().map(function(r){r(e,t)})}},tableSkeletonNeedsRendering:!0};var o;this.el=e.el&&e.el instanceof HTMLElement?e.el:document.createElement("div"),this.el!==e.el&&this.el.classList.add(e.className||"dgtable-wrapper"),i.eventsSink.add(this.el,"dragend.colresize",e=>{return t=e,void(this._p.resizer||(t.target.style.opacity=""));var t}),n.virtualTable=void 0===e.virtualTable||!!e.virtualTable,n.estimatedRowHeight=e.estimatedRowHeight||void 0,n.rowsBufferSize=e.rowsBufferSize||3,n.minColumnWidth=Math.max(e.minColumnWidth||35,0),n.resizeAreaWidth=e.resizeAreaWidth||8,n.resizableColumns=void 0===e.resizableColumns||!!e.resizableColumns,n.movableColumns=void 0===e.movableColumns||!!e.movableColumns;const l=null!==(t=e.maxColumnsSortCount)&&void 0!==t?t:e.sortableColumns;n.sortableColumns=void 0===l?1:Number(l)||1,n.adjustColumnWidthForSortArrow=void 0===e.adjustColumnWidthForSortArrow||!!e.adjustColumnWidthForSortArrow,n.convertColumnWidthsToRelative=void 0!==e.convertColumnWidthsToRelative&&!!e.convertColumnWidthsToRelative,n.autoFillTableWidth=void 0!==e.autoFillTableWidth&&!!e.autoFillTableWidth,n.allowCancelSort=void 0===e.allowCancelSort||!!e.allowCancelSort,n.cellClasses=void 0===e.cellClasses?"":e.cellClasses,n.resizerClassName=void 0===e.resizerClassName?"dgtable-resize":e.resizerClassName,n.tableClassName=void 0===e.tableClassName?"dgtable":e.tableClassName,n.allowCellPreview=void 0===e.allowCellPreview||e.allowCellPreview,n.allowHeaderCellPreview=void 0===e.allowHeaderCellPreview||e.allowHeaderCellPreview,n.cellPreviewClassName=void 0===e.cellPreviewClassName?"dgtable-cell-preview":e.cellPreviewClassName,n.cellPreviewAutoBackground=void 0===e.cellPreviewAutoBackground||e.cellPreviewAutoBackground,n.onComparatorRequired=void 0===e.onComparatorRequired?null:e.onComparatorRequired,n.customSortingProvider=void 0===e.customSortingProvider?null:e.customSortingProvider,n.width=void 0===e.width?Vn.NONE:e.width,n.relativeWidthGrowsToFillWidth=void 0===e.relativeWidthGrowsToFillWidth||!!e.relativeWidthGrowsToFillWidth,n.relativeWidthShrinksToFillWidth=void 0!==e.relativeWidthShrinksToFillWidth&&!!e.relativeWidthShrinksToFillWidth,this.setCellFormatter(e.cellFormatter),this.setHeaderCellFormatter(e.headerCellFormatter),this.setFilter(e.filter),n.height=e.height,this.setColumns(e.columns||[],!1);let s=[];const a=null!==(r=e.sortedColumns)&&void 0!==r?r:e.sortColumn;if(a){let e=Array.isArray(a)?a:[a];for(let t=0,r=e.length;t<r;t++){var d;let r=e[t];"string"==typeof r&&(r={column:r,descending:!1});let n=i.columns.get(r.column);n&&s.push({column:r.column,comparePath:n.comparePath||n.dataPath,descending:null!==(d=r.descending)&&void 0!==d&&d})}}i.rows=new zn({sortColumn:s}),i.rows.onComparatorRequired=(e,t,r)=>{if(n.onComparatorRequired)return n.onComparatorRequired(e,t,r)},i.rows.customSortingProvider=(e,t)=>n.customSortingProvider?n.customSortingProvider(e,t):t(e),i.filteredRows=null,i.scrollbarWidth=0,i._lastVirtualScrollHeight=0,function(e){const t=e._p,r=t=>{let r=t.currentTarget,n=t.relatedTarget;n===r||r.contains(n)||r[Tn]&&(n===r[Tn]||r[Tn].contains(n))||function(e,t,r,n){const i=e._o,o=e._p,l=t.firstElementChild;if(!l)return;if(!(l.scrollWidth-l.clientWidth>1||l.scrollHeight-l.clientHeight>1))return;Ei(e),o.abortCellPreview=!1;const s=t.parentElement;if(!s)return;const a=null===(r=o.visibleColumns[Ri.call(s.childNodes,t)])||void 0===r?void 0:r.name,d=a?o.columns.get(a):null;if(!d||!1===d.allowPreview)return;const u=Ni("div");u.innerHTML=t.innerHTML,u.className=i.cellPreviewClassName;const c=t.classList.contains(`${i.tableClassName}-header-cell`);c&&(u.classList.add("header"),t.classList.contains("sortable")&&u.classList.add("sortable"),u.draggable=!0,yi(e,u));const h=getComputedStyle(t),f=getComputedStyle(l),m="right"===h.float,p=m?"right":"left",v=parseFloat(h.paddingLeft)||0,g=parseFloat(h.paddingRight)||0,b=parseFloat(h.paddingTop)||0,C=parseFloat(h.paddingBottom)||0;let w=l.scrollWidth+(t.clientWidth-l.offsetWidth);const y="border-box"===h.boxSizing;if(y?u.style.boxSizing="border-box":(w-=v+g,u.style.marginTop=(parseFloat(h.borderTopWidth)||0)+"px"),!o.transparentBgColor1){const e=document.createElement("div");document.body.appendChild(e),e.style.backgroundColor="transparent",o.transparentBgColor1=getComputedStyle(e).backgroundColor,e.style.backgroundColor="rgba(0,0,0,0)",o.transparentBgColor2=getComputedStyle(e).backgroundColor,e.remove()}const _={"box-sizing":y?"border-box":"content-box",width:w+"px","min-height":Math.max(ln(t),/%/.test(h.minHeight)?0:parseFloat(h.minHeight)||0)+"px","padding-left":v+"px","padding-right":g+"px","padding-top":b+"px","padding-bottom":C+"px",overflow:"hidden",position:"absolute","z-index":"-1",[p]:"0",top:"0",cursor:h.cursor};let W=h.backgroundColor;W!==o.transparentBgColor1&&W!==o.transparentBgColor2||(W=getComputedStyle(s).backgroundColor),W!==o.transparentBgColor1&&W!==o.transparentBgColor2||(W="#fff"),_["background-color"]=W,rn(u,_),u.firstChild&&rn(u.firstChild,{direction:f.direction,"white-space":f.whiteSpace,"min-height":f.minHeight,"line-height":f.lineHeight,font:f.font}),e.el.appendChild(u),c&&Yn(u),u.rowVIndex=s.vIndex;const S=u.rowIndex=s.index;u.columnName=a;try{const e=ei.saveSelection(t);e&&ei.restoreSelection(u,e)}catch{}if(e.emit("cellpreview",{el:u.firstElementChild,name:u.columnName,rowIndex:null!=S?S:null,rowData:null==S?null:o.rows[S],cell:t,cellEl:l}),o.abortCellPreview)return void u.remove();null!=S&&u.addEventListener("click",t=>{e.emit("rowclick",{event:t,filteredRowIndex:s.vIndex,rowIndex:S,rowEl:s,rowData:o.rows[S]})});const x=e.el,I=x===window?document:x,R=getComputedStyle(x),N=un(t),E=un(x);if(m){const e=window.innerWidth;N.right=e-(N.left+on(t,!0,!0,!0)),E.right=e-(E.left+on(x,!0,!0,!0))}N.left-=parseFloat(R.borderLeftWidth)||0,"right"===p&&void 0!==N.right&&void 0!==E.right&&(N.right-=parseFloat(R.borderRightWidth)||0),N.top-=parseFloat(R.borderTopWidth)||0,"left"===p?N.left+=parseFloat(h.borderLeftWidth)||0:void 0!==N.right&&(N.right+=parseFloat(h.borderRightWidth)||0),N.top+=parseFloat(h.borderTopWidth)||parseFloat(h.borderBottomWidth)||0,N.left-=E.left,"right"===p&&void 0!==N.right&&void 0!==E.right&&(N.right-=E.right),N.top-=E.top;const P=on(x,!1,!1,!1)-on(u,!0,!0,!0),F="left"===p?N.left:null!==(n=N.right)&&void 0!==n?n:0,k=F<0?0:F>P?P:F;"left"===p?N.left=k:N.right=k;const L=ln(t,!0,!0,!0),T=("scrollTop"in I?I.scrollTop:0)+ln(x,!0)-L;N.top>T&&(N.top=Math.max(0,T));const H={top:N.top+"px","z-index":9999};H[p]=("left"===p?N.left:N.right)+"px",rn(u,H),u[Hn]=t,o.cellPreviewCell=u,t[Tn]=u,o._bindCellHoverOut(t),o._bindCellHoverOut(u),u.addEventListener("wheel",()=>{Ei(e)})}(e,r)},n=t=>{let r=t.currentTarget[Hn]||t.currentTarget,n=t.relatedTarget;n===e.el||r.contains(n)||r[Tn]&&(n===r[Tn]||r[Tn].contains(n))||function(e){Ei(e)}(e)};t._bindCellHoverIn=e=>{e[Fn]||e.addEventListener("mouseover",e[Fn]=r)},t._unbindCellHoverIn=e=>{e[Fn]&&(e.removeEventListener("mouseover",e[Fn]),e[Fn]=null)},t._bindCellHoverOut=e=>{e[kn]||e.addEventListener("mouseout",e[kn]=n)},t._unbindCellHoverOut=e=>{e[kn]&&(e.removeEventListener("mouseout",e[kn]),e[kn]=null)}}(this)}on(e,t){return this[An]||this._p.mitt.on(e,t),this}once(e,t){if(this[An])return this;const r=n=>{this._p.mitt.off(e,r),t(n)};return this._p.mitt.on(e,r),this}off(e,t){return this[An]||(e||t?this._p.mitt.off(e,t):this._p.mitt.all.clear()),this}emit(e,t){return this[An]||this._p.mitt.emit(e,t),this}destroy(){var e,t,r;const n=this._p,i=this.el;if(this[An]||!n)return this;if(n.resizer&&(n.resizer.remove(),n.resizer=null),null!==(e=n.virtualListHelper)&&void 0!==e&&e.destroy(),n.virtualListHelper=null,hi(this),null!==(t=n.table)&&void 0!==t&&t.remove(),null!==(r=n.tbody)&&void 0!==r&&r.remove(),n.workerListeners){for(let e=0;e<n.workerListeners.length;e++){let t=n.workerListeners[e];t.worker.removeEventListener("message",t.listener,!1)}n.workerListeners.length=0}n.rows.length=n.columns.length=0,n._deferredRender&&clearTimeout(n._deferredRender);for(let e in this)Pi.call(this,e)&&(this[e]=null);return this[An]=!0,i&&i.remove(),this}close(){this.destroy()}remove(){this.destroy()}render(){const e=this._o,t=this._p;if(!this.el.offsetParent)return t._deferredRender||(t._deferredRender=setTimeout(()=>{t._deferredRender=null,!this[An]&&this.el.offsetParent&&this.render()})),this;if(!0===t.tableSkeletonNeedsRendering){var r;t.tableSkeletonNeedsRendering=!1,e.width===Vn.AUTO&&Ci(this);let o=t.table&&t.table.parentNode?t.table.scrollTop:NaN,l=t.table&&t.table.parentNode?(n=t.table,void 0===i&&(i="rtl"===getComputedStyle(n).direction),i?n.scrollWidth-n.clientWidth-en(n,i):en(n,i)):NaN;!function(e,t){const r=e._p,n=e._o;null!==(t=r.virtualListHelper)&&void 0!==t&&t.destroy(),r.virtualListHelper=null,r.table&&n.virtualTable&&(r.table.remove(),r.table=void 0,r.tbody=void 0),hi(e),r.currentTouchId=null,r.header&&r.header.remove();const i=n.tableClassName,o=ci("div"),l=ci("div");o.className=`${i}-header`,l.className=`${i}-header-row`,r.header=o,r.headerRow=l,o.appendChild(l),e.el.prepend(o),Un(e.el),n.width===Vn.SCROLL?e.el.style.overflow="hidden":e.el.style.overflow="",!n.height&&n.virtualTable&&(n.height=ln(e.el,!0))}(this),function(e){const t=e._p,r=e._o,n=r.tableClassName;if(r.virtualTable&&!t.virtualRowHeight){const r=()=>{const e=ci("div"),t=e.appendChild(ci("div")),r=t.appendChild(ci("div"));return e.className=`${n}-row`,t.className=`${n}-cell`,r.innerHTML="0",e.style.visibility="hidden",e.style.position="absolute",e},i=ci("div");i.className=e.el.className,rn(i,{"z-index":"-1",position:"absolute",left:"0",top:"-9999px",width:"1px",overflow:"hidden"});const o=ci("div");o.className=n,i.appendChild(o);const l=ci("div");l.className=`${n}-body`,l.style.width="99999px",o.appendChild(l),document.body.appendChild(i);const s=r(),a=r(),d=r();l.appendChild(s),l.appendChild(a),l.appendChild(d),t.virtualRowHeight=ln(a,!0,!0,!0),i.remove()}if(!t.table){var i;const o=document.createDocumentFragment(),l=ci("div");l.className=n,r.virtualTable&&(l.className+=" virtual");const s=getComputedStyle(l);let a=(null!==(i=r.height)&&void 0!==i?i:0)-ln(t.header,!0,!0,!0);"border-box"!==s.boxSizing&&(a-=parseFloat(s.borderTopWidth)||0,a-=parseFloat(s.borderBottomWidth)||0,a-=parseFloat(s.paddingTop)||0,a-=parseFloat(s.paddingBottom)||0),rn(l,{height:r.height?a+"px":"auto",display:"block",overflowY:"auto",overflowX:r.width===Vn.SCROLL?"auto":"hidden"}),o.appendChild(l);const d=ci("div");d.className=r.tableClassName+"-body",d.style.minHeight="1px",t.table=l,t.tbody=d,Un(d),Un(l),l.appendChild(d),e.el.appendChild(o),function(e,t){const r=e._p,n=e._o,i=n.tableClassName,o=i+"-row",l=i+"-row-alt",s=i+"-cell",a=i+"-sticky";let d=r.visibleColumns,u=d.length;r.notifyRendererOfColumnsConfig=()=>{d=r.visibleColumns,u=d.length;for(let e=0;e<u;e++){const t=d[e];t._finalWidth=t.actualWidthConsideringScrollbarWidth||t.actualWidth}},r.virtualListHelper=new Cn({list:r.table,itemsParent:r.tbody,autoVirtualWrapperWidth:!1,virtual:n.virtualTable,buffer:n.rowsBufferSize,estimatedItemHeight:n.estimatedRowHeight?n.estimatedRowHeight:r.virtualRowHeight||40,itemElementCreatorFn:()=>ci("div"),onItemRender:(t,i)=>{const c=r.filteredRows||r.rows,h=!!r.filteredRows,f=n.allowCellPreview,m=r.isStickyColumns;t.className=o,i%2==1&&(t.className+=" "+l);const p=c[i],v=h?p[On]:i;t.vIndex=i,t.index=v;for(let e=0;e<u;e++){var g;const i=d[e],o=ci("div");if(o.columnName=i.name,o.setAttribute("data-column",i.name),o.className=s,o.style.width=(null!==(g=i._finalWidth)&&void 0!==g?g:0)+"px",i.cellClasses&&(o.className+=" "+i.cellClasses),i.stickyPos){o.className+=" "+a,o.style.position="sticky",o.style[i.stickyPos.absDirection]=i.stickyPos.offset+"px";const t=null==m?void 0:m.get(e);"start"===t&&!r.lastIsRtl||"end"===t&&r.lastIsRtl?o.classList.add("is-sticky-left"):("start"===t&&r.lastIsRtl||"end"===t&&!r.lastIsRtl)&&o.classList.add("is-sticky-right")}f&&r._bindCellHoverIn(o),o.appendChild(ci("div")).innerHTML=Ii(n,p,i),t.appendChild(o)}t.addEventListener("click",t[Ln]=r=>{e.emit("rowclick",{event:r,filteredRowIndex:i,rowIndex:v,rowEl:t,rowData:p})}),e.emit("rowcreate",{filteredRowIndex:i,rowIndex:v,rowEl:t,rowData:p})},onItemUnrender:t=>{t[Ln]&&t.removeEventListener("click",t[Ln]),function(e,t){const r=e._p;for(let e=0,n=t.childNodes,i=n.length;e<i;e++)r._unbindCellHoverIn(n[e])}(e,t),e.emit("rowdestroy",t)},onScrollHeightChange:t=>{t>r._lastVirtualScrollHeight&&!r.scrollbarWidth&&mi(e),r._lastVirtualScrollHeight=t}}),r.virtualListHelper.setCount((null!==(t=r.filteredRows)&&void 0!==t?t:r.rows).length),r.notifyRendererOfColumnsConfig()}(e)}}(this),this.tableWidthChanged(!0,!1),function(e){const t=e._p,r=e._o,n=r.allowCellPreview,i=r.allowHeaderCellPreview,o=r.tableClassName+"-header-cell",l=t.headerRow;for(let a=0;a<t.visibleColumns.length;a++){const d=t.visibleColumns[a];if(d.visible){var s;const u=ci("div");u.draggable=!0,u.className=o,u.style.width=(null!==(s=d.actualWidth)&&void 0!==s?s:0)+"px",r.sortableColumns&&d.sortable&&(u.className+=" sortable"),u.columnName=d.name,u.setAttribute("data-column",d.name);const c=ci("div");c.innerHTML=r.headerCellFormatter(d.label,d.name),u.appendChild(c),n&&i&&t._bindCellHoverIn(u),l.appendChild(u),t.visibleColumns[a].element=u,yi(e,u),Yn(u)}}vi(e),e.emit("headerrowcreate",l)}(this),t.virtualListHelper.setCount((null!==(r=t.filteredRows)&&void 0!==r?r:t.rows).length),fi(this),mi(this,!0),pi(this,!0);for(let e=0;e<t.rows.sortColumn.length;e++)wi(this,t.rows.sortColumn[e].column,t.rows.sortColumn[e].descending);e.adjustColumnWidthForSortArrow&&t.rows.sortColumn.length?this.tableWidthChanged(!0):e.virtualTable||this.tableWidthChanged(),isNaN(o)||(t.table.scrollTop=o),isNaN(l)||(tn(t.table,l),tn(t.header,l)),this.emit("renderskeleton")}var n,i;return t.virtualListHelper.render(),this.emit("render"),this}clearAndRender(e){var t;let r=this._p;return r.tableSkeletonNeedsRendering=!0,null!==(t=r.notifyRendererOfColumnsConfig)&&void 0!==t&&t.call(r),(void 0===e||e)&&this.render(),this}setColumns(e,t){const r=this._p;e=e||[];let n=new jn;for(let t=0,r=0;t<e.length;t++){let i=e[t],o=Wi(this._o,i);void 0!==i.order?(i.order>r&&(r=i.order+1),o.order=i.order):o.order=r++,n.push(o)}return n.normalizeOrder(),r.columns=n,r.visibleColumns=n.getVisibleColumns(),Si(this),this.clearAndRender(t),this}addColumn(e,t,r){const n=this._p;let i=n.columns;if(e&&!i.get(e.name)){let o=null;void 0!==t&&(o="string"==typeof t?i.get(t):i.getByOrder(t));let l=Wi(this._o,e);l.order=o?o.order:i.getMaxOrder()+1;for(let e=i.getMaxOrder(),t=l.order;e>=t;e--){let t=i.getByOrder(e);t&&t.order++}i.push(l),i.normalizeOrder(),n.visibleColumns=i.getVisibleColumns(),Si(this),this.clearAndRender(r),this.emit("addcolumn",l.name)}return this}removeColumn(e,t){const r=this._p;let n=r.columns,i=n.indexOf(e);return i>-1&&(n.splice(i,1),n.normalizeOrder(),r.visibleColumns=n.getVisibleColumns(),Si(this),this.clearAndRender(t),this.emit("removecolumn",e)),this}setColumnLabel(e,t){let r=this._p.columns.get(e);if(r&&(r.label=void 0===t?r.name:t,r.element))for(let e=0;e<r.element.firstChild.childNodes.length;e++){let t=r.element.firstChild.childNodes[e];if(3===t.nodeType){t.textContent=r.label;break}}return this}moveColumn(e,t,r=!0){const n=this._o,i=this._p;let o,l,s=i.columns,a=r?i.visibleColumns:s.getColumns();if("string"==typeof e?o=s.get(e):"number"==typeof e&&(o=a[e]),"string"==typeof t?l=s.get(t):"number"==typeof t&&(l=a[t]),o&&l&&e!==t){let e=o.order,t=l.order,r=s.moveColumn(o,l).getVisibleColumns();if(i.visibleColumns.length!==r.length||i.visibleColumns.some((e,t)=>e!==r[t]))if(i.visibleColumns=r,Si(this),n.virtualTable)this.clearAndRender();else{var d,u;const r=hn(i.headerRow,`>div.${n.tableClassName}-header-cell`);let o=e<t?t+1:t,l=e;r[0].parentNode.insertBefore(r[l],r[o]);let s=i.visibleColumns[e],a=(null!==(d=s.actualWidthConsideringScrollbarWidth||s.actualWidth)&&void 0!==d?d:0)+"px",c=i.visibleColumns[t],h=(null!==(u=c.actualWidthConsideringScrollbarWidth||c.actualWidth)&&void 0!==u?u:0)+"px",f=i.tbody.childNodes;for(let r=0,n=f.length;r<n;r++){let n=f[r];1===n.nodeType&&(n.insertBefore(n.childNodes[l],n.childNodes[o]),n.childNodes[t].firstChild.style.width=h,n.childNodes[e].firstChild.style.width=a)}}this.emit("movecolumn",{name:o.name,src:e,dest:t})}return this}setColumnVisible(e,t){const r=this._p;let n=r.columns.get(e);return t=!!t,n&&!!n.visible!==t&&(n.visible=t,r.visibleColumns=r.columns.getVisibleColumns(),this.emit(t?"showcolumn":"hidecolumn",e),Si(this),this.clearAndRender()),this}isColumnVisible(e){let t=this._p.columns.get(e);return!!t&&t.visible}setMinColumnWidth(e){let t=this._o;return e=Math.max(e,0),t.minColumnWidth!==e&&(t.minColumnWidth=e,this.tableWidthChanged(!0)),this}getMinColumnWidth(){return this._o.minColumnWidth}setColumnWidth(e,t){let r=this._p.columns.get(e),n=_i(t,r.ignoreMin?0:this._o.minColumnWidth);if(r){let e=Zn(r);r.width=n.width,r.widthMode=n.mode,r.unconvertedWidth=null,r.unconvertedWidthMode=null;let t=Zn(r);e!==t&&this.tableWidthChanged(!0),this.emit("columnwidth",{name:r.name,width:t,oldWidth:e})}return this}getColumnWidth(e){let t=this._p.columns.get(e);return t?Zn(t):null}getColumnConfig(e){let t=this._p.columns.get(e);if(t){var r,n;const e=t.width,i=t.widthMode;null!=t.unconvertedWidth&&(t.width=t.unconvertedWidth,t.widthMode=t.unconvertedWidthMode);const o=Zn(t);return null!=t.unconvertedWidth&&(t.width=e,t.widthMode=i),{name:t.name,label:t.label,width:o,dataPath:null===(r=t.dataPath)||void 0===r?void 0:r.join("."),comparePath:null===(n=t.comparePath)||void 0===n?void 0:n.join("."),resizable:t.resizable,movable:t.movable,sortable:t.sortable,visible:t.visible,cellClasses:t.cellClasses,ignoreMin:t.ignoreMin,sticky:t.sticky,order:t.order}}return null}getColumnsConfig(){const e=this._p;let t={};for(let r=0;r<e.columns.length;r++)t[e.columns[r].name]=this.getColumnConfig(e.columns[r].name);return t}setMaxColumnSortCount(e){const t=this._p,r=this._o;if(r.sortableColumns!==e&&(r.sortableColumns=e,t.table)){const e=hn(t.headerRow,`>div.${r.tableClassName}-header-cell`);for(let n=0,i=e.length;n<i;n++)e[n].classList[r.sortableColumns>0&&t.visibleColumns[n].sortable?"add":"remove"]("sortable")}return this}getMaxColumnSortCount(){return this._o.sortableColumns}setSortableColumns(e){return this.setMaxColumnSortCount(e)}getSortableColumns(){return this.getMaxColumnSortCount()}setMovableColumns(e){let t=this._o;return e=void 0===e||!!e,t.movableColumns!==e&&(t.movableColumns=e),this}getMovableColumns(){return this._o.movableColumns}setResizableColumns(e){let t=this._o;return e=void 0===e||!!e,t.resizableColumns!==e&&(t.resizableColumns=e),this}getResizableColumns(){return this._o.resizableColumns}getConvertColumnWidthsToRelative(){return this._o.convertColumnWidthsToRelative}setConvertColumnWidthsToRelative(e,t=!0){let r=this._o;return e=!!e,r.convertColumnWidthsToRelative!==e&&(r.convertColumnWidthsToRelative=e,t&&this.tableWidthChanged(!0)),this}setOnComparatorRequired(e){let t=this._o;return t.onComparatorRequired!==e&&(t.onComparatorRequired=e),this}setCustomSortingProvider(e){let t=this._o;return t.customSortingProvider!==e&&(t.customSortingProvider=e),this}sort(e,t,r){const n=this._o,i=this._p;let o=i.columns.get(e),l=i.rows.sortColumn.map(e=>({column:e.column,descending:e.descending}));if(o){if(r){for(let e=0;e<l.length;e++)if(l[e].column===o.name){e<l.length-1?l.length=0:(t=l[l.length-1].descending,l.splice(l.length-1,1));break}(n.sortableColumns>0&&l.length>=n.sortableColumns||l.length>=i.visibleColumns.length)&&(l.length=0)}else l.length=0;t=void 0!==t&&t,l.push({column:o.name,descending:!!t})}else l.length=0;return this.setSortedColumns(l)}resort(){const e=this._p;let t=e.columns,r=e.rows.sortColumn;if(r.length){var n;for(let e=0;e<r.length;e++)t.get(r[e].column)||r.splice(e--,1);e.rows.sortColumn=r,r.length&&(e.rows.sort(),e.filteredRows&&e.filteredRows.sort()),null===(n=e.virtualListHelper)||void 0===n||n.invalidate();let i=[];for(let e=0;e<r.length;e++)i.push({column:r[e].column,descending:r[e].descending});this.emit("sort",{sorts:i,resort:!0})}return this}setSortedColumns(e,t={immediate:!0,render:!0}){var r;const n=this._o,i=this._p;let o=i.columns,l=e.filter(e=>o.get(e.column)).map(e=>{let t=o.get(e.column);return{column:t.name,comparePath:t.comparePath||t.dataPath,descending:!!e.descending}});n.sortableColumns>0&&l.length>n.sortableColumns&&(l.length=n.sortableColumns),Ci(this);for(let e=0;e<l.length;e++)wi(this,l[e].column,l[e].descending);n.adjustColumnWidthForSortArrow&&!i.tableSkeletonNeedsRendering&&this.tableWidthChanged(!0),i.rows.sortColumn=l,l.length&&t.immediate&&(i.rows.sort(),i.filteredRows&&i.filteredRows.sort(),null!==(r=i.virtualListHelper)&&void 0!==r&&r.invalidate(),i.virtualListHelper&&t.render&&i.virtualListHelper.render());let s=[];for(let e=0;e<l.length;e++)s.push({column:l[e].column,descending:l[e].descending});return this.emit("sort",{sorts:s}),this}getSortedColumns(){const e=this._p;let t=[];for(let r=0;r<e.rows.sortColumn.length;r++){let n=e.rows.sortColumn[r];t.push({column:n.column,descending:n.descending})}return t}setCellFormatter(e){if(!e){const t=e=>"string"==typeof e?En(e):e;t[Pn]=!0,e=t}return this._o.cellFormatter=e,this}setHeaderCellFormatter(e){return this._o.headerCellFormatter=e||function(e){return"string"==typeof e?En(e):e},this}setFilter(e){return this._o.filter=e,this}filter(e){const t=this._p;let r=this._o.filter||Bn;"string"==typeof arguments[0]&&"string"==typeof arguments[1]&&(e={column:arguments[0],keyword:arguments[1],caseSensitive:arguments[2]});let n=!!t.filteredRows;return t.filteredRows&&(t.filteredRows=null),t.filterArgs=null==e?null:"object"!=typeof e||Array.isArray(e)?e:Object.assign({},e),null!==t.filterArgs?(t.filteredRows=t.rows.filteredCollection(r,t.filterArgs),(n||t.filteredRows)&&(this.clearAndRender(),this.emit("filter",e))):(t.filterArgs=null,t.filteredRows=null,this.clearAndRender(),this.emit("filterclear",{})),this}clearFilter(){const e=this._p;return e.filteredRows&&(e.filterArgs=null,e.filteredRows=null,this.clearAndRender(),this.emit("filterclear",{})),this}getHtmlForRowCell(e,t){const r=this._p;if(e<0||e>r.rows.length-1)return null;let n=r.columns.get(t);if(!n)return null;let i=r.rows[e];return Ii(this._o,i,n)}getHtmlForRowDataCell(e,t){let r=this._p.columns.get(t);return r?Ii(this._o,e,r):null}getRowYPos(e){return this._p.virtualListHelper.getItemPosition(e)||null}getDataForRow(e){const t=this._p;return e<0||e>t.rows.length-1?null:t.rows[e]}getRowCount(){const e=this._p;return e.rows?e.rows.length:0}getIndexForRow(e){return this._p.rows.indexOf(e)}getFilteredRowCount(){const e=this._p;return(e.filteredRows||e.rows).length}getIndexForFilteredRow(e){const t=this._p;return(t.filteredRows||t.rows).indexOf(e)}getDataForFilteredRow(e){const t=this._p;return e<0||e>(t.filteredRows||t.rows).length-1?null:(t.filteredRows||t.rows)[e]}getHeaderRowElement(){return this._p.headerRow}addRows(e,t,r,n){let i=this._p;"boolean"==typeof t&&(n=r,r=t,t=-1),"number"!=typeof t&&(t=-1),(t<0||t>i.rows.length)&&(t=i.rows.length),n=void 0===n||!!n;const o=(Array.isArray(e)?e:[e]).length;return e&&(i.rows.add(e,t),i.filteredRows||r&&i.rows.sortColumn.length?(r&&i.rows.sortColumn.length?this.resort():xi(this),i.tableSkeletonNeedsRendering=!0,n&&this.render()):n&&(i.virtualListHelper.addItemsAt(o,t),this._o.virtualTable?(fi(this),mi(this),this.render(),pi(this,!1)):i.tbody&&(this.render(),mi(this),pi(this,!0))),this.emit("addrows",{count:o,clear:!1})),this}removeRows(e,t,r){let n=this._p;return"number"!=typeof t||t<=0||e<0||e>n.rows.length-1||(n.rows.splice(e,t),r=void 0===r||!!r,n.filteredRows?(xi(this),n.tableSkeletonNeedsRendering=!0,r&&this.render()):r&&(n.virtualListHelper.removeItemsAt(t,e),this._o.virtualTable?(fi(this),mi(this),this.render(),pi(this,!1)):(this.render(),mi(this),pi(this,!0)))),this}removeRow(e,t){return this.removeRows(e,1,t)}refreshRow(e,t=!0){let r=this._p;if(e<0||e>r.rows.length-1)return this;let n=-1;return r.filteredRows&&-1===(n=r.filteredRows.indexOf(r.rows[e]))||(-1===n&&(n=e),r.virtualListHelper.refreshItemAt(n),t&&r.virtualListHelper.render()),this}getRowElement(e){let t=this._p;if(e<0||e>t.rows.length-1)return null;let r=-1;return t.filteredRows&&-1===(r=t.filteredRows.indexOf(t.rows[e]))?null:(-1===r&&(r=e),t.virtualListHelper.getItemElementAt(r)||null)}refreshAllVirtualRows(){return this._p.virtualListHelper.invalidate().render(),this}setRows(e,t){let r=this._p;return r.rows.reset(e),t&&r.rows.sortColumn.length?this.resort():xi(this),this.clearAndRender().emit("addrows",{count:e.length,clear:!0}),this}tableWidthChanged(e,t){let r=this._o,n=this._p,i=Jn(this),o=i,l=0;if(!n.table)return this;t=void 0===t||t;let s=0;if(n.tbody||(t=!1),t&&(s=parseFloat(n.tbody.style.minWidth)||0),o!==n.lastDetectedWidth||e){var a;n.lastDetectedWidth=i;let e=0,d=[],u=0;for(let e=0;e<n.columns.length;e++)n.columns[e].actualWidthConsideringScrollbarWidth=null;for(let t=0;t<n.visibleColumns.length;t++){let i=n.visibleColumns[t];if(1===i.widthMode){let n=i.width;n+=i.arrowProposedWidth||0,!i.ignoreMin&&n<r.minColumnWidth&&(n=r.minColumnWidth),o-=n,e+=n,n!==i.actualWidth&&(i.actualWidth=n,d.push(t))}else if(0===i.widthMode){let n=Gn(this,i.label)+20;n+=i.arrowProposedWidth||0,!i.ignoreMin&&n<r.minColumnWidth&&(n=r.minColumnWidth),o-=n,e+=n,n!==i.actualWidth&&(i.actualWidth=n,r.convertColumnWidthsToRelative||d.push(t))}else 2===i.widthMode&&(u+=i.width,l++)}if(r.convertColumnWidthsToRelative)for(let t=0;t<n.visibleColumns.length;t++){let r=n.visibleColumns[t];0===r.widthMode&&(r.widthMode=2,null==r.unconvertedWidth&&(r.unconvertedWidth=r.width,r.unconvertedWidthMode=r.unconvertedWidth),o+=r.actualWidth,r.width=r.actualWidth/e,u+=r.width,l++)}if(l&&(u<1&&r.relativeWidthGrowsToFillWidth||u>1&&r.relativeWidthShrinksToFillWidth))for(let e=0;e<n.visibleColumns.length;e++){let t=n.visibleColumns[e];2===t.widthMode&&(t.width/=u)}let c=Math.max(0,o);0===c&&(c=n.table.clientWidth);let h=r.minColumnWidth/c;if(isNaN(h)&&(h=0),h>0){let e,t=0;for(let e=0;e<n.visibleColumns.length;e++){let r=n.visibleColumns[e];2===r.widthMode&&!r.ignoreMin&&r.width<h&&(t+=h-r.width,r.width=h)}for(let r=0;r<n.visibleColumns.length;r++){let i=n.visibleColumns[r];2===i.widthMode&&!i.ignoreMin&&i.width>h&&t>0&&(null==i.unconvertedWidth&&(i.unconvertedWidth=i.width,i.unconvertedWidthMode=i.widthMode),e=Math.min(t,i.width-h),i.width-=e,t-=e)}}if(r.autoFillTableWidth&&o>0){let e=0,t=o;for(let r=0;r<n.visibleColumns.length;r++){let i=n.visibleColumns[r];i.resizable||1!==i.widthMode||(e+=i.width),2===i.widthMode&&(t-=Math.round(c*i.width))}let r=(i-e)/(i-t-e)||NaN;for(let e=0;e<n.visibleColumns.length&&t>0;e++){let t=n.visibleColumns[e];if(t.resizable||1!==t.widthMode)if(2===t.widthMode)null==t.unconvertedWidth&&(t.unconvertedWidth=t.width,t.unconvertedWidthMode=t.widthMode),t.width*=r;else{let n=t.actualWidth*r;t.actualWidth!==n&&(t.actualWidth=n,-1===d.indexOf(e)&&d.push(e))}}}for(let e=0;e<n.visibleColumns.length;e++){let t=n.visibleColumns[e];if(2===t.widthMode){let r=Math.round(c*t.width);o-=r,l--,0===l&&1===o&&(r++,o--),-1===o&&(r--,o++),r!==t.actualWidth&&(t.actualWidth=r,d.push(e))}}if(n.visibleColumns.length&&(n.visibleColumns[n.visibleColumns.length-1].actualWidthConsideringScrollbarWidth=n.visibleColumns[n.visibleColumns.length-1].actualWidth-(n.scrollbarWidth||0)),null!==(a=n.notifyRendererOfColumnsConfig)&&void 0!==a&&a.call(n),vi(this),t){let e=Kn(this);s<e&&pi(this,!1);for(let e=0;e<d.length;e++)bi(this,d[e]);s>e&&pi(this,!1)}}return this}tableHeightChanged(){let e=this._o,t=this._p;if(!t.table)return this;const r=getComputedStyle(t.table);let n=ln(this.el,!0)-(parseFloat(r.borderTopWidth)||0)-(parseFloat(r.borderBottomWidth)||0);return n!==e.height&&(e.height=n,t.tbody&&(t.tbody.style.height=Math.max(e.height-ln(t.header,!0,!0,!0),1)+"px"),e.virtualTable&&this.clearAndRender()),this}hideCellPreview(){return Ei(this),this}abortCellPreview(){return this.hideCellPreview(),this}cancelColumnResize(){return ni(this),this}getUrlForElementContent(e){let t,r=document.getElementById(e);if(r){let e=r.textContent;if("function"==typeof Blob)t=new Blob([e||""]);else{const r=window,n=r.BlobBuilder||r.WebKitBlobBuilder||r.MozBlobBuilder||r.MSBlobBuilder;if(!n)return null;const i=new n;i.append(e||""),t=i.getBlob()}return(window.URL||window.webkitURL).createObjectURL(t)}return null}isWorkerSupported(){return window.Worker instanceof Function}createWebWorker(e,t,r){if(this.isWorkerSupported()){let n=this._p,i=new Worker(e),o=e=>{e.data.append?this.addRows(e.data.rows,r):this.setRows(e.data.rows,r)};return i.addEventListener("message",o,!1),n.workerListeners||(n.workerListeners=[]),n.workerListeners.push({worker:i,listener:o}),(t||void 0===t)&&i.postMessage(null),i}return null}unbindWebWorker(e){let t=this._p;if(t.workerListeners)for(let r=0;r<t.workerListeners.length;r++)t.workerListeners[r].worker===e&&(e.removeEventListener("message",t.workerListeners[r].listener,!1),t.workerListeners.splice(r,1),r--);return this}}Fi.VERSION="@@VERSION",Fi.Width=Vn;class ki extends Fi{constructor(t){super(t),this.$el=e(this.el).data("dgtable",this).on("remove",()=>this.destroy()),this.on("headerrowdestroy",()=>{var t;const r=null===(t=this._p)||void 0===t?void 0:t.headerRow;r&&e(r).find(`div.${this._o.tableClassName}-header-cell`).remove()})}destroy(){var t,r;return null!==(t=this._p)&&void 0!==t&&t.table&&e(this._p.table).empty(),null!==(r=this._p)&&void 0!==r&&r.tbody&&e(this._p.tbody).empty(),super.destroy()}}export{ki as default};
2
2
 
3
3
  //# sourceMappingURL=lib.es6.min.js.map