jquery.dgtable 0.5.59 → 0.6.0

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,7 +1,7 @@
1
1
  /*!
2
- * jquery.dgtable 0.5.59
2
+ * jquery.dgtable 0.6.0
3
3
  * git://github.com/danielgindi/jquery.dgtable.git
4
4
  */
5
- "use strict";var e=require("jquery"),t=require("@danielgindi/dom-utils/lib/ScrollHelper"),o=require("@danielgindi/dom-utils/lib/Css"),r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},l=function(e){return e&&e.Math==Math&&e},i=l("object"==typeof globalThis&&globalThis)||l("object"==typeof window&&window)||l("object"==typeof self&&self)||l("object"==typeof r&&r)||function(){return this}()||Function("return this")(),n={},s=function(e){try{return!!e()}catch(e){return!0}},a=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),d=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),u=d,h=Function.prototype.call,c=u?h.bind(h):function(){return h.apply(h,arguments)},p={},f={}.propertyIsEnumerable,m=Object.getOwnPropertyDescriptor,g=m&&!f.call({1:2},1);p.f=g?function(e){var t=m(this,e);return!!t&&t.enumerable}:f;var b,v,C=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},w=d,y=Function.prototype,_=y.call,R=w&&y.bind.bind(_,_),W=function(e){return w?R(e):function(){return _.apply(e,arguments)}},T=W,E=T({}.toString),S=T("".slice),N=function(e){return S(E(e),8,-1)},M=N,F=W,H=function(e){if("Function"===M(e))return F(e)},z=s,O=N,x=Object,A=H("".split),P=z((function(){return!x("z").propertyIsEnumerable(0)}))?function(e){return"String"==O(e)?A(e,""):x(e)}:x,$=function(e){return null==e},L=$,k=TypeError,I=function(e){if(L(e))throw k("Can't call method on "+e);return e},B=P,D=I,j=function(e){return B(D(e))},V="object"==typeof document&&document.all,U={all:V,IS_HTMLDDA:void 0===V&&void 0!==V},q=U.all,X=U.IS_HTMLDDA?function(e){return"function"==typeof e||e===q}:function(e){return"function"==typeof e},Y=X,G=U.all,J=U.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:Y(e)||e===G}:function(e){return"object"==typeof e?null!==e:Y(e)},K=i,Q=X,Z=function(e){return Q(e)?e:void 0},ee=function(e,t){return arguments.length<2?Z(K[e]):K[e]&&K[e][t]},te=H({}.isPrototypeOf),oe=ee("navigator","userAgent")||"",re=i,le=oe,ie=re.process,ne=re.Deno,se=ie&&ie.versions||ne&&ne.version,ae=se&&se.v8;ae&&(v=(b=ae.split("."))[0]>0&&b[0]<4?1:+(b[0]+b[1])),!v&&le&&(!(b=le.match(/Edge\/(\d+)/))||b[1]>=74)&&(b=le.match(/Chrome\/(\d+)/))&&(v=+b[1]);var de=v,ue=de,he=s,ce=!!Object.getOwnPropertySymbols&&!he((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ue&&ue<41})),pe=ce&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,fe=ee,me=X,ge=te,be=Object,ve=pe?function(e){return"symbol"==typeof e}:function(e){var t=fe("Symbol");return me(t)&&ge(t.prototype,be(e))},Ce=String,we=function(e){try{return Ce(e)}catch(e){return"Object"}},ye=X,_e=we,Re=TypeError,We=function(e){if(ye(e))return e;throw Re(_e(e)+" is not a function")},Te=We,Ee=$,Se=c,Ne=X,Me=J,Fe=TypeError,He={exports:{}},ze=i,Oe=Object.defineProperty,xe=function(e,t){try{Oe(ze,e,{value:t,configurable:!0,writable:!0})}catch(o){ze[e]=t}return t},Ae=xe,Pe=i["__core-js_shared__"]||Ae("__core-js_shared__",{}),$e=Pe;(He.exports=function(e,t){return $e[e]||($e[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.25.5",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE",source:"https://github.com/zloirock/core-js"});var Le=I,ke=Object,Ie=function(e){return ke(Le(e))},Be=Ie,De=H({}.hasOwnProperty),je=Object.hasOwn||function(e,t){return De(Be(e),t)},Ve=H,Ue=0,qe=Math.random(),Xe=Ve(1..toString),Ye=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Xe(++Ue+qe,36)},Ge=i,Je=He.exports,Ke=je,Qe=Ye,Ze=ce,et=pe,tt=Je("wks"),ot=Ge.Symbol,rt=ot&&ot.for,lt=et?ot:ot&&ot.withoutSetter||Qe,it=function(e){if(!Ke(tt,e)||!Ze&&"string"!=typeof tt[e]){var t="Symbol."+e;Ze&&Ke(ot,e)?tt[e]=ot[e]:tt[e]=et&&rt?rt(t):lt(t)}return tt[e]},nt=c,st=J,at=ve,dt=TypeError,ut=it("toPrimitive"),ht=function(e,t){if(!st(e)||at(e))return e;var o,r,l=(r=e[ut],Ee(r)?void 0:Te(r));if(l){if(void 0===t&&(t="default"),o=nt(l,e,t),!st(o)||at(o))return o;throw dt("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var o,r;if("string"===t&&Ne(o=e.toString)&&!Me(r=Se(o,e)))return r;if(Ne(o=e.valueOf)&&!Me(r=Se(o,e)))return r;if("string"!==t&&Ne(o=e.toString)&&!Me(r=Se(o,e)))return r;throw Fe("Can't convert object to primitive value")}(e,t)},ct=ve,pt=function(e){var t=ht(e,"string");return ct(t)?t:t+""},ft=J,mt=i.document,gt=ft(mt)&&ft(mt.createElement),bt=!a&&!s((function(){return 7!=Object.defineProperty((e="div",gt?mt.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),vt=a,Ct=c,wt=p,yt=C,_t=j,Rt=pt,Wt=je,Tt=bt,Et=Object.getOwnPropertyDescriptor;n.f=vt?Et:function(e,t){if(e=_t(e),t=Rt(t),Tt)try{return Et(e,t)}catch(e){}if(Wt(e,t))return yt(!Ct(wt.f,e,t),e[t])};var St={},Nt=a&&s((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Mt=J,Ft=String,Ht=TypeError,zt=function(e){if(Mt(e))return e;throw Ht(Ft(e)+" is not an object")},Ot=a,xt=bt,At=Nt,Pt=zt,$t=pt,Lt=TypeError,kt=Object.defineProperty,It=Object.getOwnPropertyDescriptor;St.f=Ot?At?function(e,t,o){if(Pt(e),t=$t(t),Pt(o),"function"==typeof e&&"prototype"===t&&"value"in o&&"writable"in o&&!o.writable){var r=It(e,t);r&&r.writable&&(e[t]=o.value,o={configurable:"configurable"in o?o.configurable:r.configurable,enumerable:"enumerable"in o?o.enumerable:r.enumerable,writable:!1})}return kt(e,t,o)}:kt:function(e,t,o){if(Pt(e),t=$t(t),Pt(o),xt)try{return kt(e,t,o)}catch(e){}if("get"in o||"set"in o)throw Lt("Accessors not supported");return"value"in o&&(e[t]=o.value),e};var Bt=St,Dt=C,jt=a?function(e,t,o){return Bt.f(e,t,Dt(1,o))}:function(e,t,o){return e[t]=o,e},Vt={exports:{}},Ut=a,qt=je,Xt=Function.prototype,Yt=Ut&&Object.getOwnPropertyDescriptor,Gt=qt(Xt,"name"),Jt={EXISTS:Gt,PROPER:Gt&&"something"===function(){}.name,CONFIGURABLE:Gt&&(!Ut||Ut&&Yt(Xt,"name").configurable)},Kt=X,Qt=Pe,Zt=H(Function.toString);Kt(Qt.inspectSource)||(Qt.inspectSource=function(e){return Zt(e)});var eo,to,oo,ro,lo=Qt.inspectSource,io=X,no=i.WeakMap,so=io(no)&&/native code/.test(String(no)),ao=He.exports,uo=Ye,ho=ao("keys"),co={},po=so,fo=i,mo=J,go=jt,bo=je,vo=Pe,Co=co,wo=fo.TypeError,yo=fo.WeakMap;if(po||vo.state){var _o=vo.state||(vo.state=new yo);_o.get=_o.get,_o.has=_o.has,_o.set=_o.set,eo=function(e,t){if(_o.has(e))throw wo("Object already initialized");return t.facade=e,_o.set(e,t),t},to=function(e){return _o.get(e)||{}},oo=function(e){return _o.has(e)}}else{var Ro=ho[ro="state"]||(ho[ro]=uo(ro));Co[Ro]=!0,eo=function(e,t){if(bo(e,Ro))throw wo("Object already initialized");return t.facade=e,go(e,Ro,t),t},to=function(e){return bo(e,Ro)?e[Ro]:{}},oo=function(e){return bo(e,Ro)}}var Wo={set:eo,get:to,has:oo,enforce:function(e){return oo(e)?to(e):eo(e,{})},getterFor:function(e){return function(t){var o;if(!mo(t)||(o=to(t)).type!==e)throw wo("Incompatible receiver, "+e+" required");return o}}},To=s,Eo=X,So=je,No=a,Mo=Jt.CONFIGURABLE,Fo=lo,Ho=Wo.enforce,zo=Wo.get,Oo=Object.defineProperty,xo=No&&!To((function(){return 8!==Oo((function(){}),"length",{value:8}).length})),Ao=String(String).split("String"),Po=Vt.exports=function(e,t,o){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),o&&o.getter&&(t="get "+t),o&&o.setter&&(t="set "+t),(!So(e,"name")||Mo&&e.name!==t)&&(No?Oo(e,"name",{value:t,configurable:!0}):e.name=t),xo&&o&&So(o,"arity")&&e.length!==o.arity&&Oo(e,"length",{value:o.arity});try{o&&So(o,"constructor")&&o.constructor?No&&Oo(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=Ho(e);return So(r,"source")||(r.source=Ao.join("string"==typeof t?t:"")),e};Function.prototype.toString=Po((function(){return Eo(this)&&zo(this).source||Fo(this)}),"toString");var $o=X,Lo=St,ko=Vt.exports,Io=xe,Bo={},Do=Math.ceil,jo=Math.floor,Vo=Math.trunc||function(e){var t=+e;return(t>0?jo:Do)(t)},Uo=function(e){var t=+e;return t!=t||0===t?0:Vo(t)},qo=Uo,Xo=Math.max,Yo=Math.min,Go=function(e,t){var o=qo(e);return o<0?Xo(o+t,0):Yo(o,t)},Jo=Uo,Ko=Math.min,Qo=function(e){return(t=e.length)>0?Ko(Jo(t),9007199254740991):0;var t},Zo=j,er=Go,tr=Qo,or=function(e){return function(t,o,r){var l,i=Zo(t),n=tr(i),s=er(r,n);if(e&&o!=o){for(;n>s;)if((l=i[s++])!=l)return!0}else for(;n>s;s++)if((e||s in i)&&i[s]===o)return e||s||0;return!e&&-1}},rr={includes:or(!0),indexOf:or(!1)},lr=je,ir=j,nr=rr.indexOf,sr=co,ar=H([].push),dr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");Bo.f=Object.getOwnPropertyNames||function(e){return function(e,t){var o,r=ir(e),l=0,i=[];for(o in r)!lr(sr,o)&&lr(r,o)&&ar(i,o);for(;t.length>l;)lr(r,o=t[l++])&&(~nr(i,o)||ar(i,o));return i}(e,dr)};var ur={};ur.f=Object.getOwnPropertySymbols;var hr=ee,cr=Bo,pr=ur,fr=zt,mr=H([].concat),gr=hr("Reflect","ownKeys")||function(e){var t=cr.f(fr(e)),o=pr.f;return o?mr(t,o(e)):t},br=je,vr=gr,Cr=n,wr=St,yr=s,_r=X,Rr=/#|\.prototype\./,Wr=function(e,t){var o=Er[Tr(e)];return o==Nr||o!=Sr&&(_r(t)?yr(t):!!t)},Tr=Wr.normalize=function(e){return String(e).replace(Rr,".").toLowerCase()},Er=Wr.data={},Sr=Wr.NATIVE="N",Nr=Wr.POLYFILL="P",Mr=Wr,Fr=i,Hr=n.f,zr=jt,Or=function(e,t,o,r){r||(r={});var l=r.enumerable,i=void 0!==r.name?r.name:t;if($o(o)&&ko(o,i,r),r.global)l?e[t]=o:Io(t,o);else{try{r.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=o:Lo.f(e,t,{value:o,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},xr=xe,Ar=function(e,t,o){for(var r=vr(t),l=wr.f,i=Cr.f,n=0;n<r.length;n++){var s=r[n];br(e,s)||o&&br(o,s)||l(e,s,i(t,s))}},Pr=Mr,$r=we,Lr=TypeError,kr={};kr[it("toStringTag")]="z";var Ir,Br,Dr="[object z]"===String(kr),jr=X,Vr=N,Ur=it("toStringTag"),qr=Object,Xr="Arguments"==Vr(function(){return arguments}()),Yr=Dr?Vr:function(e){var t,o,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(o=function(e,t){try{return e[t]}catch(e){}}(t=qr(e),Ur))?o:Xr?Vr(t):"Object"==(r=Vr(t))&&jr(t.callee)?"Arguments":r},Gr=String,Jr=pt,Kr=St,Qr=C,Zr=Go,el=Qo,tl=function(e,t,o){var r=Jr(t);r in e?Kr.f(e,r,Qr(0,o)):e[r]=o},ol=Array,rl=Math.max,ll=function(e,t,o){for(var r=el(e),l=Zr(t,r),i=Zr(void 0===o?r:o,r),n=ol(rl(i-l,0)),s=0;l<i;l++,s++)tl(n,s,e[l]);return n.length=s,n},il=Math.floor,nl=function(e,t){var o=e.length,r=il(o/2);return o<8?sl(e,t):al(e,nl(ll(e,0,r),t),nl(ll(e,r),t),t)},sl=function(e,t){for(var o,r,l=e.length,i=1;i<l;){for(r=i,o=e[i];r&&t(e[r-1],o)>0;)e[r]=e[--r];r!==i++&&(e[r]=o)}return e},al=function(e,t,o,r){for(var l=t.length,i=o.length,n=0,s=0;n<l||s<i;)e[n+s]=n<l&&s<i?r(t[n],o[s])<=0?t[n++]:o[s++]:n<l?t[n++]:o[s++];return e},dl=nl,ul=s,hl=oe.match(/firefox\/(\d+)/i),cl=!!hl&&+hl[1],pl=/MSIE|Trident/.test(oe),fl=oe.match(/AppleWebKit\/(\d+)\./),ml=!!fl&&+fl[1],gl=H,bl=We,vl=Ie,Cl=Qo,wl=function(e,t){if(!delete e[t])throw Lr("Cannot delete property "+$r(t)+" of "+$r(e))},yl=function(e){if("Symbol"===Yr(e))throw TypeError("Cannot convert a Symbol value to a string");return Gr(e)},_l=s,Rl=dl,Wl=cl,Tl=pl,El=de,Sl=ml,Nl=[],Ml=gl(Nl.sort),Fl=gl(Nl.push),Hl=_l((function(){Nl.sort(void 0)})),zl=_l((function(){Nl.sort(null)})),Ol=!!(Br=[]["sort"])&&ul((function(){Br.call(null,Ir||function(){return 1},1)})),xl=!_l((function(){if(El)return El<70;if(!(Wl&&Wl>3)){if(Tl)return!0;if(Sl)return Sl<603;var e,t,o,r,l="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:o=3;break;case 68:case 71:o=4;break;default:o=2}for(r=0;r<47;r++)Nl.push({k:t+r,v:o})}for(Nl.sort((function(e,t){return t.v-e.v})),r=0;r<Nl.length;r++)t=Nl[r].k.charAt(0),l.charAt(l.length-1)!==t&&(l+=t);return"DGBEFHACIJK"!==l}}));!function(e,t){var o,r,l,i,n,s=e.target,a=e.global,d=e.stat;if(o=a?Fr:d?Fr[s]||xr(s,{}):(Fr[s]||{}).prototype)for(r in t){if(i=t[r],l=e.dontCallGetSet?(n=Hr(o,r))&&n.value:o[r],!Pr(a?r:s+(d?".":"#")+r,e.forced)&&void 0!==l){if(typeof i==typeof l)continue;Ar(i,l)}(e.sham||l&&l.sham)&&zr(i,"sham",!0),Or(o,r,i,e)}}({target:"Array",proto:!0,forced:Hl||!zl||!Ol||!xl},{sort:function(e){void 0!==e&&bl(e);var t=vl(this);if(xl)return void 0===e?Ml(t):Ml(t,e);var o,r,l=[],i=Cl(t);for(r=0;r<i;r++)r in t&&Fl(l,t[r]);for(Rl(l,function(e){return function(t,o){return void 0===o?-1:void 0===t?1:void 0!==e?+e(t,o)||0:yl(t)>yl(o)?1:-1}}(e)),o=Cl(l),r=0;r<o;)t[r]=l[r++];for(;r<i;)wl(t,r++);return t}});const Al=Array.prototype.indexOf,Pl=function(e,t){for(let o=0,r=e.length;o>=0&&o<r;o+=1)if(t(e[o],o,e))return e[o]},$l=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")};function Ll(){let e=[];return Object.assign(e,Ll.prototype),e.initialize.apply(e,arguments),e}Ll.prototype=[],Ll.prototype.initialize=function(e){e=e||{},this.sortColumn=null==e.sortColumn?[]:e.sortColumn},Ll.prototype.add=function(e,t){let o,r;if("splice"in e&&"length"in e)if("number"==typeof t)for(o=0,r=e.length;o<r;o++)this.splice(t++,0,e[o]);else for(o=0,r=e.length;o<r;o++)this.push(e[o]);else"number"==typeof t?this.splice(t,0,e):this.push(e)},Ll.prototype.reset=function(e){this.length=0,e&&this.add(e)},Ll.prototype.filteredCollection=function(e,t){if(e&&t){let o=new Ll({sortColumn:this.sortColumn});for(let r,l=0,i=this.length;l<i;l++)r=this[l],e(r,t)&&(r.__i=l,o.push(r));return o}return null},Ll.prototype.onComparatorRequired=null,Ll.prototype.onSort=null;let kl=Ll.prototype.sort;function Il(e,t){let o=e.column,r=e.comparePath||o;"string"==typeof r&&(r=r.split("."));let l,i=r.length,n=i>1,s=t?1:-1,a=t?-1:1;return function(e,t){let o=e[r[0]],d=t[r[0]];if(n)for(l=1;l<i;l++)o=o&&o[r[l]],d=d&&d[r[l]];return o===d?0:null==o?s:null==d?a:o<d?s:a}}function Bl(){let e=[];return Object.assign(e,Bl.prototype),e.initialize.apply(e,arguments),e}Ll.prototype.sort=function(e){let t;if(this.sortColumn.length){let o=[];for(let e=0;e<this.sortColumn.length;e++){t=null;const r=Il(this.sortColumn[e],this.sortColumn[e].descending);this.onComparatorRequired&&(t=this.onComparatorRequired(this.sortColumn[e].column,this.sortColumn[e].descending,r)),t||(t=r),o.push(t.bind(this))}if(1===o.length)t=o[0],kl.call(this,t);else{let e,r=o.length;t=function(t,l){for(let i=0;i<r;i++)if(e=o[i](t,l),0!==e)return e;return e},kl.call(this,t)}e||this.onSort&&this.onSort(t)}return t},Bl.prototype=[],Bl.prototype.initialize=function(){},Bl.prototype.get=function(e){for(let t=0,o=this.length;t<o;t++)if(this[t].name==e)return this[t];return null},Bl.prototype.indexOf=function(e){for(let t=0,o=this.length;t<o;t++)if(this[t].name==e)return t;return-1},Bl.prototype.getByOrder=function(e){for(let t=0,o=this.length;t<o;t++)if(this[t].order==e)return this[t];return null},Bl.prototype.normalizeOrder=function(){let e,t=[];for(e=0;e<this.length;e++)t.push(this[e]);for(t.sort((function(e,t){return e.order<t.order?-1:e.order>t.order?1:0})),e=0;e<t.length;e++)t[e].order=e;return this},Bl.prototype.getColumns=function(){let e=[];for(let t,o=0;o<this.length;o++)t=this[o],e.push(t);return e.sort(((e,t)=>e.order<t.order?-1:e.order>t.order?1:0)),e},Bl.prototype.getVisibleColumns=function(){let e=[];for(let t,o=0;o<this.length;o++)t=this[o],t.visible&&e.push(t);return e.sort(((e,t)=>e.order<t.order?-1:e.order>t.order?1:0)),e},Bl.prototype.getMaxOrder=function(){let e=0;for(let t,o=0;o<this.length;o++)t=this[o],t.order>e&&(e=t.order);return e},Bl.prototype.moveColumn=function(e,t){if(e&&t){let o,r,l=e.order,i=t.order;if(l<i)for(o=l+1;o<=i;o++)r=this.getByOrder(o),r.order--;else for(o=l-1;o>=i;o--)r=this.getByOrder(o),r.order++;e.order=i}return this};const Dl={};let jl=null;Dl.getSupportedTransform=()=>{if(null===jl){let e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],t=document.createElement("div");jl=!1;for(let o of e)if(t&&void 0!==t.style[o]){jl=o;break}}return jl};class Vl{static saveSelection(e){let t=window.getSelection().getRangeAt(0);if(e!==t.commonAncestorContainer&&!function(e,t){for(;(e=e.parentNode)&&e!==t;);return!!e}(t.commonAncestorContainer,e))return null;let o=t.cloneRange();o.selectNodeContents(e),o.setEnd(t.startContainer,t.startOffset);let r=o.toString().length;return{start:r,end:r+t.toString().length}}static restoreSelection(e,t){let o,r=0,l=[e],i=!1,n=!1,s=document.createRange();for(s.setStart(e,0),s.collapse(!0);!n&&(o=l.pop());)if(3===o.nodeType){let e=r+o.length;!i&&t.start>=r&&t.start<=e&&(s.setStart(o,t.start-r),i=!0),i&&t.end>=r&&t.end<=e&&(s.setEnd(o,t.end-r),n=!0),r=e}else{let e=o.childNodes.length;for(;e--;)l.push(o.childNodes[e])}let a=window.getSelection();a.removeAllRanges(),a.addRange(s)}}function Ul(e,t){let o=t.column,r=null==t.keyword?"":t.keyword.toString();if(!r||!o)return!0;let l=e[o];return null!=l&&(l=l.toString(),t.caseSensitive||(l=l.toLowerCase(),r=r.toLowerCase()),-1!==l.indexOf(r))}const ql=Array.prototype.indexOf,Xl=e;let Yl=navigator.userAgent,Gl=-1!==Yl.indexOf("MSIE ")?parseFloat(Yl.substr(Yl.indexOf("MSIE ")+5)):null,Jl=Gl&&Gl<10,Kl=document.createElement.bind(document);const Ql=Object.prototype.hasOwnProperty;function Zl(e){var t,o;t=["relative","absolute","fixed"],o=e.css("position"),Al.call(t,o)>=0||e.css("position","relative")}const ei=e=>/^(?:INPUT|TEXTAREA|BUTTON|SELECT)$/.test(e.target.tagName);let ti=function e(){if(!(this instanceof e))return new(Function.prototype.bind.apply(e,[e].concat(Array.prototype.slice.call(arguments,0))));this.initialize.apply(this,arguments)};ti.VERSION="@@VERSION",ti.prototype.VERSION=ti.VERSION,ti.prototype.initialize=function(e){let t=this;e=e||{};let o=t.o={},r=t.p={};r.events={},t.el=e.el&&e.el instanceof Element?e.el:document.createElement("div");let l=t.$el=Xl(t.el);t.el!==e.el&&l.addClass(e.className||"dgtable-wrapper"),l.data("control",t).data("dgtable",t),l.on("remove",(function(){t.destroy()})),r.onMouseMoveResizeAreaBound=this._onMouseMoveResizeArea.bind(this),r.onEndDragColumnHeaderBound=this._onEndDragColumnHeader.bind(this),r.onTableScrolledHorizontallyBound=this._onTableScrolledHorizontally.bind(this),this.$el.on("dragend",r.onEndDragColumnHeaderBound),r.tableSkeletonNeedsRendering=!0,o.virtualTable=void 0===e.virtualTable||!!e.virtualTable,o.rowsBufferSize=e.rowsBufferSize||3,o.minColumnWidth=Math.max(e.minColumnWidth||35,0),o.resizeAreaWidth=e.resizeAreaWidth||8,o.resizableColumns=void 0===e.resizableColumns||!!e.resizableColumns,o.movableColumns=void 0===e.movableColumns||!!e.movableColumns,o.sortableColumns=void 0===e.sortableColumns?1:parseInt(e.sortableColumns,10)||1,o.adjustColumnWidthForSortArrow=void 0===e.adjustColumnWidthForSortArrow||!!e.adjustColumnWidthForSortArrow,o.convertColumnWidthsToRelative=void 0!==e.convertColumnWidthsToRelative&&!!e.convertColumnWidthsToRelative,o.autoFillTableWidth=void 0!==e.autoFillTableWidth&&!!e.autoFillTableWidth,o.cellClasses=void 0===e.cellClasses?"":e.cellClasses,o.resizerClassName=void 0===e.resizerClassName?"dgtable-resize":e.resizerClassName,o.tableClassName=void 0===e.tableClassName?"dgtable":e.tableClassName,o.allowCellPreview=void 0===e.allowCellPreview||e.allowCellPreview,o.allowHeaderCellPreview=void 0===e.allowHeaderCellPreview||e.allowHeaderCellPreview,o.cellPreviewClassName=void 0===e.cellPreviewClassName?"dgtable-cell-preview":e.cellPreviewClassName,o.cellPreviewAutoBackground=void 0===e.cellPreviewAutoBackground||e.cellPreviewAutoBackground,o.onComparatorRequired=void 0===e.onComparatorRequired?null:e.onComparatorRequired,o.onComparatorRequired||"function"!=typeof e.comparatorCallback||(o.onComparatorRequired=e.comparatorCallback),o.width=void 0===e.width?ti.Width.NONE:e.width,o.relativeWidthGrowsToFillWidth=void 0===e.relativeWidthGrowsToFillWidth||!!e.relativeWidthGrowsToFillWidth,o.relativeWidthShrinksToFillWidth=void 0!==e.relativeWidthShrinksToFillWidth&&!!e.relativeWidthShrinksToFillWidth,this.setCellFormatter(e.cellFormatter),this.setHeaderCellFormatter(e.headerCellFormatter),this.setFilter(e.filter),o.height=e.height,t.setColumns(e.columns||[],!1);let i=[];if(e.sortColumn){let t=e.sortColumn;if(t&&!Array.isArray(t)&&(t=[t]),t)for(let e=0,o=t.length;e<o;e++){let o=t[e];"string"==typeof o&&(o={column:o,descending:!1});let l=r.columns.get(o.column);l&&i.push({column:o.column,comparePath:l.comparePath||l.dataPath,descending:o.descending})}}r.rows=new Ll({sortColumn:i}),r.rows.onComparatorRequired=(e,t,r)=>{if(o.onComparatorRequired)return o.onComparatorRequired(e,t,r)},r.filteredRows=null;let n=function(e){let o=(e=e||event).fromElement||e.relatedTarget;o===this||Xl.contains(this,o)||this.__previewCell&&(o===this.__previewCell||Xl.contains(this.__previewCell,o))||t._cellMouseOverEvent.call(t,this)},s=function(e){let o=(e=e||event).toElement||e.relatedTarget;o===this||Xl.contains(this,o)||this.__previewCell&&(o===this.__previewCell||Xl.contains(this.__previewCell,o))||t._cellMouseOutEvent.call(t,this)};"addEventListener"in window?(r._bindCellHoverIn=function(e){e.__hoverIn||e.addEventListener("mouseover",e.__hoverIn=n.bind(e))},r._unbindCellHoverIn=function(e){e.__hoverIn&&(e.removeEventListener("mouseover",e.__hoverIn),e.__hoverIn=null)},r._bindCellHoverOut=function(e){return e.__hoverOut||e.addEventListener("mouseout",e.__hoverOut=s.bind(e.__cell||e)),this},r._unbindCellHoverOut=function(e){return e.__hoverOut&&(e.removeEventListener("mouseout",e.__hoverOut),e.__hoverOut=null),this}):(r._bindCellHoverIn=function(e){e.__hoverIn||e.attachEvent("mouseover",e.__hoverIn=n.bind(e))},r._unbindCellHoverIn=function(e){e.__hoverIn&&(e.detachEvent("mouseover",e.__hoverIn),e.__hoverIn=null)},r._bindCellHoverOut=function(e){e.__hoverOut||e.attachEvent("mouseout",e.__hoverOut=s.bind(e.__cell||e))},r._unbindCellHoverOut=function(e){return e.__hoverOut&&(e.detachEvent("mouseout",e.__hoverOut),e.__hoverOut=null),this})},ti.prototype.on=function(e,t){let o=this.p.events;return"function"!=typeof t||(Ql.call(o,e)||(o[e]=[]),o[e].push({cb:t,once:!1})),this},ti.prototype.once=function(e,t){let o=this.p.events;return"function"!=typeof t||(Ql.call(o,e)||(o[e]=[]),o[e].push({cb:t,once:!0})),this},ti.prototype.off=function(e,t){let o=this.p.events;if(!Ql.call(o,e))return this;let r=o[e];for(let e=0;e<r.length;e++){let o=r[e];t&&o.cb!==t||r.splice(e--,1)}return this},ti.prototype.trigger=function(e){const t=this.p;if(!t)return;let o=t.events;if(Ql.call(o,e)){let t=o[e];for(let e=0;e<t.length;e++){let o=t[e];o.once&&t.splice(e--,1),o.cb.apply(this,Array.prototype.slice.call(arguments,1))}}return this},ti.prototype._parseColumnWidth=function(e,t){let o=Math.max(0,parseFloat(e)),r=oi.AUTO;return o>0&&(e===o+"%"?(r=oi.RELATIVE,o/=100):o>0&&o<1?r=oi.RELATIVE:(o<t&&(o=t),r=oi.ABSOLUTE)),{width:o,mode:r}},ti.prototype._initColumnFromData=function(e){let t=this._parseColumnWidth(e.width,e.ignoreMin?0:this.o.minColumnWidth),o={name:e.name,label:void 0===e.label?e.name:e.label,width:t.width,widthMode:t.mode,resizable:void 0===e.resizable||e.resizable,sortable:void 0===e.sortable||e.sortable,movable:void 0===e.movable||e.movable,visible:void 0===e.visible||e.visible,cellClasses:void 0===e.cellClasses?this.o.cellClasses:e.cellClasses,ignoreMin:void 0!==e.ignoreMin&&!!e.ignoreMin};return o.dataPath=void 0===e.dataPath?o.name:e.dataPath,o.comparePath=void 0===e.comparePath?o.dataPath:e.comparePath,"string"==typeof o.dataPath&&(o.dataPath=o.dataPath.split(".")),"string"==typeof o.comparePath&&(o.comparePath=o.comparePath.split(".")),o},ti.prototype.close=ti.prototype.remove=ti.prototype.destroy=function(){let e=this,t=e.p||{},o=e.$el;if(e.__removed)return e;if(t.$resizer&&(t.$resizer.remove(),t.$resizer=null),t.$tbody){let o=t.$tbody[0].childNodes;for(let t=0,r=o.length;t<r;t++)e.trigger("rowdestroy",o[t])}if(this._destroyHeaderCells()._unbindCellEventsForTable(),t.$table&&t.$table.empty(),t.$tbody&&t.$tbody.empty(),t.workerListeners){for(let e=0;e<t.workerListeners.length;e++){let o=t.workerListeners[e];o.worker.removeEventListener("message",o.listener,!1)}t.workerListeners.length=0}t.rows.length=t.columns.length=0,t._deferredRender&&clearTimeout(t._deferredRender);for(let t in e)Ql.call(e,t)&&(e[t]=null);return e.__removed=!0,o&&o.remove(),this},ti.prototype._unbindCellEventsForTable=function(){const e=this.p;if(e.headerRow)for(let t=0,o=e.headerRow.childNodes,r=o.length;t<r;t++)for(let r=0,l=o[t].childNodes,i=l.length;r<i;r++)e._unbindCellHoverIn(l[r]);if(e.tbody)for(let t=0,o=e.tbody.childNodes,r=o.length;t<r;t++)this._unbindCellEventsForRow(o[t]);return this},ti.prototype._unbindCellEventsForRow=function(e){const t=this.p;for(let o=0,r=e.childNodes,l=r.length;o<l;o++)t._unbindCellHoverIn(r[o]);return this},ti.prototype.render=function(){const e=this.o,o=this.p;if(!this.el.offsetParent)return o._deferredRender||(o._deferredRender=setTimeout((()=>{o._deferredRender=null,!this.__removed&&this.el.offsetParent&&this.render()}))),this;let r,l;if(!0===o.tableSkeletonNeedsRendering){o.tableSkeletonNeedsRendering=!1,e.width===ti.Width.AUTO&&this._clearSortArrows();let i=o.table&&o.table.parentNode?o.table.scrollTop:NaN,n=o.table&&o.table.parentNode?t.getScrollHorz(o.table):NaN;this._renderSkeletonBase()._renderSkeletonBody().tableWidthChanged(!0,!1)._renderSkeletonHeaderCells(),e.virtualTable||(l=(o.filteredRows||o.rows).length,r=this.renderRows(0,l-1),o.$tbody.html("").append(r)),this._updateLastCellWidthFromScrollbar(!0),this._updateTableWidth(!0);for(let e=0;e<o.rows.sortColumn.length;e++)this._showSortArrow(o.rows.sortColumn[e].column,o.rows.sortColumn[e].descending);e.adjustColumnWidthForSortArrow&&o.rows.sortColumn.length?this.tableWidthChanged(!0):e.virtualTable||this.tableWidthChanged(),isNaN(i)||(o.table.scrollTop=i),isNaN(n)||(t.setScrollHorz(o.table,n),t.setScrollHorz(o.header,n)),this.trigger("renderskeleton"),e.virtualTable&&(o.$table.on("scroll",this._onVirtualTableScrolled.bind(this)),this.render())}else if(e.virtualTable){l=(o.filteredRows||o.rows).length;let t=o.table.scrollTop,i=Math.floor((t-o.virtualRowHeightFirst)/o.virtualRowHeight)+1-e.rowsBufferSize,n=Math.ceil((t-o.virtualRowHeightFirst+o.visibleHeight)/o.virtualRowHeight)+e.rowsBufferSize;i<0&&(i=0),n>=l&&(n=l-1);let s,a=-1,d=-1,u=o.tbody.childNodes;if(u.length&&(a=u[0].rowIndex,d=u[u.length-1].rowIndex),-1!==a&&a<i){s=Math.min(d+1,i)-a;for(let e=0;e<s;e++)this.trigger("rowdestroy",u[0]),this._unbindCellEventsForRow(u[0]),o.tbody.removeChild(u[0]);a+=s,a>d&&(a=d=-1)}else if(-1!==d&&d>n){s=d-Math.max(a-1,n);for(let e=0;e<s;e++)this.trigger("rowdestroy",u[u.length-1]),this._unbindCellEventsForRow(u[u.length-1]),o.tbody.removeChild(u[u.length-1]);d<a&&(a=d=-1)}i<a&&(r=this.renderRows(i,Math.min(n,a-1)),o.$tbody.prepend(r)),(n>d||-1===d)&&(r=this.renderRows(-1===d?i:d+1,n),o.$tbody.append(r))}return this.trigger("render"),this},ti.prototype.clearAndRender=function(e){return this.p.tableSkeletonNeedsRendering=!0,(void 0===e||e)&&this.render(),this},ti.prototype.renderRows=function(e,t){const o=this.o,r=this.p;let l,i=o.tableClassName,n=i+"-row",s=i+"-row-alt",a=i+"-cell",d=r.filteredRows||r.rows,u=!!r.filteredRows,h=o.allowCellPreview,c=r.visibleColumns,p=o.virtualTable,f=r.virtualRowHeightFirst,m=r.virtualRowHeight,g=c.length;for(let e,t=0;t<g;t++)e=c[t],e._finalWidth=e.actualWidthConsideringScrollbarWidth||e.actualWidth;let b=document.createDocumentFragment(),v=this._isTableRtl()?"right":"left";const C=Dl.getSupportedTransform();for(let o=e,i=d.length;o<i&&o<=t;o++){let e=d[o],t=u?e.__i:o,i=Kl("div");i.className=n,o%2==1&&(i.className+=" "+s),i.rowIndex=o,i.physicalRowIndex=t;for(let t=0;t<g;t++){let o=c[t],l=Kl("div");l.columnName=o.name,l.setAttribute("data-column",o.name),l.className=a,l.style.width=o._finalWidth+"px",o.cellClasses&&(l.className+=" "+o.cellClasses),h&&r._bindCellHoverIn(l),l.appendChild(Kl("div")).innerHTML=this._getHtmlForCell(e,o),i.appendChild(l)}p&&(l=o>0?f+(o-1)*m:0,i.style.position="absolute",i.style[v]=0,!1===C?i.style.top=`${l}px`:(i.style.top="0px",i.style[C]=`translateY(${l}px)`)),b.appendChild(i),this.trigger("rowcreate",o,t,i,e);let w=o;i.addEventListener("click",(o=>{this.trigger("rowclick",o,w,t,i,e)}))}return b},ti.prototype._calculateVirtualHeight=function(){let e=this.p;if(e.tbody){let t=(e.filteredRows||e.rows).length,o=e.virtualRowHeight*t;t&&(o+=e.virtualRowHeightFirst-e.virtualRowHeight,o+=e.virtualRowHeightLast-e.virtualRowHeight),o<1&&(o=1),e.tbody.style.height=o+"px"}return this},ti.prototype._calculateTbodyWidth=function(){const e=this.p;let t,r,l,i=this.o.tableClassName,n=i+"-row",s=i+"-cell",a=e.visibleColumns,d=a.length,u=Xl("<div>").addClass(n).css("float","left"),h=0;for(r=0;r<d;r++)l=a[r],t=Kl("div"),t.className=s,t.style.width=l.actualWidth+"px",l.cellClasses&&(t.className+=" "+l.cellClasses),t.appendChild(Kl("div")),u.append(t),h+=l.actualWidth;let c=Xl("<div>").addClass(this.el.className).css({"z-index":-1,position:"absolute",left:"0",top:"-9999px",float:"left",width:"1px",overflow:"hidden"}).append(Xl("<div>").addClass(i).append(Xl("<div>").addClass(i+"-body").css("width",h+1e4).append(u)));c.appendTo(document.body);let p=Xl('<div style="border:1.5px solid #000;width:0;height:0;position:absolute;left:0;top:-9999px">').appendTo(document.body),f=parseFloat(p.css("border-width")),m=Math.round(f)!==f;p.remove();let g=o.getElementWidth(u[0],!0,!0,!0);return g-=e.scrollbarWidth||0,m&&g++,c.remove(),g},ti.prototype.setColumns=function(e,t){const o=this.p;e=e||[];let r=new Bl;for(let t=0,o=0;t<e.length;t++){let l=e[t],i=this._initColumnFromData(l);void 0!==l.order?(l.order>o&&(o=l.order+1),i.order=l.order):i.order=o++,r.push(i)}return r.normalizeOrder(),o.columns=r,o.visibleColumns=r.getVisibleColumns(),this._ensureVisibleColumns().clearAndRender(t),this},ti.prototype.addColumn=function(e,t,o){const r=this.p;let l=r.columns;if(e&&!l.get(e.name)){let i=null;void 0!==t&&(i=l.get(t)||l.getByOrder(t));let n=this._initColumnFromData(e);n.order=i?i.order:l.getMaxOrder()+1;for(let e=l.getMaxOrder(),t=n.order;e>=t;e--){let t=l.getByOrder(e);t&&t.order++}l.push(n),l.normalizeOrder(),r.visibleColumns=l.getVisibleColumns(),this._ensureVisibleColumns().clearAndRender(o),this.trigger("addcolumn",n.name)}return this},ti.prototype.removeColumn=function(e,t){const o=this.p;let r=o.columns,l=r.indexOf(e);return l>-1&&(r.splice(l,1),r.normalizeOrder(),o.visibleColumns=r.getVisibleColumns(),this._ensureVisibleColumns().clearAndRender(t),this.trigger("removecolumn",e)),this},ti.prototype.setCellFormatter=function(e){return e||((e=e=>"string"==typeof e?$l(e):e).safe=!0),this.o.cellFormatter=e,this},ti.prototype.setHeaderCellFormatter=function(e){return this.o.headerCellFormatter=e||function(e){return"string"==typeof e?$l(e):e},this},ti.prototype.setFilter=function(e){return this.o.filter=e,this},ti.prototype.filter=function(e){const t=this.p;let o=this.o.filter||Ul;"string"==typeof arguments[0]&&"string"==typeof arguments[1]&&(e={column:arguments[0],keyword:arguments[1],caseSensitive:arguments[2]});let r=!!t.filteredRows;return t.filteredRows&&(t.filteredRows=null),t.filterArgs=null==e?null:"object"!=typeof e||Array.isArray(e)?e:Xl.extend({},e),null!==t.filterArgs?(t.filteredRows=t.rows.filteredCollection(o,t.filterArgs),(r||t.filteredRows)&&(this.clearAndRender(),this.trigger("filter",e))):(t.filterArgs=null,t.filteredRows=null,this.clearAndRender(),this.trigger("filterclear",{})),this},ti.prototype.clearFilter=function(){const e=this.p;return e.filteredRows&&(e.filterArgs=null,e.filteredRows=null,this.clearAndRender(),this.trigger("filterclear",{})),this},ti.prototype._refilter=function(){const e=this.p;if(e.filteredRows&&e.filterArgs){let t=this.o.filter||Ul;e.filteredRows=e.rows.filteredCollection(t,e.filterArgs)}return this},ti.prototype.setColumnLabel=function(e,t){let o=this.p.columns.get(e);if(o&&(o.label=void 0===t?o.name:t,o.element))for(let e=0;e<o.element[0].firstChild.childNodes.length;e++){let t=o.element[0].firstChild.childNodes[e];if(3===t.nodeType){t.textContent=o.label;break}}return this},ti.prototype.moveColumn=function(e,t,o=!0){const r=this.o,l=this.p;let i,n,s=l.columns,a=o?l.visibleColumns:s.getColumns();if("string"==typeof e?i=s.get(e):"number"==typeof e&&(i=a[e]),"string"==typeof t?n=s.get(t):"number"==typeof t&&(n=a[t]),i&&n&&e!==t){let e=i.order,t=n.order,o=s.moveColumn(i,n).getVisibleColumns();if(l.visibleColumns.length!==o.length||l.visibleColumns.some(((e,t)=>e!==o[t])))if(l.visibleColumns=o,this._ensureVisibleColumns(),r.virtualTable)this.clearAndRender()._updateLastCellWidthFromScrollbar(!0);else{let o=l.$headerRow.find(">div."+r.tableClassName+"-header-cell"),i=e<t?t+1:t,n=e;o[0].parentNode.insertBefore(o[n],o[i]);let s=l.visibleColumns[e];s=(s.actualWidthConsideringScrollbarWidth||s.actualWidth)+"px";let a=l.visibleColumns[t];a=(a.actualWidthConsideringScrollbarWidth||a.actualWidth)+"px";let d=l.$tbody[0].childNodes;for(let o=0,r=d.length;o<r;o++){let r=d[o];1===r.nodeType&&(r.insertBefore(r.childNodes[n],r.childNodes[i]),r.childNodes[t].firstChild.style.width=a,r.childNodes[e].firstChild.style.width=s)}}this.trigger("movecolumn",i.name,e,t)}return this},ti.prototype.sort=function(e,t,o){const r=this.o,l=this.p;let i,n=l.columns.get(e),s=l.rows.sortColumn;if(n){if(s.length&&s[s.length-1].column===e&&(t=void 0===t?!s[s.length-1].descending:t),o){for(let e=0;e<s.length;e++)if(s[e].column===n.name){e<s.length-1?s.length=0:s.splice(s.length-1,1);break}(r.sortableColumns>0&&s.length>=r.sortableColumns||s.length>=l.visibleColumns.length)&&(s.length=0)}else s.length=0;t=void 0!==t&&t,s.push({column:n.name,comparePath:n.comparePath||n.dataPath,descending:!!t})}else s.length=0;this._clearSortArrows();for(let e=0;e<s.length;e++)this._showSortArrow(s[e].column,s[e].descending);if(r.adjustColumnWidthForSortArrow&&!r._tableSkeletonNeedsRendering&&this.tableWidthChanged(!0),r.virtualTable)for(;l.tbody&&l.tbody.firstChild;)this.trigger("rowdestroy",l.tbody.firstChild),this._unbindCellEventsForRow(l.tbody.firstChild),l.tbody.removeChild(l.tbody.firstChild);else l.tableSkeletonNeedsRendering=!0;l.rows.sortColumn=s,s.length&&(i=l.rows.sort(!!l.filteredRows),l.filteredRows&&l.filteredRows.sort(!!l.filteredRows));let a=[];for(let e=0;e<s.length;e++)a.push({column:s[e].column,descending:s[e].descending});return this.trigger("sort",a,!0,i),this},ti.prototype.resort=function(){const e=this.p;let t=e.columns,o=e.rows.sortColumn;if(o.length){for(let e=0;e<o.length;e++)t.get(o[e].column)||o.splice(e--,1);let r;e.rows.sortColumn=o,o.length&&(r=e.rows.sort(!!e.filteredRows),e.filteredRows&&e.filteredRows.sort(!!e.filteredRows));let l=[];for(let e=0;e<o.length;e++)l.push({column:o[e].column,descending:o[e].descending});this.trigger("sort",l,!1,r)}return this},ti.prototype._ensureVisibleColumns=function(){const e=this.p;return 0===e.visibleColumns.length&&e.columns.length&&(e.columns[0].visible=!0,e.visibleColumns.push(e.columns[0]),this.trigger("showcolumn",e.columns[0].name)),this},ti.prototype.setColumnVisible=function(e,t){const o=this.p;let r=o.columns.get(e);return t=!!t,r&&!!r.visible!==t&&(r.visible=t,o.visibleColumns=o.columns.getVisibleColumns(),this.trigger(t?"showcolumn":"hidecolumn",e),this._ensureVisibleColumns(),this.clearAndRender()),this},ti.prototype.isColumnVisible=function(e){let t=this.p.columns.get(e);return!!t&&t.visible},ti.prototype.setMinColumnWidth=function(e){let t=this.o;return e=Math.max(e,0),t.minColumnWidth!==e&&(t.minColumnWidth=e,this.tableWidthChanged(!0)),this},ti.prototype.getMinColumnWidth=function(){return this.o.minColumnWidth},ti.prototype.setSortableColumns=function(e){const t=this.p,o=this.o;if(o.sortableColumns!==e&&(o.sortableColumns=e,t.$table)){let e=t.$headerRow.find(">div."+o.tableClassName+"-header-cell");for(let r=0;r<e.length;r++)Xl(e[0])[o.sortableColumns>0&&t.visibleColumns[r].sortable?"addClass":"removeClass"]("sortable")}return this},ti.prototype.getSortableColumns=function(){return this.o.sortableColumns},ti.prototype.setMovableColumns=function(e){let t=this.o;return e=void 0===e||!!e,t.movableColumns!==e&&(t.movableColumns=e),this},ti.prototype.getMovableColumns=function(){return this.o.movableColumns},ti.prototype.setResizableColumns=function(e){let t=this.o;return e=void 0===e||!!e,t.resizableColumns!==e&&(t.resizableColumns=e),this},ti.prototype.getResizableColumns=function(){return this.o.resizableColumns},ti.prototype.setComparatorCallback=function(e){let t=this.o;return t.onComparatorRequired!==e&&(t.onComparatorRequired=e),this},ti.prototype.setColumnWidth=function(e,t){let o=this.p.columns.get(e),r=this._parseColumnWidth(t,o.ignoreMin?0:this.o.minColumnWidth);if(o){let e=this._serializeColumnWidth(o);o.width=r.width,o.widthMode=r.mode;let t=this._serializeColumnWidth(o);e!==t&&this.tableWidthChanged(!0),this.trigger("columnwidth",o.name,e,t)}return this},ti.prototype.getColumnWidth=function(e){let t=this.p.columns.get(e);return t?this._serializeColumnWidth(t):null},ti.prototype.getColumnConfig=function(e){let t=this.p.columns.get(e);return t?{order:t.order,width:this._serializeColumnWidth(t),visible:t.visible,label:t.label}:null},ti.prototype.getColumnsConfig=function(){const e=this.p;let t={};for(let o=0;o<e.columns.length;o++)t[e.columns[o].name]=this.getColumnConfig(e.columns[o].name);return t},ti.prototype.getSortedColumns=function(){const e=this.p;let t=[];for(let o=0;o<e.rows.sortColumn.length;o++){let r=e.rows.sortColumn[o];t.push({column:r.column,descending:r.descending})}return t},ti.prototype.getHtmlForRowCell=function(e,t){const o=this.p;if(e<0||e>o.rows.length-1)return null;let r=o.columns.get(t);if(!r)return null;let l=o.rows[e];return this._getHtmlForCell(l,r)},ti.prototype.getHtmlForRowDataCell=function(e,t){let o=this.p.columns.get(t);return o?this._getHtmlForCell(e,o):null},ti.prototype._getHtmlForCell=function(e,t){let o=t.dataPath,r=e[o[0]];for(let e=1;e<o.length&&null!=r;e++)r=r&&r[o[e]];const l=this.o.cellFormatter;let i;if(l.safe)i=l(r,t.name,e);else try{i=l(r,t.name,e)}catch(e){i="[ERROR]",console.error("Failed to generate content for cell "+t.name,e)}return null==i&&(i=""),i},ti.prototype.getRowYPos=function(e){const t=this.p;if(this.o.virtualTable)return e>0?t.virtualRowHeightFirst+(e-1)*t.virtualRowHeight:0;{let o=t.tbody.childNodes[e];return o?o.offsetTop:null}},ti.prototype.getDataForRow=function(e){const t=this.p;return e<0||e>t.rows.length-1?null:t.rows[e]},ti.prototype.getRowCount=function(){const e=this.p;return e.rows?e.rows.length:0},ti.prototype.getIndexForRow=function(e){return this.p.rows.indexOf(e)},ti.prototype.getFilteredRowCount=function(){const e=this.p;return(e.filteredRows||e.rows).length},ti.prototype.getIndexForFilteredRow=function(e){const t=this.p;return(t.filteredRows||t.rows).indexOf(e)},ti.prototype.getDataForFilteredRow=function(e){const t=this.p;return e<0||e>(t.filteredRows||t.rows).length-1?null:(t.filteredRows||t.rows)[e]},ti.prototype.getHeaderRowElement=function(){return this.p.headerRow},ti.prototype._horizontalPadding=function(e){return(parseFloat(Xl.css(e,"padding-left"))||0)+(parseFloat(Xl.css(e,"padding-right"))||0)},ti.prototype._horizontalBorderWidth=function(e){return(parseFloat(Xl.css(e,"border-left"))||0)+(parseFloat(Xl.css(e,"border-right"))||0)},ti.prototype._calculateWidthAvailableForColumns=function(){const e=this.o,t=this.p;let r,l,i;t.$table&&(l=t.table?t.table.scrollTop:0,i=t.table?t.table.scrollLeft:0,e.virtualTable&&(r=t.$table[0].style.display,t.$table[0].style.display="none"));let n=o.getElementWidth(this.$el[0]);t.$table&&(e.virtualTable&&(t.$table[0].style.display=r),t.table.scrollTop=l,t.table.scrollLeft=i,t.header.scrollLeft=i);let s=e.tableClassName,a=Xl("<div>").addClass(this.el.className).css({"z-index":-1,position:"absolute",left:"0",top:"-9999px"}),d=Xl("<div>").addClass(s+"-header").appendTo(a),u=Xl("<div>").addClass(s+"-header-row").appendTo(d);for(let e=0;e<t.visibleColumns.length;e++)u.append(Xl("<div><div></div></div>").addClass(s+"-header-cell").addClass(t.visibleColumns[e].cellClasses||""));a.appendTo(document.body),n-=this._horizontalBorderWidth(u[0]);let h=u.find(">div."+s+"-header-cell");for(let e=0;e<h.length;e++){let t=Xl(h[e]);"border-box"===t.css("boxSizing")||(n-=(parseFloat(t.css("border-right-width"))||0)+(parseFloat(t.css("border-left-width"))||0)+this._horizontalPadding(t[0]))}return a&&a.remove(),Math.max(0,n)},ti.prototype.tableWidthChanged=function(){let e=function(e){let t,r=this.o.tableClassName,l=Xl("<div>").addClass(this.$el).append(Xl("<div>").addClass(r+"-header").append(Xl("<div>").addClass(r+"-header-row").append(t=Xl("<div>").addClass(r+"-header-cell").append(Xl("<div>").text(e))))).css({position:"absolute",top:"-9999px",visibility:"hidden"});l.appendTo(document.body);let i=o.getElementWidth(t[0]);return l.remove(),i},t=null;return function(o,r){let l=this.o,i=this.p,n=this._calculateWidthAvailableForColumns(),s=n,a=0;if(!i.$table)return this;r=void 0===r||r;let d=0;if(i.tbody||(r=!1),r&&(d=parseFloat(i.tbody.style.minWidth)||0),s!==t||o){t=n;let o=0,u=[],h=0;for(let e=0;e<i.columns.length;e++)i.columns[e].actualWidthConsideringScrollbarWidth=null;for(let t=0;t<i.visibleColumns.length;t++){let r=i.visibleColumns[t];if(r.widthMode===oi.ABSOLUTE){let e=r.width;e+=r.arrowProposedWidth||0,!r.ignoreMin&&e<l.minColumnWidth&&(e=l.minColumnWidth),s-=e,o+=e,e!==r.actualWidth&&(r.actualWidth=e,u.push(t))}else if(r.widthMode===oi.AUTO){let i=e.call(this,r.label)+20;i+=r.arrowProposedWidth||0,!r.ignoreMin&&i<l.minColumnWidth&&(i=l.minColumnWidth),s-=i,o+=i,i!==r.actualWidth&&(r.actualWidth=i,l.convertColumnWidthsToRelative||u.push(t))}else r.widthMode===oi.RELATIVE&&(h+=r.width,a++)}if(l.convertColumnWidthsToRelative)for(let e=0;e<i.visibleColumns.length;e++){let t=i.visibleColumns[e];t.widthMode===oi.AUTO&&(t.widthMode=oi.RELATIVE,s+=t.actualWidth,t.width=t.actualWidth/o,h+=t.width,a++)}if(a&&(h<1&&l.relativeWidthGrowsToFillWidth||h>1&&l.relativeWidthShrinksToFillWidth))for(let e=0;e<i.visibleColumns.length;e++){let t=i.visibleColumns[e];t.widthMode===oi.RELATIVE&&(t.width/=h)}let c=Math.max(0,s);0===c&&(c=i.table.clientWidth);let p=l.minColumnWidth/c;if(isNaN(p)&&(p=0),p>0){let e,t=0;for(let e=0;e<i.visibleColumns.length;e++){let o=i.visibleColumns[e];o.widthMode===oi.RELATIVE&&!o.ignoreMin&&o.width<p&&(t+=p-o.width,o.width=p)}for(let o=0;o<i.visibleColumns.length;o++){let r=i.visibleColumns[o];r.widthMode===oi.RELATIVE&&!r.ignoreMin&&r.width>p&&t>0&&(e=Math.min(t,r.width-p),r.width-=e,t-=e)}}if(l.autoFillTableWidth&&s>0){let e=0,t=s;for(let o=0;o<i.visibleColumns.length;o++){let r=i.visibleColumns[o];r.resizable||r.widthMode!==oi.ABSOLUTE||(e+=r.width),r.widthMode===oi.RELATIVE&&(t-=Math.round(c*r.width))}let o=(n-e)/(n-t-e)||NaN;for(let e=0;e<i.visibleColumns.length&&t>0;e++){let t=i.visibleColumns[e];if(t.resizable||t.widthMode!==oi.ABSOLUTE)if(t.widthMode===oi.RELATIVE)t.width*=o;else{let r=t.actualWidth*o;t.actualWidth!==r&&(t.actualWidth=r,-1===u.indexOf(e)&&u.push(e))}}}for(let e=0;e<i.visibleColumns.length;e++){let t=i.visibleColumns[e];if(t.widthMode===oi.RELATIVE){let o=Math.round(c*t.width);s-=o,a--,0===a&&1===s&&(o++,s--),-1===s&&(o--,s++),o!==t.actualWidth&&(t.actualWidth=o,u.push(e))}}if(i.visibleColumns.length&&(i.visibleColumns[i.visibleColumns.length-1].actualWidthConsideringScrollbarWidth=i.visibleColumns[i.visibleColumns.length-1].actualWidth-(i.scrollbarWidth||0)),r){let e=this._calculateTbodyWidth();d<e&&this._updateTableWidth(!1);for(let e=0;e<u.length;e++)this._resizeColumnElements(u[e]);d>e&&this._updateTableWidth(!1)}}return this}}(),ti.prototype.tableHeightChanged=function(){let e=this,t=e.o,r=e.p;if(!r.$table)return e;let l=o.getElementHeight(e.$el[0],!0)-(parseFloat(r.$table.css("border-top-width"))||0)-(parseFloat(r.$table.css("border-bottom-width"))||0);return l!==t.height&&(t.height=l,r.tbody&&(r.tbody.style.height=Math.max(t.height-o.getElementHeight(r.$headerRow[0],!0,!0,!0),1)+"px"),t.virtualTable&&e.clearAndRender()),e},ti.prototype.addRows=function(e,t,o,r){let l=this,i=l.p;if("boolean"==typeof t&&(r=o,o=t,t=-1),"number"!=typeof t&&(t=-1),(t<0||t>i.rows.length)&&(t=i.rows.length),r=void 0===r||!!r,e){if(i.rows.add(e,t),i.filteredRows||o&&i.rows.sortColumn.length)o&&i.rows.sortColumn.length?this.resort():this._refilter(),i.tableSkeletonNeedsRendering=!0,r&&this.render();else if(r){let o=i.tbody.childNodes;if(l.o.virtualTable){for(;i.tbody.firstChild;)this.trigger("rowdestroy",i.tbody.firstChild),this._unbindCellEventsForRow(i.tbody.firstChild),i.tbody.removeChild(i.tbody.firstChild);this._calculateVirtualHeight()._updateLastCellWidthFromScrollbar().render()._updateTableWidth(!1)}else if(i.$tbody){let r=t,n=t+e.length-1,s=l.renderRows(r,n);i.tbody.insertBefore(s,o[t]||null);for(let t=n+1;t<o.length;t++){let r=o[t];r.rowIndex+=e.length,r.physicalRowIndex+=e.length}this.render()._updateLastCellWidthFromScrollbar()._updateTableWidth(!0)}}this.trigger("addrows",e.length,!1)}return this},ti.prototype.removeRows=function(e,t,o){let r=this.p;if("number"!=typeof t||t<=0)return this;if(e<0||e>r.rows.length-1)return this;if(r.rows.splice(e,t),o=void 0===o||!!o,r.filteredRows)this._refilter(),r.tableSkeletonNeedsRendering=!0,o&&this.render();else if(o){let o=r.tbody.childNodes;if(this.o.virtualTable){for(;r.tbody.firstChild;)this.trigger("rowdestroy",r.tbody.firstChild),this._unbindCellEventsForRow(r.tbody.firstChild),r.tbody.removeChild(r.tbody.firstChild);this._calculateVirtualHeight()._updateLastCellWidthFromScrollbar().render()._updateTableWidth(!1)}else{let l=e+t-1;for(let i=0;i<o.length;i++){let n=o[i],s=n.physicalRowIndex;s>=e?s<=l?(this.trigger("rowdestroy",n),this._unbindCellEventsForRow(n),r.tbody.removeChild(n),i--):n.physicalRowIndex-=t:n.rowIndex=i}this.render()._updateLastCellWidthFromScrollbar()._updateTableWidth(!0)}}return this},ti.prototype.removeRow=function(e,t){return this.removeRows(e,1,t)},ti.prototype.refreshRow=function(e){let t=this.p;if(e<0||e>t.rows.length-1)return this;let o=-1;if(t.filteredRows&&-1===(o=t.filteredRows.indexOf(t.rows[e])))return this;-1===o&&(o=e);let r=t.tbody.childNodes;if(this.o.virtualTable){let l=!1,i=0;for(;i<r.length;i++)if(r[i].physicalRowIndex===e){l=!0,this.trigger("rowdestroy",r[i]),this._unbindCellEventsForRow(r[i]),t.tbody.removeChild(r[i]);break}if(l){let e=this.renderRows(o,o);t.tbody.insertBefore(e,r[i]||null)}}else{this.trigger("rowdestroy",r[o]),this._unbindCellEventsForRow(r[o]),t.tbody.removeChild(r[o]);let e=this.renderRows(o,o);t.tbody.insertBefore(e,r[o]||null)}return this},ti.prototype.getRowElement=function(e){let t=this.p;if(e<0||e>t.rows.length-1)return null;let o=-1;if(t.filteredRows&&-1===(o=t.filteredRows.indexOf(t.rows[e])))return this;-1===o&&(o=e);let r=t.tbody.childNodes;if(!this.o.virtualTable)return r[o];for(let t=0;t<r.length;t++)if(r[t].physicalRowIndex===e)return r[t];return null},ti.prototype.refreshAllVirtualRows=function(){const e=this.p;if(this.o.virtualTable){let t=[],o=e.tbody.childNodes;for(let r=0,l=o.length;r<l;r++)t.push(o[r].physicalRowIndex),this.trigger("rowdestroy",o[r]),this._unbindCellEventsForRow(o[r]),e.tbody.removeChild(o[r]),r--,l--;for(let o=0;o<t.length;o++){let r=this.renderRows(t[o],t[o]);e.tbody.appendChild(r)}}return this},ti.prototype.setRows=function(e,t){let o=this.p;return o.rows.reset(e),t&&o.rows.sortColumn.length?this.resort():this._refilter(),this.clearAndRender().trigger("addrows",e.length,!0),this},ti.prototype.getUrlForElementContent=function(e){let t,o=document.getElementById(e);if(o){let e=o.textContent;if("function"==typeof Blob)t=new Blob([e]);else{let o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(!o)return null;let r=new o;r.append(e),t=r.getBlob()}return(window.URL||window.webkitURL).createObjectURL(t)}return null},ti.prototype.isWorkerSupported=function(){return window.Worker instanceof Function},ti.prototype.createWebWorker=function(e,t,o){if(this.isWorkerSupported()){let r=this,l=r.p,i=new Worker(e),n=function(e){e.data.append?r.addRows(e.data.rows,o):r.setRows(e.data.rows,o)};return i.addEventListener("message",n,!1),l.workerListeners||(l.workerListeners=[]),l.workerListeners.push({worker:i,listener:n}),(t||void 0===t)&&i.postMessage(null),i}return null},ti.prototype.unbindWebWorker=function(e){let t=this.p;if(t.workerListeners)for(let o=0;o<t.workerListeners.length;o++)t.workerListeners[o].worker===e&&(e.removeEventListener("message",t.workerListeners[o].listener,!1),t.workerListeners.splice(o,1),o--);return this},ti.prototype.abortCellPreview=function(){return this.hideCellPreview(),this},ti.prototype.cancelColumnResize=function(){const e=this.p;return e.$resizer&&(e.$resizer.remove(),e.$resizer=null,Xl(document).off("mousemove.dgtable",e.onMouseMoveResizeAreaBound).off("mouseup.dgtable",e.onEndDragColumnHeaderBound)),this},ti.prototype._onVirtualTableScrolled=function(){this.render()},ti.prototype._onTableScrolledHorizontally=function(){const e=this.p;e.header.scrollLeft=e.table.scrollLeft},ti.prototype._getColumnByResizePosition=function(e){let t=this.o,r=this._isTableRtl(),l=Xl(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName),i=l[0];i.__cell&&(i=i.__cell,l=Xl(i));let n=l[0].previousSibling;for(;n&&1!==n.nodeType;)n=n.previousSibling;let s=!n,a=((null!=e.pageX?e.pageX:e.originalEvent.pageX)||e.originalEvent.clientX)-l.offset().left;if(r){if(!s&&o.getElementWidth(l[0],!0,!0,!0)-a<=t.resizeAreaWidth/2)return n.columnName;if(a<=t.resizeAreaWidth/2)return i.columnName}else{if(!s&&a<=t.resizeAreaWidth/2)return n.columnName;if(o.getElementWidth(l[0],!0,!0,!0)-a<=t.resizeAreaWidth/2)return i.columnName}return null},ti.prototype._onTouchStartColumnHeader=function(e){const t=this.p;if(t.currentTouchId)return;let o=e.originalEvent.changedTouches[0];t.currentTouchId=o.identifier;let r,l=Xl(e.currentTarget),i={x:o.pageX,y:o.pageY},n=i,s=function(){t.currentTouchId=null,l.off("touchend").off("touchcancel"),clearTimeout(r)},a=function(t){let o=Xl.Event(t),r=Array.prototype.slice.call(arguments,1);for(let t of["target","clientX","clientY","offsetX","offsetY","screenX","screenY","pageX","pageY","which"]){o[t]=e[t];for(let e=0;e<r.length;e++)null!=r[e][t]&&(o[t]=r[e][t])}return o};l.trigger(a("mousedown",e.originalEvent.changedTouches[0],{which:1,target:e.target})),r=setTimeout((()=>{s(),l.one("touchend",(e=>{ei(e)||e.preventDefault(),l.off("touchend").off("touchcancel")})).one("touchcancel",(e=>{l.off("touchend").off("touchcancel")})),Math.sqrt(Math.pow(Math.abs(n.x-i.x),2)+Math.pow(Math.abs(n.y-i.y),2))<9&&(this.cancelColumnResize(),l.trigger(a("mouseup",e.originalEvent.changedTouches[0],{which:3,target:e.target})))}),500),l.on("touchend",(e=>{let o=Pl(e.originalEvent.changedTouches,(e=>e.identifier===t.currentTouchId));o&&(s(),ei(e)||e.preventDefault(),n={x:o.pageX,y:o.pageY},(Math.sqrt(Math.pow(Math.abs(n.x-i.x),2)+Math.pow(Math.abs(n.y-i.y),2))<9||t.$resizer)&&(l.trigger(a("mouseup",o,{which:1,target:e.target})),l.trigger(a("click",o,{which:1,target:e.target}))))})).on("touchcancel",(()=>{s()})).on("touchmove",(e=>{let o=Pl(e.originalEvent.changedTouches,(e=>e.identifier===t.currentTouchId));o&&(n={x:o.pageX,y:o.pageY},t.$resizer&&(e.preventDefault(),l.trigger(a("mousemove",o,{target:e.target}))))}))},ti.prototype._onMouseDownColumnHeader=function(e){if(1!==e.which)return this;let t=this.o,r=this.p,l=this._getColumnByResizePosition(e);if(l){let i=r.columns.get(l);if(!t.resizableColumns||!i||!i.resizable)return!1;let n=this._isTableRtl();r.$resizer&&Xl(r.$resizer).remove(),r.$resizer=Xl("<div></div>").addClass(t.resizerClassName).css({position:"absolute",display:"block","z-index":-1,visibility:"hidden",width:"2px",background:"#000",opacity:.7}).appendTo(this.$el);let s=i.element,a=r.$resizer.parent(),d=s.offset(),u=a.offset();8===Gl&&(d=s.offset()),u.left+=parseFloat(a.css("border-left-width"))||0,u.top+=parseFloat(a.css("border-top-width"))||0,d.left-=u.left,d.top-=u.top,d.top-=parseFloat(s.css("border-top-width"))||0;let h=o.getElementWidth(r.$resizer[0],!0,!0,!0);n?(d.left-=Math.ceil((parseFloat(s.css("border-left-width"))||0)/2),d.left-=Math.ceil(h/2)):(d.left+=o.getElementWidth(s[0],!0,!0,!0),d.left+=Math.ceil((parseFloat(s.css("border-right-width"))||0)/2),d.left-=Math.ceil(h/2)),r.$resizer.css({"z-index":"10",visibility:"visible",left:d.left,top:d.top,height:o.getElementHeight(this.$el[0])})[0].columnName=s[0].columnName;try{r.$resizer[0].style.zIndex=""}catch(e){}Xl(document).on("mousemove.dgtable",r.onMouseMoveResizeAreaBound),Xl(document).on("mouseup.dgtable",r.onEndDragColumnHeaderBound),e.preventDefault()}},ti.prototype._onMouseMoveColumnHeader=function(e){let t=this.o,o=this.p;if(t.resizableColumns){let r=this._getColumnByResizePosition(e),l=Xl(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName)[0];r&&o.columns.get(r).resizable?l.style.cursor="e-resize":l.style.cursor=""}},ti.prototype._onMouseUpColumnHeader=function(e){if(3===e.which){let t=this.o,r=Xl(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName),l=r.offset();l.width=o.getElementWidth(r[0],!0,!0,!0),l.height=o.getElementHeight(r[0],!0,!0,!0),this.trigger("headercontextmenu",r[0].columnName,e.pageX,e.pageY,l)}return this},ti.prototype._onMouseLeaveColumnHeader=function(e){let t=this.o;Xl(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName)[0].style.cursor=""},ti.prototype._onClickColumnHeader=function(e){if(!ei(e)&&!this._getColumnByResizePosition(e)){let t=this,o=t.o,r=t.p,l=Xl(e.target).closest("div."+o.tableClassName+"-header-cell,div."+o.cellPreviewClassName)[0];if(o.sortableColumns){let e=r.columns.get(l.columnName);e&&e.sortable&&this.sort(l.columnName,void 0,!0).render()}}},ti.prototype._onStartDragColumnHeader=function(e){let t=this.o,o=this.p;if(t.movableColumns){let r=Xl(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName),l=o.columns.get(r[0].columnName);l&&l.movable?(r[0].style.opacity=.35,o.dragId=161061273*Math.random(),e.originalEvent.dataTransfer.setData("text",JSON.stringify({dragId:o.dragId,column:l.name}))):e.preventDefault()}else e.preventDefault()},ti.prototype._onMouseMoveResizeArea=function(e){let t=this.p,r=t.columns.get(t.$resizer[0].columnName),l=this._isTableRtl(),i=r.element,n=t.$resizer.parent(),s=i.offset(),a=n.offset();a.left+=parseFloat(n.css("border-left-width"))||0,s.left-=a.left;let d=o.getElementWidth(t.$resizer[0],!0,!0,!0),u="border-box"===i.css("box-sizing"),h=e.pageX-a.left,c=s.left;c-=Math.ceil(d/2),l?(c+=o.getElementWidth(i[0],!0,!0,!0),c-=r.ignoreMin?0:this.o.minColumnWidth,u||(c-=Math.ceil((parseFloat(i.css("border-left-width"))||0)/2),c-=this._horizontalPadding(i[0])),h>c&&(h=c)):(c+=r.ignoreMin?0:this.o.minColumnWidth,u||(c+=Math.ceil((parseFloat(i.css("border-right-width"))||0)/2),c+=this._horizontalPadding(i[0])),h<c&&(h=c)),t.$resizer.css("left",h+"px")},ti.prototype._onEndDragColumnHeader=function(e){let t=this.o,r=this.p;if(r.$resizer){Xl(document).off("mousemove.dgtable",r.onMouseMoveResizeAreaBound).off("mouseup.dgtable",r.onEndDragColumnHeaderBound);let l=r.columns.get(r.$resizer[0].columnName),i=this._isTableRtl(),n=l.element,s=r.$resizer.parent(),a=n.offset(),d=s.offset();d.left+=parseFloat(s.css("border-left-width"))||0,a.left-=d.left;let u=o.getElementWidth(r.$resizer[0],!0,!0,!0),h="border-box"===n.css("box-sizing"),c=e.pageX-d.left,p=a.left,f=a.left,m=0;p-=Math.ceil(u/2),i?(h||(c+=this._horizontalPadding(n[0]),c+=parseFloat(n.css("border-left-width"))||0,c+=parseFloat(n.css("border-right-width"))||0),p+=o.getElementWidth(n[0],!0,!0,!0),f=p-(l.ignoreMin?0:this.o.minColumnWidth),c>f&&(c=f),m=p-c):(h||(c-=this._horizontalPadding(n[0]),c-=parseFloat(n.css("border-left-width"))||0,c-=parseFloat(n.css("border-right-width"))||0),f=p+(l.ignoreMin?0:this.o.minColumnWidth),c<f&&(c=f),m=c-p),r.$resizer.remove(),r.$resizer=null;let g=m;if(l.widthMode===oi.RELATIVE){let e=this._calculateWidthAvailableForColumns(),o=0,i=0;for(let t=0;t<r.visibleColumns.length;t++){let n=r.visibleColumns[t];n.name!==l.name&&(n.widthMode===oi.RELATIVE?(o+=n.width,i++):e-=n.actualWidth)}if(e=Math.max(1,e),g=m/e,i>0){let e=g/((1-g)/o);o+=g,(o<1&&t.relativeWidthGrowsToFillWidth||o>1&&t.relativeWidthShrinksToFillWidth)&&(g=e)}g*=100,g+="%"}this.setColumnWidth(l.name,g)}else e.target.style.opacity=null},ti.prototype._onDragEnterColumnHeader=function(e){let t=this.o,o=this.p;if(t.movableColumns){let r=e.originalEvent.dataTransfer.getData("text");r=r?JSON.parse(r):null;let l=Xl(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName);if(!r||o.dragId===r.dragId&&l.columnName!==r.column){let e=o.columns.get(l[0].columnName);e&&(e.movable||e!==o.visibleColumns[0])&&Xl(l).addClass("drag-over")}}},ti.prototype._onDragOverColumnHeader=function(e){e.preventDefault()},ti.prototype._onDragLeaveColumnHeader=function(e){let t=this.o,o=Xl(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName);Xl(o[0].firstChild).has(e.originalEvent.relatedTarget).length||o.removeClass("drag-over")},ti.prototype._onDropColumnHeader=function(e){e.preventDefault();let t=this.o,o=this.p,r=JSON.parse(e.originalEvent.dataTransfer.getData("text")),l=Xl(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName);if(t.movableColumns&&r.dragId===o.dragId){let e=r.column,t=l[0].columnName,i=o.columns.get(e),n=o.columns.get(t);i&&n&&i.movable&&(n.movable||n!==o.visibleColumns[0])&&this.moveColumn(e,t)}Xl(l).removeClass("drag-over")},ti.prototype._clearSortArrows=function(){let e=this.p;if(e.$table){let t=this.o.tableClassName,o=e.$headerRow.find(">div."+t+"-header-cell.sorted"),r=o.find(">div>.sort-arrow");for(let t of r){let o=e.columns.get(t.parentNode.parentNode.columnName);o&&(o.arrowProposedWidth=0)}r.remove(),o.removeClass("sorted").removeClass("desc")}return this},ti.prototype._showSortArrow=function(e,t){let o=this.p.columns.get(e);if(!o)return!1;let r=Kl("span");return r.className="sort-arrow",o.element&&(o.element.addClass(t?"sorted desc":"sorted"),o.element[0].firstChild.insertBefore(r,o.element[0].firstChild.firstChild)),o.widthMode!==oi.RELATIVE&&this.o.adjustColumnWidthForSortArrow&&(o.arrowProposedWidth=r.scrollWidth+(parseFloat(Xl(r).css("margin-right"))||0)+(parseFloat(Xl(r).css("margin-left"))||0)),this},ti.prototype._resizeColumnElements=function(e){let t=this.p,o=t.$headerRow.find("div."+this.o.tableClassName+"-header-cell"),r=t.columns.get(o[e].columnName);if(r){o[e].style.width=(r.actualWidthConsideringScrollbarWidth||r.actualWidth)+"px";let l=(r.actualWidthConsideringScrollbarWidth||r.actualWidth)+"px",i=t.$tbody[0].childNodes;for(let t=0,o=i.length;t<o;t++){let o=i[t];1===o.nodeType&&(o.childNodes[e].style.width=l)}}return this},ti.prototype._destroyHeaderCells=function(){let e=this.o,t=this.p;return t.$headerRow&&(this.trigger("headerrowdestroy",t.headerRow),t.$headerRow.find("div."+e.tableClassName+"-header-cell").remove(),t.$headerRow=null,t.headerRow=null),this},ti.prototype._renderSkeletonBase=function(){let e=this,t=e.p,r=e.o;if(t.$table&&r.virtualTable){if(t.$table.remove(),t.$tbody){let o=t.$tbody[0].childNodes;for(let t=0,r=o.length;t<r;t++)e.trigger("rowdestroy",o[t]),e._unbindCellEventsForRow(o[t])}t.$table=t.table=t.$tbody=t.tbody=null}e._destroyHeaderCells(),t.currentTouchId=null,t.$header&&t.$header.remove();let l=r.tableClassName,i=Kl("div"),n=Xl(i),s=Kl("div"),a=Xl(s);return i.className=l+"-header",s.className=l+"-header-row",t.$header=n,t.header=i,t.$headerRow=a,t.headerRow=s,a.appendTo(t.$header),n.prependTo(this.$el),Zl(e.$el),r.width===ti.Width.SCROLL?this.el.style.overflow="hidden":this.el.style.overflow="",!r.height&&r.virtualTable&&(r.height=o.getElementHeight(this.$el[0],!0)),this},ti.prototype._renderSkeletonHeaderCells=function(){let e,t=this,o=t.p,r=t.o,l=r.allowCellPreview,i=r.allowHeaderCellPreview,n=r.tableClassName+"-header-cell",s=o.headerRow;Jl&&(e=function(e){return e.preventDefault(),this.dragDrop(),!1});let a=function(e){e.preventDefault()};for(let d=0;d<o.visibleColumns.length;d++){let u=o.visibleColumns[d];if(u.visible){let h=Kl("div"),c=Xl(h);h.draggable=!0,h.className=n,h.style.width=u.actualWidth+"px",r.sortableColumns&&u.sortable&&(h.className+=" sortable"),h.columnName=u.name,h.setAttribute("data-column",u.name);let p=Kl("div");p.innerHTML=r.headerCellFormatter(u.label,u.name),h.appendChild(p),l&&i&&o._bindCellHoverIn(h),s.appendChild(h),o.visibleColumns[d].element=c,c.on("mousedown.dgtable",t._onMouseDownColumnHeader.bind(t)).on("mousemove.dgtable",t._onMouseMoveColumnHeader.bind(t)).on("mouseup.dgtable",t._onMouseUpColumnHeader.bind(t)).on("mouseleave.dgtable",t._onMouseLeaveColumnHeader.bind(t)).on("touchstart.dgtable",t._onTouchStartColumnHeader.bind(t)).on("dragstart.dgtable",t._onStartDragColumnHeader.bind(t)).on("click.dgtable",t._onClickColumnHeader.bind(t)).on("contextmenu.dgtable",a),Xl(p).on("dragenter.dgtable",t._onDragEnterColumnHeader.bind(t)).on("dragover.dgtable",t._onDragOverColumnHeader.bind(t)).on("dragleave.dgtable",t._onDragLeaveColumnHeader.bind(t)).on("drop.dgtable",t._onDropColumnHeader.bind(t)),Jl&&c.on("selectstart.dgtable",e.bind(h)),c.css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"})}}return this.trigger("headerrowcreate",s),this},ti.prototype._renderSkeletonBody=function(){let e=this,t=e.p,r=e.o,l=r.tableClassName;if(r.virtualTable&&!t.virtualRowHeight){let r,i=function(){let e=Kl("div"),t=e.appendChild(Kl("div")),o=t.appendChild(Kl("div"));return e.className=l+"-row",t.className=l+"-cell",o.innerHTML="0",e.style.visibility="hidden",e.style.position="absolute",e},n=Xl("<div>").addClass(e.el.className).css({"z-index":-1,position:"absolute",left:"0",top:"-9999px",width:"1px",overflow:"hidden"}).append(Xl("<div>").addClass(l).append(r=Xl("<div>").addClass(l+"-body").css("width",99999)));n.appendTo(document.body);let s=i(),a=i(),d=i();r.append(s,a,d),t.virtualRowHeightFirst=o.getElementHeight(s,!0,!0,!0),t.virtualRowHeight=o.getElementHeight(a,!0,!0,!0),t.virtualRowHeightLast=o.getElementHeight(d,!0,!0,!0),t.virtualRowHeightMin=Math.min(Math.min(t.virtualRowHeightFirst,t.virtualRowHeight),t.virtualRowHeightLast),t.virtualRowHeightMax=Math.max(Math.max(t.virtualRowHeightFirst,t.virtualRowHeight),t.virtualRowHeightLast),n.remove()}if(!t.$table){let i=document.createDocumentFragment(),n=Kl("div"),s=Xl(n);n.className=l,r.virtualTable&&(n.className+=" virtual");let a=r.height-o.getElementHeight(t.$headerRow[0],!0,!0,!0);"border-box"!==s.css("box-sizing")&&(a-=parseFloat(s.css("border-top-width"))||0,a-=parseFloat(s.css("border-bottom-width"))||0,a-=parseFloat(s.css("padding-top"))||0,a-=parseFloat(s.css("padding-bottom"))||0),t.visibleHeight=a,n.style.height=r.height?a+"px":"auto",n.style.display="block",n.style.overflowY="auto",n.style.overflowX=r.width===ti.Width.SCROLL?"auto":"hidden",i.appendChild(n);let d=Kl("div"),u=Xl(d);d.className=r.tableClassName+"-body",t.table=n,t.tbody=d,t.$table=s,t.$tbody=u,r.virtualTable&&(t.virtualVisibleRows=Math.ceil(t.visibleHeight/t.virtualRowHeightMin)),e._calculateVirtualHeight(),Zl(u),Zl(s),n.appendChild(d),e.el.appendChild(i)}return this},ti.prototype._renderSkeleton=function(){return this},ti.prototype._updateLastCellWidthFromScrollbar=function(e){const t=this.p;let o=t.table.offsetWidth-t.table.clientWidth;if(o!==t.scrollbarWidth||e){t.scrollbarWidth=o;for(let e=0;e<t.columns.length;e++)t.columns[e].actualWidthConsideringScrollbarWidth=null;if(t.scrollbarWidth>0&&t.visibleColumns.length>0){let e=t.visibleColumns.length-1;t.visibleColumns[e].actualWidthConsideringScrollbarWidth=t.visibleColumns[e].actualWidth-t.scrollbarWidth;let o=t.visibleColumns[e].actualWidthConsideringScrollbarWidth+"px",r=t.tbody.childNodes;for(let t=0,l=r.length;t<l;t++){let l=r[t];1===l.nodeType&&(l.childNodes[e].style.width=o)}t.headerRow.childNodes[e].style.width=o}}return this},ti.prototype._updateTableWidth=function(e){const t=this.o,r=this.p;let l=this._calculateTbodyWidth();if(r.tbody.style.minWidth=l+"px",r.headerRow.style.minWidth=l+(r.scrollbarWidth||0)+"px",r.$table.off("scroll",r.onTableScrolledHorizontallyBound),t.width===ti.Width.AUTO)o.setElementWidth(r.$table[0],o.getElementWidth(r.$tbody[0],!0,!0,!0)),o.setElementWidth(this.$el[0],o.getElementWidth(r.$table[0],!0,!0,!0));else if(t.width===ti.Width.SCROLL){if(e){let e=r.table?r.table.scrollTop:0,t=r.table?r.table.scrollLeft:0;!function(e){let t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}(this.el),r.table.scrollTop=e,r.table.scrollLeft=t,r.header.scrollLeft=t}r.$table.on("scroll",r.onTableScrolledHorizontallyBound)}return this},ti.prototype._isTableRtl=function(){return"rtl"===this.p.$table.css("direction")},ti.prototype._serializeColumnWidth=function(e){return e.widthMode===oi.AUTO?"auto":e.widthMode===oi.RELATIVE?100*e.width+"%":e.width},ti.prototype._cellMouseOverEvent=function(e){const t=this.o,r=this.p;let l=e.firstChild;if(l.scrollWidth-l.clientWidth>1||l.scrollHeight-l.clientHeight>1){this.hideCellPreview(),r.abortCellPreview=!1;let i=Xl(e),n=Xl(l);const s=e.parentNode;let a=Kl("div"),d=Xl(a);a.innerHTML=e.innerHTML,a.className=t.cellPreviewClassName;let u=i.hasClass(t.tableClassName+"-header-cell");u&&(a.className+=" header",i.hasClass("sortable")&&(a.className+=" sortable"),a.draggable=!0,Xl(a).on("mousedown",this._onMouseDownColumnHeader.bind(this)).on("mousemove",this._onMouseMoveColumnHeader.bind(this)).on("mouseup",this._onMouseUpColumnHeader.bind(this)).on("mouseleave",this._onMouseLeaveColumnHeader.bind(this)).on("touchstart",this._onTouchStartColumnHeader.bind(this)).on("dragstart",this._onStartDragColumnHeader.bind(this)).on("click",this._onClickColumnHeader.bind(this)).on("contextmenu.dgtable",(function(e){e.preventDefault()})),Xl(a.firstChild).on("dragenter",this._onDragEnterColumnHeader.bind(this)).on("dragover",this._onDragOverColumnHeader.bind(this)).on("dragleave",this._onDragLeaveColumnHeader.bind(this)).on("drop",this._onDropColumnHeader.bind(this)),Jl&&Xl(a).on("selectstart",function(e){return e.preventDefault(),this.dragDrop(),!1}.bind(a)));let h=parseFloat(i.css("padding-left"))||0,c=parseFloat(i.css("padding-right"))||0,p=parseFloat(i.css("padding-top"))||0,f=parseFloat(i.css("padding-bottom"))||0,m=l.scrollWidth+(e.clientWidth-l.offsetWidth),g="border-box"===i.css("box-sizing");if(g?d.css("box-sizing","border-box"):(m-=h+c,d.css("margin-top",parseFloat(Xl(e).css("border-top-width"))||0)),!r.transparentBgColor1){let e=document.createElement("div");e.style.backgroundColor="transparent",r.transparentBgColor1=Xl(e).css("background-color"),e.style.backgroundColor="rgba(0,0,0,0)",r.transparentBgColor2=Xl(e).css("background-color")}let b={"box-sizing":g?"border-box":"content-box",width:m,"min-height":o.getElementHeight(i[0]),"padding-left":h,"padding-right":c,"padding-top":p,"padding-bottom":f,overflow:"hidden",position:"absolute","z-index":"-1",left:"0",top:"0",cursor:i.css("cursor")};if(b){let t=Xl(e).css("background-color");t!==r.transparentBgColor1&&t!==r.transparentBgColor2||(t=Xl(s).css("background-color")),t!==r.transparentBgColor1&&t!==r.transparentBgColor2||(t="#fff"),b["background-color"]=t}d.css(b),this.el.appendChild(a),Xl(a.firstChild).css({direction:n.css("direction"),"white-space":n.css("white-space")}),u&&d.css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"}),a.rowIndex=s.rowIndex;let v=a.physicalRowIndex=s.physicalRowIndex;a.columnName=r.visibleColumns[ql.call(s.childNodes,e)].name;try{let t=Vl.saveSelection(e);t&&Vl.restoreSelection(a,t)}catch(e){}if(this.trigger("cellpreview",a.firstChild,null==v?null:v,a.columnName,null==v?null:r.rows[v],e),r.abortCellPreview)return void d.remove();null!=v&&a.addEventListener("click",(e=>{this.trigger("rowclick",e,s.rowIndex,v,s,r.rows[v])}));let C=this.$el,w=C[0]===window?Xl(document):C,y=i.offset(),_=C.offset(),R="right"===i.css("float"),W=R?"right":"left";if(R){let e=Xl(window).width();y.right=e-(y.left+o.getElementWidth(i[0],!0,!0,!0)),_.right=e-(_.left+o.getElementWidth(C[0],!0,!0,!0))}y.left-=parseFloat(C.css("border-left-width"))||0,y.right-=parseFloat(C.css("border-right-width"))||0,y.top-=parseFloat(C.css("border-top-width"))||0,y[W]+=parseFloat(Xl(e).css("border-"+W+"-width"))||0,y.top+=parseFloat(Xl(e).css("border-top-width"))||parseFloat(Xl(e).css("border-bottom-width"))||0,y.left-=_.left,y.right-=_.right,y.top-=_.top;let T=0,E=C-o.getElementWidth(d[0],!0,!0,!0);y[W]=y[W]<T?T:y[W]>E?E:y[W];let S=o.getElementHeight(i[0],!0,!0,!0),N=w.scrollTop()+o.getElementHeight(C[0],!0)-S;y.top>N&&(y.top=Math.max(0,N));let M={top:y.top,"z-index":9999};M[W]=y[W],d.css(M),a.__cell=e,r.$cellPreviewCell=d,e.__previewCell=a,r._bindCellHoverOut(e),r._bindCellHoverOut(a),d.on("wheel",(()=>{this.hideCellPreview()}))}},ti.prototype._cellMouseOutEvent=function(e){this.hideCellPreview()},ti.prototype.hideCellPreview=function(){const e=this.p;if(e.$cellPreviewCell){let t,o=e.$cellPreviewCell[0],r=o.__cell;try{t=Vl.saveSelection(o)}catch(e){}e.$cellPreviewCell.remove(),e._unbindCellHoverOut(r),e._unbindCellHoverOut(o);try{t&&Vl.restoreSelection(r,t)}catch(e){}this.trigger("cellpreviewdestroy",o.firstChild,o.physicalRowIndex,o.columnName,r),r.__previewCell=null,o.__cell=null,e.$cellPreviewCell=null,e.abortCellPreview=!1}else e.abortCellPreview=!0;return this};const oi={AUTO:0,ABSOLUTE:1,RELATIVE:2};ti.Width={NONE:"none",AUTO:"auto",SCROLL:"scroll"},Xl.controls||(Xl.controls={}),Xl.controls.dgtable=ti,module.exports=ti;
5
+ "use strict";var e=require("jquery"),t=require("@danielgindi/dom-utils/lib/ScrollHelper"),r=require("@danielgindi/dom-utils/lib/Css"),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=function(e){return e&&e.Math==Math&&e},n=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof o&&o)||function(){return this}()||Function("return this")(),l={},s=function(e){try{return!!e()}catch(e){return!0}},a=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),d=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),u=d,h=Function.prototype.call,c=u?h.bind(h):function(){return h.apply(h,arguments)},p={},m={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,g=f&&!m.call({1:2},1);p.f=g?function(e){var t=f(this,e);return!!t&&t.enumerable}:m;var b,v,C=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},y=d,w=Function.prototype,_=w.call,W=y&&w.bind.bind(_,_),E=y?W:function(e){return function(){return _.apply(e,arguments)}},I=E,R=I({}.toString),S=I("".slice),x=function(e){return S(R(e),8,-1)},H=x,N=E,T=function(e){if("Function"===H(e))return N(e)},P=s,F=x,A=Object,M=T("".split),O=P((function(){return!A("z").propertyIsEnumerable(0)}))?function(e){return"String"==F(e)?M(e,""):A(e)}:A,z=function(e){return null==e},k=z,L=TypeError,$=function(e){if(k(e))throw L("Can't call method on "+e);return e},B=O,V=$,D=function(e){return B(V(e))},j="object"==typeof document&&document.all,U={all:j,IS_HTMLDDA:void 0===j&&void 0!==j},q=U.all,X=U.IS_HTMLDDA?function(e){return"function"==typeof e||e===q}:function(e){return"function"==typeof e},Y=X,G=U.all,J=U.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:Y(e)||e===G}:function(e){return"object"==typeof e?null!==e:Y(e)},K=n,Q=X,Z=function(e){return Q(e)?e:void 0},ee=function(e,t){return arguments.length<2?Z(K[e]):K[e]&&K[e][t]},te=T({}.isPrototypeOf),re=ee("navigator","userAgent")||"",oe=n,ie=re,ne=oe.process,le=oe.Deno,se=ne&&ne.versions||le&&le.version,ae=se&&se.v8;ae&&(v=(b=ae.split("."))[0]>0&&b[0]<4?1:+(b[0]+b[1])),!v&&ie&&(!(b=ie.match(/Edge\/(\d+)/))||b[1]>=74)&&(b=ie.match(/Chrome\/(\d+)/))&&(v=+b[1]);var de=v,ue=de,he=s,ce=!!Object.getOwnPropertySymbols&&!he((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ue&&ue<41})),pe=ce&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,me=ee,fe=X,ge=te,be=Object,ve=pe?function(e){return"symbol"==typeof e}:function(e){var t=me("Symbol");return fe(t)&&ge(t.prototype,be(e))},Ce=String,ye=function(e){try{return Ce(e)}catch(e){return"Object"}},we=X,_e=ye,We=TypeError,Ee=function(e){if(we(e))return e;throw We(_e(e)+" is not a function")},Ie=Ee,Re=z,Se=c,xe=X,He=J,Ne=TypeError,Te={exports:{}},Pe=n,Fe=Object.defineProperty,Ae=function(e,t){try{Fe(Pe,e,{value:t,configurable:!0,writable:!0})}catch(r){Pe[e]=t}return t},Me=Ae,Oe=n["__core-js_shared__"]||Me("__core-js_shared__",{}),ze=Oe;(Te.exports=function(e,t){return ze[e]||(ze[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.0",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.0/LICENSE",source:"https://github.com/zloirock/core-js"});var ke=$,Le=Object,$e=function(e){return Le(ke(e))},Be=$e,Ve=T({}.hasOwnProperty),De=Object.hasOwn||function(e,t){return Ve(Be(e),t)},je=T,Ue=0,qe=Math.random(),Xe=je(1..toString),Ye=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Xe(++Ue+qe,36)},Ge=n,Je=Te.exports,Ke=De,Qe=Ye,Ze=ce,et=pe,tt=Je("wks"),rt=Ge.Symbol,ot=rt&&rt.for,it=et?rt:rt&&rt.withoutSetter||Qe,nt=function(e){if(!Ke(tt,e)||!Ze&&"string"!=typeof tt[e]){var t="Symbol."+e;Ze&&Ke(rt,e)?tt[e]=rt[e]:tt[e]=et&&ot?ot(t):it(t)}return tt[e]},lt=c,st=J,at=ve,dt=TypeError,ut=nt("toPrimitive"),ht=function(e,t){if(!st(e)||at(e))return e;var r,o,i=(o=e[ut],Re(o)?void 0:Ie(o));if(i){if(void 0===t&&(t="default"),r=lt(i,e,t),!st(r)||at(r))return r;throw dt("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,o;if("string"===t&&xe(r=e.toString)&&!He(o=Se(r,e)))return o;if(xe(r=e.valueOf)&&!He(o=Se(r,e)))return o;if("string"!==t&&xe(r=e.toString)&&!He(o=Se(r,e)))return o;throw Ne("Can't convert object to primitive value")}(e,t)},ct=ve,pt=function(e){var t=ht(e,"string");return ct(t)?t:t+""},mt=J,ft=n.document,gt=mt(ft)&&mt(ft.createElement),bt=!a&&!s((function(){return 7!=Object.defineProperty((e="div",gt?ft.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),vt=a,Ct=c,yt=p,wt=C,_t=D,Wt=pt,Et=De,It=bt,Rt=Object.getOwnPropertyDescriptor;l.f=vt?Rt:function(e,t){if(e=_t(e),t=Wt(t),It)try{return Rt(e,t)}catch(e){}if(Et(e,t))return wt(!Ct(yt.f,e,t),e[t])};var St={},xt=a&&s((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ht=J,Nt=String,Tt=TypeError,Pt=function(e){if(Ht(e))return e;throw Tt(Nt(e)+" is not an object")},Ft=a,At=bt,Mt=xt,Ot=Pt,zt=pt,kt=TypeError,Lt=Object.defineProperty,$t=Object.getOwnPropertyDescriptor;St.f=Ft?Mt?function(e,t,r){if(Ot(e),t=zt(t),Ot(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var o=$t(e,t);o&&o.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:o.configurable,enumerable:"enumerable"in r?r.enumerable:o.enumerable,writable:!1})}return Lt(e,t,r)}:Lt:function(e,t,r){if(Ot(e),t=zt(t),Ot(r),At)try{return Lt(e,t,r)}catch(e){}if("get"in r||"set"in r)throw kt("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Bt=St,Vt=C,Dt=a?function(e,t,r){return Bt.f(e,t,Vt(1,r))}:function(e,t,r){return e[t]=r,e},jt={exports:{}},Ut=a,qt=De,Xt=Function.prototype,Yt=Ut&&Object.getOwnPropertyDescriptor,Gt=qt(Xt,"name"),Jt={EXISTS:Gt,PROPER:Gt&&"something"===function(){}.name,CONFIGURABLE:Gt&&(!Ut||Ut&&Yt(Xt,"name").configurable)},Kt=X,Qt=Oe,Zt=T(Function.toString);Kt(Qt.inspectSource)||(Qt.inspectSource=function(e){return Zt(e)});var er,tr,rr,or,ir=Qt.inspectSource,nr=X,lr=n.WeakMap,sr=nr(lr)&&/native code/.test(String(lr)),ar=Te.exports,dr=Ye,ur=ar("keys"),hr={},cr=sr,pr=n,mr=J,fr=Dt,gr=De,br=Oe,vr=hr,Cr=pr.TypeError,yr=pr.WeakMap;if(cr||br.state){var wr=br.state||(br.state=new yr);wr.get=wr.get,wr.has=wr.has,wr.set=wr.set,er=function(e,t){if(wr.has(e))throw Cr("Object already initialized");return t.facade=e,wr.set(e,t),t},tr=function(e){return wr.get(e)||{}},rr=function(e){return wr.has(e)}}else{var _r=ur[or="state"]||(ur[or]=dr(or));vr[_r]=!0,er=function(e,t){if(gr(e,_r))throw Cr("Object already initialized");return t.facade=e,fr(e,_r,t),t},tr=function(e){return gr(e,_r)?e[_r]:{}},rr=function(e){return gr(e,_r)}}var Wr={set:er,get:tr,has:rr,enforce:function(e){return rr(e)?tr(e):er(e,{})},getterFor:function(e){return function(t){var r;if(!mr(t)||(r=tr(t)).type!==e)throw Cr("Incompatible receiver, "+e+" required");return r}}},Er=s,Ir=X,Rr=De,Sr=a,xr=Jt.CONFIGURABLE,Hr=ir,Nr=Wr.enforce,Tr=Wr.get,Pr=Object.defineProperty,Fr=Sr&&!Er((function(){return 8!==Pr((function(){}),"length",{value:8}).length})),Ar=String(String).split("String"),Mr=jt.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Rr(e,"name")||xr&&e.name!==t)&&(Sr?Pr(e,"name",{value:t,configurable:!0}):e.name=t),Fr&&r&&Rr(r,"arity")&&e.length!==r.arity&&Pr(e,"length",{value:r.arity});try{r&&Rr(r,"constructor")&&r.constructor?Sr&&Pr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var o=Nr(e);return Rr(o,"source")||(o.source=Ar.join("string"==typeof t?t:"")),e};Function.prototype.toString=Mr((function(){return Ir(this)&&Tr(this).source||Hr(this)}),"toString");var Or=X,zr=St,kr=jt.exports,Lr=Ae,$r={},Br=Math.ceil,Vr=Math.floor,Dr=Math.trunc||function(e){var t=+e;return(t>0?Vr:Br)(t)},jr=function(e){var t=+e;return t!=t||0===t?0:Dr(t)},Ur=jr,qr=Math.max,Xr=Math.min,Yr=function(e,t){var r=Ur(e);return r<0?qr(r+t,0):Xr(r,t)},Gr=jr,Jr=Math.min,Kr=function(e){return(t=e.length)>0?Jr(Gr(t),9007199254740991):0;var t},Qr=D,Zr=Yr,eo=Kr,to=function(e){return function(t,r,o){var i,n=Qr(t),l=eo(n),s=Zr(o,l);if(e&&r!=r){for(;l>s;)if((i=n[s++])!=i)return!0}else for(;l>s;s++)if((e||s in n)&&n[s]===r)return e||s||0;return!e&&-1}},ro={includes:to(!0),indexOf:to(!1)},oo=De,io=D,no=ro.indexOf,lo=hr,so=T([].push),ao=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");$r.f=Object.getOwnPropertyNames||function(e){return function(e,t){var r,o=io(e),i=0,n=[];for(r in o)!oo(lo,r)&&oo(o,r)&&so(n,r);for(;t.length>i;)oo(o,r=t[i++])&&(~no(n,r)||so(n,r));return n}(e,ao)};var uo={};uo.f=Object.getOwnPropertySymbols;var ho=ee,co=$r,po=uo,mo=Pt,fo=T([].concat),go=ho("Reflect","ownKeys")||function(e){var t=co.f(mo(e)),r=po.f;return r?fo(t,r(e)):t},bo=De,vo=go,Co=l,yo=St,wo=function(e,t,r){for(var o=vo(t),i=yo.f,n=Co.f,l=0;l<o.length;l++){var s=o[l];bo(e,s)||r&&bo(r,s)||i(e,s,n(t,s))}},_o=s,Wo=X,Eo=/#|\.prototype\./,Io=function(e,t){var r=So[Ro(e)];return r==Ho||r!=xo&&(Wo(t)?_o(t):!!t)},Ro=Io.normalize=function(e){return String(e).replace(Eo,".").toLowerCase()},So=Io.data={},xo=Io.NATIVE="N",Ho=Io.POLYFILL="P",No=Io,To=n,Po=l.f,Fo=Dt,Ao=function(e,t,r,o){o||(o={});var i=o.enumerable,n=void 0!==o.name?o.name:t;if(Or(r)&&kr(r,n,o),o.global)i?e[t]=r:Lr(t,r);else{try{o.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:zr.f(e,t,{value:r,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e},Mo=Ae,Oo=wo,zo=No,ko=function(e,t){var r,o,i,n,l,s=e.target,a=e.global,d=e.stat;if(r=a?To:d?To[s]||Mo(s,{}):(To[s]||{}).prototype)for(o in t){if(n=t[o],i=e.dontCallGetSet?(l=Po(r,o))&&l.value:r[o],!zo(a?o:s+(d?".":"#")+o,e.forced)&&void 0!==i){if(typeof n==typeof i)continue;Oo(n,i)}(e.sham||i&&i.sham)&&Fo(n,"sham",!0),Ao(r,o,n,e)}},Lo={};Lo[nt("toStringTag")]="z";var $o="[object z]"===String(Lo),Bo=X,Vo=x,Do=nt("toStringTag"),jo=Object,Uo="Arguments"==Vo(function(){return arguments}()),qo=$o?Vo:function(e){var t,r,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=jo(e),Do))?r:Uo?Vo(t):"Object"==(o=Vo(t))&&Bo(t.callee)?"Arguments":o},Xo=String,Yo=function(e){if("Symbol"===qo(e))throw TypeError("Cannot convert a Symbol value to a string");return Xo(e)},Go=ko,Jo=a,Ko=n,Qo=T,Zo=De,ei=X,ti=te,ri=Yo,oi=St.f,ii=wo,ni=Ko.Symbol,li=ni&&ni.prototype;if(Jo&&ei(ni)&&(!("description"in li)||void 0!==ni().description)){var si={},ai=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:ri(arguments[0]),t=ti(li,this)?new ni(e):void 0===e?ni():ni(e);return""===e&&(si[t]=!0),t};ii(ai,ni),ai.prototype=li,li.constructor=ai;var di="Symbol(test)"==String(ni("test")),ui=Qo(li.valueOf),hi=Qo(li.toString),ci=/^Symbol\((.*)\)[^)]+$/,pi=Qo("".replace),mi=Qo("".slice);oi(li,"description",{configurable:!0,get:function(){var e=ui(this);if(Zo(si,e))return"";var t=hi(e),r=di?mi(t,7,-1):pi(t,ci,"$1");return""===r?void 0:r}}),Go({global:!0,constructor:!0,forced:!0},{Symbol:ai})}var fi,gi,bi=ye,vi=TypeError,Ci=pt,yi=St,wi=C,_i=Yr,Wi=Kr,Ei=function(e,t,r){var o=Ci(t);o in e?yi.f(e,o,wi(0,r)):e[o]=r},Ii=Array,Ri=Math.max,Si=function(e,t,r){for(var o=Wi(e),i=_i(t,o),n=_i(void 0===r?o:r,o),l=Ii(Ri(n-i,0)),s=0;i<n;i++,s++)Ei(l,s,e[i]);return l.length=s,l},xi=Math.floor,Hi=function(e,t){var r=e.length,o=xi(r/2);return r<8?Ni(e,t):Ti(e,Hi(Si(e,0,o),t),Hi(Si(e,o),t),t)},Ni=function(e,t){for(var r,o,i=e.length,n=1;n<i;){for(o=n,r=e[n];o&&t(e[o-1],r)>0;)e[o]=e[--o];o!==n++&&(e[o]=r)}return e},Ti=function(e,t,r,o){for(var i=t.length,n=r.length,l=0,s=0;l<i||s<n;)e[l+s]=l<i&&s<n?o(t[l],r[s])<=0?t[l++]:r[s++]:l<i?t[l++]:r[s++];return e},Pi=Hi,Fi=s,Ai=re.match(/firefox\/(\d+)/i),Mi=!!Ai&&+Ai[1],Oi=/MSIE|Trident/.test(re),zi=re.match(/AppleWebKit\/(\d+)\./),ki=!!zi&&+zi[1],Li=ko,$i=T,Bi=Ee,Vi=$e,Di=Kr,ji=function(e,t){if(!delete e[t])throw vi("Cannot delete property "+bi(t)+" of "+bi(e))},Ui=Yo,qi=s,Xi=Pi,Yi=Mi,Gi=Oi,Ji=de,Ki=ki,Qi=[],Zi=$i(Qi.sort),en=$i(Qi.push),tn=qi((function(){Qi.sort(void 0)})),rn=qi((function(){Qi.sort(null)})),on=!!(gi=[]["sort"])&&Fi((function(){gi.call(null,fi||function(){return 1},1)})),nn=!qi((function(){if(Ji)return Ji<70;if(!(Yi&&Yi>3)){if(Gi)return!0;if(Ki)return Ki<603;var e,t,r,o,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(o=0;o<47;o++)Qi.push({k:t+o,v:r})}for(Qi.sort((function(e,t){return t.v-e.v})),o=0;o<Qi.length;o++)t=Qi[o].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));Li({target:"Array",proto:!0,forced:tn||!rn||!on||!nn},{sort:function(e){void 0!==e&&Bi(e);var t=Vi(this);if(nn)return void 0===e?Zi(t):Zi(t,e);var r,o,i=[],n=Di(t);for(o=0;o<n;o++)o in t&&en(i,t[o]);for(Xi(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Ui(t)>Ui(r)?1:-1}}(e)),r=Di(i),o=0;o<r;)t[o]=i[o++];for(;o<n;)ji(t,o++);return t}});const ln=Array.prototype.indexOf,sn=function(e,t){for(let r=0,o=e.length;r>=0&&r<o;r+=1)if(t(e[r],r,e))return e[r]},an=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")};function dn(){let e=[];return Object.assign(e,dn.prototype),e.initialize.apply(e,arguments),e}dn.prototype=[],dn.prototype.initialize=function(e){e=e||{},this.sortColumn=null==e.sortColumn?[]:e.sortColumn},dn.prototype.add=function(e,t){let r,o;if("splice"in e&&"length"in e)if("number"==typeof t)for(r=0,o=e.length;r<o;r++)this.splice(t++,0,e[r]);else for(r=0,o=e.length;r<o;r++)this.push(e[r]);else"number"==typeof t?this.splice(t,0,e):this.push(e)},dn.prototype.reset=function(e){this.length=0,e&&this.add(e)},dn.prototype.filteredCollection=function(e,t){if(e&&t){let r=new dn({sortColumn:this.sortColumn});for(let o,i=0,n=this.length;i<n;i++)o=this[i],e(o,t)&&(o.__i=i,r.push(o));return r}return null},dn.prototype.onComparatorRequired=null,dn.prototype.onSort=null;let un=dn.prototype.sort;function hn(e,t){let r=e.column,o=e.comparePath||r;"string"==typeof o&&(o=o.split("."));let i,n=o.length,l=n>1,s=t?1:-1,a=t?-1:1;return function(e,t){let r=e[o[0]],d=t[o[0]];if(l)for(i=1;i<n;i++)r=r&&r[o[i]],d=d&&d[o[i]];return r===d?0:null==r?s:null==d?a:r<d?s:a}}function cn(){let e=[];return Object.assign(e,cn.prototype),e.initialize.apply(e,arguments),e}dn.prototype.sort=function(e){let t;if(this.sortColumn.length){let r=[];for(let e=0;e<this.sortColumn.length;e++){t=null;const o=hn(this.sortColumn[e],this.sortColumn[e].descending);this.onComparatorRequired&&(t=this.onComparatorRequired(this.sortColumn[e].column,this.sortColumn[e].descending,o)),t||(t=o),r.push(t.bind(this))}if(1===r.length)t=r[0],un.call(this,t);else{let e,o=r.length;t=function(t,i){for(let n=0;n<o;n++)if(e=r[n](t,i),0!==e)return e;return e},un.call(this,t)}e||this.onSort&&this.onSort(t)}return t},cn.prototype=[],cn.prototype.initialize=function(){},cn.prototype.get=function(e){for(let t=0,r=this.length;t<r;t++)if(this[t].name===e)return this[t];return null},cn.prototype.indexOf=function(e){for(let t=0,r=this.length;t<r;t++)if(this[t].name===e)return t;return-1},cn.prototype.getByOrder=function(e){for(let t=0,r=this.length;t<r;t++)if(this[t].order===e)return this[t];return null},cn.prototype.normalizeOrder=function(){let e,t=[];for(e=0;e<this.length;e++)t.push(this[e]);for(t.sort((function(e,t){return e.order<t.order?-1:e.order>t.order?1:0})),e=0;e<t.length;e++)t[e].order=e;return this},cn.prototype.getColumns=function(){let e=[];for(let t,r=0;r<this.length;r++)t=this[r],e.push(t);return e.sort(((e,t)=>e.order<t.order?-1:e.order>t.order?1:0)),e},cn.prototype.getVisibleColumns=function(){let e=[];for(let t,r=0;r<this.length;r++)t=this[r],t.visible&&e.push(t);return e.sort(((e,t)=>e.order<t.order?-1:e.order>t.order?1:0)),e},cn.prototype.getMaxOrder=function(){let e=0;for(let t,r=0;r<this.length;r++)t=this[r],t.order>e&&(e=t.order);return e},cn.prototype.moveColumn=function(e,t){if(e&&t){let r,o,i=e.order,n=t.order;if(i<n)for(r=i+1;r<=n;r++)o=this.getByOrder(r),o.order--;else for(r=i-1;r>=n;r--)o=this.getByOrder(r),o.order++;e.order=n}return this};class pn{static saveSelection(e){let t=window.getSelection().getRangeAt(0);if(e!==t.commonAncestorContainer&&!function(e,t){for(;(e=e.parentNode)&&e!==t;);return!!e}(t.commonAncestorContainer,e))return null;let r=t.cloneRange();r.selectNodeContents(e),r.setEnd(t.startContainer,t.startOffset);let o=r.toString().length;return{start:o,end:o+t.toString().length}}static restoreSelection(e,t){let r,o=0,i=[e],n=!1,l=!1,s=document.createRange();for(s.setStart(e,0),s.collapse(!0);!l&&(r=i.pop());)if(3===r.nodeType){let e=o+r.length;!n&&t.start>=o&&t.start<=e&&(s.setStart(r,t.start-o),n=!0),n&&t.end>=o&&t.end<=e&&(s.setEnd(r,t.end-o),l=!0),o=e}else{let e=r.childNodes.length;for(;e--;)i.push(r.childNodes[e])}let a=window.getSelection();a.removeAllRanges(),a.addRange(s)}}const mn=Object.prototype.hasOwnProperty;class fn{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:vn,onItemRender:null,onItemUnrender:null,virtualWrapper:null,currentItemsParent:null,cachedItemHeights:[],cachedItemEstimatedHeights:[],cachedItemPositions:[],itemPositionsNeedsUpdate:0,boundRender:this.render.bind(this),existingEls:[]};r.currentItemsParent=r.userItemsParent||r.list,"boolean"==typeof e.hookScrollEvent?this.setHookScrollEvent(e.hookScrollEvent):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)}destroy(){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.invalidatePositions()}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||vn,this}setOnItemRender(e){return this._p.onItemRender=e,this}setOnItemUnrender(e){return this._p.onItemUnrender=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();const t=e.onItemUnrender,r=e.existingEls;for(let e=0;e<r.length;e++){const o=r[e];void 0!==o[gn]&&(t&&t(o),delete o[gn])}return this}render(){const e=this._p,t=e.list,r=e.virtual;let o=e.virtualWrapper,i=t.scrollTop,n=i+t.clientHeight,l=e.count,s=e.buffer,a=e.onItemUnrender,d=e.existingEls,u=d.length;if(r){const r=t.clientWidth;o||(o=e.virtualWrapper=e.userItemsParent,o||(o=e.virtualWrapper=document.createElement("div"),t.appendChild(o)),this._resetCurrentItemsParent(),e.autoVirtualWrapperWidth?(o.style.width="100%",e.virtualWrapperWidthWasSet=!0):e.virtualWrapperWidthWasSet=!1);for(let e=0;e<u;e++)d[e][bn]=!0;this._calculateItemPosition(e.count-1);let a,h=this._getExistingElsRange(),c=Cn(e.cachedItemPositions,i),p=Math.max(0,c-s),m=p,f=this._calculateItemPosition(m),g=s;for(;(f<n||g-- >0)&&m<l;){let t;-1!==h.firstIndex&&m>=h.firstIndex&&m<=h.lastIndex&&(t=d.find((e=>e[gn]===m&&!0===e[bn]))),void 0===t&&(t=(h.firstIndex<p||h.firstValidArrayIndex>0?d.find((e=>(e[gn]<p||!1===mn.call(e,gn))&&!0===e[bn])):void 0)||wn(d,(e=>!0===e[bn]))),void 0!==t&&delete t[bn];let r=a?a.nextSibling:o.childNodes[0];r&&r===t&&(r=r.nextSibling),a=this._dequeueElementForIndex(t,m,r),f=e.cachedItemPositions[m]+e.cachedItemHeights[m],m++}let b=this.estimateFullHeight();e.virtualWrapper.style.height=b+"px",r!==t.clientWidth&&this.render()}else if(l!==d.length){for(let e=0;e<u;e++)d[e][bn]=!0;let e;for(let r=0;r<l;r++){let o=d.find((e=>e[gn]===r&&!0===e[bn]));void 0!==o&&delete o[bn];let i=e?e.nextSibling:t.childNodes[0];i&&i===o&&(i=i.nextSibling),e=this._dequeueElementForIndex(o,r,i)}}u=d.length;for(let e=0;e<u;e++){const t=d[e];if(!0!==t[bn])continue;let r=t.parentNode;r&&r.removeChild(t),a&&void 0!==t[gn]&&a(t),d.splice(e,1),e--,u--}}addItemsAt(e,t=-1){if("number"!=typeof e||e<=0)return this;const r=this._p;if((t<-1||t>=r.count)&&(t=r.count),r.count+=e,r.virtual)t>=0&&t<r.count&&this._invalidateItemIndexesAt(t,-1);else{let o=r.existingEls;if(o.length!==r.count-e)return this;let i=this._getExistingElsRange();if(-1===i.firstValidArrayIndex)return this;let n=i.firstValidArrayIndex+t-i.firstIndex;this._pushItemIndexesAt(t,e);let l=o[n-1];for(let r=t,i=t+e;r<i;r++){let e=l?l.nextSibling:o[0];l=this._dequeueElementForIndex(void 0,r,e)}}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 o=r.existingEls;if(o.length!==r.count+e)return this;let i=this._getExistingElsRange();if(-1===i.firstValidArrayIndex)return this;this._pushItemIndexesAt(t+e,-e);const n=r.onItemUnrender;let l=i.firstValidArrayIndex+t-i.firstIndex;if(l<o.length){for(let t=0;t<e;t++){let e=o[l+t],r=e.parentNode;r&&r.removeChild(e),n&&void 0!==e[gn]&&n(e)}o.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 o=this._getExistingElsRange();if(e>=o.firstIndex&&e<=o.lastIndex){let t=r[o.firstValidArrayIndex+e-o.firstIndex];delete t[gn],this._dequeueElementForIndex(t,e,t.nextSibling)}}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,o=this._getExistingElsRange();return e>=o.firstIndex&&e<=o.lastIndex?r[o.firstValidArrayIndex+e-o.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 o=this.getItemElementAt(e);if(void 0===o)return;const i=t.list;return r.getElementOffset(o).top-r.getElementOffset(i).top+i.scrollTop}}}getItemIndexFromElement(e){return e?e[gn]: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,o,i=t.scrollTop,n=t.clientHeight;if(e.virtual)r=Cn(e.cachedItemPositions,i),o=Cn(e.cachedItemPositions,i+n,r);else{const t=e=>{let t=this.getItemPosition(e);return void 0===t&&(t=1/0),t};r=yn(e.count,t,i),o=yn(e.count,t,i+n,r)}return this.getItemPosition(o)===i+n&&o--,o-r+1}createGhostItemElement(e,t,r){const o=this._p;let i=this._dequeueElementForIndex(null,e,!1);try{t&&o.currentItemsParent.appendChild(i),r(i)}finally{if(t){let e=i.parentNode;e&&e.removeChild(i)}o.onItemUnrender&&o.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 o=r[e];let i=o.parentNode;i&&i.removeChild(o),t&&void 0!==o[gn]&&t(o)}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 o=r.existingEls,i=o.length,n=this._getExistingElsRange();if(-1!==n.firstValidArrayIndex&&(-1===t&&(t=o.length),e>=n.firstIndex&&e<=n.lastIndex))for(let r=n.firstValidArrayIndex+e-n.firstIndex,l=0;r<i&&l<t;r++,l++)delete o[r][gn]}_pushItemIndexesAt(e,t){let r=this._p.existingEls,o=r.length,i=this._getExistingElsRange();if(-1!==i.firstValidArrayIndex&&e>=i.firstIndex&&e<=i.lastIndex)for(let n=i.firstValidArrayIndex+e-i.firstIndex;n<o;n++)r[n][gn]+=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 o=t.count,i=t.cachedItemHeights,n=t.cachedItemEstimatedHeights,l=t.estimatedItemHeight,s=t.itemHeightEstimatorFn;i.length!==o&&(i.length=o,n.length=o,r.length=o);let a=t.itemPositionsNeedsUpdate,d=Math.min(e,o),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 o=i[t];void 0===o&&(o=s?s(t):null,"number"!=typeof o&&(o=l),n[t]=o),u+=o,r[e]=u}t.itemPositionsNeedsUpdate=d+1}if(e>0&&e===t.count){let o=t.cachedItemHeights[e-1];return void 0===o&&(o=t.itemHeightEstimatorFn?t.itemHeightEstimatorFn(e-1):null,"number"!=typeof o&&(o=t.estimatedItemHeight),t.cachedItemEstimatedHeights[e-1]=o),r[e-1]+o}return r[e]}_dequeueElementForIndex(e,t,r){const o=this._p,i=o.virtualWrapper,n=o.currentItemsParent,l=o.existingEls,s=o.onItemRender,a=o.onItemUnrender,d=!e,u=d||t!==e[gn];if(e?a&&u&&a(e):(e=o.itemElementCreatorFn(),i&&!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),e.parentNode===n&&e.nextSibling===r||n.insertBefore(e,r),!d){let t=l.indexOf(e);-1!==t&&l.splice(t,1)}let s=r?l.indexOf(r):-1;if(-1===s?l.push(e):l.splice(s,0,e),i){let r=e.getBoundingClientRect().height,i=o.cachedItemHeights[t];i!==r&&(o.cachedItemHeights[t]=r),(void 0!==i&&r!==i||void 0===i&&r!==o.cachedItemEstimatedHeights[t])&&this._setItemPositionsNeedsUpdate(t+1);let n=this._calculateItemPosition(t);const l=Wn();!1===l?e.style.top=`${n}px`:e.style[l]=`translateY(${n}px)`}}return e[gn]=t,e}_getExistingElsRange(){const e=this._p.existingEls;let t=-1,r=-1;for(let r=0,o=e.length;r<o;r++)if(!1!==mn.call(e[r],gn)){t=r;break}for(let t=e.length-1;t>=0;t--)if(!1!==mn.call(e[t],gn)){r=t;break}return{firstValidArrayIndex:t,lastValidArrayIndex:r,firstIndex:-1!==t?e[t][gn]:-1,lastIndex:-1!==r?e[r][gn]:-1}}}const gn=Symbol("index"),bn=Symbol("reuse"),vn=()=>document.createElement("li"),Cn=(e,t,r=0,o=-1)=>{let i=e.length;if(o<0&&(o+=i),o<=r)return o;for(;r<=o;){let n=Math.floor(r+(o-r)/2),l=e[n];if(l===t||l<=t&&n<i&&e[n+1]>t){for(;n>0&&e[n-1]===l;)n--;return n}l<t?r=n+1:o=n-1}return-1===o?0:i-1},yn=(e,t,r,o=0,i=-1)=>{if(i<0&&(i+=e),i<=o)return i;for(;o<=i;){let n=Math.floor(o+(i-o)/2),l=t(n);if(l===r||l<=r&&n<e&&t(n+1)>r){for(;n>0&&t(n-1)===l;)n--;return n}l<r?o=n+1:i=n-1}return-1===i?0:t(e-1)},wn=(e,t)=>{for(let r=e.length-1;r>=0;r--)if(t(e[r]))return e[r]};let _n=null;const Wn=()=>{if(null===_n){let e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],t=document.createElement("div");_n=!1;for(let r of e)if(t&&void 0!==t.style[r]){_n=r;break}}return _n};function En(e,t){let r=t.column,o=null==t.keyword?"":t.keyword.toString();if(!o||!r)return!0;let i=e[r];return null!=i&&(i=i.toString(),t.caseSensitive||(i=i.toLowerCase(),o=o.toLowerCase()),-1!==i.indexOf(o))}const In=Array.prototype.indexOf,Rn=e;let Sn=navigator.userAgent,xn=-1!==Sn.indexOf("MSIE ")?parseFloat(Sn.substr(Sn.indexOf("MSIE ")+5)):null,Hn=xn&&xn<10,Nn=document.createElement.bind(document);const Tn=Object.prototype.hasOwnProperty,Pn=Symbol("safe"),Fn=Symbol("hover_in"),An=Symbol("hover_out"),Mn=Symbol("row_click");function On(e){var t,r;t=["relative","absolute","fixed"],r=e.css("position"),ln.call(t,r)>=0||e.css("position","relative")}const zn=e=>/^(?:INPUT|TEXTAREA|BUTTON|SELECT)$/.test(e.target.tagName);let kn=function e(){if(!(this instanceof e))return new(Function.prototype.bind.apply(e,[e].concat(Array.prototype.slice.call(arguments,0))));this.initialize.apply(this,arguments)};kn.VERSION="@@VERSION",kn.prototype.VERSION=kn.VERSION,kn.prototype.initialize=function(e){let t=this;e=e||{};let r=t.o={},o=t.p={};o.events={},t.el=e.el&&e.el instanceof Element?e.el:document.createElement("div");let i=t.$el=Rn(t.el);t.el!==e.el&&i.addClass(e.className||"dgtable-wrapper"),i.data("control",t).data("dgtable",t),i.on("remove",(()=>t.destroy())),o.onMouseMoveResizeAreaBound=this._onMouseMoveResizeArea.bind(this),o.onEndDragColumnHeaderBound=this._onEndDragColumnHeader.bind(this),o.onTableScrolledHorizontallyBound=this._onTableScrolledHorizontally.bind(this),this.$el.on("dragend",o.onEndDragColumnHeaderBound),o.tableSkeletonNeedsRendering=!0,r.virtualTable=void 0===e.virtualTable||!!e.virtualTable,r.estimatedRowHeight=void 0===e.estimatedRowHeight?40:e.estimatedRowHeight,r.rowsBufferSize=e.rowsBufferSize||3,r.minColumnWidth=Math.max(e.minColumnWidth||35,0),r.resizeAreaWidth=e.resizeAreaWidth||8,r.resizableColumns=void 0===e.resizableColumns||!!e.resizableColumns,r.movableColumns=void 0===e.movableColumns||!!e.movableColumns,r.sortableColumns=void 0===e.sortableColumns?1:parseInt(e.sortableColumns,10)||1,r.adjustColumnWidthForSortArrow=void 0===e.adjustColumnWidthForSortArrow||!!e.adjustColumnWidthForSortArrow,r.convertColumnWidthsToRelative=void 0!==e.convertColumnWidthsToRelative&&!!e.convertColumnWidthsToRelative,r.autoFillTableWidth=void 0!==e.autoFillTableWidth&&!!e.autoFillTableWidth,r.cellClasses=void 0===e.cellClasses?"":e.cellClasses,r.resizerClassName=void 0===e.resizerClassName?"dgtable-resize":e.resizerClassName,r.tableClassName=void 0===e.tableClassName?"dgtable":e.tableClassName,r.allowCellPreview=void 0===e.allowCellPreview||e.allowCellPreview,r.allowHeaderCellPreview=void 0===e.allowHeaderCellPreview||e.allowHeaderCellPreview,r.cellPreviewClassName=void 0===e.cellPreviewClassName?"dgtable-cell-preview":e.cellPreviewClassName,r.cellPreviewAutoBackground=void 0===e.cellPreviewAutoBackground||e.cellPreviewAutoBackground,r.onComparatorRequired=void 0===e.onComparatorRequired?null:e.onComparatorRequired,r.onComparatorRequired||"function"!=typeof e.comparatorCallback||(r.onComparatorRequired=e.comparatorCallback),r.width=void 0===e.width?kn.Width.NONE:e.width,r.relativeWidthGrowsToFillWidth=void 0===e.relativeWidthGrowsToFillWidth||!!e.relativeWidthGrowsToFillWidth,r.relativeWidthShrinksToFillWidth=void 0!==e.relativeWidthShrinksToFillWidth&&!!e.relativeWidthShrinksToFillWidth,this.setCellFormatter(e.cellFormatter),this.setHeaderCellFormatter(e.headerCellFormatter),this.setFilter(e.filter),r.height=e.height,t.setColumns(e.columns||[],!1);let n=[];if(e.sortColumn){let t=e.sortColumn;if(t&&!Array.isArray(t)&&(t=[t]),t)for(let e=0,r=t.length;e<r;e++){let r=t[e];"string"==typeof r&&(r={column:r,descending:!1});let i=o.columns.get(r.column);i&&n.push({column:r.column,comparePath:i.comparePath||i.dataPath,descending:r.descending})}}o.rows=new dn({sortColumn:n}),o.rows.onComparatorRequired=(e,t,o)=>{if(r.onComparatorRequired)return r.onComparatorRequired(e,t,o)},o.filteredRows=null,this._setupHovers()},kn.prototype._setupHovers=function(){const e=this,t=e.p;let r=function(t){let r=t.fromElement||t.relatedTarget;r===this||Rn.contains(this,r)||this.__previewCell&&(r===this.__previewCell||Rn.contains(this.__previewCell,r))||e._cellMouseOverEvent.call(e,this)},o=function(t){let r=(t=t||event).toElement||t.relatedTarget;r===this||Rn.contains(this,r)||this.__previewCell&&(r===this.__previewCell||Rn.contains(this.__previewCell,r))||e._cellMouseOutEvent.call(e,this)};t._bindCellHoverIn=function(e){e[Fn]||e.addEventListener("mouseover",e[Fn]=r.bind(e))},t._unbindCellHoverIn=function(e){e[Fn]&&(e.removeEventListener("mouseover",e[Fn]),e[Fn]=null)},t._bindCellHoverOut=function(e){return e[An]||e.addEventListener("mouseout",e[An]=o.bind(e.__cell||e)),this},t._unbindCellHoverOut=function(e){return e[An]&&(e.removeEventListener("mouseout",e[An]),e[An]=null),this}},kn.prototype._setupVirtualTable=function(){const e=this,t=e.p,r=e.o,o=r.tableClassName,i=o+"-row",n=o+"-row-alt",l=o+"-cell";let s=t.visibleColumns,a=s.length;t.notifyRendererOfColumnsConfig=()=>{s=t.visibleColumns,a=s.length;for(let e,t=0;t<a;t++)e=s[t],e._finalWidth=e.actualWidthConsideringScrollbarWidth||e.actualWidth},t.virtualListHelper=new fn({list:t.table,itemsParent:t.tbody,autoVirtualWrapperWidth:!1,virtual:!0,buffer:r.rowsBufferSize,estimatedItemHeight:r.estimatedRowHeight||40,itemElementCreatorFn:()=>Nn("div"),onItemRender:(r,o)=>{const d=t.filteredRows||t.rows,u=!!t.filteredRows,h=t.allowCellPreview;r.className=i,o%2==1&&(r.className+=" "+n);let c=d[o],p=u?c.__i:o;r.rowIndex=o,r.physicalRowIndex=p;for(let e=0;e<a;e++){let o=s[e],i=Nn("div");i.columnName=o.name,i.setAttribute("data-column",o.name),i.className=l,i.style.width=o._finalWidth+"px",o.cellClasses&&(i.className+=" "+o.cellClasses),h&&t._bindCellHoverIn(i),i.appendChild(Nn("div")).innerHTML=this._getHtmlForCell(c,o),r.appendChild(i)}r.addEventListener("click",r[Mn]=t=>{e.trigger("rowclick",t,o,p,r,c)}),e.trigger("rowcreate",o,p,r,c)},onItemUnrender:t=>{t[Mn]&&t.removeEventListener("click",t[Mn]),e._unbindCellEventsForRow(t),e.trigger("rowdestroy",t)}}),t.virtualListHelper.setCount(t.rows.length),t.notifyRendererOfColumnsConfig()},kn.prototype.on=function(e,t){let r=this.p.events;return"function"!=typeof t||(Tn.call(r,e)||(r[e]=[]),r[e].push({cb:t,once:!1})),this},kn.prototype.once=function(e,t){let r=this.p.events;return"function"!=typeof t||(Tn.call(r,e)||(r[e]=[]),r[e].push({cb:t,once:!0})),this},kn.prototype.off=function(e,t){let r=this.p.events;if(!Tn.call(r,e))return this;let o=r[e];for(let e=0;e<o.length;e++){let r=o[e];t&&r.cb!==t||o.splice(e--,1)}return this},kn.prototype.trigger=function(e){const t=this.p;if(!t)return;let r=t.events;if(Tn.call(r,e)){let t=r[e];for(let e=0;e<t.length;e++){let r=t[e];r.once&&t.splice(e--,1),r.cb.apply(this,Array.prototype.slice.call(arguments,1))}}return this},kn.prototype._parseColumnWidth=function(e,t){let r=Math.max(0,parseFloat(e)),o=Ln.AUTO;return r>0&&(e===r+"%"?(o=Ln.RELATIVE,r/=100):r>0&&r<1?o=Ln.RELATIVE:(r<t&&(r=t),o=Ln.ABSOLUTE)),{width:r,mode:o}},kn.prototype._initColumnFromData=function(e){let t=this._parseColumnWidth(e.width,e.ignoreMin?0:this.o.minColumnWidth),r={name:e.name,label:void 0===e.label?e.name:e.label,width:t.width,widthMode:t.mode,resizable:void 0===e.resizable||e.resizable,sortable:void 0===e.sortable||e.sortable,movable:void 0===e.movable||e.movable,visible:void 0===e.visible||e.visible,cellClasses:void 0===e.cellClasses?this.o.cellClasses:e.cellClasses,ignoreMin:void 0!==e.ignoreMin&&!!e.ignoreMin};return r.dataPath=void 0===e.dataPath?r.name:e.dataPath,r.comparePath=void 0===e.comparePath?r.dataPath:e.comparePath,"string"==typeof r.dataPath&&(r.dataPath=r.dataPath.split(".")),"string"==typeof r.comparePath&&(r.comparePath=r.comparePath.split(".")),r},kn.prototype.close=kn.prototype.remove=kn.prototype.destroy=function(){var e;let t=this,r=t.p||{},o=t.$el;if(t.__removed)return t;if(r.$resizer&&(r.$resizer.remove(),r.$resizer=null),null===(e=r.virtualListHelper)||void 0===e||e.destroy(),r.virtualListHelper=null,this._destroyHeaderCells(),r.virtualListHelper.destroy(),r.$table&&r.$table.empty(),r.$tbody&&r.$tbody.empty(),r.workerListeners){for(let e=0;e<r.workerListeners.length;e++){let t=r.workerListeners[e];t.worker.removeEventListener("message",t.listener,!1)}r.workerListeners.length=0}r.rows.length=r.columns.length=0,r._deferredRender&&clearTimeout(r._deferredRender);for(let e in t)Tn.call(t,e)&&(t[e]=null);return t.__removed=!0,o&&o.remove(),this},kn.prototype._unbindCellEventsForTable=function(){const e=this.p;if(e.headerRow)for(let t=0,r=e.headerRow.childNodes,o=r.length;t<o;t++)for(let o=0,i=r[t].childNodes,n=i.length;o<n;o++)e._unbindCellHoverIn(i[o]);return this},kn.prototype._unbindCellEventsForRow=function(e){const t=this.p;for(let r=0,o=e.childNodes,i=o.length;r<i;r++)t._unbindCellHoverIn(o[r]);return this},kn.prototype.render=function(){const e=this.o,r=this.p;if(!this.el.offsetParent)return r._deferredRender||(r._deferredRender=setTimeout((()=>{r._deferredRender=null,!this.__removed&&this.el.offsetParent&&this.render()}))),this;if(!0===r.tableSkeletonNeedsRendering){r.tableSkeletonNeedsRendering=!1,e.width===kn.Width.AUTO&&this._clearSortArrows();let o=r.table&&r.table.parentNode?r.table.scrollTop:NaN,i=r.table&&r.table.parentNode?t.getScrollHorz(r.table):NaN;this._renderSkeletonBase()._renderSkeletonBody().tableWidthChanged(!0,!1)._renderSkeletonHeaderCells(),r.virtualListHelper.invalidate(),this._updateLastCellWidthFromScrollbar(!0),this._updateTableWidth(!0);for(let e=0;e<r.rows.sortColumn.length;e++)this._showSortArrow(r.rows.sortColumn[e].column,r.rows.sortColumn[e].descending);e.adjustColumnWidthForSortArrow&&r.rows.sortColumn.length?this.tableWidthChanged(!0):e.virtualTable||this.tableWidthChanged(),isNaN(o)||(r.table.scrollTop=o),isNaN(i)||(t.setScrollHorz(r.table,i),t.setScrollHorz(r.header,i)),this.trigger("renderskeleton")}return r.virtualListHelper.render(),this.trigger("render"),this},kn.prototype.clearAndRender=function(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},kn.prototype._calculateTbodyWidth=function(){const e=this.p;let t,o,i,n=this.o.tableClassName,l=n+"-row",s=n+"-cell",a=e.visibleColumns,d=a.length,u=Rn("<div>").addClass(l).css("float","left"),h=0;for(o=0;o<d;o++)i=a[o],t=Nn("div"),t.className=s,t.style.width=i.actualWidth+"px",i.cellClasses&&(t.className+=" "+i.cellClasses),t.appendChild(Nn("div")),u.append(t),h+=i.actualWidth;let c=Rn("<div>").addClass(this.el.className).css({"z-index":-1,position:"absolute",left:"0",top:"-9999px",float:"left",width:"1px",overflow:"hidden"}).append(Rn("<div>").addClass(n).append(Rn("<div>").addClass(n+"-body").css("width",h+1e4).append(u)));c.appendTo(document.body);let p=Rn('<div style="border:1.5px solid #000;width:0;height:0;position:absolute;left:0;top:-9999px">').appendTo(document.body),m=parseFloat(p.css("border-width")),f=Math.round(m)!==m;p.remove();let g=r.getElementWidth(u[0],!0,!0,!0);return g-=e.scrollbarWidth||0,f&&g++,c.remove(),g},kn.prototype.setColumns=function(e,t){const r=this.p;e=e||[];let o=new cn;for(let t=0,r=0;t<e.length;t++){let i=e[t],n=this._initColumnFromData(i);void 0!==i.order?(i.order>r&&(r=i.order+1),n.order=i.order):n.order=r++,o.push(n)}return o.normalizeOrder(),r.columns=o,r.visibleColumns=o.getVisibleColumns(),this._ensureVisibleColumns().clearAndRender(t),this},kn.prototype.addColumn=function(e,t,r){const o=this.p;let i=o.columns;if(e&&!i.get(e.name)){let n=null;void 0!==t&&(n=i.get(t)||i.getByOrder(t));let l=this._initColumnFromData(e);l.order=n?n.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(),o.visibleColumns=i.getVisibleColumns(),this._ensureVisibleColumns().clearAndRender(r),this.trigger("addcolumn",l.name)}return this},kn.prototype.removeColumn=function(e,t){const r=this.p;let o=r.columns,i=o.indexOf(e);return i>-1&&(o.splice(i,1),o.normalizeOrder(),r.visibleColumns=o.getVisibleColumns(),this._ensureVisibleColumns().clearAndRender(t),this.trigger("removecolumn",e)),this},kn.prototype.setCellFormatter=function(e){return e||((e=e=>"string"==typeof e?an(e):e)[Pn]=!0),this.o.cellFormatter=e,this},kn.prototype.setHeaderCellFormatter=function(e){return this.o.headerCellFormatter=e||function(e){return"string"==typeof e?an(e):e},this},kn.prototype.setFilter=function(e){return this.o.filter=e,this},kn.prototype.filter=function(e){const t=this.p;let r=this.o.filter||En;"string"==typeof arguments[0]&&"string"==typeof arguments[1]&&(e={column:arguments[0],keyword:arguments[1],caseSensitive:arguments[2]});let o=!!t.filteredRows;return t.filteredRows&&(t.filteredRows=null),t.filterArgs=null==e?null:"object"!=typeof e||Array.isArray(e)?e:Rn.extend({},e),null!==t.filterArgs?(t.filteredRows=t.rows.filteredCollection(r,t.filterArgs),(o||t.filteredRows)&&(this.clearAndRender(),this.trigger("filter",e))):(t.filterArgs=null,t.filteredRows=null,this.clearAndRender(),this.trigger("filterclear",{})),this},kn.prototype.clearFilter=function(){const e=this.p;return e.filteredRows&&(e.filterArgs=null,e.filteredRows=null,this.clearAndRender(),this.trigger("filterclear",{})),this},kn.prototype._refilter=function(){const e=this.p;if(e.filteredRows&&e.filterArgs){let t=this.o.filter||En;e.filteredRows=e.rows.filteredCollection(t,e.filterArgs)}return this},kn.prototype.setColumnLabel=function(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[0].firstChild.childNodes.length;e++){let t=r.element[0].firstChild.childNodes[e];if(3===t.nodeType){t.textContent=r.label;break}}return this},kn.prototype.moveColumn=function(e,t,r=!0){const o=this.o,i=this.p;let n,l,s=i.columns,a=r?i.visibleColumns:s.getColumns();if("string"==typeof e?n=s.get(e):"number"==typeof e&&(n=a[e]),"string"==typeof t?l=s.get(t):"number"==typeof t&&(l=a[t]),n&&l&&e!==t){let e=n.order,t=l.order,r=s.moveColumn(n,l).getVisibleColumns();if(i.visibleColumns.length!==r.length||i.visibleColumns.some(((e,t)=>e!==r[t])))if(i.visibleColumns=r,this._ensureVisibleColumns(),o.virtualTable)this.clearAndRender()._updateLastCellWidthFromScrollbar(!0);else{let r=i.$headerRow.find(">div."+o.tableClassName+"-header-cell"),n=e<t?t+1:t,l=e;r[0].parentNode.insertBefore(r[l],r[n]);let s=i.visibleColumns[e];s=(s.actualWidthConsideringScrollbarWidth||s.actualWidth)+"px";let a=i.visibleColumns[t];a=(a.actualWidthConsideringScrollbarWidth||a.actualWidth)+"px";let d=i.tbody.childNodes;for(let r=0,o=d.length;r<o;r++){let o=d[r];1===o.nodeType&&(o.insertBefore(o.childNodes[l],o.childNodes[n]),o.childNodes[t].firstChild.style.width=a,o.childNodes[e].firstChild.style.width=s)}}this.trigger("movecolumn",n.name,e,t)}return this},kn.prototype.sort=function(e,t,r){const o=this.o,i=this.p;let n,l=i.columns.get(e),s=i.rows.sortColumn;if(l){if(s.length&&s[s.length-1].column===e&&(t=void 0===t?!s[s.length-1].descending:t),r){for(let e=0;e<s.length;e++)if(s[e].column===l.name){e<s.length-1?s.length=0:s.splice(s.length-1,1);break}(o.sortableColumns>0&&s.length>=o.sortableColumns||s.length>=i.visibleColumns.length)&&(s.length=0)}else s.length=0;t=void 0!==t&&t,s.push({column:l.name,comparePath:l.comparePath||l.dataPath,descending:!!t})}else s.length=0;this._clearSortArrows();for(let e=0;e<s.length;e++)this._showSortArrow(s[e].column,s[e].descending);o.adjustColumnWidthForSortArrow&&!i.tableSkeletonNeedsRendering&&this.tableWidthChanged(!0),i.rows.sortColumn=s,s.length&&(n=i.rows.sort(!!i.filteredRows),i.filteredRows&&i.filteredRows.sort(!!i.filteredRows)),i.virtualListHelper.invalidate().render();let a=[];for(let e=0;e<s.length;e++)a.push({column:s[e].column,descending:s[e].descending});return this.trigger("sort",a,!0,n),this},kn.prototype.resort=function(){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);let o;e.rows.sortColumn=r,r.length&&(o=e.rows.sort(!!e.filteredRows),e.filteredRows&&e.filteredRows.sort(!!e.filteredRows));let i=[];for(let e=0;e<r.length;e++)i.push({column:r[e].column,descending:r[e].descending});this.trigger("sort",i,!1,o)}return this},kn.prototype._ensureVisibleColumns=function(){const e=this.p;return 0===e.visibleColumns.length&&e.columns.length&&(e.columns[0].visible=!0,e.visibleColumns.push(e.columns[0]),this.trigger("showcolumn",e.columns[0].name)),this},kn.prototype.setColumnVisible=function(e,t){const r=this.p;let o=r.columns.get(e);return t=!!t,o&&!!o.visible!==t&&(o.visible=t,r.visibleColumns=r.columns.getVisibleColumns(),this.trigger(t?"showcolumn":"hidecolumn",e),this._ensureVisibleColumns(),this.clearAndRender()),this},kn.prototype.isColumnVisible=function(e){let t=this.p.columns.get(e);return!!t&&t.visible},kn.prototype.setMinColumnWidth=function(e){let t=this.o;return e=Math.max(e,0),t.minColumnWidth!==e&&(t.minColumnWidth=e,this.tableWidthChanged(!0)),this},kn.prototype.getMinColumnWidth=function(){return this.o.minColumnWidth},kn.prototype.setSortableColumns=function(e){const t=this.p,r=this.o;if(r.sortableColumns!==e&&(r.sortableColumns=e,t.$table)){let e=t.$headerRow.find(">div."+r.tableClassName+"-header-cell");for(let o=0;o<e.length;o++)Rn(e[0])[r.sortableColumns>0&&t.visibleColumns[o].sortable?"addClass":"removeClass"]("sortable")}return this},kn.prototype.getSortableColumns=function(){return this.o.sortableColumns},kn.prototype.setMovableColumns=function(e){let t=this.o;return e=void 0===e||!!e,t.movableColumns!==e&&(t.movableColumns=e),this},kn.prototype.getMovableColumns=function(){return this.o.movableColumns},kn.prototype.setResizableColumns=function(e){let t=this.o;return e=void 0===e||!!e,t.resizableColumns!==e&&(t.resizableColumns=e),this},kn.prototype.getResizableColumns=function(){return this.o.resizableColumns},kn.prototype.setComparatorCallback=function(e){let t=this.o;return t.onComparatorRequired!==e&&(t.onComparatorRequired=e),this},kn.prototype.setColumnWidth=function(e,t){let r=this.p.columns.get(e),o=this._parseColumnWidth(t,r.ignoreMin?0:this.o.minColumnWidth);if(r){let e=this._serializeColumnWidth(r);r.width=o.width,r.widthMode=o.mode;let t=this._serializeColumnWidth(r);e!==t&&this.tableWidthChanged(!0),this.trigger("columnwidth",r.name,e,t)}return this},kn.prototype.getColumnWidth=function(e){let t=this.p.columns.get(e);return t?this._serializeColumnWidth(t):null},kn.prototype.getColumnConfig=function(e){let t=this.p.columns.get(e);return t?{order:t.order,width:this._serializeColumnWidth(t),visible:t.visible,label:t.label}:null},kn.prototype.getColumnsConfig=function(){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},kn.prototype.getSortedColumns=function(){const e=this.p;let t=[];for(let r=0;r<e.rows.sortColumn.length;r++){let o=e.rows.sortColumn[r];t.push({column:o.column,descending:o.descending})}return t},kn.prototype.getHtmlForRowCell=function(e,t){const r=this.p;if(e<0||e>r.rows.length-1)return null;let o=r.columns.get(t);if(!o)return null;let i=r.rows[e];return this._getHtmlForCell(i,o)},kn.prototype.getHtmlForRowDataCell=function(e,t){let r=this.p.columns.get(t);return r?this._getHtmlForCell(e,r):null},kn.prototype._getHtmlForCell=function(e,t){let r=t.dataPath,o=e[r[0]];for(let e=1;e<r.length&&null!=o;e++)o=o&&o[r[e]];const i=this.o.cellFormatter;let n;if(i[Pn])n=i(o,t.name,e);else try{n=i(o,t.name,e)}catch(e){n="[ERROR]",console.error("Failed to generate content for cell "+t.name,e)}return null==n&&(n=""),n},kn.prototype.getRowYPos=function(e){return this.p.virtualListHelper.getItemPosition(e)||null},kn.prototype.getDataForRow=function(e){const t=this.p;return e<0||e>t.rows.length-1?null:t.rows[e]},kn.prototype.getRowCount=function(){const e=this.p;return e.rows?e.rows.length:0},kn.prototype.getIndexForRow=function(e){return this.p.rows.indexOf(e)},kn.prototype.getFilteredRowCount=function(){const e=this.p;return(e.filteredRows||e.rows).length},kn.prototype.getIndexForFilteredRow=function(e){const t=this.p;return(t.filteredRows||t.rows).indexOf(e)},kn.prototype.getDataForFilteredRow=function(e){const t=this.p;return e<0||e>(t.filteredRows||t.rows).length-1?null:(t.filteredRows||t.rows)[e]},kn.prototype.getHeaderRowElement=function(){return this.p.headerRow},kn.prototype._horizontalPadding=function(e){return(parseFloat(Rn.css(e,"padding-left"))||0)+(parseFloat(Rn.css(e,"padding-right"))||0)},kn.prototype._horizontalBorderWidth=function(e){return(parseFloat(Rn.css(e,"border-left"))||0)+(parseFloat(Rn.css(e,"border-right"))||0)},kn.prototype._calculateWidthAvailableForColumns=function(){const e=this.o,t=this.p;let o,i,n;t.table&&(i=t.table?t.table.scrollTop:0,n=t.table?t.table.scrollLeft:0,e.virtualTable&&(o=t.table.style.display,t.table.style.display="none"));let l=r.getElementWidth(this.$el[0]);t.table&&(e.virtualTable&&(t.table.style.display=o),t.table.scrollTop=i,t.table.scrollLeft=n,t.header.scrollLeft=n);let s=e.tableClassName,a=Rn("<div>").addClass(this.el.className).css({"z-index":-1,position:"absolute",left:"0",top:"-9999px"}),d=Rn("<div>").addClass(s+"-header").appendTo(a),u=Rn("<div>").addClass(s+"-header-row").appendTo(d);for(let e=0;e<t.visibleColumns.length;e++)u.append(Rn("<div><div></div></div>").addClass(s+"-header-cell").addClass(t.visibleColumns[e].cellClasses||""));a.appendTo(document.body),l-=this._horizontalBorderWidth(u[0]);let h=u.find(">div."+s+"-header-cell");for(let e=0;e<h.length;e++){let t=Rn(h[e]);"border-box"===t.css("boxSizing")||(l-=(parseFloat(t.css("border-right-width"))||0)+(parseFloat(t.css("border-left-width"))||0)+this._horizontalPadding(t[0]))}return a&&a.remove(),Math.max(0,l)},kn.prototype.tableWidthChanged=function(){let e=function(e){let t,o=this.o.tableClassName,i=Rn("<div>").addClass(this.$el).append(Rn("<div>").addClass(o+"-header").append(Rn("<div>").addClass(o+"-header-row").append(t=Rn("<div>").addClass(o+"-header-cell").append(Rn("<div>").text(e))))).css({position:"absolute",top:"-9999px",visibility:"hidden"});i.appendTo(document.body);let n=r.getElementWidth(t[0]);return i.remove(),n},t=null;return function(r,o){let i=this.o,n=this.p,l=this._calculateWidthAvailableForColumns(),s=l,a=0;if(!n.$table)return this;o=void 0===o||o;let d=0;if(n.tbody||(o=!1),o&&(d=parseFloat(n.tbody.style.minWidth)||0),s!==t||r){var u;t=l;let r=0,h=[],c=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 o=n.visibleColumns[t];if(o.widthMode===Ln.ABSOLUTE){let e=o.width;e+=o.arrowProposedWidth||0,!o.ignoreMin&&e<i.minColumnWidth&&(e=i.minColumnWidth),s-=e,r+=e,e!==o.actualWidth&&(o.actualWidth=e,h.push(t))}else if(o.widthMode===Ln.AUTO){let n=e.call(this,o.label)+20;n+=o.arrowProposedWidth||0,!o.ignoreMin&&n<i.minColumnWidth&&(n=i.minColumnWidth),s-=n,r+=n,n!==o.actualWidth&&(o.actualWidth=n,i.convertColumnWidthsToRelative||h.push(t))}else o.widthMode===Ln.RELATIVE&&(c+=o.width,a++)}if(i.convertColumnWidthsToRelative)for(let e=0;e<n.visibleColumns.length;e++){let t=n.visibleColumns[e];t.widthMode===Ln.AUTO&&(t.widthMode=Ln.RELATIVE,s+=t.actualWidth,t.width=t.actualWidth/r,c+=t.width,a++)}if(a&&(c<1&&i.relativeWidthGrowsToFillWidth||c>1&&i.relativeWidthShrinksToFillWidth))for(let e=0;e<n.visibleColumns.length;e++){let t=n.visibleColumns[e];t.widthMode===Ln.RELATIVE&&(t.width/=c)}let p=Math.max(0,s);0===p&&(p=n.table.clientWidth);let m=i.minColumnWidth/p;if(isNaN(m)&&(m=0),m>0){let e,t=0;for(let e=0;e<n.visibleColumns.length;e++){let r=n.visibleColumns[e];r.widthMode===Ln.RELATIVE&&!r.ignoreMin&&r.width<m&&(t+=m-r.width,r.width=m)}for(let r=0;r<n.visibleColumns.length;r++){let o=n.visibleColumns[r];o.widthMode===Ln.RELATIVE&&!o.ignoreMin&&o.width>m&&t>0&&(e=Math.min(t,o.width-m),o.width-=e,t-=e)}}if(i.autoFillTableWidth&&s>0){let e=0,t=s;for(let r=0;r<n.visibleColumns.length;r++){let o=n.visibleColumns[r];o.resizable||o.widthMode!==Ln.ABSOLUTE||(e+=o.width),o.widthMode===Ln.RELATIVE&&(t-=Math.round(p*o.width))}let r=(l-e)/(l-t-e)||NaN;for(let e=0;e<n.visibleColumns.length&&t>0;e++){let t=n.visibleColumns[e];if(t.resizable||t.widthMode!==Ln.ABSOLUTE)if(t.widthMode===Ln.RELATIVE)t.width*=r;else{let o=t.actualWidth*r;t.actualWidth!==o&&(t.actualWidth=o,-1===h.indexOf(e)&&h.push(e))}}}for(let e=0;e<n.visibleColumns.length;e++){let t=n.visibleColumns[e];if(t.widthMode===Ln.RELATIVE){let r=Math.round(p*t.width);s-=r,a--,0===a&&1===s&&(r++,s--),-1===s&&(r--,s++),r!==t.actualWidth&&(t.actualWidth=r,h.push(e))}}if(n.visibleColumns.length&&(n.visibleColumns[n.visibleColumns.length-1].actualWidthConsideringScrollbarWidth=n.visibleColumns[n.visibleColumns.length-1].actualWidth-(n.scrollbarWidth||0)),null===(u=n.notifyRendererOfColumnsConfig)||void 0===u||u.call(n),o){let e=this._calculateTbodyWidth();d<e&&this._updateTableWidth(!1);for(let e=0;e<h.length;e++)this._resizeColumnElements(h[e]);d>e&&this._updateTableWidth(!1)}}return this}}(),kn.prototype.tableHeightChanged=function(){let e=this,t=e.o,o=e.p;if(!o.$table)return e;let i=r.getElementHeight(e.$el[0],!0)-(parseFloat(o.$table.css("border-top-width"))||0)-(parseFloat(o.$table.css("border-bottom-width"))||0);return i!==t.height&&(t.height=i,o.tbody&&(o.tbody.style.height=Math.max(t.height-r.getElementHeight(o.$headerRow[0],!0,!0,!0),1)+"px"),t.virtualTable&&e.clearAndRender()),e},kn.prototype.addRows=function(e,t,r,o){let i=this.p;return"boolean"==typeof t&&(o=r,r=t,t=-1),"number"!=typeof t&&(t=-1),(t<0||t>i.rows.length)&&(t=i.rows.length),o=void 0===o||!!o,e&&(i.rows.add(e,t),i.filteredRows||r&&i.rows.sortColumn.length?(r&&i.rows.sortColumn.length?this.resort():this._refilter(),i.tableSkeletonNeedsRendering=!0,o&&this.render()):o&&(i.virtualListHelper.addItemsAt(e.length,t),this.o.virtualTable?this._updateVirtualHeight()._updateLastCellWidthFromScrollbar().render()._updateTableWidth(!1):i.tbody&&this.render()._updateLastCellWidthFromScrollbar()._updateTableWidth(!0)),this.trigger("addrows",e.length,!1)),this},kn.prototype.removeRows=function(e,t,r){let o=this.p;return"number"!=typeof t||t<=0||e<0||e>o.rows.length-1||(o.rows.splice(e,t),r=void 0===r||!!r,o.filteredRows?(this._refilter(),o.tableSkeletonNeedsRendering=!0,r&&this.render()):r&&(o.virtualListHelper.removeItemsAt(t,e),this.o.virtualTable?this._updateVirtualHeight()._updateLastCellWidthFromScrollbar().render()._updateTableWidth(!1):this.render()._updateLastCellWidthFromScrollbar()._updateTableWidth(!0))),this},kn.prototype.removeRow=function(e,t){return this.removeRows(e,1,t)},kn.prototype.refreshRow=function(e){let t=this.p;if(e<0||e>t.rows.length-1)return this;let r=-1;return t.filteredRows&&-1===(r=t.filteredRows.indexOf(t.rows[e]))||(-1===r&&(r=e),t.virtualListHelper.refreshItemAt(r)),this},kn.prototype.getRowElement=function(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]))?this:(-1===r&&(r=e),t.virtualListHelper.getItemElementAt(r)||null)},kn.prototype.refreshAllVirtualRows=function(){return this.p.virtualListHelper.invalidate().render(),this},kn.prototype.setRows=function(e,t){let r=this.p;return r.rows.reset(e),t&&r.rows.sortColumn.length?this.resort():this._refilter(),this.clearAndRender().trigger("addrows",e.length,!0),this},kn.prototype.getUrlForElementContent=function(e){let t,r=document.getElementById(e);if(r){let e=r.textContent;if("function"==typeof Blob)t=new Blob([e]);else{let r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(!r)return null;let o=new r;o.append(e),t=o.getBlob()}return(window.URL||window.webkitURL).createObjectURL(t)}return null},kn.prototype.isWorkerSupported=function(){return window.Worker instanceof Function},kn.prototype.createWebWorker=function(e,t,r){if(this.isWorkerSupported()){let o=this,i=o.p,n=new Worker(e),l=function(e){e.data.append?o.addRows(e.data.rows,r):o.setRows(e.data.rows,r)};return n.addEventListener("message",l,!1),i.workerListeners||(i.workerListeners=[]),i.workerListeners.push({worker:n,listener:l}),(t||void 0===t)&&n.postMessage(null),n}return null},kn.prototype.unbindWebWorker=function(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},kn.prototype.abortCellPreview=function(){return this.hideCellPreview(),this},kn.prototype.cancelColumnResize=function(){const e=this.p;return e.$resizer&&(e.$resizer.remove(),e.$resizer=null,Rn(document).off("mousemove.dgtable",e.onMouseMoveResizeAreaBound).off("mouseup.dgtable",e.onEndDragColumnHeaderBound)),this},kn.prototype._onTableScrolledHorizontally=function(){const e=this.p;e.header.scrollLeft=e.table.scrollLeft},kn.prototype._getColumnByResizePosition=function(e){let t=this.o,o=this._isTableRtl(),i=Rn(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName),n=i[0];n.__cell&&(n=n.__cell,i=Rn(n));let l=i[0].previousSibling;for(;l&&1!==l.nodeType;)l=l.previousSibling;let s=!l,a=((null!=e.pageX?e.pageX:e.originalEvent.pageX)||e.originalEvent.clientX)-i.offset().left;if(o){if(!s&&r.getElementWidth(i[0],!0,!0,!0)-a<=t.resizeAreaWidth/2)return l.columnName;if(a<=t.resizeAreaWidth/2)return n.columnName}else{if(!s&&a<=t.resizeAreaWidth/2)return l.columnName;if(r.getElementWidth(i[0],!0,!0,!0)-a<=t.resizeAreaWidth/2)return n.columnName}return null},kn.prototype._onTouchStartColumnHeader=function(e){const t=this.p;if(t.currentTouchId)return;let r=e.originalEvent.changedTouches[0];t.currentTouchId=r.identifier;let o,i=Rn(e.currentTarget),n={x:r.pageX,y:r.pageY},l=n,s=function(){t.currentTouchId=null,i.off("touchend").off("touchcancel"),clearTimeout(o)},a=function(t){let r=Rn.Event(t),o=Array.prototype.slice.call(arguments,1);for(let t of["target","clientX","clientY","offsetX","offsetY","screenX","screenY","pageX","pageY","which"]){r[t]=e[t];for(let e=0;e<o.length;e++)null!=o[e][t]&&(r[t]=o[e][t])}return r};i.trigger(a("mousedown",e.originalEvent.changedTouches[0],{which:1,target:e.target})),o=setTimeout((()=>{s(),i.one("touchend",(e=>{zn(e)||e.preventDefault(),i.off("touchend").off("touchcancel")})).one("touchcancel",(e=>{i.off("touchend").off("touchcancel")})),Math.sqrt(Math.pow(Math.abs(l.x-n.x),2)+Math.pow(Math.abs(l.y-n.y),2))<9&&(this.cancelColumnResize(),i.trigger(a("mouseup",e.originalEvent.changedTouches[0],{which:3,target:e.target})))}),500),i.on("touchend",(e=>{let r=sn(e.originalEvent.changedTouches,(e=>e.identifier===t.currentTouchId));r&&(s(),zn(e)||e.preventDefault(),l={x:r.pageX,y:r.pageY},(Math.sqrt(Math.pow(Math.abs(l.x-n.x),2)+Math.pow(Math.abs(l.y-n.y),2))<9||t.$resizer)&&(i.trigger(a("mouseup",r,{which:1,target:e.target})),i.trigger(a("click",r,{which:1,target:e.target}))))})).on("touchcancel",(()=>{s()})).on("touchmove",(e=>{let r=sn(e.originalEvent.changedTouches,(e=>e.identifier===t.currentTouchId));r&&(l={x:r.pageX,y:r.pageY},t.$resizer&&(e.preventDefault(),i.trigger(a("mousemove",r,{target:e.target}))))}))},kn.prototype._onMouseDownColumnHeader=function(e){if(1!==e.which)return this;let t=this.o,o=this.p,i=this._getColumnByResizePosition(e);if(i){let n=o.columns.get(i);if(!t.resizableColumns||!n||!n.resizable)return!1;let l=this._isTableRtl();o.$resizer&&Rn(o.$resizer).remove(),o.$resizer=Rn("<div></div>").addClass(t.resizerClassName).css({position:"absolute",display:"block","z-index":-1,visibility:"hidden",width:"2px",background:"#000",opacity:.7}).appendTo(this.$el);let s=n.element,a=o.$resizer.parent(),d=s.offset(),u=a.offset();8===xn&&(d=s.offset()),u.left+=parseFloat(a.css("border-left-width"))||0,u.top+=parseFloat(a.css("border-top-width"))||0,d.left-=u.left,d.top-=u.top,d.top-=parseFloat(s.css("border-top-width"))||0;let h=r.getElementWidth(o.$resizer[0],!0,!0,!0);l?(d.left-=Math.ceil((parseFloat(s.css("border-left-width"))||0)/2),d.left-=Math.ceil(h/2)):(d.left+=r.getElementWidth(s[0],!0,!0,!0),d.left+=Math.ceil((parseFloat(s.css("border-right-width"))||0)/2),d.left-=Math.ceil(h/2)),o.$resizer.css({"z-index":"10",visibility:"visible",left:d.left,top:d.top,height:r.getElementHeight(this.$el[0])})[0].columnName=s[0].columnName;try{o.$resizer[0].style.zIndex=""}catch(e){}Rn(document).on("mousemove.dgtable",o.onMouseMoveResizeAreaBound),Rn(document).on("mouseup.dgtable",o.onEndDragColumnHeaderBound),e.preventDefault()}},kn.prototype._onMouseMoveColumnHeader=function(e){let t=this.o,r=this.p;if(t.resizableColumns){let o=this._getColumnByResizePosition(e),i=Rn(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName)[0];o&&r.columns.get(o).resizable?i.style.cursor="e-resize":i.style.cursor=""}},kn.prototype._onMouseUpColumnHeader=function(e){if(3===e.which){let t=this.o,o=Rn(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName),i=o.offset();i.width=r.getElementWidth(o[0],!0,!0,!0),i.height=r.getElementHeight(o[0],!0,!0,!0),this.trigger("headercontextmenu",o[0].columnName,e.pageX,e.pageY,i)}return this},kn.prototype._onMouseLeaveColumnHeader=function(e){let t=this.o;Rn(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName)[0].style.cursor=""},kn.prototype._onClickColumnHeader=function(e){if(!zn(e)&&!this._getColumnByResizePosition(e)){let t=this,r=t.o,o=t.p,i=Rn(e.target).closest("div."+r.tableClassName+"-header-cell,div."+r.cellPreviewClassName)[0];if(r.sortableColumns){let e=o.columns.get(i.columnName);e&&e.sortable&&this.sort(i.columnName,void 0,!0).render()}}},kn.prototype._onStartDragColumnHeader=function(e){let t=this.o,r=this.p;if(t.movableColumns){let o=Rn(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName),i=r.columns.get(o[0].columnName);i&&i.movable?(o[0].style.opacity=.35,r.dragId=161061273*Math.random(),e.originalEvent.dataTransfer.setData("text",JSON.stringify({dragId:r.dragId,column:i.name}))):e.preventDefault()}else e.preventDefault()},kn.prototype._onMouseMoveResizeArea=function(e){let t=this.p,o=t.columns.get(t.$resizer[0].columnName),i=this._isTableRtl(),n=o.element,l=t.$resizer.parent(),s=n.offset(),a=l.offset();a.left+=parseFloat(l.css("border-left-width"))||0,s.left-=a.left;let d=r.getElementWidth(t.$resizer[0],!0,!0,!0),u="border-box"===n.css("box-sizing"),h=e.pageX-a.left,c=s.left;c-=Math.ceil(d/2),i?(c+=r.getElementWidth(n[0],!0,!0,!0),c-=o.ignoreMin?0:this.o.minColumnWidth,u||(c-=Math.ceil((parseFloat(n.css("border-left-width"))||0)/2),c-=this._horizontalPadding(n[0])),h>c&&(h=c)):(c+=o.ignoreMin?0:this.o.minColumnWidth,u||(c+=Math.ceil((parseFloat(n.css("border-right-width"))||0)/2),c+=this._horizontalPadding(n[0])),h<c&&(h=c)),t.$resizer.css("left",h+"px")},kn.prototype._onEndDragColumnHeader=function(e){let t=this.o,o=this.p;if(o.$resizer){Rn(document).off("mousemove.dgtable",o.onMouseMoveResizeAreaBound).off("mouseup.dgtable",o.onEndDragColumnHeaderBound);let i=o.columns.get(o.$resizer[0].columnName),n=this._isTableRtl(),l=i.element,s=o.$resizer.parent(),a=l.offset(),d=s.offset();d.left+=parseFloat(s.css("border-left-width"))||0,a.left-=d.left;let u=r.getElementWidth(o.$resizer[0],!0,!0,!0),h="border-box"===l.css("box-sizing"),c=e.pageX-d.left,p=a.left,m=a.left,f=0;p-=Math.ceil(u/2),n?(h||(c+=this._horizontalPadding(l[0]),c+=parseFloat(l.css("border-left-width"))||0,c+=parseFloat(l.css("border-right-width"))||0),p+=r.getElementWidth(l[0],!0,!0,!0),m=p-(i.ignoreMin?0:this.o.minColumnWidth),c>m&&(c=m),f=p-c):(h||(c-=this._horizontalPadding(l[0]),c-=parseFloat(l.css("border-left-width"))||0,c-=parseFloat(l.css("border-right-width"))||0),m=p+(i.ignoreMin?0:this.o.minColumnWidth),c<m&&(c=m),f=c-p),o.$resizer.remove(),o.$resizer=null;let g=f;if(i.widthMode===Ln.RELATIVE){let e=this._calculateWidthAvailableForColumns(),r=0,n=0;for(let t=0;t<o.visibleColumns.length;t++){let l=o.visibleColumns[t];l.name!==i.name&&(l.widthMode===Ln.RELATIVE?(r+=l.width,n++):e-=l.actualWidth)}if(e=Math.max(1,e),g=f/e,n>0){let e=g/((1-g)/r);r+=g,(r<1&&t.relativeWidthGrowsToFillWidth||r>1&&t.relativeWidthShrinksToFillWidth)&&(g=e)}g*=100,g+="%"}this.setColumnWidth(i.name,g)}else e.target.style.opacity=null},kn.prototype._onDragEnterColumnHeader=function(e){let t=this.o,r=this.p;if(t.movableColumns){let o=e.originalEvent.dataTransfer.getData("text");o=o?JSON.parse(o):null;let i=Rn(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName);if(!o||r.dragId===o.dragId&&i.columnName!==o.column){let e=r.columns.get(i[0].columnName);e&&(e.movable||e!==r.visibleColumns[0])&&Rn(i).addClass("drag-over")}}},kn.prototype._onDragOverColumnHeader=function(e){e.preventDefault()},kn.prototype._onDragLeaveColumnHeader=function(e){let t=this.o,r=Rn(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName);Rn(r[0].firstChild).has(e.originalEvent.relatedTarget).length||r.removeClass("drag-over")},kn.prototype._onDropColumnHeader=function(e){e.preventDefault();let t=this.o,r=this.p,o=JSON.parse(e.originalEvent.dataTransfer.getData("text")),i=Rn(e.target).closest("div."+t.tableClassName+"-header-cell,div."+t.cellPreviewClassName);if(t.movableColumns&&o.dragId===r.dragId){let e=o.column,t=i[0].columnName,n=r.columns.get(e),l=r.columns.get(t);n&&l&&n.movable&&(l.movable||l!==r.visibleColumns[0])&&this.moveColumn(e,t)}Rn(i).removeClass("drag-over")},kn.prototype._clearSortArrows=function(){let e=this.p;if(e.$table){let t=this.o.tableClassName,r=e.$headerRow.find(">div."+t+"-header-cell.sorted"),o=r.find(">div>.sort-arrow");o.each(((t,r)=>{let o=e.columns.get(r.parentNode.parentNode.columnName);o&&(o.arrowProposedWidth=0)})),o.remove(),r.removeClass("sorted").removeClass("desc")}return this},kn.prototype._showSortArrow=function(e,t){let r=this.p.columns.get(e);if(!r)return!1;let o=Nn("span");return o.className="sort-arrow",r.element&&(r.element.addClass(t?"sorted desc":"sorted"),r.element[0].firstChild.insertBefore(o,r.element[0].firstChild.firstChild)),r.widthMode!==Ln.RELATIVE&&this.o.adjustColumnWidthForSortArrow&&(r.arrowProposedWidth=o.scrollWidth+(parseFloat(Rn(o).css("margin-right"))||0)+(parseFloat(Rn(o).css("margin-left"))||0)),this},kn.prototype._resizeColumnElements=function(e){let t=this.p,r=t.$headerRow.find("div."+this.o.tableClassName+"-header-cell"),o=t.columns.get(r[e].columnName);if(o){r[e].style.width=(o.actualWidthConsideringScrollbarWidth||o.actualWidth)+"px";let i=(o.actualWidthConsideringScrollbarWidth||o.actualWidth)+"px",n=t.tbody.childNodes;for(let t=0,r=n.length;t<r;t++){let r=n[t];1===r.nodeType&&(r.childNodes[e].style.width=i)}}return this},kn.prototype._destroyHeaderCells=function(){let e=this.o,t=this.p;return t.$headerRow&&(this.trigger("headerrowdestroy",t.headerRow),t.$headerRow.find("div."+e.tableClassName+"-header-cell").remove(),t.$headerRow=null,t.headerRow=null),this},kn.prototype._renderSkeletonBase=function(){var e;let t=this,o=t.p,i=t.o;null===(e=o.virtualListHelper)||void 0===e||e.destroy(),o.virtualListHelper=null,o.$table&&i.virtualTable&&(o.$table.remove(),o.$table=o.table=o.$tbody=o.tbody=null),t._destroyHeaderCells(),o.currentTouchId=null,o.$header&&o.$header.remove();let n=i.tableClassName,l=Nn("div"),s=Rn(l),a=Nn("div"),d=Rn(a);return l.className=n+"-header",a.className=n+"-header-row",o.$header=s,o.header=l,o.$headerRow=d,o.headerRow=a,d.appendTo(o.$header),s.prependTo(this.$el),On(t.$el),i.width===kn.Width.SCROLL?this.el.style.overflow="hidden":this.el.style.overflow="",!i.height&&i.virtualTable&&(i.height=r.getElementHeight(this.$el[0],!0)),this},kn.prototype._renderSkeletonHeaderCells=function(){let e,t=this,r=t.p,o=t.o,i=o.allowCellPreview,n=o.allowHeaderCellPreview,l=o.tableClassName+"-header-cell",s=r.headerRow;Hn&&(e=function(e){return e.preventDefault(),this.dragDrop(),!1});let a=function(e){e.preventDefault()};for(let d=0;d<r.visibleColumns.length;d++){let u=r.visibleColumns[d];if(u.visible){let h=Nn("div"),c=Rn(h);h.draggable=!0,h.className=l,h.style.width=u.actualWidth+"px",o.sortableColumns&&u.sortable&&(h.className+=" sortable"),h.columnName=u.name,h.setAttribute("data-column",u.name);let p=Nn("div");p.innerHTML=o.headerCellFormatter(u.label,u.name),h.appendChild(p),i&&n&&r._bindCellHoverIn(h),s.appendChild(h),r.visibleColumns[d].element=c,c.on("mousedown.dgtable",t._onMouseDownColumnHeader.bind(t)).on("mousemove.dgtable",t._onMouseMoveColumnHeader.bind(t)).on("mouseup.dgtable",t._onMouseUpColumnHeader.bind(t)).on("mouseleave.dgtable",t._onMouseLeaveColumnHeader.bind(t)).on("touchstart.dgtable",t._onTouchStartColumnHeader.bind(t)).on("dragstart.dgtable",t._onStartDragColumnHeader.bind(t)).on("click.dgtable",t._onClickColumnHeader.bind(t)).on("contextmenu.dgtable",a),Rn(p).on("dragenter.dgtable",t._onDragEnterColumnHeader.bind(t)).on("dragover.dgtable",t._onDragOverColumnHeader.bind(t)).on("dragleave.dgtable",t._onDragLeaveColumnHeader.bind(t)).on("drop.dgtable",t._onDropColumnHeader.bind(t)),Hn&&c.on("selectstart.dgtable",e.bind(h)),c.css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"})}}return this.trigger("headerrowcreate",s),this},kn.prototype._renderSkeletonBody=function(){let e=this,t=e.p,o=e.o,i=o.tableClassName;if(!t.$table){let n=document.createDocumentFragment(),l=Nn("div"),s=Rn(l);l.className=i,o.virtualTable&&(l.className+=" virtual");let a=o.height-r.getElementHeight(t.$headerRow[0],!0,!0,!0);"border-box"!==s.css("box-sizing")&&(a-=parseFloat(s.css("border-top-width"))||0,a-=parseFloat(s.css("border-bottom-width"))||0,a-=parseFloat(s.css("padding-top"))||0,a-=parseFloat(s.css("padding-bottom"))||0),t.visibleHeight=a,l.style.height=o.height?a+"px":"auto",l.style.display="block",l.style.overflowY="auto",l.style.overflowX=o.width===kn.Width.SCROLL?"auto":"hidden",n.appendChild(l);let d=Nn("div"),u=Rn(d);d.className=o.tableClassName+"-body",d.style.minHeight="1px",t.table=l,t.tbody=d,t.$table=s,t.$tbody=u,On(u),On(s),l.appendChild(d),e.el.appendChild(n),this._setupVirtualTable()}return this},kn.prototype._renderSkeleton=function(){return this},kn.prototype._updateVirtualHeight=function(){const e=this.o,t=this.p;return t.tbody?(e.virtualTable?t.tbody.style.height=t.virtualListHelper.estimateFullHeight()+"px":t.tbody.style.height="",this):this},kn.prototype._updateLastCellWidthFromScrollbar=function(e){const t=this.p;let r=t.table.offsetWidth-t.table.clientWidth;if(r!==t.scrollbarWidth||e){var o;t.scrollbarWidth=r;for(let e=0;e<t.columns.length;e++)t.columns[e].actualWidthConsideringScrollbarWidth=null;if(t.scrollbarWidth>0&&t.visibleColumns.length>0){let e=t.visibleColumns.length-1;t.visibleColumns[e].actualWidthConsideringScrollbarWidth=t.visibleColumns[e].actualWidth-t.scrollbarWidth;let r=t.visibleColumns[e].actualWidthConsideringScrollbarWidth+"px",o=t.tbody.childNodes;for(let t=0,i=o.length;t<i;t++){let i=o[t];1===i.nodeType&&(i.childNodes[e].style.width=r)}t.headerRow.childNodes[e].style.width=r}null===(o=t.notifyRendererOfColumnsConfig)||void 0===o||o.call(t)}return this},kn.prototype._updateTableWidth=function(e){const t=this.o,o=this.p;let i=this._calculateTbodyWidth();if(o.tbody.style.minWidth=i+"px",o.headerRow.style.minWidth=i+(o.scrollbarWidth||0)+"px",o.$table.off("scroll",o.onTableScrolledHorizontallyBound),t.width===kn.Width.AUTO)r.setElementWidth(o.$table[0],r.getElementWidth(o.tbody,!0,!0,!0)),r.setElementWidth(this.$el[0],r.getElementWidth(o.$table[0],!0,!0,!0));else if(t.width===kn.Width.SCROLL){if(e){let e=o.table?o.table.scrollTop:0,t=o.table?o.table.scrollLeft:0;!function(e){let t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}(this.el),o.table.scrollTop=e,o.table.scrollLeft=t,o.header.scrollLeft=t}o.$table.on("scroll",o.onTableScrolledHorizontallyBound)}return this},kn.prototype._isTableRtl=function(){return"rtl"===this.p.$table.css("direction")},kn.prototype._serializeColumnWidth=function(e){return e.widthMode===Ln.AUTO?"auto":e.widthMode===Ln.RELATIVE?100*e.width+"%":e.width},kn.prototype._cellMouseOverEvent=function(e){const t=this.o,o=this.p;let i=e.firstChild;if(i.scrollWidth-i.clientWidth>1||i.scrollHeight-i.clientHeight>1){this.hideCellPreview(),o.abortCellPreview=!1;let n=Rn(e),l=Rn(i);const s=e.parentNode;let a=Nn("div"),d=Rn(a);a.innerHTML=e.innerHTML,a.className=t.cellPreviewClassName;let u=n.hasClass(t.tableClassName+"-header-cell");u&&(a.className+=" header",n.hasClass("sortable")&&(a.className+=" sortable"),a.draggable=!0,Rn(a).on("mousedown",this._onMouseDownColumnHeader.bind(this)).on("mousemove",this._onMouseMoveColumnHeader.bind(this)).on("mouseup",this._onMouseUpColumnHeader.bind(this)).on("mouseleave",this._onMouseLeaveColumnHeader.bind(this)).on("touchstart",this._onTouchStartColumnHeader.bind(this)).on("dragstart",this._onStartDragColumnHeader.bind(this)).on("click",this._onClickColumnHeader.bind(this)).on("contextmenu.dgtable",(function(e){e.preventDefault()})),Rn(a.firstChild).on("dragenter",this._onDragEnterColumnHeader.bind(this)).on("dragover",this._onDragOverColumnHeader.bind(this)).on("dragleave",this._onDragLeaveColumnHeader.bind(this)).on("drop",this._onDropColumnHeader.bind(this)),Hn&&Rn(a).on("selectstart",function(e){return e.preventDefault(),this.dragDrop(),!1}.bind(a)));let h=parseFloat(n.css("padding-left"))||0,c=parseFloat(n.css("padding-right"))||0,p=parseFloat(n.css("padding-top"))||0,m=parseFloat(n.css("padding-bottom"))||0,f=i.scrollWidth+(e.clientWidth-i.offsetWidth),g="border-box"===n.css("box-sizing");if(g?d.css("box-sizing","border-box"):(f-=h+c,d.css("margin-top",parseFloat(Rn(e).css("border-top-width"))||0)),!o.transparentBgColor1){let e=document.createElement("div");e.style.backgroundColor="transparent",o.transparentBgColor1=Rn(e).css("background-color"),e.style.backgroundColor="rgba(0,0,0,0)",o.transparentBgColor2=Rn(e).css("background-color")}let b={"box-sizing":g?"border-box":"content-box",width:f,"min-height":r.getElementHeight(n[0]),"padding-left":h,"padding-right":c,"padding-top":p,"padding-bottom":m,overflow:"hidden",position:"absolute","z-index":"-1",left:"0",top:"0",cursor:n.css("cursor")};if(b){let t=Rn(e).css("background-color");t!==o.transparentBgColor1&&t!==o.transparentBgColor2||(t=Rn(s).css("background-color")),t!==o.transparentBgColor1&&t!==o.transparentBgColor2||(t="#fff"),b["background-color"]=t}d.css(b),this.el.appendChild(a),Rn(a.firstChild).css({direction:l.css("direction"),"white-space":l.css("white-space")}),u&&d.css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none"}),a.rowIndex=s.rowIndex;let v=a.physicalRowIndex=s.physicalRowIndex;a.columnName=o.visibleColumns[In.call(s.childNodes,e)].name;try{let t=pn.saveSelection(e);t&&pn.restoreSelection(a,t)}catch(e){}if(this.trigger("cellpreview",a.firstChild,null==v?null:v,a.columnName,null==v?null:o.rows[v],e),o.abortCellPreview)return void d.remove();null!=v&&a.addEventListener("click",(e=>{this.trigger("rowclick",e,s.rowIndex,v,s,o.rows[v])}));let C=this.$el,y=C[0]===window?Rn(document):C,w=n.offset(),_=C.offset(),W="right"===n.css("float"),E=W?"right":"left";if(W){let e=Rn(window).width();w.right=e-(w.left+r.getElementWidth(n[0],!0,!0,!0)),_.right=e-(_.left+r.getElementWidth(C[0],!0,!0,!0))}w.left-=parseFloat(C.css("border-left-width"))||0,w.right-=parseFloat(C.css("border-right-width"))||0,w.top-=parseFloat(C.css("border-top-width"))||0,w[E]+=parseFloat(Rn(e).css("border-"+E+"-width"))||0,w.top+=parseFloat(Rn(e).css("border-top-width"))||parseFloat(Rn(e).css("border-bottom-width"))||0,w.left-=_.left,w.right-=_.right,w.top-=_.top;let I=0,R=C-r.getElementWidth(d[0],!0,!0,!0);w[E]=w[E]<I?I:w[E]>R?R:w[E];let S=r.getElementHeight(n[0],!0,!0,!0),x=y.scrollTop()+r.getElementHeight(C[0],!0)-S;w.top>x&&(w.top=Math.max(0,x));let H={top:w.top,"z-index":9999};H[E]=w[E],d.css(H),a.__cell=e,o.$cellPreviewCell=d,e.__previewCell=a,o._bindCellHoverOut(e),o._bindCellHoverOut(a),d.on("wheel",(()=>{this.hideCellPreview()}))}},kn.prototype._cellMouseOutEvent=function(e){this.hideCellPreview()},kn.prototype.hideCellPreview=function(){const e=this.p;if(e.$cellPreviewCell){let t,r=e.$cellPreviewCell[0],o=r.__cell;try{t=pn.saveSelection(r)}catch(e){}e.$cellPreviewCell.remove(),e._unbindCellHoverOut(o),e._unbindCellHoverOut(r);try{t&&pn.restoreSelection(o,t)}catch(e){}this.trigger("cellpreviewdestroy",r.firstChild,r.physicalRowIndex,r.columnName,o),o.__previewCell=null,r.__cell=null,e.$cellPreviewCell=null,e.abortCellPreview=!1}else e.abortCellPreview=!0;return this};const Ln={AUTO:0,ABSOLUTE:1,RELATIVE:2};kn.Width={NONE:"none",AUTO:"auto",SCROLL:"scroll"},Rn.controls||(Rn.controls={}),Rn.controls.dgtable=kn,module.exports=kn;
6
6
 
7
7
  //# sourceMappingURL=jquery.dgtable.cjs.min.js.map